4b70a87171976c860b9489440e6dc1237cea570f342a3bd7689d8081efaa4d99

Source Code:

(function(x){var f=window.AmazonUIPageJS||window.P,r=f._namespace||f.attributeErrors,e=r?r("NavSharedAssets",""):f;e.guardFatal?e.guardFatal(x)(e,window):e.execute(function(){x(e,window)})})(function(x,f,r){(function(e){if(!e.$Nav||e.$Nav._replay){document.createElement("header");var b=function(){this.data={}},d=function(b){d.manager.add(b)};b.arrayAdder=function(b){return function(){this.data[b]=(this.data[b]||[]).concat([].slice.call(arguments));return this}};b.prototype={build:function(b,a){this.data.name=
b;this.data.value=a;this.data.immediate=!1;this.data.process=!0;d.manager.add(this.data)},run:function(b,a){a&&(this.data.name=b);this.data.value=a||b;this.data.process=!0;d.manager.add(this.data)},publish:function(b,a){this.data.name=b;this.data.value=a;d.manager.publish(this.data)},declare:function(b,a){this.data.name=b;this.data.value=a;d.manager.add(this.data)},when:b.arrayAdder("when"),iff:b.arrayAdder("iff"),filter:b.arrayAdder("filter"),observe:b.arrayAdder("observe")};var k=function(a){d[a]=
function(){var c=new b;return c[a].apply(c,arguments)}},a;for(a in b.prototype)b.prototype.hasOwnProperty(a)&&k(a);d.make=function(){return d};d.getNow=function(b,a){return d.manager.get(b,a)};d.stats=function(b){return d.manager.stats(b)};d.importEvent=function(b,a){a=a||{};a.name=b;d.manager.importEvent(a)};d.manager={pending:[],add:function(b){this.pending.push({m:"add",data:b})},publish:function(b){this.pending.push({m:"publish",data:b})},importEvent:function(b){this.pending.push({m:"importEvent",
data:b})},get:function(b,a){return a},stats:function(){return{}}};if(e.$Nav&&e.$Nav.make&&e.$Nav.make._shims){k=function(a){for(var c=new b,k=0;k<a.length;k++){var e=a[k];if("importEvent"===e.m){a=e.a[1]||{};a.name=e.a[0];d.manager.importEvent(a);break}else if(!c[e.m])break;c[e.m].apply(c,e.a)}};a=e.$Nav.make._shims;for(var c=0;c<a.length;c++){for(var f=0;f<a[c]._replay.length;f++)k(a[c]._replay[f]);for(var h in a[c])a[c].hasOwnProperty(h)&&d.hasOwnProperty(h)&&(a[c][h]=d[h])}}e.$Nav=d}})(f);(function(e,
b,d,k){if((b=e.$Nav)&&b.manager&&b.manager.pending){var a=d.now||function(){return+new d},c=function(b){return"function"===typeof b},f="object"===typeof e.P&&"function"===typeof e.P.when&&"function"===typeof e.P.register&&"function"===typeof e.P.execute,h="object"===typeof e.AmazonUIPageJS&&"function"===typeof e.AmazonUIPageJS.when&&"function"===typeof e.AmazonUIPageJS.register&&"function"===typeof e.AmazonUIPageJS.execute,g=function(b,a){a=a||{};var c=a.start||50,d=function(){c<=(a.max||2E4)&&!b()&&
(setTimeout(d,c),c*=a.factor||2)};return d},p=function(b,a){if(1===arguments.length&&"string"===typeof b)p({message:"rcx-nav: "+b});else if(e.console&&e.console.error&&e.console.error(b,a),e.ueLogError)e.ueLogError(b,a);else throw b;},l=function(b,a){try{return b()}catch(c){"object"===typeof a&&(a.message=a.message||c.message,a.message="rcx-nav: "+a.message),p(c,a)}},u=function(){function b(){return setTimeout(c,0)}function c(){for(var e=b(),f=a();d.length;)if(d.shift()(),50<a()-f)return;clearTimeout(e);
k=!1}var d=[],k=!1;try{/OS 6_[0-9]+ like Mac OS X/i.test(navigator.userAgent)&&e.addEventListener&&e.addEventListener("scroll",b,!1)}catch(f){}return function(a){d.push(a);k||(b(),k=!0)}}(),n=function(){var b={};return{run:function(a){if(b[a]instanceof Array)for(var c=0;c<b[a].length;c++)b[a][c]();b[a]=!0},add:function(a,c){for(var d=1,k=function(){0>=--d&&u(c)},e=a.length;e--;)!0!==b[a[e]]&&((b[a[e]]=b[a[e]]||[]).push(k),d++);k()}}},v=function(a){a=a||{};this.context=a.context||e;this.once=a.once||
!1;this.async=a.async||!1;this.observers=[];this.notifyCount=0;this.notifyArgs=[]};v.prototype={notify:function(){this.notifyCount++;if(!(this.once&&1<this.notifyCount)){this.notifyArgs=[].slice.call(arguments);for(var a=0;a<this.observers.length;a++)this._run(this.observers[a])}},observe:function(a){if(c(a))if(this.once&&this.isNotified())this._run(a);else return this.observers.push(a),this.observers.length-1},remove:function(a){return-1<a&&a<this.observers.length?(this.observers[a]=function(){},
!0):!1},boundObserve:function(){var a=this;return function(){a.observe.apply(a,arguments)}},isNotified:function(){return 0<this.notifyCount},_run:function(a){var b=this.notifyArgs,c=this.context;this.async?u(function(){a.apply(c,b)}):a.apply(c,b)}};var w=function(){var b={},d=0,w={},p=n(),t={},q=function(b){this.data={name:"nav:"+d++,group:"rcx-nav",value:null,result:null,immediate:!0,process:!1,override:!1,resolved:!1,watched:!1,context:w,when:[],iff:[],filter:[],observe:[],stats:{defined:a(),resolved:-1,
buildStarted:-1,buildCompleted:-1,callCount:0,executionTime:0}};for(var c in b)b.hasOwnProperty(c)&&(this.data[c]=b[c]);-1<this.data.name.indexOf("]")&&(b=this.data.name.split("]"),2===b.length&&1<b[0].length&&0<b[1].length&&(this.data.name=b[1],this.data.group=b[0].replace("[","")))};q.prototype={getDependencyNames:function(){for(var b=[].concat(this.data.when,this.data.filter),a=0;a<this.data.iff.length;a++)"string"===typeof this.data.iff[a]?b.push(this.data.iff[a]):this.data.iff[a].name&&b.push(this.data.iff[a].name);
return b},checkIff:function(a){a=function(a){a="string"===typeof a?{name:a}:a;var c=b[a.name];if(!c||!c.data.resolved)return!1;var c=c.getResult(),c=a.prop&&c?c[a.prop]:c,d=a.value||!0;switch(a.op||"truthy"){case "truthy":return!!c;case "falsey":return!c;case "eq":return c===d;case "ne":return c!==d;case "gt":return c>d;case "lt":return c<d;case "gte":return c>=d;case "lte":return c<=d}return!1};for(var c=0;c<this.data.iff.length;c++)if(!a(this.data.iff[c]))return!1;return!0},watchModule:function(a){var d=
this;t[a]||(t[a]=new v);t[a].observe(function(){var a=d.getResult();if(c(a))return a.apply(d.data.context,arguments)});b[a]&&b[a].applyObserverWrapper()},applyObserverWrapper:function(){var a=this;if(t[this.data.name]&&!this.data.watched&&this.data.resolved&&this.data.result){if(c(this.data.result)){var b=this.data.result;this.data.result=function(){var c=b.apply(a.data.context,arguments);t[a.data.name].notify(c)};for(var d in b)b.hasOwnProperty(d)&&(this.data.result[d]=b[d])}this.data.watched=!0}},
applyFilterWrapper:function(){var a=this;if(0!==this.data.filter.length&&c(this.data.result)){for(var d=[],k=[],e=0;e<this.data.filter.length;e++)if(b.hasOwnProperty(this.data.filter[e])){var f=b[this.data.filter[e]].getResult();c(f.request)&&d.push(f.request);c(f.response)&&k.push(f.response)}var g=function(b,c){for(var d=0;d<b.length;d++)if(c=b[d].call(a.data.context,c),!1===c)return!1;return c},h=this.data.result;this.data.result=function(a){if(!1!==(a=g(d,a))&&(a=h.call(w,a),!1!==(a=g(k,a))))return a}}},
execute:function(){if(this.checkIff()){for(var b=0;b<this.data.observe.length;b++)this.watchModule(this.data.observe[b]);p.run(this.data.name);this.data.resolved=!0;this.data.stats.resolved=a();this.data.immediate&&this.getResult()}},getResult:function(){var d=this,k=a();this.data.stats.callCount++;if(null!==this.data.result||!this.data.resolved)return this.data.result;this.data.stats.buildStarted=a();if(this.data.process){for(var e=[],f=0;f<this.data.when.length;f++)e.push(b.hasOwnProperty(this.data.when[f])?
b[this.data.when[f]].getResult():null);var g=this.data.group+":"+this.data.name;if("string"===typeof this.data.value){for(var h=this.data.when,f=0;f<h.length;f++){var m=h[f].indexOf(".");-1<m&&m<h[f].length&&(h[f]=h[f].substr(m+1));h[f]=h[f].replace(/[^0-9a-zA-Z_$]/g,"");h[f].length||(h[f]=String.fromCharCode(97+f))}this.data.value=l(new Function("return function ("+h.join(", ")+") { "+this.data.value+"};"),{attribution:g,logLevel:"ERROR",message:"$Nav module eval failed: "+g})}c(this.data.value)&&
(this.data.result=l(function(){return d.data.value.apply(d.data.context,e)},{attribution:g,logLevel:"ERROR",message:"$Nav module execution failed: "+g}))}else this.data.result=this.data.value;this.applyFilterWrapper();this.applyObserverWrapper();this.data.stats.buildCompleted=a();this.data.stats.executionTime+=a()-k;return this.data.result}};return{add:function(a){if(!b.hasOwnProperty(a.name)||a.override){var c=new q(a);b[c.data.name]=c;a=function(){c.execute()};var d=c.getDependencyNames();0===d.length?
u(a):p.add(d,a)}},publish:function(a){this.add(a);f?k.register(a.name,function(){return a.value}):h&&e.AmazonUIPageJS.register(a.name,function(){return a.value});e.amznJQ&&e.amznJQ.declareAvailable(a.name)},importEvent:function(a){var b=this;a=a||{};f&&k.when(a.name).execute("importEvent",function(c){c=void 0===c||null===c?a.otherwise:c;b.add({name:a.as||a.name,value:c})});if(e.amznJQ)e.amznJQ[a.useOnCompletion?"onCompletion":"available"](a.amznJQ||a.name,g(function(){var c;if(a.global){c=e;for(var d=
(a.global||"").split("."),k=0,f=d.length;k<f;k++)c&&d[k]&&(c=c[d[k]])}else c=a.otherwise;if(a.retry&&(void 0===c||null===c))return!1;b.add({name:a.as||a.name,value:c});return!0}))},get:function(a,c){return b[a]&&b[a].data.resolved?b[a].getResult():c},stats:function(a){var c={},d;for(d in b)if(b.hasOwnProperty(d)&&(!a||!b[d].data.resolved)){c[d]=b[d].data;c[d].blocked=[];for(var k=b[d].getDependencyNames(),e=0;e<k.length;e++)b[k[e]]&&b[k[e]].data.resolved||c[d].blocked.push(k[e])}return c}}}();if(b&&
b.manager&&b.manager.pending)for(var t=0;t<b.manager.pending.length;t++)w[b.manager.pending[t].m](b.manager.pending[t].data);b.manager=w;b.declare("now",a);b.declare("async",u);b.declare("eventGraph",n);b.declare("logError",function(a,b){b="rcx-nav: "+(b||"");a&&a.message?a.message=b+a.message:"object"===typeof a?a.message=b:a={message:b+a};e.console&&e.console.error&&e.console.error(a);if(e.ueLogError)e.ueLogError(a);else throw a;});b.declare("logUeError",p);b.declare("Observer",v);b.declare("isAuiP",
f);b.declare("isAuiPJS",h)}})(f,document,Date,x);(function(e){e.build("$F",function(){function b(b,a){this.up=b;this.action=a}function d(d){return function(){var a=[].slice.call(arguments);return new b(this,function(b){return d.apply(this,[b].concat(a))})}}b.prototype.noOp=function(){};b.prototype.on=function(b){b="function"===typeof b?b:function(){return b};return this.up?this.up.on(this.action(b)):b};b.prototype.run=function(b){return this.on(b)()};b.prototype.bind=d(function(b,a){return function(){return b.apply(a,
arguments)}});b.prototype.memoize=d(function(b){var a,c=!1;return function(){c||(c=!0,a=b.apply(this,arguments),b=null);return a}});b.prototype.once=d(function(b){var a=!1;return function(){if(!a){a=!0;var c=b.apply(this,arguments);b=null;return c}}});b.prototype.debounce=d(function(b,a,c){var d;return function(){var e,f=arguments,p=this;c&&!d&&(e=b.apply(p,f));d&&clearTimeout(d);d=setTimeout(function(){d=null;c||b.apply(p,f)},a);return e}});b.prototype.after=d(function(b,a,c){return function(){(c&&
0<a||!c&&0>=a)&&b();a--}});b.prototype.delay=d(function(b,a){var c=void 0===a?0:a;return function(){return setTimeout(b,c)}});b.prototype.partial=d(function(b){var a=Array.prototype.slice.call(arguments,1);return function(){return b.apply(this,a.concat([].slice.call(arguments)))}});b.prototype.rpartial=d(function(b){var a=Array.prototype.slice.call(arguments,1);return function(){return b.apply(this,[].slice.call(arguments).concat(a))}});b.prototype.throttle=d(function(b,a){function c(){e?(e=!1,setTimeout(c,
a),b()):d=!1}var d=!1,e=!1;return function(){d?e=!0:(d=!0,setTimeout(c,a),b())}});b.prototype.iff=d(function(b,a){return"function"===typeof a?function(){if(a())return b.apply(this,arguments)}:a?b:this.noOp});b.prototype.tap=d(function(b,a){var c=Array.prototype.slice.call(arguments,2);return function(){a.apply(this,c.concat([].slice.call(arguments)));return b.apply(this,arguments)}});return new b})})(f.$Nav);(function(e){e.when("$","now","async","Observer","debugStream","debug.param").build("data",
function(b,d,e,a,c,f){var h={},g=f.value("navDisableDataKey"),p={},l=null,u=null,n=new a({async:!0}),v=function(){c("Data Batch",p);n.notify(p);l=u=null;for(var a in p)p.hasOwnProperty(a)&&(h[a]=p[a]);p={}};a=function(a){g&&g in a&&delete a[g];c("Data Added",a);p=b.extend(p,a);u&&clearTimeout(u);l||(l=d());50<l-d()?v():u=setTimeout(v,10);return a};a.get=function(a){return h[a]};a.getCache=function(){return h};a.observe=function(a,b,d){var f=-1;b&&"function"===typeof b?(f=n.observe(function(d){a in
d&&(c("Data Observed",{name:a,data:d[a]}),b(d[a]))}),!d&&a in h&&e(function(){b(h[a])})):f=n.observe(a);return f};a.remove=function(a){return n.remove(a)};return a})})(f.$Nav);(function(e){e.when("log").build("metrics",function(b){return new function(){var d=this;this.count=function(d,a){if(f.ue&&f.ue.count){var c=f.ue.count(d);c||(c=0);a=c+a;f.ue.count(d,a);b("Nav-Metrics: Incremented "+d+" to "+a);return a}b("Nav-Metrics: UE not setup. Unable to send Metrics")};this.increment=function(b){return d.count(b,
1)};this.decrement=function(b){return d.count(b,-1)}}});e.build("managerStats",function(){return function(){var b={totalCallCount:0,totalExecutionTime:0},d=e.stats(),f;for(f in d)if(d.hasOwnProperty(f)){var a=d[f].stats;b.totalCallCount+=a.callCount;b.totalExecutionTime+=a.executionTime}return b}});e.when("metrics","managerStats","config","sharedconstants","page.ATF").run("jsMetrics.ATF",function(b,d,e,a){d=d();b.count(a.TIME_UP_TO+"ATF:"+e.navDeviceType,d.totalExecutionTime)});e.when("metrics","managerStats",
"config","sharedconstants","page.CF").run("jsMetrics.CF",function(b,d,e,a){d=d();b.count(a.TIME_UP_TO+"CF:"+e.navDeviceType,d.totalExecutionTime)});e.when("metrics","managerStats","config","sharedconstants","page.loaded").run("jsMetrics.PageLoaded",function(b,d,e,a){d=d();e=e.navDeviceType;b.count(a.TIME_UP_TO+"PageLoaded:"+e,d.totalExecutionTime);b.count(a.TOTAL_CALL_COUNT+"PageLoaded:"+e,d.totalCallCount)});e.when("metrics","config","sharedconstants","page.loaded").run("jsMetrics.collector",function(b,
d,e){var a=f.navmet;if(a!==r&&a.length!==r&&(d=d.navDeviceType,f.ue_t0!==r)){var c={},m=[],h,g;for(h=0;h<a.length;++h)g=a[h],c[g.key]!==r?(c[g.key].key=g.key,c[g.key].delta+=g.end-g.begin,c[g.key].completed=g.end-f.ue_t0,m[c[g.key].index]=r,c[g.key].index=h):c[g.key]={key:g.key,delta:g.end-g.begin,completed:g.end-f.ue_t0,index:h},m.push(g.key);a.basic&&(b.count(e.CSM_LATENCY_V2+":network:D:"+d,a.basic.networkLatency),b.count(e.CSM_LATENCY_V2+":navFirstPaint:D:"+d,a.basic.navFirstPaint),b.count(e.CSM_LATENCY_V2+
":NavStart:C:"+d,a.basic.NavStart));for(h=0;h<m.length;++h)m[h]!==r&&(g=c[m[h]],b.count(e.CSM_LATENCY_V2+":"+g.key+":D:"+d,g.delta),b.count(e.CSM_LATENCY_V2+":"+g.key+":C:"+d,g.completed))}});e.when("metrics","sharedconstants","config").run("metrics.csm",function(b,d,e){if(e=e.navDeviceType){var a={UpNavBanner:{since:"ue_t0",by:"nav_t_upnav_begin"},BeginNav:{since:"ue_t0",by:"nav_t_begin_nav"},InlineCSS:{since:"ue_t0",by:"nav_t_after_inline_CSS"},PreloadJS:{since:"ue_t0",by:"nav_t_after_preload_JS"},
PreloadSprite:{since:"ue_t0",by:"nav_t_after_preload_sprite"},ANI:{since:"ue_t0",by:"nav_t_after_ANI"},Config:{since:"ue_t0",by:"nav_t_after_config_declaration"},NavBar:{since:"ue_t0",by:"nav_t_after_navbar"},SearchBar:{since:"ue_t0",by:"nav_t_after_searchbar"},EndNav:{since:"ue_t0",by:"nav_t_end_nav"}},c;for(c in a)if(a.hasOwnProperty(c)){var m=a[c];if(m){var h=f[m.by],m=f[m.since];h&&m&&b.count(d.CSM_LATENCY+":"+c+":"+e,h-m)}}}})})(f.$Nav);(function(e){e.when("$").build("agent",function(b){var d=
function(){var a=Array.prototype.slice.call(arguments,0);return(new RegExp("("+a.join("|")+")","i")).test(navigator.userAgent)},e=!!("ontouchstart"in f)||d("\\bTouch\\b")||0<f.navigator.msMaxTouchPoints,a={iPhone:d("iPhone"),iPad:d("iPad"),kindleFire:d("Kindle Fire","Silk/"),android:d("Android"),windowsPhone:d("Windows Phone"),webkit:d("WebKit"),ie11:d("Trident/7"),ie10:d("MSIE 10"),ie7:d("MSIE 7"),ie6:b.browser?b.browser.msie&&6>=parseInt(b.browser.version,10):d("MSIE 6"),opera:d("Opera"),firefox:d("Firefox"),
mac:d("Macintosh"),iOS:d("iPhone")||d("iPad")};a.ie=b.browser?b.browser.msie:a.ie11||d("MSIE");a.touch=a.iPhone||a.iPad||a.android||a.kindleFire||e;a.quirks=a.ie&&document&&"CSS1Compat"!==document.compatMode;return a})})(f.$Nav);f.$Nav.declare("sharedconstants",{ADVANCED_PREFIX:"aj:",TIME_UP_TO:"NavJS:TimeUpTo:",CSM_LATENCY:"NavJS:CSM:Latency",CSM_LATENCY_V2:"Nav:CSM:Latency",TOTAL_CALL_COUNT:"NavJS:TotalCallCount:",DWELLTIME_MIN:200});(function(e){e.build("util.addCssRule",function(){var b=null;
return function(d,e,a){if(!b){var c=document.getElementsByTagName("head")[0];if(!c)return;var f=document.createElement("style");f.appendChild(document.createTextNode(""));c.appendChild(f);b=f.sheet||{}}b.insertRule?b.insertRule(d+"{"+e+"}",a):b.addRule&&b.addRule(d,e,a)}})})(f.$Nav);(function(e){e.build("getRefTag",function(){return function(b){if(b){b=b.split("?");var d=b[0].split("/ref\x3d");if(d[1])return d[1];if(b=b[1])return b=b.split("\x26").reduce(function(b,a){a=a.split("\x3d");return b[a[0]]=
a[1],b},{}),b.ref_||b.ref}}})})(f.$Nav);(function(e){e.when("config").build("signInRedirect",function(b){return function(d,e,a){if(!b.isRecognized&&!b.isBackup){var c=b.signInUrlWithRefTag;if(c){d="ref_%3D".concat(d);c=c.replace(/ref_%3DnavSignInUrlRefTagPlaceHolder/g,d);a&&(c=c.concat("\x26ref_%3D",a));location.href=c;return}}location.href=e}})})(f.$Nav);(function(e){e.when("$").run("hamburgerIosScrollSpy",function(b){var d;return{touchStartHandler:function(b){if(!b)return!1;d=b.touches[0].clientY},
touchMoveHandler:function(e){var a,c,f,h;if(!e||!d)return!1;a=e.touches[0].clientY;c=b(".hmenu.hmenu-visible");f=c[0].scrollHeight;h=c.scrollTop();c=c.outerHeight();a<d&&f-h<=c&&(d=r,e.cancelable&&e.preventDefault());a>d&&0>=h&&(d=r,e.cancelable&&e.preventDefault())},preventCurrentEvent:function(b){b.preventDefault()}}})})(f.$Nav);(function(e){e.when("$","metrics","getRefTag").build("bindFlyoutAnchorReftagMetrics",function(b,d,e){return function(a,c,f,h,g){0!==a.length&&a.each(function(){var a=b(this),
l=e(a.attr("href"));if(l){var u="Nav:"+c+"Flyout:"+g;f&&d.increment(u+"Impression:"+l);h&&a.click(function(){d.increment(u+"Click:"+l)})}})}})})(f.$Nav);(function(e){e.declare("util.getQueryString",function(){return f.location&&f.location.search?f.location.search:r});e.when("config","util.getQueryString").build("util.getQueryStringForHMenuAjax",function(b,d){return function(){return b.hasOwnProperty("isHMenuBrowserCacheDisable")&&!b.isHMenuBrowserCacheDisable?r:d()}})})(f.$Nav);(function(e,b){e.when("jQuery",
"hamburgerMenuInteractionJS","util.ajax","config","metrics","util.getQueryStringForHMenuAjax").build("HamburgerMenuFirstLayerAJAXCall",function(b,e,a,c,m,h){return function(g,p){function l(a){return"".concat(n?"navm":"nav",a)}function u(){b("#nav-hamburger-menu").attr("href","/gp/site-directory?ref\x3d".concat(l("_em_ajax_fail")))}var n="mobile"===g.toLowerCase();g=n||!0===c.desktopHMenuRefactor;var v={attribution:"AmazonNavigationCards",logLevel:"ERROR"};m.increment("".concat(n?"Navm":"Nav",":Hmenu:FirstLayerAjax"));
var w=Date.now(),t={ajaxTemplate:g?n?"hMenuFirstLayer":"hMenuDesktopFirstLayer":"hamburger",pageType:f.ue_pty?f.ue_pty:"NavUnknownPageType",hmDataAjaxHint:1,isFreshRegion:c.isFreshRegion,isFreshCustomer:n?c.isFreshCustomer:c.navfresh,isPrimeMember:n?c.isPrimeCustomer:c.isPrimeMember,isPrimeDay:n?c.isPrimeDay:c.primeDay,isSmile:c.isSmile,regionalStores:c.regionalStores,isBackup:c.isBackup,firstName:n?c.firstName:c.customerName,currentQueryString:h(),navDeviceType:c.navDeviceType,hashCustomerAndSessionId:c.hashCustomerAndSessionId,
isExportMode:c.isExportMode,environmentVFI:c.environmentVFI,languageCode:c.languageCode};a({retryMetric:l("-hmenu-ajax-retry"),errorMetric:l("-hmenu-ajax-error"),url:"/gp/navigation/ajax/generic.html",dataType:"html",cache:!c.isHMenuBrowserCacheDisable,data:t,error:function(a,b,c){a=" HamburgerMenu AJAX Call failed. RID: "+(f.ue&&f.ue.rid?f.ue.rid:r)+" Status Code : "+a.status+" Status text : "+b+" Exception : "+c+" Response text : "+a.responseText+"AJAX request data : "+JSON.stringify(t);f.ueLogError&&
(v.message=a,f.ueLogError(v));u()},success:function(a){a&&b(a).is("#hmenu-container")?(b("body").append(a),e(),"function"===typeof p&&p(),w&&m.count("".concat(n?"Navm":"Nav",":Hmenu:FirstLayerSuccessTotalTime"),Math.floor((Date.now()-w)/1E3))):(f.ueLogError&&(v.message=" HamburgerMenu Empty or Malformed AJAX response. AJAX Request Data: "+JSON.stringify(t)+(a?a.toString():" Empty html response."),f.ueLogError(v)),u())}})}})})(f.$Nav,x);(function(e){e.when("$","util.ajaxReftagLogger","metrics","config").run("hMenuItemClickHandler",
function(b,d,e,a){return function(c){function m(b,c,d){var g=h.children("ul.hmenu[data-menu-id\x3d"+c+"]");0===g.length?(e.increment("Navm:Hmenu:CustomerClickWithSelectedLayerError"),f.location="mobile"===a.navDeviceType?"/gp/site-directory?ref\x3dnavm_em_linktree_fail":"/gp/site-directory?ref\x3dnav_em_linktree_fail"):(b.removeClass("hmenu-translateX").bind("transitionend webkitTransitionEnd oTransitionEnd",function(){b.removeClass("hmenu-visible");b.removeClass("hmenu-transition").unbind("transitionend webkitTransitionEnd oTransitionEnd")}).addClass("hmenu-transition "+
(d?"hmenu-translateX-left":"hmenu-translateX-right")),g.removeClass(d?"hmenu-translateX-right":"hmenu-translateX-left").bind("transitionend webkitTransitionEnd oTransitionEnd",function(){g.removeClass("hmenu-transition").unbind("transitionend webkitTransitionEnd oTransitionEnd");if(d){var a=h.children("ul.hmenu.hmenu-hidden[data-parent-menu-id\x3d'"+c+"']");a&&a.removeClass("hmenu-hidden")}}).addClass("hmenu-visible hmenu-transition hmenu-translateX").scrollTop(0),h.attr("tabIndex",0).focus().removeAttr("tabIndex"))}
var h=b("#hmenu-content");c=b(c.currentTarget);var g=c.closest("ul.hmenu"),p="";if(c.data("menu-id"))return m(g,c.data("menu-id"),!0),(p=c.data("ref-tag"))&&d(c.data("ref-tag")),!1;if(c.hasClass("hmenu-back-button"))return m(g,g.data("parent-menu-id")),(p=c.data("ref-tag"))&&d(c.data("ref-tag")),!1}})})(f.$Nav);(function(e){e.when("$","metrics","util.ajaxReftagLogger","hamburgerIosScrollSpy","agent","hMenuItemClickHandler","hMenuCompressibleSectionsHandler","config","HamburgerMenuMainContentAJAXCall",
"hMenuUpdatedEvent").run("hamburgerMenuInteractionJS",function(b,d,k,a,c,m,h,g,p,l){return function(){function k(a){a.removeClass(q.transition).unbind("transitionend webkitTransitionEnd oTransitionEnd")}e.when("updateIcpReturnUrl").run("updateHamburgerMenuMozartUpdateUrl",function(a){a("#hmenu-icp-language")});var n=b("body"),v=b("#nav-hamburger-menu"),w=b("#hmenu-container"),t=b("#hmenu-canvas"),y=b("#hmenu-canvas-background"),r=b("#hmenu-content"),z=b("#hmenu-close-menu"),x=b("#a-page"),A;e.when("accountMenuCloseButton").run(function(a){a&&
a.length&&(z=a.clone(),z.prependTo(t),z.click(function(){y.click()}))});var q={transition:"hmenu-transition",visible:"hmenu-visible",translateX:"hmenu-translateX",translateXLeft:"hmenu-translateX-left",translateXRight:"hmenu-translateX-right",transparent:"hmenu-transparent",opaque:"hmenu-opaque",lockPosition:"lock-position"},B=document.getElementById("nav-hamburger-menu");B&&B.removeEventListener("click",f.navHamburgerMetricLogger);v.one("click",function(){f.ue_t0&&d.count("mobile"===g.navDeviceType?
"Navm:Hmenu:IconFirstClickTime":"Nav:Hmenu:IconFirstClickTime",Math.floor((Date.now()-f.ue_t0)/1E3));var a=e.getNow("navHMenuIconClickedNotReadyTimeStamp");d.count("mobile"===g.navDeviceType?"Navm:Hmenu:IconFirstClickWaitTime":"Nav:Hmenu:IconFirstClickWaitTime",a?Date.now()-a:0);t.bind("transitionend webkitTransitionEnd oTransitionEnd",function(){b("ul.hmenu[data-parent-menu-id\x3d'1']").removeClass("hmenu-hidden")});"mobile"!==g.navDeviceType&&!0!==g.desktopHMenuRefactor||p()});v.click(function(){r.children("ul.hmenu[data-menu-id\x3d'1']").addClass(q.visible);
w.addClass(q.visible);t.removeClass(q.translateXLeft).bind("transitionend webkitTransitionEnd oTransitionEnd",function(){k(t)}).addClass(q.transition+" "+q.translateX);y.removeClass(q.transparent).bind("transitionend webkitTransitionEnd oTransitionEnd",function(){k(y)}).addClass(q.transition+" "+q.opaque);A=f.scrollY;n.css({top:"-"+A+"px"});n.addClass(q.lockPosition);x.attr("aria-hidden","true");z.focus();"mobile"===g.navDeviceType&&c.iPhone&&(n[0].addEventListener("touchstart",a.touchStartHandler,
{passive:!1}),n[0].addEventListener("touchmove",a.touchMoveHandler,{passive:!1}),y.bind("touchmove",a.preventCurrentEvent));d.increment("mobile"===g.navDeviceType?"Navm:Hmenu:IconClickActionComplete":"Nav:Hmenu:IconClickActionComplete")});f.ue_t0&&d.count("mobile"===g.navDeviceType?"Navm:Hmenu:MenuAccessibleLatency":"Nav:Hmenu:MenuAccessibleLatency",Date.now()-f.ue_t0);y.click(function(e){if(e.target===this||e.target.parentElement===this)if(d.increment("mobile"===g.navDeviceType?"Navm:Hmenu:MenuAbandon":
"Nav:Hmenu:MenuAbandon"),y.removeClass(q.opaque).bind("transitionend webkitTransitionEnd oTransitionEnd",function(){k(y)}).addClass(q.transition+" "+q.transparent),t.removeClass(q.translateX).bind("transitionend webkitTransitionEnd oTransitionEnd",function(){w.removeClass(q.visible);r.children("ul.hmenu:not([data-menu-id\x3d'1'])").removeClass(q.translateX+" "+q.translateXLeft+" "+q.visible).addClass(q.translateXRight);r.children("ul.hmenu[data-menu-id\x3d'1']").removeClass(q.translateXLeft+" "+q.visible).scrollTop(0);
k(t)}).addClass(q.transition+" "+q.translateXLeft),x.removeAttr("aria-hidden"),"mobile"===g.navDeviceType&&c.iPhone&&(n[0].removeEventListener("touchstart",a.touchStartHandler),n[0].removeEventListener("touchmove",a.touchMoveHandler),y.unbind("touchmove",a.preventCurrentEvent)),n.attr("tabIndex",0).focus().removeAttr("tabIndex").removeClass(q.lockPosition),n.css("top",""),f.scrollTo(f.scrollX,A),"mobile"===g.navDeviceType){var h=n.is(".fixed-navbar");f.setTimeout(function(){h&&n.addClass("fixed-navbar")},
1)}else b(document).unbind("keyup.hamburgerEscape")});z.click(function(){y.click()});b("#hmenu-container .nav-side-menu-back-to-top").click(function(){var a=r.children("ul.hmenu.hmenu-visible");a.scrollTop(0);"1"===a.attr("data-menu-id")?z.focus():a.find(".hmenu-back-button").focus()});b(".hmenu-item").click(function(a){return m(a)});h();document.getElementById("hmenu-container").style.display="block";l();f.csa&&csa("Content",{element:document.getElementById("nav-hamburger-menu")})("mark","functional:click")}})})(f.$Nav);
(function(e){e.when("$","util.ajaxReftagLogger").run("hMenuCompressibleSectionsHandler",function(b,d){var e=function(a){var e=b(a.currentTarget).parent().prev(".hmenu-compress-section");e.find(".hmenu-item").removeAttr("tabindex");requestAnimationFrame(function(){var a=e.prop("scrollHeight");e.css("height",a+"px");e.removeClass("compressed");e.bind("transitionend.menuSection webkitTransitionEnd.menuSection oTransitionEnd.menuSection",function(a){"height"===a.originalEvent.propertyName&&(e.unbind("transitionend.menuSection webkitTransitionEnd.menuSection oTransitionEnd.menuSection"),
e.css("height",""),e.find(".hmenu-item").first().focus())})});d("nav_em_seemore");return!1},a=function(a){var e=b(a.currentTarget),f=e.parent().prev(".hmenu-compress-section");f.find(".hmenu-item").attr("tabindex",-1);requestAnimationFrame(function(){var a=f.prop("scrollHeight");f.css("height",a+"px");requestAnimationFrame(function(){f.addClass("compressed");f.css("height","");e.siblings(".hmenu-compressed-btn").focus()})});d("nav_em_seeless");return!1};return function(){b(".hmenu-compressed-btn").click(e);
b(".hmenu-expanded-btn").click(a)}})})(f.$Nav);(function(e,b){e.when("jQuery","util.ajax","hMenuItemClickHandler","config","metrics","hMenuUpdatedEvent","util.getQueryStringForHMenuAjax").build("HamburgerMenuMainContentAJAXCall",function(b,k,a,c,m,h,g){return function(){var p={attribution:"AmazonNavigationCards",logLevel:"ERROR"},l=e.getNow("HMenuSecondLayerVariables");if(l&&Array.isArray(l.secondLayerTreeName)&&l.secondLayerTreeName.length){m.increment("mobile"===c.navDeviceType?"Navm:Hmenu:MainContentAjax":
"Nav:Hmenu:MainContentAjax");var u=Date.now(),l={ajaxTemplate:"hamburgerMainContent",pageType:f.ue_pty?f.ue_pty:"NavUnknownPageType",hmDataAjaxHint:1,navDeviceType:c.navDeviceType,isSmile:l.isSmile,RegionalStores:l.RegionalStores,isPrime:l.isPrime,isBackup:c.isBackup,hashCustomerAndSessionId:c.hashCustomerAndSessionId,isExportMode:c.isExportMode,languageCode:c.languageCode,environmentVFI:c.environmentVFI,secondLayerTreeName:l.slt||l.secondLayerTreeName,currentQueryString:g()};k({retryMetric:"mobile"===
c.navDeviceType?"navm-hmenu-main-content-ajax-retry":"nav-hmenu-main-content-ajax-retry",errorMetric:"mobile"===c.navDeviceType?"navm-hmenu-main-content-ajax-error":"nav-hmenu-main-content-ajax-error",url:"/gp/navigation/ajax/generic.html",cache:!c.isHMenuBrowserCacheDisable,dataType:"html",data:l,error:function(a,b,c){a=" HamburgerMenu Main Content AJAX Call failed. Status Code : "+a.status+" Status text : "+b+" Exception : "+c;f.ueLogError&&(p.message=a,f.ueLogError(p))},success:function(e){e&&
b(e).hasClass("hmenu-translateX-right")&&(b("#hmenu-content").append(e),h(),b(".hmenu-item").click(function(b){return a(b)}),u&&m.count("mobile"===c.navDeviceType?"Navm:Hmenu:MainContentSuccessTotalTime":"Nav:Hmenu:MainContentSuccessTotalTime",Math.floor((Date.now()-u)/1E3)))}})}}})})(f.$Nav,x);(function(e){e.when("$","config").run("hMenuUpdatedEvent",function(b,d){return function(){if("mobile"===d.navDeviceType){var b=new Event("nav:hbm:updated",{bubbles:!0,cancelable:!1});document.dispatchEvent(b)}}})})(f.$Nav);
(function(e){e.declare("hMenuShouldSwipeClose",function(b){return"left"===b})})(f.$Nav);(function(e){e.when("$","util.ajax","metrics","config").run("notificationInteractionJS",function(b,d,e,a){function c(a){return"".concat(r?"Navm":"Nav",a)}function m(a){return"".concat(r?"navm":"nav",a)}function h(a,b,c,h,m){var l=Date.now();f.ue_t0&&e.count(a,Math.floor((l-f.ue_t0)/1E3));a={"client-id":"GlobalNav",type:"Payments","sub-type":"MFA","source-action":m,"suppression-timestamp":Date.now(),"page-type":f.ue_pty,
"sub-page-type":f.ue_spty};d({retryMetric:b,errorMetric:c,url:"/gp/navigation/notifications/1.0/suppress",data:a,method:"POST",error:function(a,b,c){var d={attribution:"AmazonNavigationCards",logLevel:"ERROR"};a=" Notification Suppression AJAX Call failed. Status Code : "+a.status+" Status text : "+b+" Exception : "+c;f.ueLogError&&(d.message=a,f.ueLogError(d))},success:function(){g.length&&g.hide();n.length&&g.length&&!1===p&&n.show();l&&e.count(h,Math.floor((Date.now()-l)/1E3))}})}var g=b("#nav-notification"),
p=0!==b("#nav-notification.nav-notification-bottom").length,l=b("a#nav-notification-right, #nav-notification-right \x3e a"),u=b("a#nav-notification-action, a#nav-notification-left"),n=b("#nav-upnav"),r="mobile"===a.navDeviceType.toLowerCase();n.length&&g.length&&!1===p&&n.hide();l.click(function(){var a=c(":Notification:Suppress:ClickTime"),b=m("-notification-suppress-retry"),d=m("-notification-suppress-error"),e=c(":Notification:Suppress:TotalTime");h(a,b,d,e,"CloseButton")});u.click(function(){var a=
c(":Notification:Action:ClickTime"),b=m("-notification-action-retry"),d=m("-notification-action-error"),e=c(":Notification:Action:TotalTime");h(a,b,d,e,"CallToAction")})})})(f.$Nav)});
/* ******** */
(function(H){var g=window.AmazonUIPageJS||window.P,E=g._namespace||g.attributeErrors,e=E?E("NavDesktopAssets",""):g;e.guardFatal?e.guardFatal(H)(e,window):e.execute(function(){H(e,window)})})(function(H,g,E){(function(e){e.when("sharedconstants").build("constants",function(a){a.CAROUSEL_WIDTH_BUFFER=45;a.PINNED_NAV_SEARCH_SPACING=140;a.REMOVE_COVER_SCROLL_HEIGHT=200;a.COMMUNICATION_CHANNEL_TYPE="NAV_BAR";return a})})(g.$Nav);(function(e){e.when("$","config").run(function(a,c){c.ewc&&c.ewc.isMigrationTreatment||
e.run("ewc.ajax",function(){if(c.ewc&&!c.ewc.debugInlineJS){var d=a("#nav-flyout-ewc .nav-ewc-content"),b=function(){d.html(c.ewc.errorContent.html).addClass("nav-tpl-flyoutError")},k=/\$Nav/g,f=function(a){if(a){a="var P \x3d window.AmazonUIPageJS; "+a;if(k.test(a))return b(),!1;e.when("ewc.flyout","ewc.cartCount").run("[rcx-nav-cart]ewc",a)}return!0},m=function(a){var b={};a||(c.ewc.freshCartCount!==E&&(b.freshCartCount=c.ewc.freshCartCount),c.ewc.almCartCount!==E&&(b.almCartCount=c.ewc.almCartCount));
return b},l=function(k){a.ajax({url:c.ewc.url,data:m(k),type:"GET",dataType:c.ewc.isCompactEWCRendered?"html":"json",cache:!1,timeout:c.ewc.timeout||3E4,beforeSend:function(){c.ewc.isCompactEWCRendered?"function"===typeof g.uet&&g.uet("af","ewc2-compact",{wb:1}):(d.addClass("nav-spinner"),"function"===typeof g.uet&&g.uet("af","ewc",{wb:1}))},error:b,success:function(b){if(c.ewc.isCompactEWCRendered){if(k){var m=a(b).find("#ewc-total-quantity").val();g.$Nav&&m&&g.$Nav.when("api.setCartCount").run(function(a){a(parseInt(m),
!0)})}else H.register("EWC",function(){g.EwcP===E&&(g.EwcP=g.AmazonUIPageJS||H);return{refresh:function(){g.ue&&g.ue.count&&g.ue.count("ewc2-refresh",1);l(!0)}}});return d.html(b)}f(b.js)&&d.html(b.html)},complete:function(){c.ewc.isCompactEWCRendered||d.removeClass("nav-spinner");"function"===typeof g.uet&&g.uet("cf","ewc",{wb:1});"function"===typeof g.uex&&(c.ewc.isCompactEWCRendered?g.uex("ld","ewc2-compact",{wb:1}):g.uex("ld","ewc",{wb:1}))}})};c.ewc.flyout.ableToPersist()?(l(),e.declare("ewc.loadContent",
function(){})):e.declare("ewc.loadContent",l)}})})})(g.$Nav);$Nav.when("$","$F","config").run(function(e,a,c){c.ewc&&c.ewc.isMigrationTreatment||$Nav.build("fixedBarWithEwcHandling",function(){var d=e("#nav-search"),b=e("#nav-tools"),k=e(g),f=function(){var a=e(".nav-ewc-persistent-hover #nav-flyout-ewc");return a&&a[0]?a[0].offsetWidth:0},m=function(){var a=e(".nav-ewc-persistent-hover #nav-flyout-ewc");return c.ewc&&c.ewc.isCompactEWCRendered&&a.length?a.css("right"):"0px"},l=function(){return"calc("+
Array.from(arguments).join(" + ")+")"},p=a.throttle(400).on(function(){b.css({right:l(f()+"px",m())});d.css({right:l(b.width()+"px",f()+"px",m())})});return{setFixed:function(a,c){b.css({right:l(f()+"px",m())});d.css({left:a,right:c+f()});k.bind("resize",p)},setRelative:function(){k.unbind("resize",p)}}})});(function(e,a){e.when("$","config").run(function(a,d){d.ewc&&d.ewc.isMigrationTreatment||e.build("compactEWCSmallScreenCheck",function(){return{canCompactEWCHideContentOnPage:function(){var b=
d.ewc.isCompactEWCRendered,k=document.getElementById("a-page"),f=document.getElementById("nav-belt"),m=document.getElementById("nav-flyout-ewc"),l,p,h=function(a){a.forEach(function(a){a.hide()})},q=function(a){a.forEach(function(a){a.show()})},n=function(){h([a("#nav-upnav")]);var b=k.scrollWidth;q([a("#nav-upnav")]);return b},t=function(b){var d,f;return function(){var h=a(g).width();h!==d&&(d=h,f=b.apply(this,arguments));return f}}(function(){if(p===E)return 25<n()-f.scrollWidth?(e(),!0):l===E&&
(a(".nav-ewc-compact-view")?e():(m.style.visibility="hidden",inlineFlyout.applyPageLayoutForPersistent(),e(),inlineFlyout.unapplyPageLayoutForPersistent(),m.style.visibility=""),p!==E&&p>f.scrollWidth)?!0:!1;if(p!==E){var b=f.scrollWidth;l&&(b=f.scrollWidth+100);return p>b}}),e=function(){25<n()-f.scrollWidth&&(p=n()-25+100)};return function(){if(!b||1280<(g.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||"loading"===document.readyState)return!1;var a=k&&f&&t(),c=!a;
if(c!==E){var d;d=c?"shown":"hidden";var h;l===E?h=d:l!==c&&(h="resizeto"+d);if(d=h)d=["compactEWCVisibleState",d],g.ue&&g.ue.count&&g.ue.count(d.join(":"),1);l=c}return a}}()}})})})(g.$Nav,H);(function(e){e.when("$","config","provider.ajax").iff({name:"config",prop:"searchapiEndpoint"}).run("searchApiAjax",function(a,c,d){d({url:c.searchapiEndpoint,dataKey:"searchAjaxContent",success:function(a){a&&a.searchAjaxContent&&a.searchAjaxContent.js&&(a="var P \x3d window.AmazonUIPageJS || window.P; "+a.searchAjaxContent.js,
e.when("$","iss.flyout","searchApi","util.templates").run("[sx]iss",a))},error:function(){throw"ISS failed to load.";}}).fetch()})})(g.$Nav);(function(e,a){a.importEvent("jQuery",{as:"$",global:"jQuery"});a.importEvent("jQuery",{global:"jQuery"});a.when("$").run("PageEventSetup",function(c){var d=function(){a.declare("page.domReady");a.declare("page.ATF");a.declare("page.CF");a.declare("page.loaded");a.declare("btf.full")};c(function(){a.declare("page.domReady")});c(e).load(d);"complete"===document.readyState?
d():"interactive"===document.readyState&&a.declare("page.domReady")});a.when("log","Observer","$F").run("setupPageReady",function(c,d,b){function k(){return"complete"!==document.readyState}function f(){return!!a.getNow("config.readyOnATF")}var m=new d;m.observe(function(b){c("page.ready triggered by: "+b);a.declare("page.ready")});d=function(a){m.notify(a)};"complete"===document.readyState?d("immediate"):(a.when("page.ATF").run("page.TriggerATF",b.partial("Event: page.ATF").tap(c).iff(k).iff(f).on(d)),
a.when("page.CF").run("page.TriggerCF",b.partial("Event: page.CF").tap(c).iff(k).on(d)),a.when("page.domReady").run("page.TriggerDom+",b.delay(1E4).partial("Event: page.domReady+").tap(c).iff(k).on(d)),a.when("page.loaded").run("page.TriggerLoaded",b.delay(100).partial("Event: page.loaded+").tap(c).on(d)))});a.declare("noOp",function(){});a.when("$","img.sprite","util.preload","config","util.addCssRule","page.ready").run("ApplyHighResImage",function(a,d,b,k,f){a=e.devicePixelRatio||1;k.navDebugHighres&&
(a=2);if(!(1>=a)){var m=k.upnavHighResImgInfo,l=k.upnav2xAiryPreloadImgInfo,p=k.upnav2xAiryPostSlateImgInfo;d["png32-2x"]&&b(d["png32-2x"],function(a){1<a.width&&(f("#navbar .nav-sprite","background-image: url("+d["png32-2x"]+"); background-size: "+Math.floor(a.width/2)+"px;"),f("#hmenu-container .nav-sprite","background-image: url("+d["png32-2x"]+"); background-size: "+Math.floor(a.width/2)+"px;"))});if(m&&m.upnav2xImagePath&&m.upnav2xImageHeight){var h=m.upnav2xImagePath;b(h,function(a){1<a.width&&
f("#nav-upnav","background-image: url("+h+") !important;"+m.upnav2xImageHeight+" !important;")})}if(m&&m.upnav2xImagePath&&m.upnav2xImageHeight){var q=m.upnav2xImagePath;b(q,function(a){1<a.width&&(a=document.getElementById("nav-upnav"))&&(a=a.getElementsByTagName("img"),a[0]&&a[0].src&&(a[0].src=q))})}if(l&&l.preloadImgPath&&l.preloadImgHeight){var n=l.preloadImgPath;b(n,function(a){1<a.width&&f("#nav-airy-preload-slate-image","background-image: url("+n+") !important;height:"+l.preloadImgHeight+
" !important;")})}if(p&&p.postslateImgPath&&p.postslateImgHeight){var t=p.postslateImgPath;b(t,function(a){1<a.width&&f("#nav-airy-post-media-slate-image","background-image: url("+t+") !important;height:"+p.postslateImgHeight+" !important;")})}}});a.when("config","now","Observer","noOp").build("debugStream",function(a,d,b,k){if(!a.isInternal)return a=function(){},a.observe=k,a.getHistory=k,a;var f=[],m=new b;k=function(a,b){a={data:b,msg:a,timestamp:d()};f.push(a);m.notify(a)};k.observe=m.boundObserve();
k.getHistory=function(){return f};return k});a.when("debug.param","debugStream").build("log",function(a,d){return e.console&&e.console.log&&a("navDebug")?function(a){d("Log",a);e.console.log(a)}:function(){}});a.when("config","util.getQueryString").build("debug.param",function(a,d){if(!a.isInternal)return a=function(){return!1},a.value=function(){return null},a;var b=function(){var a={},b=d();if(!b)return a;for(var b=b.substring(1).split("\x26"),c=0;c<b.length;c++){var l=b[c].split("\x3d");try{a[decodeURIComponent(l[0])]=
decodeURIComponent(l[1])}catch(p){}}return a}();a=function(a,c){return 1===arguments.length?a in b:b[a]===c};a.value=function(a){return a in b?b[a]:null};return a});a.when("$").iff({name:"config",prop:"isInternal"},{name:"agent",prop:"quirks"}).run(function(a){a("#nav-debug-quirks-warning").show();a("#nav-debug-quirks-warning-close").click(function(){a("#nav-debug-quirks-warning").hide()})});a.when("$","$F","config").iff({name:"config",prop:"windowWidths"}).run("windowResizeHandler",function(a,d,
b){var k=a("#navbar").parent("header"),f=a(e),m=b.windowWidths;a=d.throttle(300).on(function(){for(var a=f.width(),b=0;b<m.length;b++){var c=m[b],d="nav-w"+c;a>=c?k.addClass(d):k.removeClass(d)}});f.resize(a);a()});a.when("$","$F","config.fixedBarBeacon","fixedBar","flyouts","page.ready","nav.inline").run("fixedBarResize",function(a,d,b,k,f){if(b){var m=a(e),l=0;a.each(f.getAll(),function(a,b){b.elem().height()>l&&(l=b.elem().height())});a=d.throttle(300).on(function(){var a=m.width(),b=m.height();
1E3<=a&&b>=l+30?k.enable():k.disable()});m.resize(a);a()}});a.when("$","$F","config.fixedSubBarBeacon","fixedSubBar","flyouts","page.ready","nav.inline").run("fixedSubBarResize",function(a,d,b,k,f){if(b){var m=a(e),l=0;a.each(f.getAll(),function(a,b){b.elem().height()>l&&(l=b.elem().height())});a=d.throttle(300).on(function(){var a=m.width(),b=m.height();1E3<=a&&b>=l+30?k.enable():k.disable()});m.resize(a);a()}});a.when("$","$F","config","pinnedNav","flyouts","page.ready","nav.inline").run("pinnedNavResize",
function(a,d,b,k,f){if(b.pinnedNav){var m=a(e),l=0,p=1E3;a.each(f.getAll(),function(a,b){b.elem().height()>l&&(l=b.elem().height())});l=b.pinnedNavMinHeight?b.pinnedNavMinHeight:l+30;b.pinnedNavMinWidth&&(p=b.pinnedNavMinWidth);a=d.throttle(300).on(function(){var a=m.width(),b=m.height();a>=p&&b>=l?k.enable():k.disable()});m.resize(a);a()}});a.when("PublishAPIs").publish("navbarJSInteraction")})(g,g.$Nav);(function(e,a){a.when("$","img.sprite","util.preload","config","util.addCssRule","page.ready").run("ApplyHighResImageDesktop",
function(a,d,b,k,f){a=e.devicePixelRatio||1;k.navDebugHighres&&(a=2);if(!(1>=a)){var m=k.transientMenuImage2xHover,l=k.transientMenuImage2x;l&&b(l,function(a){1<a.width&&f("#nav-transient-flyout-trigger","background: url("+l+") no-repeat !important;background-size: "+Math.floor(a.width/2)+"px !important;")});m&&b(l,function(a){1<a.width&&(f("#nav-transient-flyout-trigger:focus","background: url("+m+") no-repeat !important; background-size: "+Math.floor(a.width/2)+"px !important;"),f("#nav-transient-flyout-trigger:hover",
"background: url("+m+") no-repeat !important; background-size: "+Math.floor(a.width/2)+"px !important;"))})}})})(g,g.$Nav);(function(e){e.when("logEvent.enabled","$F").build("logEvent",function(a,c){var d={};return function(b,k){var f=[],m;for(m in b)b.hasOwnProperty(m)&&f.push(m+":"+b[m]);f.sort();f=f.join("|");d[f]||(d[f]=!0,e.getNow("log",c.noOp)("logEv:"+f),a&&g.ue&&g.ue.log&&g.ue.log(b,"navigation",k))}});e.when("agent","logEvent","btf.lite").run("logQuirks",function(a,c){c({quirks:a.quirks?
1:0})});e.when("$F","log").build("phoneHome",function(a,c){function d(){k={t:[],e:[]};f={t:{},e:{}};m=!0}function b(a,b){!b||b in f[a]||(k[a].push(b),c("PhoneHome: "+a+" "+b),f[a][b]=!0,m=!1)}var k,f,m;e.when("$","config.recordEvUrl","config.recordEvInterval","config.sessionId","config.requestId","eventing.onunload").run("recordEvLoop",function(a,b,c,f,n,t){function e(a,b){a=k[a].join(b);return g.encodeURIComponent(a)}function r(a){x++;if(!m){a=a||x;var c=e("t",":"),h=e("e",":");a="trigger\x3d"+c+
"\x26exposure\x3d"+h+"\x26when\x3d"+a+"\x26sid\x3d"+(g.ue&&g.ue.sid||f||"")+"\x26rid\x3d"+(g.ue&&g.ue.rid||n||"");c=0<b.indexOf("?")?"\x26":"?";(new Image).src=b+c+a;d()}}if(b){var x=0;g.setInterval(r,c);t(function(){r("beforeunload")})}});d();return{trigger:a.partial("t").on(b),exposure:a.partial("e").on(b)}})})(g.$Nav);(function(e){e.when("$","debugStream","util.checkedObserver","util.node","util.randomString").build("panels",function(a,c,d,b,k){var f={},m=0,l=function(a){return function(b){for(var c in f)f.hasOwnProperty(c)&&
a.call(f[c],b||{})}},p={create:function(h){var l={name:"panel-"+m++,visible:!1,sidePanelCallback:[],locked:!1,rendered:!1,interactionDelay:750,elem:null,groups:[],locks:[]};h=a.extend({},l,h);if(f[h.name])return f[h.name];var n={},t=!0;n.elem=function(c){if(c||t)h.elem=a(b.create(c||h.elem)),t=!1;return h.elem};var e=!1;n.interact=d({context:n,observe:function(){c("Panel Interact",n);e=!0}});n.hasInteracted=function(){return e};var g=null,x=function(){g&&(clearTimeout(g),g=null)},z=function(){x();
h.rendered&&h.visible&&(g=setTimeout(n.interact,h.interactionDelay))};n.render=d({context:n,check:function(a){if(h.rendered)return!1},observe:function(a){h.rendered=!0;z();c("Panel Render",n)}});n.reset=d({context:n,observe:function(a){h.rendered=!1;x();c("Panel Reset",n)}});n.show=d({context:n,check:function(a){if(h.visible||h.locked||!n.groups.has(a.group))return!1},observe:function(a){if(0<h.groups.length)for(var b=0;b<h.groups.length;b++)p.hideAll({group:h.groups[b]});h.rendered||n.render(a);
h.visible=!0;z();c("Panel Show",n)}});n.hide=d({context:n,check:function(a){if(!h.visible||h.locked||!n.groups.has(a.group))return!1},observe:function(a){h.visible=!1;x();c("Panel Hide",n)}});n.lockRequest=d({context:n});n.lock=d({context:n,check:function(a){var b=h.locked;n.locks.add(a.lockKey||"global");n.lockRequest();if(b)return!1},observe:function(){c("Panel Lock",n)}});n.unlockRequest=d({context:n});n.unlock=d({context:n,check:function(a){n.unlockRequest();n.locks.remove(a.lockKey||"global");
if(h.locked)return!1},observe:function(){c("Panel Unlock",n)}});n.groups={add:function(a){h.groups.push(a)},remove:function(b){b=a.inArray(b,h.groups);-1<b&&h.groups.splice(b,1)},has:function(b){return!b||-1<a.inArray(b,h.groups)?!0:!1},clear:function(){h.groups=[]}};n.locks={add:function(a){h.locks.push(a||k());h.locked=!0},remove:function(b){b=a.inArray(b,h.locks);-1<b&&h.locks.splice(b,1);0===h.locks.length&&(h.locked=!1)},has:function(b){return!b||-1<a.inArray(b,h.locks)?!0:!1},clear:function(){h.locked=
!1;h.locks=[]}};n.isVisible=function(){return h.visible};n.isSideCallbackSet=function(){return null!==h.sidePanelCallback};n.setSidePanelCallback=function(a){h.sidePanelCallback.push(a)};n.initiateSidePanel=function(){if(null!==h.sidePanelCallback)for(var a=0;a<h.sidePanelCallback.length;a++)h.sidePanelCallback[a]()};n.isLocked=function(){return 0<h.locks.length};n.isRendered=function(){return h.rendered};n.isGrouped=function(){return 0<h.groups.length};n.getName=function(){return h.name};n.destroy=
d({context:n,observe:function(){x();var a=n.elem();a&&a.remove();c("Panel destroy",n)}});n.onReset=n.reset.observe;n.onRender=n.render.observe;n.onInteract=n.interact.observe;n.onShow=n.show.observe;n.onHide=n.hide.observe;n.onLock=n.lock.observe;n.onUnlock=n.unlock.observe;n.onLockRequest=n.lockRequest.observe;n.onUnlockRequest=n.unlockRequest.observe;n.onDestroy=n.destroy.observe;a.each(h,function(a,b){a in l||a in n||(n[a]=b)});c("Panel Create",n);return f[h.name]=n},destroy:function(a){return f[a]?
(f[a].destroy(),delete f[a],!0):!1},hideAll:l(function(a){this.hide(a)}),showAll:l(function(a){this.show(a)}),lockAll:l(function(a){this.lock(a)}),unlockAll:l(function(a){this.unlock(a)}),getAll:function(a){a=a||{};var b=[],c;for(c in f)"locked"in a&&f[c].isLocked()!==a.locked||"visible"in a&&f[c].isVisible()!==a.visible||"rendered"in a&&f[c].isRendered()!==a.rendered||"group"in a&&!f[c].groups.has(a.group)||"lockKey"in a&&!f[c].locks.has(a.lockKey)||b.push(f[c]);return b},get:function(a){return f[a]}};
return p})})(g.$Nav);(function(e){e.when("$","data","debugStream","panels","util.templates","metrics","util.checkedObserver").build("dataPanel",function(a,c,d,b,k,f,m){var l=0;return function(p){var h=b.create(a.extend({id:"dataPanel-"+p.dataKey+"-"+l++,className:null,dataKey:null,groups:[],spinner:!1,visible:!0,timeoutDataKey:null,timeoutDelay:5E3,elem:function(){var b=a("\x3cdiv class\x3d'nav-template'\x3e\x3c/div\x3e");p.id&&b.attr("id",p.id);p.className&&b.addClass(p.className);p.spinner&&b.addClass("nav-spinner");
return b}},p)),q=k.renderer();q.onRender(function(a){h.reset();h.render({html:a,templateName:q.templateName,data:q.data})});var n=null;h.timeout=m({context:h,check:function(){if(h.isRendered())return!1},observe:function(){if(p.timeoutDataKey){var a=c.get(p.timeoutDataKey);if(a){a.isTimeout=!0;var b={};b[p.dataKey]=a;c(b)}f.increment("nav-panel-"+p.timeoutDataKey);d("Panel Timeout",h)}}});h.onTimeout=h.timeout.observe;h.startTimeout=function(){n&&clearTimeout(n);h.isRendered()||(n=setTimeout(h.timeout,
h.timeoutDelay))};h.render.check(function(a){if(!a.html)return!1});h.onRender(function(a){var b=this.elem();b[0].className="nav-template"+(p.className?" "+p.className:"")+(a.templateName?" nav-tpl-"+a.templateName:"")+(a.noTemplate?" nav-tpl-itemList":"");b.html(a.html||"")});h.onReset(function(){var a=this.elem();a[0].className="nav-template"+(p.className?" "+p.className:"")+(p.spinner?" nav-spinner":"");a.html("")});h.data=m({context:h});h.onData=h.data.observe;h.onShow(function(){this.elem().show()});
h.onHide(function(){this.elem().hide()});var t=function(b){b&&(b.css&&(h.styleSheet&&h.styleSheet.attr("disabled","disabled").remove(),h.styleSheet=a("\x3cstyle type\x3d'text/css' /\x3e").appendTo("head"),h.styleSheet[0].styleSheet?h.styleSheet[0].styleSheet.cssText=b.css:h.styleSheet[0].appendChild(document.createTextNode(b.css))),b.event&&"string"===typeof b.event&&a.isFunction(h[b.event])?h[b.event].call(h):b.event&&"string"===typeof b.event.name&&a.isFunction(h[b.event.name])?h[b.event.name].apply(h,
"[object Array]"===Object.prototype.toString.call(b.event.args)?b.event.args:[]):b.template?(q.templateName=b.template.name,q.data=b.template.data,q.render()):b.html?(h.reset(),h.render({html:b.html,noTemplate:b.noTemplate})):b.dataKey&&c.get(b.dataKey)&&t(c.get(b.dataKey)),h.data(b))},e=c.observe(p.dataKey,t);h.onDestroy(function(){c.remove(e)});return h}})})(g.$Nav);(function(e){e.when("$","$F","util.parseQueryString","config.isInternal","log","metrics","onOptionClick","eventing.onunload").build("searchMetrics",
function(a,c,d,b,k,f,m,l){return function(p){var h=this;this.elements=p;this.debug=!1;this.trigger="TN";this.scopeChanged=!1;this.setTrigger=c.once().on(function(a){h.trigger=a});this.queryFirst="N";this.setQueryFirst=c.once().on(function(a){h.queryFirst=a?0:1});this.TRIGGERS={BUTTON:"TB",ENTER_KEY:"TE",ISS_KEYBOARD:"ISSK",ISS_MOUSE:"ISSM"};this._getState=function(){var a=h.elements.scopeSelect[0].selectedIndex||null,b=h.elements.inputTextfield.val();""===b&&(b=null);return{scope:a,query:b}};this._computeAction=
function(a,b,c){var d="N";a?(d="R",b&&(d="NC",a!==b&&(d="M"))):b&&(d="A");return c+d};this._computeKey=function(){var a=h._getState(),b=h._computeAction(h.initial.scope,a.scope,"S"),a=h._computeAction(h.initial.query,a.query,"Q");return["QF-"+h.queryFirst,b,a,h.trigger].join(":")};this.log=function(a){h.debug&&k(a)};this.printKey=function(){if(h.debug){var a=h._computeKey();h.log("SM: key is: "+a);return a}};this._sendMetric=c.once().on(function(){var a=h._computeKey();f.increment(a)});this._setupScopeSelectListener=
function(){m(this.elements.scopeSelect,function(){h.log("SM: scope changed");h.scopeChanged=!0})};this.updateScopeSelect=function(a){this.elements.scopeSelect=a;h._setupScopeSelectListener()};this.init=function(){this.debug=b&&"1"===d().navTestSearchMetrics;this.initial=this._getState();this.log("SM: initial state");this.log(this.initial);h._setupScopeSelectListener();this.elements.inputTextfield.keypress(function(a){13===a.which?h.setTrigger(h.TRIGGERS.ENTER_KEY):(h.scopeChanged&&h.setQueryFirst(!0),
h.setQueryFirst(!1))});this.elements.submitButton.click(function(){h.setTrigger(h.TRIGGERS.BUTTON)});e.when("flyoutAPI.SearchSuggest").run(function(b){b.onShow(function(){a(".srch_sggst_flyout").one("mousedown",function(){h.setTrigger(h.TRIGGERS.ISS_MOUSE)})})});l(function(a){if(h.debug)return h.printKey(),a.preventDefault(),a.stopPropagation(),!1;h._sendMetric()})}}})})(g.$Nav);(function(e){e.when("log","sharedconstants").build("flyoutMetrics",function(a,c){function d(a){var d=0,m=!1,l,p=a.getName().split("/"),
p=p[p.length-1];if(g&&g.navmet){var h=g.navmet.MainEnd;h&&b("nav-flyout-"+p+"-attach-latency",new Date-h)}a.elem().click(function(){var a;a=l?new Date-l:void 0;b("nav-flyout-"+p+"-dwellTime",a);m=!1});a.onShow(function(){l=new Date;m=!0});a.onHide(function(){if(m){var a;a=l?new Date-l:void 0;a>c.DWELLTIME_MIN&&(d++,b("nav-flyout-"+p+"-dwellTime",a),b("nav-flyout-"+p+"-bounceCount",d))}m=!1})}function b(b,c){g.ue&&g.ue.count&&(g.ue.count(b,c),a("Nav-Flyout-Metrics: "+b+" to "+c))}a("flyout metrics");
return{attachTo:function(a){d(a)}}})})(g.$Nav);(function(e){e.when("$","Observer").build("util.ajax",function(a,c){return function(c){c=a.extend({url:null,data:{},type:"GET",dataType:"json",cache:!1,timeout:5E3,retryLimit:3},c);var b=c.error;c.error=function(){0<=--this.retryLimit?(a.ajax(this),c.retry&&c.retry(this)):b&&b.apply(this,arguments)};return a.ajax(c)}})})(g.$Nav);(function(e){e.when("$","$F","agent","util.bean","util.class","config").build("util.Aligner",function(a,c,d,b,k,f){var m={top:{direction:"vert",
size:0},middle:{direction:"vert",size:.5},bottom:{direction:"vert",size:1},left:{direction:"horiz",size:0},center:{direction:"horiz",size:.5},right:{direction:"horiz",size:1}};f.rightMarginAlignEnabled&&(m.rightArrow={direction:"horiz",size:.9});var l={top:"vert",bottom:"vert",left:"horiz",right:"horiz"},p=function(a,b,c){try{return a[b?"outerHeight":"outerWidth"](c)||0}catch(d){return 0}},h=function(a,b){b=b?"top":"left";try{var c=a.offset();return c?c[b]:0}catch(d){return 0}};d=k();d.prototype.alignTo=
b({value:a.fn});d.prototype.offsetTo=b({value:a.fn});d.prototype.base=b({value:a.fn});d.prototype.target=b({value:a.fn});d.prototype.fullWidth=b({value:!1});d.prototype.constrainTo=b({value:a.fn});d.prototype.constrainBuffer=b({value:[0,0,0,0]});d.prototype.constrainChecks=b({value:[!0,!0,!0,!0]});d.prototype.fullWidthCss=b({get:function(b){return a.extend({left:"0px",right:"0px",width:"auto"},b)},value:function(){return{}}});d.prototype.anchor=b({value:{vert:"top",horiz:"left"},set:function(a){a=
a.split(" ");for(var b={vert:"top",horiz:"left"},c=0;c<a.length;c++)l[a[c]]&&(b[l[a[c]]]=a[c]);return b}});d.prototype.getAlignment=function(a){var b=m[a];if(b){var d="vert"===b.direction?!0:!1,f=d?"top":"left",l=d?"bottom":"right";return{offset:c.bind(this).on(function(){return h(this.base(),d)-h(this.offsetTo(),d)+p(this.base(),d)*b.size}),align:c.bind(this).on(function(){var a=this.from()[b.direction].offset()+this.nudgeFrom()[f],c=h(this.alignTo(),d),k=c-h(this.offsetTo(),d)+this.nudgeTo()[f],
m=p(this.target(),d),a=a-k-m*b.size,e=this.constrainTo();if(1===e.length){var k=this.constrainChecks(),q=this.constrainBuffer(),g=p(e,d)-(d?q[0]+q[2]:q[1]+q[3]),e=h(e,d)+(d?q[0]:q[3]);(d&&k[0]||!d&&k[3])&&a+c<e?a=e-c:(d&&k[2]||!d&&k[1])&&a+c+m>e+g&&(a=e+g-m-c)}c={};this.anchor()[b.direction]===f?c[f]=a:(k=p(this.alignTo(),d),c[l]=k-a-m);return c})}}return{offset:function(){return 0},align:function(){return{}}}};d.prototype.from=b({set:function(a){a=a.split(" ");for(var b={vert:this.getAlignment(),
horiz:this.getAlignment()},c=0;c<a.length;c++){var d=m[a[c]];d&&(b["vert"===d.direction?"vert":"horiz"]=this.getAlignment(a[c]))}return b},value:function(){return{vert:this.getAlignment(),horiz:this.getAlignment()}}});d.prototype.to=b({set:function(a){a=a.split(" ");for(var b={vert:this.getAlignment(),horiz:this.getAlignment()},c=0;c<a.length;c++){var d=m[a[c]];d&&(b["vert"===d.direction?"vert":"horiz"]=this.getAlignment(a[c]))}return b},value:function(){return{vert:this.getAlignment(),horiz:this.getAlignment()}}});
d.prototype.nudgeFrom=b({set:function(a){return{top:a.top||0,left:a.left||0}},value:{top:0,left:0}});d.prototype.nudgeTo=b({set:function(a){return{top:a.top||0,left:a.left||0}},value:{top:0,left:0}});d.prototype.align=function(b){b&&this.target(b);this.target().css("position","absolute");b=this.to();this.target().css(a.extend({},b.vert.align(),this.fullWidth()?this.fullWidthCss():b.horiz.align()));return this};return d})})(g.$Nav);(function(e){e.when("$","$F").build("util.bean",function(a,c){var d=
0;return function(b){b=a.extend({name:"__bean_storage_"+d++,set:function(a){return a},get:function(a){return a}},b);return function(a){var d=b.context||this;d[b.name]||(d[b.name]={},"undefined"!==typeof b.value&&(d[b.name].value=b.value instanceof Function?c.bind(d).on(b.value)():b.value));var m=d[b.name].value;if("undefined"!==typeof a)return d[b.name].set||(d[b.name].set=c.bind(d).on(b.set)),d[b.name].value=d[b.name].set(a,m),d;"undefined"===typeof m&&"undefined"!==typeof b.empty&&(d[b.name].empty||
(d[b.name].empty=b.empty instanceof Function?c.bind(d).on(b.empty):function(){return b.empty}),m=d[b.name].empty());d[b.name].get||(d[b.name].get=c.bind(d).on(b.get));return d[b.name].get(m)}}})})(g.$Nav);(function(e){e.declare("util.checkedObserver",function(a){function c(a){a=a||{};!1!==c.check(a)&&(d++,c.observe(a))}var d=0,b={},k=[],f=[];c.observe=function(a){a=a||{};if("function"===typeof a)return k.push(a),c;for(var d=0;d<k.length;d++)k[d].call(b,a)};c.check=function(a){a=a||{};if("function"===
typeof a)return f.push(a),c;for(var d=0;d<f.length;d++)if(!1===f[d].call(b,a))return!1;return!0};c.context=function(a){return a?(b=a,c):b};c.count=function(a){return a?(d=a,c):d};if(a)for(var m in a)if(a.hasOwnProperty(m)&&c[m])c[m](a[m]);return c})})(g.$Nav);(function(e){e.when("$","$F").build("util.class",function(a,c){return function(d){d=a.extend({construct:c.noOp},d);var b=function(a){for(var b in a)this[b](a[b]);d.construct.apply(this,arguments)};b.newInstance=function(){var a=Array.prototype.slice.call(arguments),
c=function(){return b.apply(this,a)};c.prototype=b.prototype;return new c};b.isInstance=function(a){return a instanceof this};return b}})})(g.$Nav);(function(e){e.when("$","$F","util.bean","util.class").build("util.Ellipsis",function(a,c,d,b){c=b();c.prototype._storage=[];c.prototype.elem=function(b){var c=this;b instanceof a&&b.get&&(b=b.get());var d=function(b){b=a(b);c._storage.push({$elem:b,text:b.text(),isTruncated:!1})};if(b instanceof Array)for(var l=0;l<b.length;l++)d(b[l]);else d(b);return this};
c.prototype.lines=d({value:!1});c.prototype.external=d({value:!1});c.prototype.lastCharacter=d({value:"..."});c.prototype.dimensions=d({empty:function(){var a=this.lines();return function(b){return{width:b.innerWidth(),height:a?parseInt(b.css("line-height"),10)*a:b.parent().height()}}},set:function(a){var b=this;return function(c){c=a.call(b,c);return{width:c.width||0,height:c.height||0}}}});c.prototype.refresh=function(){this.reset();this.truncate();return this};c.prototype.truncate=function(){var b=
this.lastCharacter(),c=this.external(),d=this.dimensions(),l;c&&(l=a("\x3cdiv\x3e\x3c/div\x3e").css({position:"absolute",left:"-10000px",visibility:"hidden"}).appendTo(document.body));a.each(this._storage,function(a,h){if(!h.isTruncated){h.isTruncated=!0;a=d(h.$elem);c&&l.css({width:a.width+"px",lineHeight:h.$elem.css("line-height")});var e=c?l:h.$elem;e.text("");for(var n=e.height(),t=h.text.split(" "),g=0,r="";n<=a.height;){var x=t.slice(0,++g).join(" ");if(""!==t[g]){if(x.length===r.length){h.$elem.text(h.text);
return}e.text(x+b);n=e.height();r=x}}h.$elem.text(t.slice(0,g-1).join(" ")+b)}});c&&l.remove();return this};c.prototype.reset=function(){a.each(this._storage,function(a,b){b.isTruncated&&(b.isTruncated=!1,b.$elem.text(b.text))});return this};return c})})(g.$Nav);(function(e){e.when("$").build("eventing.onunload",function(a){var c=e.getNow("config.pageHideEnabled");return function(d){c&&g.addEventListener&&(g.onpagehide||null===g.onpagehide)?g.addEventListener("pagehide",d,!1):a(g).bind("beforeunload",
d)}})})(g.$Nav);(function(e){e.build("util.getComputedStyle",function(){return g.getComputedStyle||function(a,c){return{el:a,getPropertyValue:function(c){var b=/(\-([a-z]){1})/g;"float"===c&&(c="styleFloat");b.test(c)&&(c=c.replace(b,function(a,b,c){return c.toUpperCase()}));return a.currentStyle&&a.currentStyle[c]?a.currentStyle[c]:null}}}})})(g.$Nav);(function(e){e.when("$","img.pixel","util.getComputedStyle").build("util.highContrast",function(a,c,d){var b=document.createElement("div");b.style.cssText=
"position:absolute; left:-1000px; height:10px; width:10px; border-left:1px solid black; border-right:1px solid white; background-image: url('"+c+"')";document.body.appendChild(b);c=d(b,"backgroundImage");d="none"===c||"url(invalid-url:)"===c||d(b,"borderLeftColor")===d(b,"borderRightColor");a.browser&&a.browser.msie&&7>=parseInt(a.browser.version,10)?b.outerHTML="":document.body.removeChild(b);return d})})(g.$Nav);(function(e){e.build("util.highRes",function(){return 1<g.devicePixelRatio?!0:!1})})(g.$Nav);
(function(e){e.when("agent").build("util.inlineBlock",function(a){return function(c){a.ie6||a.quirks?c.css({display:"inline",zoom:"1"}):c.css({display:"inline-block"})}})})(g.$Nav);(function(e){e.when("$F","util.Keycode").build("util.onKey",function(a,c){return function(d,b,k,f){if(!d||!b)return{bind:a.noOp,unbind:a.noOp};k=k||"keydown";f=!1===f?!1:!0;var m=function(a){var d=new c(a);return b.call(d,a)};f&&d.bind(k,m);return{bind:function(){f||(d.bind(k,m),f=!0)},unbind:function(){f&&(d.unbind(k,
m),f=!1)}}}});e.when("$").build("util.Keycode",function(a){function c(a){this.evt=a;this.code=a.keyCode||a.which}c.prototype.isAugmented=function(){return this.evt.altKey||this.evt.ctrlKey||this.evt.metaKey};c.prototype.isAugmentor=function(){return 0<=a.inArray(this.code,[0,16,20,17,18,224,91,93])};c.prototype.isTextFieldControl=function(){return 0<=a.inArray(this.code,[8,9,13,32,35,36,37,38,39,40,45,46])};c.prototype.isControl=function(){return 46>=this.code||91<=this.code&&95>=this.code||112<=
this.code&&145>=this.code?!0:!1};c.prototype.isShiftTab=function(){return 9===this.code&&this.evt.shiftKey};c.prototype.isTab=function(){return 9===this.code};c.prototype.isEnter=function(){return 13===this.code};c.prototype.isBackspace=function(){return 8===this.code};c.prototype.isSpace=function(){return 32===this.code};c.prototype.isEscape=function(){return 27===this.code};return c})})(g.$Nav);(function(e){e.when("$","now","agent").build("util.MouseTracker",function(a,c,d){function b(a){var b=
f.length;if(b&&(b=f[b-1],b.x===a.pageX&&b.y===a.pageY))return;f.push({x:a.pageX,y:a.pageY,when:m?a.timeStamp:c()});100<f.length&&(f=f.slice(-10))}function k(){this.active=!0;0===l&&a(document).mousemove(b);l++}var f=[],m=!d.firefox,l=0;k.prototype.stop=function(){this.active&&(l--,0===l&&(a(document).unbind("mousemove",b),this.active=!1,f=[]))};k.prototype.position=function(){var b=f.length;return b?a.extend(!0,{},f[b-1]):null};k.prototype.velocity=function(){var a=f.length;if(1<a&&75>=c()-f[a-1].when)for(var b=
f[a-1],d=2;d<=a;d++){var m=f[a-d],l=b.when-m.when,m=Math.abs(b.x-m.x)+Math.abs(b.y-m.y);if(0<m&&0<l)return m/l*1E3}return 0};k.prototype.history=function(b){var c=f.length;if(0===c)return[];var d=Math.min(c,10);0<arguments.length&&(d=Math.min(d,b));for(var m=[],l=c-1,c=c-d;l>=c;l--)m.push(a.extend(!0,{},f[l]));return m};return{start:function(){return new k}}});e.when("$","$F","util.MouseTracker","debug.param").build("util.Proximity",function(a,c,d,b){function k(b,c){var d=[],f=[],k=[],e=[];b.each(function(b,
c){c=a(c);b=c.offset();k.push(b.top);e.push(b.top+c.height());m?(d.push(a(g).width()-(b.left+c.width())),f.push(a(g).width()-b.left)):(d.push(b.left),f.push(b.left+c.width()))});return{left:Math.min.apply(Math,d)-c[3],top:Math.min.apply(Math,k)-c[0],right:Math.max.apply(Math,f)+c[1],bottom:Math.max.apply(Math,e)+c[2]}}var f=b("navDebugProximity"),m="rtl"===a("body").css("direction");return{onEnter:function(b,p,h,e,n){function t(){f&&x.show().css({background:"rgba(255,0,0,0.1)"});y&&(g.clearInterval(y),
y=null);v&&(v.stop(),v=null);r=null}var v=d.start(),r=k(b,p);if(f){var x=a("\x3cdiv\x3e\x3c/div\x3e").css({position:"absolute",top:r.top,left:m?"auto":r.left,right:m?r.left:"auto",width:r.right-r.left,height:r.bottom-r.top,background:"rgba(0,255,0,0.1)",zIndex:1E3,clickEvents:"none"});x.click(function(){x.hide().remove()});x.show();a("body").append(x)}var z;z=e?c.throttle(e).on(h):c.once().on(function(){t();h()});var A,u,B,C,D,w,y=g.setInterval(function(){n&&(B=g.scrollX,C=g.scrollY,w=a(g).width(),
B!==A||C!==u||w!==D)&&(r=k(b,p),f&&x.show().css({top:r.top,left:m?"auto":r.left,right:m?r.left:"auto",width:r.right-r.left,height:r.bottom-r.top}),A=B,u=C,D=w);var c=v.position();c&&c.x>=r.left&&c.x<=r.right&&c.y>=r.top&&c.y<=r.bottom&&z()},100);return{unbind:function(){t()}}}}});e.when("$","$F","Observer","util.MouseTracker").build("util.MouseIntent",function(a,c,d,b){function k(a,b,c,d){var f=(c.x-b.x)*(d.y-b.y)-(d.x-b.x)*(c.y-b.y),k=((d.x-a.x)*(b.y-a.y)-(b.x-a.x)*(d.y-a.y))/f;b=((b.x-a.x)*(c.y-
a.y)-(c.x-a.x)*(b.y-a.y))/f;return 0<((c.x-a.x)*(d.y-a.y)-(d.x-a.x)*(c.y-a.y))/f&&0<k&&0<b}function f(f,k){f=a(f);k=a.extend({slop:25,minorDelay:200,majorDelay:100},k);this._onStrayEvent=new d({once:!0,async:!0});this._onArriveEvent=new d({once:!0,async:!0});this._tracker=b.start();this.onArrive(c.bind(this._tracker).on(this._tracker.stop));this.onStray(c.bind(this._tracker).on(this._tracker.stop));this._minorDelay=k.minorDelay;this._majorDelay=k.majorDelay;var p=k.slop,h=f.offset();k={x:h.left,y:h.top-
p};f={x:h.left+f.outerWidth(),y:h.top+f.outerHeight()+p};this._upperLeft=k;this._lowerRight=f;this._minor=0;this._tick()}f.prototype.onArrive=function(a){this._onArriveEvent.observe(a);return this};f.prototype.onStray=function(a){this._onStrayEvent.observe(a);return this};f.prototype._scheduleTick=function(a){this._timer=c.delay(a).bind(this).run(this._tick)};f.prototype.cancel=function(){this._timer&&g.clearTimeout(this._timer)};f.prototype._tick=function(){if(!this._onStrayEvent.isNotified()&&!this._onArriveEvent.isNotified()){var a=
this._tracker.history(10);if(2>a.length)this._scheduleTick(this._minorDelay);else{for(var b=a.shift(),c=null;a.length&&(c=a.shift(),2>Math.abs(c.x-b.x)&&2>Math.abs(c.y-b.y)););if(c){var a=this._upperLeft,d=this._lowerRight;b.x>=a.x&&b.x<=d.x&&b.y>=a.y&&b.y<=d.y?this._onArriveEvent.notify():k(b,c,this._upperLeft,this._lowerRight)||k(b,c,{x:this._lowerRight.x,y:this._upperLeft.y},{x:this._upperLeft.x,y:this._lowerRight.y})?2>Math.abs(b.x-c.x)&&2>Math.abs(b.y-c.y)?2<=this._minor?this._onStrayEvent.notify():
(this._minor++,this._scheduleTick(this._minorDelay)):(this._minor=0,this._scheduleTick(this._majorDelay)):this._onStrayEvent.notify()}else this._scheduleTick(this._minorDelay)}}};return f});e.when("$","agent","Observer","util.bean","util.class").build("util.ClickOut",function(a,c,d,b,k){c=k({construct:function(){var b=this;this._isEnabled=!1;this._clickHandler=function(c){var d=b.ignore(),k=d.length;c=c.target;0===a(c).parents().add(c).filter(function(){for(var a=0;a<k;a++)if(this===d[a])return!0;
return!1}).length&&b.action()}}});c.prototype.attachTo=b({value:function(){return a(document.body)}});c.prototype.ignore=b({value:function(){return[]},set:function(b,c){c.push(b instanceof a?b.get(0):b);return c}});c.prototype.action=b({value:function(){return new d},set:function(a,b){b.observe(a);return b},get:function(a){a.notify()}});c.prototype.enable=function(){if(!this._isEnabled)return this.attachTo().bind("click touchstart",this._clickHandler),this._isEnabled=!0,this};c.prototype.disable=
function(){if(this._isEnabled)return this.attachTo().unbind("click touchstart",this._clickHandler),this._isEnabled=!1,this};return c});e.when("$","Observer").build("util.mouseOut",function(a,c){return function(a){a=a||10;var b=new c,k=b.boundObserve(),f=new c,m=[],l=!1,p=null,h=!1,e=function(){p&&(clearTimeout(p),p=null)},n=function(){e();p=setTimeout(function(){b.notify();e();h=!1},a)},t=function(){h||f.notify();h=!0;e()};return{add:function(a){l&&a.hover(e,n);m.push(a)},enable:function(){if(!l){for(var a=
0;a<m.length;a++)m[a].hover(t,n);l=!0}},changeTimeout:function(b){a=b},disable:function(){if(l){e();for(var a=0;a<m.length;a++)m[a].unbind("mouseenter mouseleave");h=l=!1}},onEnter:f.boundObserve(),onLeave:k,action:k}}});e.when("$","Observer","util.MouseTracker").build("util.velocityTracker",function(a,c,d){return function(){var a={},k=null,f=!1,m=null,l=new c({context:a});a.enable=function(){f||(k=d.start(),m=g.setInterval(function(){l.notify(k.velocity())},25),f=!0)};a.disable=function(){f&&(g.clearInterval(m),
m=null,k.stop(),k=null,f=!1)};a.addThreshold=function(c,d){c&&d&&l.observe(function(f){(!c.above||f>c.above)&&(!c.below||f<c.below)&&d.call(a,f)})};return a}})})(g.$Nav);(function(e){e.when("$").build("util.node",function(a){function c(a){return"object"===typeof g.Node?a instanceof g.Node:a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName}function d(b){if(c(b))return b;if(b instanceof a)return b[0];if("function"===typeof b)return d(b());if("string"===typeof b){var k=
document.createElement("div");k.innerHTML=b;return k.firstChild}return b&&"string"===typeof b.jquery?b[0]:null}return{is:c,create:d}})})(g.$Nav);(function(e){e.when("util.getQueryString").build("util.parseQueryString",function(a){return function(c){c=c||{};var d=a();if(d)for(var d=d.substring(1).split("\x26"),b=0;b<d.length;b++){var k=d[b].split("\x3d");1<k.length&&(c[k[0]]=k[1])}return c}})})(g.$Nav);(function(e){e.build("util.preload",function(){return function(a,c){var d=new Image;c&&(d.onload=
function(){c(d)});d.src=a;return d}})})(g.$Nav);(function(e){e.declare("util.randomString",function(a){a=a||{};var c="",d=a.charset||"1234567890abcdefghijklmnopqurstuvwxyz";a=a.length||10;for(var b=0;b<a;b++)c+=d.substr(Math.floor(Math.random()*d.length),1);return c})})(g.$Nav);(function(e){e.when("$","Observer","debugStream").build("util.templates",function(a,c,d){var b={},k=[],f=function(b){var c=new Function("obj","var p\x3d[],print\x3dfunction(){p.push.apply(p,arguments);};with(obj){p.push('"+
b.replace(/[\r\t\n]/g," ").replace(/'(?=[^#]*#>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<#=(.+?)#>/g,"',$1,'").split("\x3c#").join("');").split("#\x3e").join("p.push('")+"');}return p.join('');");return function(b){try{return b.jQuery=a,c(b)}catch(d){return""}}};return{add:function(a,c){if(a&&c&&!b[a]){b[a]=f(c);d("Template Added",{name:a,template:b[a]});for(c=0;c<k.length;c++)k[c].templateName===a&&k[c].render();"cart"===a&&e.declare("cartTemplateAvailable");return b[a]}},
use:function(a,c){if(b[a])return b[a](c)},get:function(a){return b[a]},getAll:function(){return b},build:f,renderer:function(a){a=a||{};var f={data:a.data||{},templateName:a.templateName||null,disabled:!1},p=new c({context:f});f.onRender=p.boundObserve();f.render=function(){if(b[f.templateName]&&f.data&&!f.disabled){var a=b[f.templateName](f.data);a&&(d("Renderer Rendered",{html:a,renderer:f}),p.notify(a))}};if(a.onRender)f.onRender(a.onRender);d("Renderer Created",f);f.render();k.push(f);return f}}})})(g.$Nav);
(function(e){e.when("$","$F").build("util.tabbing",function(a,c){var d={isEnabled:c.noOp,enable:c.noOp,disable:c.noOp,focus:c.noOp,destroy:c.noOp,bind:c.noOp,unbind:c.noOp,tailAction:c.noOp},b=[];return function(c){if(!c||1>c.length)return d;c.attr("tabindex",1);var f=".navTabbing"+b.length,m=-1,l="natural",p=!1,h=function(b){var d=m;m=-1;-1<d&&(b||c.eq(d).blur());a(document).unbind(f)},e=function(a){var b=a.keyCode||a.which;if(-1!==m&&9===b){b=m;h();if(a.shiftKey&&0===b)if("loop"===l)c.eq(c.length-
1).focus();else{if("natural"===l)return}else if(a.shiftKey)c.eq(b-1).focus();else if(b===c.length-1)if("loop"===l)c.eq(0).focus();else{if("natural"===l){c.attr("tabindex",-1);setTimeout(function(){c.attr("tabindex",1)},1);return}}else c.eq(b+1).focus();a.preventDefault();return!1}},n={isEnabled:function(){return p},bind:function(c){for(var d=0;d<b.length;d++)b[d].unbind();m=c;a(document).bind("keydown"+f,e)},unbind:h,focus:function(){if(p){for(var a=!1,b=0;b<c.length;b++)if(c.get(b)===document.activeElement){a=
!0;break}a||c.eq(0).focus()}},enable:function(){if(!p)return a.each(c,function(b){a(this).bind("focus"+f+" focusin"+f,function(){b!==m&&n.bind(b)}).bind("blur"+f+" focusout"+f,function(){n.unbind(!0)})}),p=!0,n},disable:function(){if(p)return a.each(c,function(){a(this).unbind(f)}),n.unbind(),p=!1,n},destroy:function(){n.disable();c=null;n=d},tailAction:function(a){l="block"===a?"block":"loop"===a?"loop":"natural";return n}};b.push(n);return n}})})(g.$Nav);(function(e){e.build("util.cleanUrl",function(){return function(a,
c){c.https&&(a=a.replace(/^http:\/\//i,"https://"));c.ref&&(a.match(/ref=/g)?a=a.replace(/(ref=)[^\&\?]+/g,"ref\x3d"+c.ref):a.match(/ref_=/g)?a=a.replace(/(ref_=)[^\&\?]+/g,"ref_\x3d"+c.ref):(a+=a.match(/\?/g)?"\x26":"?",a+="ref_\x3d"+c.ref));c.encode&&(a=encodeURIComponent(a));return a}})})(g.$Nav);(function(e){e.when("$").run("util.session.builder",function(){try{if(!g.sessionStorage)return;g.sessionStorage.setItem("testKey",1);g.sessionStorage.removeItem("testKey")}catch(a){return}e.declare("util.session",
{get:function(a){return g.JSON.parse(g.sessionStorage.getItem(a))},set:function(a,c){g.sessionStorage.setItem(a,g.JSON.stringify(c))},getString:function(a){return g.sessionStorage.getItem(a)},setString:function(a,c){g.sessionStorage.setItem(a,c)}})})})(g.$Nav);(function(e){g.navbar={};e.build("api.publish",function(){g.navbar.use=function(a,c){e.when("api."+a).run(c)};return function(a,c){g.navbar[a]=c;e.publish("nav."+a,c);e.declare("api."+a,c)}});e.when("$","$F","config","agent","data","async",
"api.publish","util.node","util.Proximity","util.Aligner","util.ajax","phoneHome","flyouts","flyouts.anchor","subnav.builder","searchBar","provider.dynamicMenu","util.ClickOut","SignInRedirect","fixedBar","pinnedNav","constants","flyouts.cover","nav.inline").run("PublishAPIs",function(a,c,d,b,k,f,m,l,p,h,q,n,t,v,r,x,z,A,u,B,C,D,w){var y=a("#navbar"),I=a(g),F={getFlyout:t.get,lockFlyouts:function(a){a&&t.hideAll();t.lockAll()},unlockFlyouts:t.unlockAll,toggleFlyout:function(a,b,c){if(a=t.get(a))a.unlock(),
!0===b?a.show():!1===b?a.hide():a.isVisible()?a.hide():a.show(),c&&a.lock()},setCartCount:function(a,b){k({cartCount:a});z.reset();z.fetch({data:{cartItems:"cart"}});d.ewc&&(e.when("ewc.flyout").run(function(b){b&&(d.ewc.cartCount=parseInt(a,10),b.ableToPersist()&&b.persist({noAnimation:!0}))}),d.ewc.isCompactEWCRendered&&!b&&H.when("EWC").execute(function(a){a.refresh()}))},overrideCartButtonClick:function(b){d.ewc||(a("#nav-cart").click(b),a("#nav-cart-menu-button").click(b))},getLightningDealsData:function(){return d.lightningDeals||
{}},unHideSWM:function(){var b=a("#navHiddenSwm"),c=d.swmStyleData;if(b.length&&c){var f=a("#nav-swmslot");f.parent().attr("style",c.style||"");f.children().css("display","none");b.css("display","");n.exposure(b.attr("data-selection-id"))}},navDimensions:function(){var b=y.offset();b.height=y.height();b.bottom=b.top+b.height;b.fixedBottom=y.hasClass("nav-fixed")?Math.max(I.scrollTop()+a("#nav-belt").height(),b.bottom):b.bottom;return b},fixedBar:function(a){B&&(!1===a?B.disable():B.enable())},pinnedNav:function(a){C&&
(!1===a?C.disable():C.enable())},sidePanel:function(b){if(!d.primeDay){b=a.extend({flyoutName:null,data:null,dataAjaxUrl:null},b);var f=b.flyoutName;"yourAccount"===f&&d.accountList&&(f="accountList");var h=t.get(f),m=function(a){if(a){var b={};b[h.sidePanel.dataKey]=a;k(b)}};if(h&&h.sidePanel&&h.sidePanel.dataKey){if(b.data)return m(b.data),!0;if(b.dataAjaxUrl&&h.link)return f=c.once().on(function(){q({url:b.dataAjaxUrl,dataType:"json",success:function(a){m(a)}})}),h.isVisible()?f():(p.onEnter(h.link,
[20,100,60,100],f),h.onShow(f),h.link.focus(f)),!0}return!1}},createTooltip:function(b){b=a.extend({arrow:"top",timeout:1E4,cover:!1,addCloseX:!1,disableCoverPinned:!0,clickCallback:null,closeOnMouseOut:!1},b);var c=F.createFlyout(b);if(c){var d=a.extend(c,{addCloseX:function(){d.elem().append('\x3cdiv class\x3d"nav-tooltip-close nav-timeline-icon"\x3e\x3c/div\x3e')},fadeIn:function(a,b){d.isVisible()||(d.show(),d.elem().css("opacity",0).fadeTo(a||400,1,b))},fadeOut:function(a,b){if(d.isVisible()){d.hide();
var c=d.elem();c.show();c.css("opacity",1).fadeTo(a||400,0,function(){b&&b();c.hide().css("opacity",1)})}}});b.addCloseX&&d.addCloseX();b.cover&&w(d,b.disableCoverPinned);b.clickCallback&&d.elem().click(function(c){a(c.target).hasClass("nav-tooltip-close")?d.hide():b.clickCallback()});var f=null,h=b.timeout,k=A.newInstance(),m=function(){clearTimeout(f);d.fadeOut(400,function(){k.disable()})};d.elem().hover(function(){d.show();d.elem().stop().css("opacity",1);clearTimeout(f)},function(){"none"!==
h?f=setTimeout(m,h):b.closeOnMouseOut&&m()});k.ignore(d.elem()).action(m).enable();d.onShow(function(){if("none"!==h)f=setTimeout(m,h);else{var b=a(document);b.scroll(function(){b.scrollTop()>D.REMOVE_COVER_SCROLL_HEIGHT&&m()})}});e.when("navDismissTooltip").run(function(){d.hide();d.lock()});return d}},createFlyout:function(b){b=a.extend(!0,{name:null,content:"\x3cdiv\x3e\x3c/div\x3e",arrow:null,className:"",align:{from:"bottom center",to:"top center",base:"#navbar",alignTo:null,offsetTo:"#navbar"},
onAlign:c.noOp},b);if(b.name&&b.content){var d=t.create({name:b.name,buildNode:function(){var c=a("\x3cdiv class\x3d'"+b.className+"'\x3e\x3c/div\x3e");"top"===b.arrow&&c.append("\x3cdiv class\x3d'nav-arrow'\x3e\x3cdiv class\x3d'nav-arrow-inner'\x3e\x3c/div\x3e\x3c/div\x3e");c.append(l.create(b.content));return c}}),f=null;d.onAlign(function(){if(!f){b.align.target=d.elem();b.align.base=a(b.align.base);b.align.alignTo=a(b.align.alignTo||v());b.align.offsetTo=a(b.align.offsetTo);var c=new h(b.align);
f=function(){c.align();b.onAlign.apply(d,arguments)}}f()});e.declare("flyoutAPI."+b.name.replace(" ",""),d);return d}},update:function(b){if(d.signInOverride){var c=a('#navbar [data-nav-role\x3d"signin"]');a.each(c,function(b,c){u.setRedirectUrl(a(c),null,null)})}return b instanceof Object?(b.cart&&b.cart.data&&"count"===b.cart.type&&F.setCartCount(b.cart.data.count),b.catsubnav&&r(b.catsubnav),b.searchbar&&"searchbar"===b.searchbar.type&&k({searchbar:b.searchbar.data}),b.swmSlot&&(b=b.swmSlot.swmContent,
c=a("#nav-swmslot"),b.data&&"html"===b.type&&1===c.length&&c.html(b.data)),!0):!1},updateSearchDropdown:function(a){return x.updateSearchDropdownCard(a)},showSubnav:function(){var b=a("#nav-subnav");b&&(b.style.display="block")},hideSubnav:function(){var b=a("#nav-subnav");b&&(b.style.display="none")},hasSubnav:function(){return!!a("#nav-subnav")},getSearchBackState:function(){return d.searchBackState||{}},removePrimeExperience:function(){k({isPrime:!1})}},G;for(G in F)F.hasOwnProperty(G)&&m(G,F[G]);
e.publish("navbarJSLoaded")});e.when("$","data").run("setupRefreshPrime",function(a,c){c.observe("isPrime",function(c){c||(a("#nav-logo").removeClass("nav-prime-1"),a(".nav-logo-tagline").text("Try Prime"),a(".nav-logo-tagline").attr("href","/gp/prime/ref\x3dnav_logo_prime_join"),a("#nav-link-prime .nav-line-1").text("Try"))})})})(g.$Nav);(function(e){e.when("$","subnav.initFlyouts","nav.inline").run("subnav.init",function(a,c){var d=a("#nav-subnav");0<d.length&&c();var b=location.href.toLowerCase().split("?");
a("a[data-nav-link-highlight]",d).each(function(){var c=this.href.toLowerCase().split("?"),d=0;2===b.length&&2===c.length?-1<b[0].indexOf(c[0])&&b[1]===c[1]&&(d=1):1===b.length&&1===c.length&&-1<b[0].indexOf(c[0])&&(d=1);d&&(c=a(this),c.attr("data-nav-link-bold")&&c.css({"font-weight":"bold"}),c.attr("data-nav-link-color")&&c.css({color:c.attr("data-nav-link-color")}),c.attr("data-nav-link-bottom-style")&&c.css({"border-bottom":c.attr("data-nav-link-bottom-style")}))})});e.when("$","subnav.initFlyouts",
"constants","nav.inline").build("subnav.builder",function(a,c,d){a("#navbar");return function(b){var k=a("#nav-subnav");0===k.length&&(k=a("\x3cdiv id\x3d'nav-subnav'\x3e\x3c/div\x3e").appendTo("#navbar"));var f=location.href.toLowerCase().split("?");k.html("");k.hide();if(b.categoryKey&&b.digest){k.attr("data-category",b.categoryKey).attr("data-digest",b.digest).attr("class",b.category.data.categoryStyle);b.style?k.attr("style",b.style):k.attr("style")&&k.removeAttr("style");var m=function(b){if(b&&
b.href){var c="nav-a",m=b.text,l=b.dataKey;if(!m&&!b.image)if(l&&0===l.indexOf(d.ADVANCED_PREFIX))m="",c+=" nav-aText";else return;m=b.image?"\x3cimg src\x3d'"+b.image+"'class\x3d'nav-categ-image' \x3e\x3c/a\x3e":m;c=a("\x3ca href\x3d'"+b.href+"' class\x3d'"+c+"'\x3e\x3c/a\x3e");m=a("\x3cspan class\x3d'nav-a-content'\x3e"+m+"\x3c/span\x3e");"image"===b.type&&(m.html(""),c.addClass("nav-hasImage"),b.rightText="");b.bold&&!b.image&&c.addClass("nav-b");b.floatRight&&c.addClass("nav-right");b.flyoutFullWidth&&
"0"!==b.flyoutFullWidth&&c.attr("data-nav-flyout-full-width","1");if(b.src){var e=["nav-image"];b["absolute-right"]&&e.push("nav-image-abs-right");b["absolute-right"]&&e.push("nav-image-abs-right");a("\x3cimg src\x3d'"+b.src+"' class\x3d'"+e.join(" ")+"' alt\x3d'"+(b.alt||"")+"' /\x3e").appendTo(m)}b.rightText&&m.append(b.rightText);m.appendTo(c);l&&(a("\x3cspan class\x3d'nav-arrow'\x3e\x3c/span\x3e").appendTo(c),c.attr("data-nav-key",l).addClass("nav-hasArrow"));b.highlightLink&&(c.attr("data-nav-link-highlight",
b.highlightLink),l=b.href.toLowerCase().split("?"),m=0,2===f.length&&2===l.length?-1<f[0].indexOf(l[0])&&f[1]===l[1]&&(m=1):1===f.length&&1===l.length&&-1<f[0].indexOf(l[0])&&(m=1),m&&(b.highlightLinkBold&&c.css({"font-weight":"bold"}),b.highlightLinkColor&&c.css({color:b.highlightLinkColor}),b.highlightLinkBottomStyle&&c.css({"border-bottom":b.highlightLinkBottomStyle})));c.appendTo(k);k.append(document.createTextNode(" "))}};b.category&&b.category.data&&(b.category.data.bold=!0,m(b.category.data));
if(b.subnav&&"linkSequence"===b.subnav.type)for(var l=0;l<b.subnav.data.length;l++)m(b.subnav.data[l]);k.show();c()}}});e.when("$","$F","panels","debugStream","util.Proximity","provider.subnavFlyouts","util.mouseOut","flyouts.create","cover","flyouts.accessibility","provider.advancedSubnavFlyouts","advKeyDecoder","constants","util.Aligner","flyouts.anchor","flyouts","config").build("subnav.initFlyouts",function(a,c,d,b,k,f,m,l,p,h,g,n,t,v,r,x,z){var A=null,u=m(),B=!1,C=null,D=t.ADVANCED_PREFIX,w=
a("#navbar"),y=function(){f.fetch();g.fetchLazy()},I={},F=function(b){var d=b.attr("data-nav-key"),f=b.attr("data-event"),k=b.attr("data-nav-flyout-full-width"),m=b.attr("data-nav-asinsubnav-flyout");if(d){m=k&&m?"nav-fullWidthSubnavFlyout nav-asinsubnav-flyout":k?"nav-fullWidthSubnavFlyout":"nav-subnavFlyout";x.destroy(d);var g=n(d),t=l({key:d,panelDataKey:g?D+g.jsonkey+"Content":d,link:b,event:{t:"subnav",id:f},fullWidth:!!k,className:m,arrow:"top",suspendTabbing:!0,aligner:k?E:function(b){var c=
b.$link.find(".nav-arrow, .nav-icon"),d=z.rightMarginAlignEnabled&&b.$flyout.find(".right-margin-subnav-flyout").length?"top rightArrow":"top center",f=new v({base:c,target:b.$flyout,from:"bottom center",to:d,anchor:"top",alignTo:r(),constrainTo:w,constrainBuffer:[3,0,0,3],constrainChecks:[!0,!1,!1,!0],offsetTo:w}),k=new v({base:c,target:a(".nav-arrow",b.$flyout),offsetTo:w,alignTo:b.$flyout,anchor:"top center",from:"center",to:"center"});return function(){f.align();k.align();b.$flyout.addClass("nav-subnavFlyout-nudged")}}});
if(g){d=g.jsonkey;b.setSubnavText=function(a){var c=b.find(".nav-arrow");b.html(a).removeClass("nav-hasAtext").append(c)};var q=D+d;I[q]={flyout:t,link:b};e.declare(D+d+".flyout",function(){return I[q].flyout});e.declare(D+d+".toplink",function(){return I[q].link})}var F=h({link:b,onEscape:function(){t.hide();b.focus()}});t.groups.add("subnavFlyoutGroup");u.add(b);u.add(t.elem());t.getPanel().onData(function(a){a.flyoutWidth&&t.elem().css({width:a.flyoutWidth})});t.getPanel().onRender(c.once().on(function(){F.elems(a(".nav-hasPanel, a",
t.elem()))}));t.onHide(function(){F.disable()});t.hide.check(function(){if(B&&C===this)return!1});t.onShow(function(){var a=C;C=this;a&&a!==this&&a.hide();p.hide()});t.onShow(y)}};return function(){g.refresh();g.fetchOnload();var b=a("#nav-subnav");A&&A.unbind();A=k.onEnter(b,[20,40,40,40],y);a("a[data-nav-key]",b).each(function(){F(a(this))});u.onEnter(function(){B=!0});u.onLeave(function(){B=!1;C&&C.hide();C=null});u.enable()}});e.when("$","dataPanel","advKeyDecoder","constants","metrics","subnav.initShelf").run("subnav.shelf.create",
function(a,c,d,b,k,f){var m=a("#nav-subnav-content-shelf");if(0!==m.length){m=m.data("nav-key");d=d(m);var l=new Date;c=c({dataKey:d?b.ADVANCED_PREFIX+d.jsonkey+"Content":m,className:"subnav-shelf-content",spinner:!0,visible:!0,timeoutDataKey:null,timeoutDelay:5E3});c.onRender(function(){k.count("subnav_shelf_render_latency",new Date-l)});a("#nav-subnav-content-shelf").html(c.elem());f()}});e.when("$","provider.subnavContentShelf","provider.advancedSubnavShelf").build("subnav.initShelf",function(a,
c,d){if(0!==a("#nav-subnav-content-shelf").length)return function(){c.fetch();d.refresh();d.fetchAll()}})})(g.$Nav);(function(e){e.when("constants").build("advKeyDecoder",function(a){return function(c){if(!c||0!==c.indexOf(a.ADVANCED_PREFIX))return!1;c=c.split(":");var d=c.length;return 4>d?!1:{jsonkey:c[d-2],endpoint:c.slice(1,-2).join(":"),onload:"1"===c[d-1]}}})})(g.$Nav);(function(e){e.when("Observer").build("searchBar.observers",function(a){return{scopeChanged:new a}});e.when("$","$F","agent",
"config","onOptionClick","async","searchMetrics","searchBar.observers","nav.inline").run("searchBar",function(a,c,d,b,k,f,m,l){function e(){k(u,function(){n.clearBlur();h.update();h.select();C.focus()});u.change(h.update).keyup(n.keyListener).blur(n.blur);u.focus(function(){t.length||n.clearBlur();x.addClass("nav-focus")}).blur(function(){x.removeClass("nav-focus")});z.click(function(a){C.focus();return!1})}b=c.noOp;if(d.ie6)return{active:b,inactive:b,clearBlur:b,focus:b,blur:b,keyListener:b,form:a(),
input:{hasValue:b,val:b,el:a()},scope:{prevIndex:null,init:b,hasTextChanged:b,text:b,value:b,digest:b,selectedIndex:b,set:b,getOptions:function(){return a()},appendOption:b},facade:{init:b,resize:b,text:b,update:b,select:b}};var h,q,n;b=a(g);var t=a("#navbar.layout2"),v=a("#nav-search"),r=a(".nav-searchbar",v),x=a(".nav-search-scope",v),z=a(".nav-search-facade",v),A=a(".nav-search-label",z),u=a(".nav-search-dropdown",v),B=a(".nav-search-submit",v),v=a(".nav-search-submit .nav-input",v),C=a("#twotabsearchtextbox"),
D=a(".srch_sggst_flyout"),w=new m({scopeSelect:u,inputTextfield:C,submitButton:v,issContainer:D});w.init();var y=null;m={hasValue:function(){var a=!!C.val();r[a?"addClass":"removeClass"]("nav-hasTerm");return a},val:function(a){if(a)C.val(a);else return C.val()},el:C};q={prevIndex:null,init:c.once().on(function(){q.prevIndex=u[0].selectedIndex}),hasTextChanged:function(){return q.prevIndex!==u[0].selectedIndex},text:function(){q.prevIndex=u[0].selectedIndex;var b=a("option:selected",u);return 0===
b.length?null:b.html()},value:function(){var b=a("option:selected",u);return 0===b.length?null:b.val()},digest:function(a){return a?(u.attr("data-nav-digest",a),a):u.attr("data-nav-digest")},selectedIndex:function(b){if(0<b||0===b){u.attr("data-nav-selected",b);a("option",u).eq(b).attr("selected","selected");var c=a("option",u).eq(b).text(),d=u.attr("title");C.attr("placeholder")&&d&&c&&C.attr("placeholder",d+" "+c.trim());return b}return u.attr("data-nav-selected")},set:function(b,c,d){q.prevIndex=
null;if(c&&c===q.digest())d!==q.selectedIndex()&&q.selectedIndex(d||0);else{u.blur().empty();for(var f=0;f<b.length;f++){var k=b[f],h=k._display||"";delete k._display;a("\x3coption /\x3e").html(h).attr(k).appendTo(u)}q.digest(c||" ");q.selectedIndex(d||0)}},getOptions:function(){return a("option",u)},appendOption:function(a){a.appendTo(u);h.update()}};h={formAction:"/s/ref\x3d",searchAlias:"search-alias",init:c.once().on(function(){z.attr("data-value")!==q.value()&&h.update();q.init()}),resize:function(){if(x.is(":visible")){var a=
x.outerHeight(),b=u.outerHeight();u.css({top:(a-b)/2});A.css({width:"auto"});a=t.length?150:140;C.width()<a&&(a=Math.max(0,r.width()-a-B.width()-(x.outerWidth(!0)-A.width())),A.css({width:a.toString()+"px"}));a=x.width();(d.iOS||u.width()<a)&&u.width(a)}},text:function(a){if(!a)return A.text();A.html(a);l.scopeChanged.notify(a);h.resize()},update:function(){q.hasTextChanged()&&h.text(q.text())},select:function(){if(n&&n.form&&n.form.attr("dd-ref")){var a=n.form.attr("action");if(a&&a.startsWith(h.formAction)){var b=
q.value();if(b&&b.startsWith(h.searchAlias)&&(b=b.split("\x3d"),2===b.length&&(b=b[1],a=a.split("\x3d"),2===a.length))){var a=a[1],c=h.formAction;a.match(/^nb_sb_(no)?ss(?!.*_sa_)/)?c+=a+"_sa_"+b:a.match(/^nb_sb_(no)?ss.*_sa_/)&&(c+=a.replace(/^(.*_sa_).*$/,"$1"+b));n.form.attr("action",c)}}}}};n={active:function(){r.addClass("nav-active")},inactive:function(){r.removeClass("nav-active")},clearBlur:function(){y&&(clearTimeout(y),y=null)},focus:function(){n.active();n.clearBlur()},blur:function(){y&&
(clearTimeout(y),y=null);y=setTimeout(function(){n.inactive();n.clearBlur()},300)},keyListener:function(a){13===a.which&&C.focus();9!==a.which&&16!==a.which&&h.update()},updateSearchDropdownCard:function(b){b=a("\x3cdiv/\x3e").append(b);var c=a(".nav-search-scope",b),d=a(".nav-search-facade",b),f=a(".nav-search-label",b),k=a(".nav-search-dropdown",b);return 0<c.length&&0<d.length&&0<f.length&&0<k.length?(x=c,z=d,A=f,u=k,a("#nav-search-dropdown-card").empty().append(b.children()),w.updateScopeSelect(u),
e(),!0):!1},form:r,input:m,scope:q,facade:h};e();C.focus(n.focus).blur(n.blur);v.blur(n.blur);v.focus(function(){t.length||n.clearBlur();B.addClass("nav-focus")}).blur(function(){B.removeClass("nav-focus")});b.resize(c.throttle(300).on(h.resize));C[0]===document.activeElement&&n.focus();f(h.init);return n});e.when("data","searchBar").run("searchBarUpdater",function(a,c){a.observe("searchbar",function(a){var b=a["nav-metadata"]||{};a.options&&(c.scope.set(a.options,b.digest,b.selected),c.facade.update(),
c.facade.resize())})});e.when("searchBar","search-js-autocomplete").run("SddIss",function(a,c){c.keydown(function(c){setTimeout(function(){a.keyListener(c)},10)});e.declare("SddIssComplete")});e.when("$","agent").build("onOptionClick",function(a,c){return function(d,b){var k=a(d);if(c.mac&&c.webkit||c.touch&&!c.ie10)k.change(function(){b.apply(k)});else{var f={click:0,change:0};d=function(a,c){return function(){f[a]=(new Date).getTime();100>=f[a]-f[c]&&b.apply(k)}};k.click(d("click","change")).change(d("change",
"click"))}}});e.when("$","searchBar","iss.flyout","searchBar.observers").build("searchApi",function(a,c,d,b){var k={};k.val=c.input.val;k.on=function(a,k){if(a&&k&&"function"===typeof k)switch(a){case "scopeChanged":b.scopeChanged.observe(k);break;case "issShown":d.onShow(k);break;case "issHidden":d.onHide(k);break;default:c.input.el.bind(a,k)}};k.scope=function(a){if(a)c.facade.text(a);else return c.facade.text()};k.options=function(b,d){b&&(b=a(b),d&&b.attr("selected","selected"),c.scope.appendOption(b));
return c.scope.getOptions()};k.action=function(a){if(a)c.form.attr("action",a);else return c.form.attr("action")};k.submit=function(a){a&&"function"!==typeof a?c.form.submit(a):c.form.submit()};k.flyout=d;return k})})(g.$Nav);(function(e){e.when("$","flyoutAPI.SearchSuggest","config","cover","nav.inline").run("issHackery",function(a,c,d,b){var k=a("#nav-iss-attach"),f=a("#nav-search .nav-searchbar"),m=!!d.beaconbeltCover;c.onAlign(function(){a("div:first-child",this.elem()).css({width:k.width()})});
c.onShow(function(){m&&b.show();f.addClass("nav-issOpen")});c.onHide(function(){m&&b.hide();f.removeClass("nav-issOpen")})})})(g.$Nav);(function(e){e.when("$","$F","panels","config","debugStream","nav.inline").build("cover",function(a,c,d,b,k){var f=a(document),m=a(g),l=a("#navbar"),e=function(){},h=d.create({name:"cover",visible:!1,rendered:!0,elem:function(){return a("\x3cdiv id\x3d'nav-cover'\x3e\x3c/div\x3e").click(function(){return e.apply(this,arguments)}).appendTo(l)}});h.LAYERS={ALL:6,BELT:5,
MAIN:2,SUB:1,NONE:"auto"};h.setLayer=function(a){a&&a in h.LAYERS||(a="NONE");h.elem().css({zIndex:h.LAYERS[a]})};h.setClick=function(a){a&&"function"===typeof a||(a=c.noOp);e=a};var q=function(){var b=Math.max(f.height(),m.height())-l.offset().top,c=a(".nav-ewc-persistent-hover").hasClass("nav-ewc-full-height-persistent-hover"),d=a(".nav-ewc-persistent-hover").hasClass("nav-ewc-compact-view");c||d?h.elem().css({height:b,width:l.outerWidth()+a("#nav-flyout-ewc").outerWidth()}):h.elem().css({height:b})};
h.onShow(function(a){a=a||{};k("Cover: Show");h.setLayer(a.layer);h.setClick(a.click);q();a=100;if(b.fullWidthCoreFlyout||b.flyoutAnimation)a=550;h.elem().fadeIn(a,function(){var a=h.elem().get(0);a.style.removeAttribute&&a.style.removeAttribute("filter")});m.resize(q)});h.onHide(function(){k("Cover: Hide");h.elem().stop().fadeOut(100,function(){h.elem().css("opacity","0.6")});m.unbind("resize",q)});return h})})(g.$Nav);(function(e){e.when("$","$F","data","config","flyout.yourAccount","provider.ajax",
"util.Proximity","logEvent","sidepanel.yaNotis").iff({name:"sidepanel.yaNotis",op:"falsey"}).run("sidepanel.csYourAccount",function(a,c,d,b,k,f,m,l){if(!b.primeDay){var e=!0,h=!1,g,n,t,v,r=!1,x=!0,z=function(){h||(x=!1,g&&(g(n),h=!0))},A=function(){e=!1;x?r||(t?(t(v),r=!0):b.sdaYourAccount&&b.sdaYourAccount.url||z()):z()};c=function(){return{register:function(a,b){h||(g=a,n=b);e||x||z()},sdaRegister:function(a,b){r||(t=a,v=b);e||A()},biaFallback:z,sdaNotRendering:function(){x=!1;z()}}}();var u={count:0,
decrement:function(){u.count=Math.max(u.count-1,0)}},B=function(){var b=a("#csr-hcb-wrapper"),c=a(".csr-hcb-content",b);b.remove();if(1!==c.length)return A(),!1;l({t:"hcb"});d({"yourAccount-sidePanel":{html:c[0].outerHTML}});return!0};if(!b.csYourAccount||!b.csYourAccount.url)return e=B(),c;var C=f({url:b.csYourAccount.url,data:{rid:b.requestId},success:function(c){if(c)if(1>(((c.template||{}).data||{}).items||[]).length)B();else{var f=c.template.name;if(f){c={"yourAccount-sidePanel":c};"notificationsList"===
f?l({t:"csnoti"}):"discoveryPanelList"!==f&&"discoveryPanelSummary"!==f||l({t:"discoverypanel"});if("notificationsList"===f)k.sidePanel.onRender(function(){var c=this.elem(),d=a(".nav-item",c).not(".nav-title");u.count=d.length;var f=function(){var b=c.height();a(".nav-item",c).each(function(){var c=a(this);b-=c.outerHeight(!0);c[0<=b?"show":"hide"]()})},h=function(c){a.ajax({url:b.csYourAccount.url,type:"POST",data:{dismiss:c.attr("data-noti-id"),rid:b.requestId},cache:!1,timeout:500});var d=c.parent();
d.slideUp(300,function(){d.remove();f()});u.decrement();0===u.count&&(k.sidePanel.hide(),B()||(c=a("#nav-flyout-profile").find(".nav-column"),c=c.eq(3),c.removeClass("nav-column-break")))};c.bind("click",function(b){var c=a(b.target);if(c.is(".nav-noti-list-x"))return h(c),b.preventDefault(),!1})});d(c)}else B()}else B()},error:B});f=function(){C.fetch()};k.onShow(f);k.link.focus(f);m.onEnter(k.link,[20,40,40,40],f);return c}})})(g.$Nav);(function(e){e.when("$","$F","config","flyout.yourAccount",
"util.Proximity","sidepanel.csYourAccount","api.sidePanel","metrics","constants","debug.param").run("sdaSidePanel",function(a,c,d,b,k,f,m,l,e,h){if(!d.primeDay&&d.sdaYourAccount&&d.sdaYourAccount.url){var q=!1,n=!1,t=!0,v=2500,r=function(){l.increment("SDA:YourAccount:SidePanel:FallbackCalled");f&&!q&&t?(t=!1,f.sdaNotRendering()):f&&!n&&(f.biaFallback(),n=!0)},x=d.sdaYourAccount.url,z=function(a){a.status&&"ok"!==a.status?(l.increment("SDA:YourAccount:SidePanel:NotificationStatusError"),r()):(a.impressionThreshold&&
(v=a.impressionThreshold),m({flyoutName:"yourAccount",data:a})||r())};c=c.once().on(function(){h("SDAYourAccountNoNotification")?r():(l.increment("SDA:YourAccount:SidePanel:RequestNotification"),a.ajax({url:x,type:"GET",dataType:"json",cache:!1,timeout:5E3,data:{communicationChannelType:e.COMMUNICATION_CHANNEL_TYPE},success:function(a){a&&a.html?null===a.html||""===a.html?(l.increment("SDA:YourAccount:SidePanel:NotificationNotReceived"),r()):(l.increment("SDA:YourAccount:SidePanel:NotificationReceived"),
f&&(f.sdaRegister(z,a),q=!0)):(l.increment("SDA:YourAccount:SidePanel:NotificationNotReceived"),r())},error:function(a,b,c){404===a.status?l.increment("SDA:YourAccount:SidePanel:RequestNotificationError404"):500===a.status?l.increment("SDA:YourAccount:SidePanel:RequestNotificationError500"):"timeout"===b?l.increment("SDA:YourAccount:SidePanel:RequestNotificationErrorTimeout"):l.increment("SDA:YourAccount:SidePanel:RequestNotificationErrorUnknown");l.increment("SDA:YourAccount:SidePanel:NotificationReceivedError");
r()}}))});b.isVisible()?c():(k.onEnter(b.link,[20,40,40,40],c),b.onShow(c),b.link.focus(c));var A=new function(){var c,f,k,m;this.initializeVariables=function(){c=a("#sda-side-panel-content #sda-side-panel-issue");f=c.attr("data-address-issue-id");k=c.attr("data-address-issue-type");var b=a('#sda-side-panel-content input[name\x3d"appActionToken"]'),d={};d.appActionToken=b.val();d.value="csrfTokenValue";m=a.param(d)};this.postImpression=function(){l.increment("SDA:YourAccount:SidePanel:Impression");
a.ajax({url:"/ma/api/impression?"+m,type:"POST",contentType:"application/json",dataType:"json",data:g.JSON.stringify({addressIssueId:f,addressIssueType:k,communicationChannelType:e.COMMUNICATION_CHANNEL_TYPE}),cache:!1,timeout:5E3})};this.postAcceptNotification=function(c){var n=function(c){"ok"===c?a("#sda-side-panel-thanks").show():a("#sda-side-panel-error").show();setTimeout(function(){b.sidePanel.hide();if(d.fullWidthCoreFlyout){var c=a("#nav-flyout-profile").find(".nav-column"),c=c.eq(3);c.removeClass("nav-column-break")}r()},
3E3)},t=function(b){a("#sda-side-panel-content").hide("fast",function(){a("#sda-side-panel-content").remove();n(b)})};a("#sda-side-panel-buttons \x3e button").removeClass("sda-button");h("SDAYourAccountNoThanks")?t("error"):(l.increment("SDA:YourAccount:SidePanel:AcceptNotification"),a.ajax({url:"/ma/api/customerResponse?"+m,type:"POST",contentType:"application/json",dataType:"json",data:g.JSON.stringify({addressIssueId:f,addressIssueType:k,communicationChannelType:e.COMMUNICATION_CHANNEL_TYPE,customerResponseType:c,
customerResponseValue:null}),cache:!1,timeout:5E3,success:function(a){a&&"ok"===a.status?(l.increment("SDA:YourAccount:SidePanel:AcceptNotificationStatusSuccess"),t("ok")):(l.increment("SDA:YourAccount:SidePanel:AcceptNotificationStatusError"),t("error"))},error:function(a,b,c){404===a.status?l.increment("SDA:YourAccount:SidePanel:AcceptNotificationError404"):500===a.status?l.increment("SDA:YourAccount:SidePanel:AcceptNotificationError500"):"timeout"===b?l.increment("SDA:YourAccount:SidePanel:AcceptNotificationErrorTimeout"):
l.increment("SDA:YourAccount:SidePanel:AcceptNotificationUnknown");t("error")}}))};this.redirectNotification=function(){l.increment("SDA:YourAccount:SidePanel:RedirectNotification");a("#sda-side-panel-buttons \x3e button").removeClass("sda-button");g.location="/ma/addressIssuePage/addressIssueDetails?addressIssueId\x3d"+f}},u=null,B=function(){a("#sda-side-panel-content").length&&(l.increment("SDA:YourAccount:SidePanel:NotificationDisplayed"),u=setTimeout(A.postImpression,v))};b.onShow(function(){B()});
b.onHide(function(){clearTimeout(u)});b.sidePanel.onRender(function(){0!==a("#sda-side-panel-content").length&&(l.increment("SDA:YourAccount:SidePanel:NotificationRendered"),A.initializeVariables(),B(),a("#sda-side-panel-content").bind("click",function(b){b.preventDefault();b=a(b.target);b.is("#sda-redirect-notification.sda-button")?A.redirectNotification():b.is("#sda-accept-notification.sda-button")&&(A.postAcceptNotification(b.attr("data-customer-response-type")),clearTimeout(u),u=null);return!1}))})}})})(g.$Nav);
(function(e){e.when("$","$F","agent","flyouts","fixedBarWithEwcHandling").build("fixedBar",function(a,c,d,b,k){var f=!1,m=!1,l,e,h,q,n,t,v,r,x,z,A,u,B=c.once().on(function(){l=a(g);e=a("#navbar");h=a("#nav-main");n=a("#nav-shop");t=a("#nav-search");r=a("#nav-tools");x=a("#nav-swmslot");v=a("#nav-xshop-container");z=a("#nav-main \x3e .nav-left");a("#nav-main \x3e .nav-right");A=a("#nav-main \x3e .nav-fill");u=a("#nav-belt \x3e .nav-right");q=a("\x3cdiv\x3e\x3c/div\x3e").css({position:"relative",display:"none",
width:"100%",height:h.height()+"px"}).insertBefore(h);0<A.find("#nav-shop").length&&n.detach().appendTo(z)}),C=function(){e.removeClass("nav-fixed");t.removeClass("nav-fixed");r.removeClass("nav-fixed");r.css({right:""});x.show();t.css({left:0,right:0});v.removeClass("nav-fixed");a("#navbar").hasClass("layout3")||a("#nav-belt \x3e .nav-left").css({width:a("#nav-logo").outerWidth(!0)+a("#nav-hamburger-menu").outerWidth(!0)});k.setRelative();q.hide();m=!1},D=function(){var a=l.scrollTop();0<a&&b.hideAll();
m&&q.offset().top>=a?C():!m&&h.offset().top<a&&(a=u[0].getBoundingClientRect().width,e.addClass("nav-fixed"),t.addClass("nav-fixed"),r.addClass("nav-fixed"),k.setFixed(z.width(),a),x.hide(),v.addClass("nav-fixed"),q.show(),m=!0)};return{enable:function(){f||d.ie6||d.quirks||(B(),l.bind("scroll.navFixed",D),D(),f=!0)},disable:function(){f&&(l.unbind("scroll.navFixed"),C(),f=!1)}}})})(g.$Nav);(function(e){e.when("$","$F","constants","metrics","config","agent","page.domReady").build("carousel",function(a,
c,d,b,k,f){function m(a){a=a.children();for(var b=a.length,c=0,f=0;f<b;f++)c+=a.eq(f).width();return c+d.CAROUSEL_WIDTH_BUFFER}function l(){r.css({width:D,"float":"left"})}function e(b){x.hover(function(){z.fadeIn()},function(){z.fadeOut()});I.resize(c.throttle(300).on(function(){w=a("#navbar").width();r.css("left","0");u.removeClass("nav-feed-control-disabled");A.addClass("nav-feed-control-disabled");l()}));A.click(function(a){a.preventDefault();t(b);return!1});u.click(function(a){a.preventDefault();
n(b);return!1});f.touch&&g.addEventListener("touchstart",v,!1)}function h(a){B.bind("mouseenter",function(){a.mouseOutUtility&&a.mouseOutUtility.changeTimeout(600)});x.bind("mouseenter",function(){a.mouseOutUtility&&a.mouseOutUtility.changeTimeout(0)})}function q(a,c){b.increment("nav-"+a.getName()+"-"+c+"-arrow-clicked");k.pageType&&b.increment("nav-"+a.getName()+"-"+c+"-arrow-clicked-"+k.pageType.toLowerCase())}function n(a){A.removeClass("nav-feed-control-disabled");var b=parseInt(r.css("left"),
10);if(isNaN(b)||null===b)b=0;var c=w-D,b=b-y;b<c&&(b=c);r.animate({left:b},300,function(){b===c&&u.addClass("nav-feed-control-disabled")});q(a,"right")}function t(a){u.removeClass("nav-feed-control-disabled");var b=r.css("left"),b=parseInt(b,10)+y;0<b&&(b=0);r.animate({left:b},300,function(){0===b&&A.addClass("nav-feed-control-disabled")});q(a,"left")}function v(){x.addClass("nav-carousel-swipe");z.remove()}var r,x,z,A,u,B,C,D,w,y,I;return{create:function(b,c){var d=m(b);0===b.parent(".nav-carousel-container").length&&
d>=a(g).width()&&0<a(".nav-timeline-item").length&&(r=b,r.wrap('\x3cdiv class\x3d"nav-carousel-container"\x3e\x3c/div\x3e'),r.after('\x3cdiv class\x3d"nav-control-hidden"\x3e\x3ca class\x3d"nav-feed-carousel-control nav-feed-left nav-feed-control-disabled " href\x3d"#"\x3e\x3cspan class\x3d"nav-timeline-icon nav-feed-arrow"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/div\x3e\x3cdiv class\x3d"nav-control-hidden nav-control-hidden-right"\x3e\x3ca class\x3d"nav-feed-carousel-control nav-feed-right" href\x3d"#"\x3e\x3cspan class\x3d"nav-timeline-icon nav-feed-arrow"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/div\x3e'),
x=r.parent(".nav-carousel-container"),z=x.find(".nav-feed-carousel-control"),A=x.find(".nav-feed-left"),u=x.find(".nav-feed-right"),B=x.find(".nav-control-hidden"),C=r.children(":first").width(),D=m(r),w=x.width(),y=w-C,I=a(g),l(),e(c),h(c))},readjust:function(a){r=a;D=m(r);D<=w&&(a=x.parent(),a.append(r),a.css("width","100%"),x.remove(),r.css("left",0))}}})})(g.$Nav);(function(e){e.when("$","metrics","page.domReady").run("navbackToTopCounter",function(a,c){a("#navBackToTop").click(function(){c.increment("nav-backToTop")})})})(g.$Nav);
(function(e){e.when("$","getRefTag","metrics").run("xshopImpressions",function(a,c,d){var b=a("#nav-xshop"),k=b.offset().top+b.outerHeight();a("#nav-xshop \x3e .nav-a").each(function(){var b=c(a(this).attr("href"));b&&a(this).offset().top+a(this).outerHeight()<k&&d.increment("Nav:Xshop:Impression:"+b)})})})(g.$Nav);(function(e){e.when("configComplete").run("buildConfigObject",function(){if(!e.getNow("config")){var a={},c=e.stats(),d;for(d in c)if(c.hasOwnProperty(d)){var b=d.split("config.");2===
b.length&&(a[b[1]]=c[d].value)}e.declare("config",a)}});e.when("$","data","debug.param","page.domReady").build("dataProviders.primeTooltip",function(a,c,d){var b=!1,k={load:function(){if(!b){var d=a("#nav-prime-tooltip").html();return d?(c({primeTooltipContent:{html:d}}),b=!0):!1}}};d("navDisablePrimeTooltipData")||k.load();return k});e.when("$","now","debugStream","data","util.ajax","debug.param","metrics","logUeError").build("provider.ajax",function(a,c,d,b,k,f,m,l){var e=function(a){var b={},d=
function(a){a=a||{};var b="";try{b=g.JSON.stringify(a)}catch(c){b=a.url+"?";a=a.data||{};for(var d in a)a.hasOwnProperty(d)&&"string"===typeof a[d]&&(b+=d+":"+a[d]+";")}return b};return{add:function(a){b[d(a)]=c()},ok:function(f){return(f=b[d(f)])?f<c()-a:!0},reset:function(){b={}}}};return function(c){c=a.extend({throttle:24E4},c);var g=null,n=e(c.throttle);c.dataType="json";var t={fetch:function(e){e=a.extend(!0,{},e||{},c);if(g)setTimeout(function(){t.fetch(e)},250);else{if(e.isNavyaanContent||
e.isRawHTMLContent)e.dataType="html";if(n.ok(e)){var p=new Date,x=e.success,z=e.error;e.error=function(a,b,c){l({logLevel:"ERROR",message:"AJAX call failed for "+e.url+" with "+b+": "+c});if(e.data){var d=e.data.metricKey||"";d&&m.increment(d+"-AjaxCallCountError")}z&&"function"===typeof z&&z(a,b,c)};e.success=function(a){if(f("navDisableAjax"))e.error&&"function"===typeof e.error&&e.error();else{g=null;n.add(e);if(a){e.isNavyaanContent&&eval(a.replace(/\x3c!--.*--\x3e/g,""));if(e.dataKey){var c=
{};c[e.dataKey]=a;a=c}e.data&&(c=e.data.metricKey||"")&&(m.increment(c+"-AjaxCallCount"),m.count(c+"-AjaxLatency",new Date-p));e.isRawHTMLContent||b(a)}x&&x(a)}};d("Ajax Data Provider Fired",e);g=k(e)}}},boundFetch:function(a){return function(){t.fetch(a)}},reset:function(){g&&(g.abort(),g=null);n.reset()}};return t}});e.when("$","provider.generic.subnav.flyoutAndShelf","constants").build("provider.subnavFlyouts",function(a,c,d){return c(E,function(b){var c=[];a("a[data-nav-key]",b).each(function(){var b=
a(this).data("nav-key");0!==b.indexOf(d.ADVANCED_PREFIX)&&c.push(b)});return c},E)});e.when("$","provider.generic.subnav.flyoutAndShelf","constants").build("provider.subnavContentShelf",function(a,c,d){var b=a("#nav-subnav-content-shelf");if(0!==b.length)return c(b,function(b){b=a(b).data("nav-key");var c=[];if(0===b.indexOf(d.ADVANCED_PREFIX))return c;c.push(b);return c},"_nav_shelf_cs")});e.when("$","config","provider.ajax").build("provider.generic.subnav.flyoutAndShelf",function(a,c,d){return function(b,
k,f){var m=d({url:c.subnavFlyoutUrl}),l=m.fetch;m.fetch=function(c){var d=a("#nav-subnav");if(0!==d.length){var m=d.data("category");m&&(d=k(b?b:d),0!==d.length&&(c=a.extend(!0,c||{},{data:{subnavCategory:m,keys:1===d.length?d[0]:d.join(";"),metricKey:f?m+f:E}}),l(c)))}};return m}});e.when("$","provider.generic.advanced.subnav.flyoutAndShelf","constants").build("provider.advancedSubnavFlyouts",function(a,c,d){return c(E,function(b){var c=[];a("a[data-nav-key]",b).each(function(){var b=a(this).data("nav-key");
0===b.indexOf(d.ADVANCED_PREFIX)&&c.push(b)});return c},E)});e.when("$","provider.generic.advanced.subnav.flyoutAndShelf","constants").build("provider.advancedSubnavShelf",function(a,c,d){var b=a("#nav-subnav-content-shelf");if(0!==b.length)return c(b,function(b){b=a(b).data("nav-key");var c=[];0===b.indexOf(d.ADVANCED_PREFIX)&&c.push(b);return c},"_nav_shelf_cs")});e.when("$","$F","data","provider.ajax","constants","advKeyDecoder").build("provider.generic.advanced.subnav.flyoutAndShelf",function(a,
c,d,b,k,f){return function(c,l,g){var h=k.ADVANCED_PREFIX,q,n,t,v=function(){q=[];n=[];t=[];var k=a("#nav-subnav");if(0!==k.length){var r=k.data("category"),k=l(c?c:k);if(0!==k.length)for(var v=function(a){if(a=f(a)){var c=a.endpoint,k={jsonkey:a.jsonkey};t[c]?t[c].push(k):(t[c]=[k],k=b({data:{metricKey:r&&g?r+g:E},url:c,timeout:1E4,error:function(){for(var a=t[c],b=0;b<a.length;b++){var f={};f[h+a[b].jsonkey+"Content"]=d.get("genericError");d(f)}},success:function(a){if(a&&"object"===typeof a)for(var b in a)if(a.hasOwnProperty(b)){var c=
h+b+".flyout",f=h+b+".toplink",k={};k[h+b+"Content"]=a[b];d(k);a&&a[b]&&a[b].js&&e.when("$",c,f).run("[rcx-nav] adv-panel-"+c,a[b].js)}}}),a.onload?n.push(k):q.push(k))}},u=0;u<k.length;u++)v(k[u])}},r={refresh:function(){v()},fetchOnload:function(){for(var a=0;a<n.length;a++)n[a].fetch()},fetchLazy:function(){for(var a=0;a<q.length;a++)q[a].fetch()},fetchAll:function(){r.fetchOnload();r.fetchLazy()}};return r}});e.when("util.templates","data").run("provider.templates",function(a,c){c.observe("templates",
function(c){for(var b in c)c.hasOwnProperty(b)&&c[b]&&a.add(b,c[b])})});e.when("config","provider.ajax").build("provider.dynamicMenu",function(a,c){return c({url:a.dynamicMenuUrl,data:a.dynamicMenuArgs})});e.when("config","provider.ajax").build("provider.genericMenu",function(a,c){return c({url:"/gp/navigation/ajax/generic.html",data:{rid:a.requestId},isNavyaanContent:!0})});e.when("config","data","provider.ajax","debug.param").build("provider.groceries",function(a,c,d,b){return d({url:"/fsx/storeingress/groceries/flyout/desktop",
data:{rid:a.requestId},success:function(a){var b="";a.html&&(b=a.html);c({groceriesContent:{html:b}})},error:function(){c({groceriesContent:{html:'\x3ca href\x3d"/fmc/learn-more?ref\x3dnav_cs_dsk_grfl_lm"\x3eLearn more about groceries on Amazon\x3c/a\x3e'}})}})});e.when("config","data","provider.ajax","debug.param").build("provider.smile",function(a,c,d,b){b=function(a){c({smileSupportingCharityContent:{html:a}})};var k=function(a,b,d){c({smileSupportingCharityContent:{html:'\x3ca href\x3d"/gp/chpf/dashboard?ref\x3dnav_cs_smile_sm_err"\x3eView Charity Dashboard\x3c/a\x3e',
error:"Error with smile ajax - "+d}})};if(a.smilePopoverUrl)return d({url:a.smilePopoverUrl,success:b,error:k});k(null,null,"No smile popover url provided from config")})})(g.$Nav);(function(e){e.when("$","$F","config","dataPanel","flyout.yourAccount","provider.ajax","util.Proximity").iff({name:"config",prop:"carnac"}).run("carnac",function(a,c,d,b,k,f,m){if(d.carnac.url){var l=b({id:"nav-carnac-panel",dataKey:"yourAccountCarnacContent",className:"nav-flyout-content",spinner:!0,visible:!0});k.elem().append(l.elem());
var e=k.getPanel();e.elem().remove();k.getPanel=function(){return l};var h=f({url:d.carnac.url,dataKey:"yourAccountCarnacContent",data:{rid:d.requestId}}),g=c.once().delay(5E3).on(function(){l.isRendered()||(l.elem().remove(),k.elem().append(e.elem()),k.getPanel=function(){return e})});a=function(){h.fetch();g()};k.onShow(a);k.link.focus(a);m.onEnter(k.link,[20,40,40,40],a)}})})(g.$Nav);(function(e){e.when("config.flyoutURL","debug.param","btf.full").run("provider.remote",function(a,c){a&&!c("navDisableJsonp")&&
(c=document.createElement("script"),c.setAttribute("type","text/javascript"),c.setAttribute("src",a),(document.head||document.getElementsByTagName("head")[0]).appendChild(c))});e.when("$","$F","provider.dynamicMenu","provider.genericMenu","provider.groceries","provider.smile","util.Proximity","config","flyout.groceries","flyout.cart","flyout.prime","flyout.wishlist","flyout.yourAccount","flyout.accountList","flyout.timeline","flyout.fresh","flyout.packardGlow","searchTimeline.flyout","searchTopCategories.flyout",
"flyout.abAcquisition","flyout.abActivation","bindFlyoutAnchorReftagMetrics","flyout.smile").run("bindProvidersToEvents",function(a,c,d,b,k,f,m,l,g,h,q,n,t,v,r,x,z,A,u,B,C,D,w){if(!l.primeDay){var y={prefetchGatewayHero:c.once().on(function(){l.prefetchGatewayHero&&"function"===typeof l.prefetchGatewayHero&&l.prefetchGatewayHero()}),setupSmileFlyout:function(){if(w&&f){var a=f.boundFetch({isRawHTMLContent:!0,data:{smileSupportingCharityContent:"smileSupportingCharity",metricKey:"smileMetric"}});y._bindProviderToEvents(w,
w.link,a);e.when("page.domReady").run("smileSupportingCharityFlyoutAjaxData",function(){a()})}},setupGroceriesFlyout:function(){if(g){var a=k.boundFetch({data:{groceriesContent:"groceries",metricKey:"groceriesMetric"}});y._bindProviderToEvents(g,g.link,a);m.onEnter(g.link,[20,40,40,40],function(){a();g.onShow(function(){D(g.elem().find(".f3-cgi-flyout-section a"),"Grocery",!0,!0,"Store");D(g.elem().find(".f3-cgi-flyout-static-links-section a"),"Grocery",!0,!0,"Store")});y.prefetchGatewayHero()})}},
setupCartFlyout:function(){if(h){var b=d.boundFetch({data:{cartItems:"cart",metricKey:"cartMetric"}});h.onShow(b);a("nav-cart nav-a").focus(b)}},_getWishlistFetch:function(){var a={wishlistItems:"wishlist",metricKey:"wishlistMetric"};l.alexaListEnabled&&(a={wishlistItems:"wishlist",alexaItems:"alexa",metricKey:"alexaMetric"});return d.boundFetch({data:a})},setupTimeline:function(){var a=[100,100,100,100];l.timelineAsinPriceEnabled&&(a=[20,50,30,30]);var c;c=l.isTimelineMigrationEnabled?b.boundFetch({data:{timelineContent:"timeline",
pageType:l.pageType,subPageType:l.subPageType,metricKey:"timelineMetric",ajaxTemplate:"timeline"}}):d.boundFetch({data:{timelineContent:"timeline",pageType:l.pageType,subPageType:l.subPageType,metricKey:"timelineMetric"}});y._bindProviderToEvents(r,r.link,c);m.onEnter(r.link,a,function(){c();y.prefetchGatewayHero()})},setupSearchTimeline:function(){var b=a("#twotabsearchtextbox"),c=d.boundFetch({data:{timelineContent:"timeline",pageType:l.pageType,subPageType:l.subPageType,metricKey:"timelineMetric"}});
y._bindProviderToEvents(A,b,c);m.onEnter(b,[100,100,100,100],function(){c();y.prefetchGatewayHero()})},setupTimelineTooltip:function(){var a=d.boundFetch({data:{timelineTooltipContent:"timelinetooltip",metricKey:"timelineTooltipMetric"}});e.when("page.domReady").run("timelineTooltipAjaxData",function(){"Detail"===l.pageType&&a()})},setupSearchTopCategories:function(){var b=a("#twotabsearchtextbox"),c=d.boundFetch({data:{topCategoriesContent:"topCategories",pageType:l.pageType,subPageType:l.subPageType,
metricKey:"topCategoriesMetric"}});y._bindProviderToEvents(u,b,c);m.onEnter(b,[100,100,100,100],function(){c()})},setupWishlistFlyout:function(){var a=y._getWishlistFetch(),b=n;l.accountList&&(b=v);y._bindProviderToEvents(b,b.link,a);m.onEnter(b.link,[20,20,40,100],function(){a();y.prefetchGatewayHero()})},setupPrimeFlyout:function(){if(q){var a=d.boundFetch({data:{primeContent:"prime",metricKey:"primeMetric"}});y._bindProviderToEvents(q,q.link,a);m.onEnter(q.link,[20,40,40,40],function(){a();y.prefetchGatewayHero()})}},
setupAccountListFlyout:function(){if(v)if(l.accountListFlyoutRedesign){var a=b.boundFetch({data:{accountListRedesignContent:"accountListRedesign",metricKey:"accountListRedesignMetric",ajaxTemplate:"accountListFlyoutRedesign"}});y._bindProviderToEvents(v,v.link,a);m.onEnter(v.link,[20,40,40,40],function(){a();y.prefetchGatewayHero()})}else{var c=b.boundFetch({data:{accountListContent:"accountList",metricKey:"accountListMetric",ajaxTemplate:"accountListFlyout"}});y._bindProviderToEvents(v,v.link,c);
m.onEnter(v.link,[20,40,40,40],function(){c();y.prefetchGatewayHero()})}},setupFreshFlyout:function(){if(x){var a=d.boundFetch({data:{freshContent:"fresh",metricKey:"freshMetric"}});y._bindProviderToEvents(x,x.link,a);m.onEnter(x.link,[20,40,40,40],function(){a();y.prefetchGatewayHero()})}},setupPackardGlow:function(){var a=[100,100,100,100];if(z.link){var b=d.boundFetch({data:{packardContent:"packardGlowFlyout",pageType:l.pageType,subPageType:l.subPageType}});y._bindProviderToEvents(z,z.link,b);
m.onEnter(z.link,a,function(){b()})}},setupABAcquisition:function(){if(B){var a=d.boundFetch({data:{abAcquisitionContent:"abAcquisition",pageType:l.pageType,subPageType:l.subPageType,metricKey:"abAcquisitionMetric"}});y._bindProviderToEvents(B,B.link,a);m.onEnter(B.link,[15,15,15,15],function(){a()})}},setupABActivation:function(){if(C){var a=d.boundFetch({data:{abActivationContent:"abActivation",pageType:l.pageType,subPageType:l.subPageType,metricKey:"abActivationMetric"}});y._bindProviderToEvents(C,
C.link,a);m.onEnter(C.link,[15,15,15,15],function(){a()})}},_bindProviderToEvents:function(a,b,c){a.onShow(c);b.focus(c)},init:function(){y.setupCartFlyout();y.setupPrimeFlyout();y.setupFreshFlyout();y.setupWishlistFlyout();y.setupABAcquisition();y.setupABActivation();y.setupGroceriesFlyout();y.setupSmileFlyout();l.isPureAjaxALF&&y.setupAccountListFlyout();(l.packardGlowFlyout||l.packardGlowTooltip)&&y.setupPackardGlow();l.timeline&&(y.setupTimeline(),y.setupTimelineTooltip());l.searchTimeline&&y.setupSearchTimeline();
l.searchTopCategories&&y.setupSearchTopCategories()}};y.init()}})})(g.$Nav);(function(e){e.when("$","$F","panels","util.checkedObserver","flyouts.anchor","flyouts.fixers","metrics","config","nav.inline").run("flyouts",function(a,c,d,b,k,f,m,e){var p={};a(g).bind("resize",function(){for(var a in p)p.hasOwnProperty(a)&&p[a].align()});return{create:function(c){c=a.extend({elem:function(){var b=c.buildNode?c.buildNode():a("\x3cdiv\x3e\x3c/div\x3e");b.addClass("nav-flyout").appendTo(c.anchor||k());b.append("\x3cdiv class\x3d'nav-flyout-buffer-left'\x3e\x3c/div\x3e\x3cdiv class\x3d'nav-flyout-buffer-right'\x3e\x3c/div\x3e\x3cdiv class\x3d'nav-flyout-buffer-top'\x3e\x3c/div\x3e\x3cdiv class\x3d'nav-flyout-buffer-bottom'\x3e\x3c/div\x3e");
return b},groups:["flyouts"],transition:{show:function(){g.elem().show();g.flyoutFullyAnimated=!1;if(g.animateDown){a.extend(a.easing,{easeOutCubic:function(a,b,c,d,f){return d*((b=b/f-1)*b*b+1)+c},easeInCubic:function(a,b,c,d,f){return d*(b/=f)*b*b+c}});var b=g.elem().height();g.elem().stop(!0,!0).css({height:"10px"}).animate({height:b},250,"easeOutCubic",function(){a(this).css("height","auto");g.initiateSidePanel();g.flyoutFullyAnimated=!0});g.elem().find(".nav-flyout-content, #nav-flyout-wl-items, #nav-profile-bottom-bia-wrapper").hide().addClass("nav-add-filter").stop(!0,
!0).fadeIn({duration:300,easing:"easeInCubic"},function(){a(this).removeClass("nav-add-filter")})}g.align();m.increment("nav-flyout-"+g.getName()+"-show");e.pageType&&m.increment("nav-flyout-"+g.getName()+"-"+e.pageType.toLowerCase()+"-show")},hide:function(){g.elem().stop(!0,!0).hide()}}},c);var g=d.create(c);g.align=b({context:g,check:function(){if(!g.isVisible())return!1}});g.onAlign=g.align.observe;g.show.observe(function(){c.transition.show.apply(g,arguments)});g.hide.observe(function(){c.transition.hide.apply(g,
arguments)});g.lock.observe(function(){g.elem().addClass("nav-locked")});g.unlock.observe(function(){g.elem().removeClass("nav-locked")});f(g);return p[c.name]=g},destroy:function(a){return p[a]?(p[a].destroy(),delete p[a],d.destroy(a),!0):!1},hideAll:function(){d.hideAll({group:"flyouts"})},lockAll:function(){d.lockAll({group:"flyouts",lockKey:"global-flyout-lock-key"})},unlockAll:function(){d.unlockAll({group:"flyouts",lockKey:"global-flyout-lock-key"})},get:function(a){return p[a]},getAll:function(){return p}}});
e.when("$","$F","config").build("flyouts.anchor",function(a,c,d){return c.memoize().on(function(){var b=a("\x3cdiv id\x3d'nav-flyout-anchor' /\x3e");return d.isDesktopHeaderFlex?b.insertAfter("#nav-belt"):b.appendTo("#nav-belt")})});e.when("$","$F","cover","debugStream").build("flyouts.cover",function(a,c,d,b){var k=null,f=!1,m=function(){k&&(clearTimeout(k),k=null)},e=function(){m();f||(k=setTimeout(function(){f||(m(),d.hide(),f=!1);k=null},10))},g=function(){m();d.show({layer:"SUB",click:function(){e();
f=!1}})};return function(b,c){b.onShow(function(){0<a("#navbar.nav-pinned").length&&c||g()});b.onHide(e)}});e.when("$","$F","agent").build("flyouts.fixers",function(a,c,d){return function(b){if(d.kindleFire){var k=a([]);b.onShow(function(){var b=this.elem(),c=a("img[usemap]").filter(function(){return 0===a(this).parents(b).length});k=k.add(c);c.each(function(){this.disabledUseMap=a(this).attr("usemap");a(this).attr("usemap","")})});b.onHide(function(){k.each(function(){a(this).attr("usemap",this.disabledUseMap)});
k=a([])})}if(d.touch)b.onShow(function(){var b=a("video");b.css("visibility","hidden");c.delay(10).run(function(){b.css("visibility","")})})}});e.when("$","$F","agent","config","util.ClickOut","util.mouseOut","util.velocityTracker","util.MouseIntent","debug.param","util.onKey").build("flyouts.linkTrigger",function(a,c,d,b,k,f,m,e,g,h){var q=g("navFlyoutClick");return function(d,g,p,r,x,z,A){z=q||z;var u=new k,B=m(),C=A?f(A):f(),D=null,w=!1,y=function(){D&&(D.cancel(),D=null,w=!1)};a(g).bind("mouseleave",
function(){y();d.isVisible()&&(D=(new e(d.elem(),{slop:0})).onArrive(function(){y()}).onStray(function(){w&&d.hide();y()}))});p?C.add(p):C.add(g);z||C.action(function(){D?w=!0:d.hide()});u.action(function(){d.hide()});d.onShow(c.once().on(function(){var a=d.elem();u.ignore(a);u.ignore(g);z||(C.add(a),C.enable())}));d.onShow(function(){g.addClass("nav-active");u.enable();B.disable()});d.onHide(function(){g.removeClass("nav-active");u.disable();y()});d.onLock(function(){d.isVisible()||a(".nav-icon, .nav-arrow",
g).css({visibility:"hidden"})});d.onUnlock(function(){a(".nav-icon, .nav-arrow",g).css({visibility:"visible"})});var I=!1,F=c.debounce(500,!0).on(function(){if(d.isVisible()||d.isLocked()){if(x||d.isLocked()){I=!1;return}d.hide()}else d.show();I=!0}),G=function(a){F();if(I||!x)return a.stopPropagation(),a.preventDefault(),!1};g.bind("touchstart",G);h(g,function(){if(this.isEnter())return G(this.evt)},"keydown");z||g.hover(function(a){a.originalEvent.acknowledge&&a.originalEvent.acknowledge();B.enable();
r&&r()},function(){B.disable()});var K=c.debounce(500,!0).on(function(){d.show()});B.addThreshold({below:40},function(){d.isVisible()||setTimeout(function(){K()},1);B.disable()});b.flyoutArrowStyle&&(a(".nav-icon.nav-arrow",g).addClass(b.flyoutArrowStyle),a(".nav-coreFlyout .nav-arrow").addClass(b.flyoutArrowStyle));a(".nav-icon",g).show().css({visibility:"visible"});return C}});e.when("$","$F","noOp","Observer","util.tabbing","util.onKey").build("flyouts.accessibility",function(a,c,d,b,k,f){var e=
c.memoize().on(function(){var c=new b;f(a(document),function(){this.isEscape()&&c.notify()},"keydown");return c.boundObserve()});return function(b){b=a.extend({link:null,onEscape:d},b);var c={},h=!1,g=!1,n=null,t=!1,v=a([]);e()(function(){h&&g&&(b.onEscape(),c.disable())});f(b.link,function(){(this.isEnter()||this.isSpace())&&c.enable()},"keyup");var r=null,x=function(){n&&(clearTimeout(n),n=null);g=!0},z=function(){n&&(clearTimeout(n),n=null);n=setTimeout(function(){g=!1},10)},A=function(){!t&&h&&
(r=k(v),r.tailAction("loop"),r.enable(),v.focus(x),v.blur(z),r.focus(),t=!0)};c.elems=function(a){t=!1;v.unbind("focus blur");r&&(r.destroy(),r=null);v=a;A()};c.disable=function(){h=!1;r&&r.disable()};c.enable=function(){h=!0;A();r&&!r.isEnabled()&&(r.enable(),r.focus())};return c}});e.when("$","$F","agent","dataPanel","config").build("flyouts.sidePanel",function(a,c,d,b,k){return function(f){var e=f.getName();"accountList"===e&&(e="yourAccount");var l=b({dataKey:e+"-sidePanel",className:"nav-flyout-sidePanel-content",
spinner:!1,visible:!1}),g=c.memoize().on(function(){var b=a("\x3cdiv class\x3d'nav-flyout-sidePanel' /\x3e").append(l.elem()).appendTo(f.elem()),c=-b.width();f.elem().find(".nav-flyout-buffer-left").css({left:c-10});f.elem().find(".nav-flyout-buffer-top, .nav-flyout-buffer-bottom").css({left:c});return b}),h=function(){if(l.isVisible()&&f.isVisible()){var b=function(){var b=l.elem().height();a(".nav-item",l.elem()).each(function(){var c=a(this);b-=c.outerHeight(!0);c[0<=b?"show":"hide"]()})};k.flyoutAnimation?
f.setSidePanelCallback(b):b()}};f.onShow(h);f.onRender(h);l.onShow(function(){g().css({width:"0px",display:"block"}).animate({width:"240px"},300,"swing",h)});l.onHide(function(){g().animate({width:"0px"},300,function(){a(this).hide()})});l.onRender(l.show);l.onReset(l.hide);if(d.quirks)f.onShow(function(){g().css({height:f.elem().outerHeight()})});f.sidePanel=l}});e.when("$","$F","config","data","dataPanel","logEvent","phoneHome","flyouts","flyouts.cover","flyouts.linkTrigger","flyouts.aligner","flyouts.accessibility",
"flyouts.sidePanel","debugStream","panels","flyoutMetrics","btf.exists").build("flyouts.create",function(a,c,d,b,k,f,e,l,g,h,q,n,t,v,r,x){return function(d){d=a.extend({key:null,panelDataKey:null,event:{},elem:null,link:null,altMouseoutElem:null,mouseEnterCallback:null,arrow:null,fullWidth:!1,animateDown:!1,cover:!1,aligner:null,sidePanel:!1,linkCounter:!1,clickThrough:!0,clickTrigger:!1,spinner:!0,className:"nav-coreFlyout",suspendTabbing:!1,disableCoverPinned:!1,timeoutDelay:5E3,mouseoutTimeOut:250},
d);d.key&&d.link&&0!==d.link.length||v("Bad Flyout Config (key: "+d.key+")");"string"===typeof d.event&&(d.event={t:d.event});var A=k({dataKey:d.panelDataKey||d.key+"Content",className:"nav-flyout-content",spinner:d.spinner,visible:!0,timeoutDataKey:d.key+"Timeout",timeoutDelay:d.timeoutDelay}),u=l.create({name:d.key,link:d.link,buildNode:function(){var b=d.elem||a("\x3cdiv id\x3d'nav-flyout-"+d.key+"'\x3e\x3c/div\x3e");b.addClass(d.className);d.arrow&&b.append("\x3cdiv class\x3d'nav-arrow'\x3e\x3cdiv class\x3d'nav-arrow-inner'\x3e\x3c/div\x3e\x3c/div\x3e");
b.append(A.elem());return b},anchor:d.anchor,transition:d.transition}),B=null;u.onAlign(function(){B||(B=(d.aligner||q)({$flyout:u.elem(),$link:d.link,$key:d.key,arrow:d.arrow,fullWidth:d.fullWidth}));B()});if(d.link){var C=n({link:d.link,onEscape:function(){u.hide();d.link.focus()}});u.a11y=C;x.attachTo(u);u.a11ysetup=function(){if(!d.suspendTabbing){var b=a(u.elem().find(".nav-flyout-content").find(".nav-link,\x3ea,\x3espan"));0<b.length?C.elems(b):C.elems(a(u.elem().find("a")))}};u.onShow(c.once().on(function(){u.a11ysetup()}));
u.onShow(function(){d.link.addClass("nav-active")});u.onHide(function(){d.link.removeClass("nav-active");C.disable()});u.onShow(function(){if("ewc"!==u.getName()){var b=l.get("ewc");b&&b.isPersistent()&&b.elem().css({zIndex:"1"});(b=a(".nav-ewc-arrow"))&&b.css({borderRight:"6px solid #666666"})}});u.onHide(function(){if("ewc"!==u.getName()){var b=l.get("ewc"),c=a(".nav-ewc-arrow");b&&b.isPersistent()&&b.elem().css({zIndex:""});c&&c.css({borderRight:""})}})}u.onShow(function(){A.startTimeout()});u.onInteract(c.once().on(function(){f(d.event)}));
A.onData(function(a){if("wlTriggers"in a)if(u.hasInteracted()&&u.isVisible())e.trigger(a.wlTriggers);else u.onInteract(c.once().on(function(){e.trigger(a.wlTriggers)}))});u.getPanel=function(){return A};d.sidePanel&&t(u);if(d.link){d.cover&&g(u,d.disableCoverPinned);if(d.linkCounter){var D=c.memoize().on(function(){return a("\x3cspan class\x3d'nav-counter'\x3e\x3c/span\x3e").insertBefore(a(".nav-icon",d.link))});b.observe(d.key+"-counter",function(a){0>=a?(D().hide(),d.link.removeClass("nav-hasCounter")):
(D().show().text(a),d.link.addClass("nav-hasCounter"))})}var w=h(u,d.link,d.altMouseoutElem,d.mouseEnterCallback,d.clickThrough,d.clickTrigger,d.mouseoutTimeOut);u.mouseOutUtility=w;u.animateDown=d.animateDown}u.onDestroy(function(){r.destroy(A.getName())});return u}})})(g.$Nav);(function(e){e.when("$","flyouts.anchor","util.Aligner","config").build("flyouts.aligner",function(a,c,d,b){var k=a("#navbar");return function(b){b=a.extend({$flyout:null,$link:null,arrow:null,fullWidth:!1},b);var e=new d({base:b.$link,
target:b.$flyout,offsetTo:k,constrainTo:k,constrainBuffer:[3,3,0,3],constrainChecks:[!0,!0,!1,!0],alignTo:c(),anchor:"top left",from:"bottom left",to:"nav-flyout-accountList"===b.$flyout.context.id?"top center":"top left",fullWidth:b.fullWidth,fullWidthCss:{"border-radius":"0px","border-right":"0px","border-left":"0px","padding-left":"0px","padding-right":"0px","min-width":"1000px"}}),l=null;"top"===b.arrow&&(l=new d({base:a(".nav-arrow, .nav-icon",b.$link).filter(":visible"),target:a(".nav-arrow",
b.$flyout),offsetTo:k,alignTo:b.$flyout,anchor:"top left",from:"center",to:"center"}));return function(){"accountListRedesign"!==b.$key&&e.align();l&&l.align()}}})})(g.$Nav);(function(e){e.when("$","data","config","nav.createTooltip","SignInRedirect").iff({name:"config",prop:"signInTooltip"}).run("tooltip.signin",function(a,c,d,b,k){c.observe("signinContent",function(c){if(c.html&&!d.primeDay){var e=a("#navbar"),l=a("#nav-link-yourAccount");d.accountList&&(l=a("#nav-link-accountList"));var g=b({name:"signinTT",
content:c.html,className:"nav-signin-tt",timeout:1E4,align:{base:l,from:"bottom center",to:"top center",constrainTo:e,constrainBuffer:[3,3,0,3],constrainChecks:[!0,!0,!1,!0]},arrow:"top"});if(d.signInOverride)g.onRender(function(){var b=a('[data-nav-role\x3d"signin"]',g.elem());a.each(b,function(b,c){k.setRedirectUrl(a(c),null,null)})});g.fadeIn()}})})})(g.$Nav);(function(e){e.when("$","$F","config","flyouts.create","SignInRedirect","dataPanel","util.addCssRule","flyout.accountList").run("flyout.yourAccount",
function(a,c,d,b,k,f,e,l){return d.accountList?l:function(){var c={t:"ya"};1===a("#nav-noti-wrapper .nav-noti-content").length&&(c.noti=1);var f=!1,e=!1;d.beaconbeltCover&&!d.primeDay&&(e=f=!0);var m=b({key:"yourAccount",link:a("#nav-link-yourAccount"),event:c,sidePanel:!0,linkCounter:!0,arrow:"top",cover:f,disableCoverPinned:e,animateDown:d.flyoutAnimation}),l=!1;m.getPanel().onData(function(b){b.signInHtml&&!l&&(m.elem().prepend(b.signInHtml),l=!0,d.signInOverride&&(b=a('[data-nav-role\x3d"signin"]',
m.elem()),a.each(b,function(b,c){k.setRedirectUrl(a(c),null,null)})))});return m}()});e.when("$","agent","$F","data","flyout.yourAccount","config.dismissNotificationUrl","config","page.domReady").run("sidepanel.yaNotis",function(a,c,d,b,k,f,e){if(!e.primeDay){var l=a("#nav-noti-wrapper"),g=a(".nav-noti-content",l),h={count:parseInt(g.attr("data-noti-count")||"0",10),render:function(){var a=h.count;1>a&&(a=0);9<a&&(a="9+");b({"yourAccount-counter":a})},decrement:function(){h.count=Math.max(h.count-
1,0);h.render()}};l.remove();if(1!==g.length||1>h.count)return!1;k.sidePanel.onRender(function(){var b=this.elem(),l=a(".nav-noti-item",b).not("#nav-noti-empty"),g=function(){var c=function(){var c=a("#nav-noti-all",b);a(".nav-noti-title");var d=b.height()-c.outerHeight(!0),f=!1;l.each(function(){var b=a(this);f?b.hide():(d-=a(this).outerHeight(),0<d?b.show():(f=!0,b.hide()))})};e.flyoutAnimation?k.setSidePanelCallback(c):c()};l.each(function(){var b=a(this);c.touch?b.addClass("nav-noti-touch"):b.hover(function(){a(this).addClass("nav-noti-hover")},
function(){a(this).removeClass("nav-noti-hover")});a(".nav-noti-x",b).click(function(c){a.ajax({url:f,type:"POST",data:{id:b.attr("data-noti-id")},cache:!1,timeout:500});b.slideUp(300,function(){b.remove();g()});h.decrement();0===h.count&&k.sidePanel.hide();c.preventDefault();return!1}).hover(function(){a(this).addClass("nav-noti-x-hover")},function(){a(this).removeClass("nav-noti-x-hover")})});if(k.isVisible())g();else k.onShow(d.once().on(g))});b({"yourAccount-sidePanel":{html:g[0].outerHTML}});
h.render();return!0}});e.when("$","data","logEvent","sidepanel.csYourAccount","page.domReady").iff({name:"sidepanel.csYourAccount",op:"falsey"}).run("sidepanel.yaHighConf",function(a,c,d){var b=a("#csr-hcb-wrapper");a=a(".csr-hcb-content",b);b.remove();if(1!==a.length)return!1;d({t:"hcb"});c({"yourAccount-sidePanel":{html:a[0].outerHTML}});return!0});e.when("$","$F","config","flyout.yourAccount","SignInRedirect").run(function(a,c,d,b,k){b.onRender(function(){a("#nav-item-switch-account").click(function(){var b=
a("#nav-item-switch-account");k.setRedirectUrl(a(b),null,null)})});if(d.yourAccountPrimeURL){var f=c.once().on(function(){(new Image).src=d.yourAccountPrimeURL});b.onRender(function(){a("#nav_prefetch_yourorders").mousedown(function(){f()});if(d.yourAccountPrimeHover){var b=null;a("#nav_prefetch_yourorders").hover(function(){b=g.setTimeout(function(){f()},75)},function(){b&&(g.clearTimeout(b),b=null)})}})}})})(g.$Nav);(function(e){e.when("$","config").build("prime.presentation",function(a,c){var d=
{};return function(b,c,f){b={id:b,pt:c,et:(new Date).getTime()};b=a.extend(b,f);var e;f=b;c=[];for(e in f)f.hasOwnProperty(e)&&"et"!==e&&c.push(e+":"+f[e]);c.sort();e=c.join("|");d[e]||(d[e]=!0,g.ue&&g.ue.log&&g.ue.log(b,"prime-presentation-metrics"))}});e.when("$","config").build("prime.metadata",function(a,c){return function(d){var b={};c.requestId&&(b.r=c.requestId);c.sessionId&&(b.s=c.sessionId);a(d).each(function(c){c=a(this).attr("data-metadata");"string"===typeof c&&Object.prototype.hasOwnProperty.call(g,
"JSON")&&(c=g.JSON.parse(c));var d={};c&&c.hasOwnProperty("customerID")&&(d.cid=c.customerID);c&&c.hasOwnProperty("marketplaceID")&&(d.mid=c.marketplaceID);c&&c.hasOwnProperty("containerRequestID")&&(d.mgid=c.containerRequestID);b=a.extend(b,d);return!1});return b}});e.when("$","$F","config","data","prime.presentation","prime.metadata","flyouts.create","flyouts.accessibility","util.checkedObserver").run("flyout.prime",function(a,c,d,b,e,f,m,l,g){if(!(d.genz&&d.genzMap&&d.genzMap.genzPrime)){var h=
a("#nav-link-prime"),q=function(b){var m=l({link:h,onEscape:function(){b.hide();h.focus()}}),q=0,r=g({check:function(a){return 2===q},observe:function(a){e(1,"PrimeNavigationMenu",f("div#prime-ms3-nav-metadata"))}});b.getPanel().onRender(c.once().on(function(){d.dynamicMenuArgs&&d.dynamicMenuArgs.primeMenuWidth&&b.elem().css({width:d.dynamicMenuArgs.primeMenuWidth+"px"});m.elems(a(".nav-hasPanel, a",b.elem()));b.align();q++;r()}));b.onInteract(c.once().on(function(){q++;r()}));b.onShow(c.once().on(function(){m.elems(a(".nav-hasPanel, a",
b.elem()))}))};return function(){var a=!!d.beaconbeltCover;b.observe("primeMenu",function(a){b({primeContent:{html:a}})});a=m({key:"prime",link:h,clickThrough:!0,event:"prime",arrow:"top",suspendTabbing:!0,cover:a,animateDown:d.flyoutAnimation});q(a);return a}()}});e.when("$","$F","flyouts.create","util.Aligner","flyouts.anchor","dataProviders.primeTooltip").run("flyout.primeTooltip",function(a,c,d,b,e,f){if(a("#nav-logo .nav-prime-try").html()){var m=d({key:"primeTooltip",link:a("#nav-logo .nav-logo-tagline"),
event:"prime-tt",arrow:"top",className:"",aligner:function(c){var d=new b({base:c.$link,target:c.$flyout,from:"middle right",to:"middle left",anchor:"top left",alignTo:e(),constrainTo:a("#navbar"),constrainBuffer:[3,0,0,3],constrainChecks:[!0,!1,!1,!0],offsetTo:a("#navbar")});return function(){d.align()}}});m.getPanel().onRender(c.once().on(function(){m.getPanel().elem().attr("id","nav-prime-tooltip")}));m.show.check(function(){if(!this.getPanel().isRendered())return f.load()&&setTimeout(function(){m.show()},
10),!1});a("#nav-prime-tooltip").remove();return m}})})(g.$Nav);(function(e){e.when("$","$F","flyouts.create","util.Aligner","config","cover").build("iss.flyout",function(a,c,d,b,k,f){a("#navbar");var m=a("#nav-search"),l=a("#twotabsearchtextbox"),p=a(".nav-search-field",m),h=a(".nav-search-submit"),q=a(g),n=!!k.beaconbeltCover&&!k.primeDay,t=c.memoize().on(function(){var b=a("\x3cdiv id\x3d'nav-flyout-iss-anchor' /\x3e");return k.isDesktopHeaderFlex?b.insertAfter("#nav-belt"):b.appendTo("#nav-belt")}),
v=d({key:"searchAjax",className:"nav-issFlyout",event:"searchAjax",spinner:!1,anchor:t(),aligner:function(a){var c=new b({base:l,target:a.$flyout,from:"bottom left",to:"top left",anchor:"top left",alignTo:t()});return function(){c.align()}}}),r=function(){var b=p.width(),b=b+h.width();a(v.elem()).width(b)};v.onShow(function(){q.bind("resize",r);r();n&&f.show()});v.onHide(function(){q.unbind("resize",r);n&&f.hide()});e.declare("search.flyout",v);return v})})(g.$Nav);(function(e){e.when("$","$F","flyouts.create",
"util.Aligner","config","cover","data","carousel","provider.dynamicMenu","agent","log").build("searchTimeline.flyout",function(a,c,d,b,k,f,m,l,p,h,q){if(k.searchTimeline){var n=a("#nav-search"),t=a("#twotabsearchtextbox"),v=a(".nav-search-field",n),r=a(g),x=!!k.beaconbeltCover&&!k.primeDay,z=c.memoize().on(function(){var b=a("\x3cdiv id\x3d'nav-flyout-iss-timeline-anchor' /\x3e");return k.isDesktopHeaderFlex?b.insertAfter("#nav-belt"):b.appendTo("#nav-belt")}),A=d({key:"timeline",className:"nav-issTimelineFlyout",
event:"timeline",spinner:!0,anchor:z(),aligner:function(a){var c=new b({base:t,target:a.$flyout,from:"bottom left",to:"top left",anchor:"top left",alignTo:z()});return function(){c.align()}}}),u=function(){m.observe("timelineContent",function(b){l.create(a("#nav-timeline-data"),A)})},B=function(){var b=function(b){var c=a(this),d=a(b.target),f=c.find(".nav-timeline-remove-item"),e=c.find(".nav-timeline-remove-error-msg"),k=c.find(".nav-timeline-date");"mouseover"===b.type?(c.addClass("nav-change-dot"),
b=e.css("display"),(d.hasClass("nav-timeline-remove-container")||0<d.parents(".nav-timeline-remove-container").length)&&"none"===b?(f.show(),k.hide()):"block"===b?(f.hide(),k.hide()):(f.hide(),k.show())):(c.removeClass("nav-change-dot"),f.hide(),e.hide(),k.show())},c=0;k.dynamicTimelineDeleteArgs&&(c=k.dynamicTimelineDeleteArgs);var d=function(a,b,c){b={lastItemTimeStamp:b,isCalledFromTimelineDelete:1,fetchEmptyContent:c,pageType:k.pageType,subPageType:k.subPageType,metricKey:"timelineRefillMetric"};
b[a]="timeline";p.boundFetch({data:b})()},f=function(a,b){b={asin:b,navDebugTimelineDeleteError:c,metricKey:"timelineDeleteMetric",pageType:k.pageType};q("Timeline delete on page: "+k.pageType);b[a]="timelineDelete";p.boundFetch({data:b})()},e=function(c){var k=a(this),h=k.parents(".nav-timeline-item"),g=k.find(".nav-timeline-remove-error-msg"),n=k.find(".nav-timeline-remove-item"),p=h.attr("data-nav-timeline-item"),t=a("#nav-timeline-data"),r=t.attr("data-nav-timeline-length"),q=t.attr("data-nav-timeline-max-items-shown"),
B=a(".nav-timeline-item:last"),y=B.prev().attr("data-nav-timeline-item-timestamp"),u=a(".nav-timeline-item \x3e .nav-timeline-dummy").length,v="timelineRefillContent"+p,x="timelineDeleteContent"+p,C=a(".nav-timeline-item");c=C.length;var z=a("#nav-timeline"),A=0;3===c?A=0<u?1:0:2===c&&(A=1);var D=a(".nav-carousel-container").length,E=function(){f(x,p);m.observe(x,function(b){if(parseInt(b.html,10)){b=a(".nav-timeline-item");var c=b.length,d=h.find(".nav-start").length,f=h.find(".nav-timeline-date"),
m=h.next(),p=m.find(".nav-timeline-date"),r=m.find(".nav-timeline-line"),B=a(".nav-timeline-hidden-item"),q=B.length;if(0<q&&(0<u||2===c)&&3>=c)b.remove(),t.addClass("nav-center"),t.css({width:"auto","float":"none"}),z.removeClass("nav-timeline-delete-enabled"),B.removeClass("nav-timeline-hidden-item");else{if(0<d)h.hide(),0<q&&B.removeClass("nav-timeline-hidden-item");else{h.addClass("nav-timeline-shift");for(var y=!1,w,v=0;v<c;v++)w=C.eq(v),!y&&w.hasClass("nav-timeline-shift")&&(y=!0),y&&w.css({left:"-165px"})}0<
q&&(c=B.attr("data-nav-timeline-length"),q=B.attr("data-nav-timeline-max-items-shown"),t.attr("data-nav-timeline-length",c-1),t.attr("data-nav-timeline-max-items-shown",q),B.removeAttr("data-nav-timeline-length"),B.removeAttr("data-nav-timeline-max-items-shown"),B.removeClass("nav-timeline-hidden-item"));h.remove();b.css({left:"0"});0<D&&l.readjust(t)}0<f.length&&0===p.length&&m.find(".nav-timeline-remove-container").append('\x3cdiv class\x3d"nav-timeline-date"\x3e'+f.text()+"\x3c/div\x3e");0<d&&
r.addClass("nav-start nav-edge")}else b=a(".nav-timeline-hidden-item"),0<b.length&&b.remove(),n.hide(),g.show(),k.bind("click",e)})};(function(){k.unbind("click");parseInt(r,10)>parseInt(q,10)||0<A?(d(v,y,A),m.observe(v,function(c){a(c.html).insertBefore(B);0===A&&(c=B.prev(),c.bind("mouseover mouseleave",b),c.find(".nav-timeline-remove-container").bind("click",e));E()})):E()})()};a(".nav-timeline-item").bind("mouseover mouseleave",b);a(".nav-timeline-remove-container").bind("click",e)};A.getPanel().onRender(function(){k.timelineDeleteEnabled&&
!h.touch&&B()});var C=function(){a(A.elem()).width(v.width())};A.onShow(function(){r.bind("resize",C);C();u();x&&(f.show(),f.setClick(function(){A.isVisible()&&A.hide();f.hide()}))});A.onHide(function(){r.unbind("resize",C)});var D=function(){0===t.val().length?A.isVisible()||A.show():A.isVisible()&&A.hide()};t.focus(function(){D()});t.keyup(function(){D()});e.declare("searchTimeline.flyout",A);return A}})})(g.$Nav);(function(e){e.when("$","$F","flyouts.create","util.Aligner","config","cover","data",
"carousel").build("searchTopCategories.flyout",function(a,c,d,b,k,f,m,l){if(k.searchTopCategories){var p=a("#nav-search"),h=a("#twotabsearchtextbox"),q=a(".nav-search-field",p),n=a(g),t=!!k.beaconbeltCover&&!k.primeDay,v=c.memoize().on(function(){var b=a("\x3cdiv id\x3d'nav-flyout-iss-topCategories-anchor' /\x3e");return k.isDesktopHeaderFlex?b.insertAfter("#nav-belt"):b.appendTo("#nav-belt")}),r=d({key:"topCategories",className:"nav-issTopCategoriesFlyout",event:"topCategories",spinner:!0,anchor:v(),
aligner:function(a){var c=new b({base:h,target:a.$flyout,from:"bottom left",to:"top left",anchor:"top left",alignTo:v()});return function(){c.align()}}}),x=function(){m.observe("topCategoriesContent",function(b){l.create(a("#nav-topCategories-data"),r)})},z=function(){a(r.elem()).width(q.width())};r.onShow(function(){n.bind("resize",z);z();x();t&&(f.show(),f.setClick(function(){r.isVisible()&&r.hide();f.hide()}))});r.onHide(function(){n.unbind("resize",z)});var A=function(){0===h.val().length?r.isVisible()||
r.show():r.isVisible()&&r.hide()};h.focus(function(){A()});h.keyup(function(){A()});e.declare("searchTopCategories.flyout",r);return r}})})(g.$Nav);(function(e){e.when("$","$F","config","nav.createTooltip","util.ajax","data","logUeError","now","util.Aligner","metrics","page.domReady").iff({name:"config",prop:"primeTooltip"}).run("tooltip.prime",function(a,c,d,b,e,f,m,l,p,h){f={type:"load",isPrime:d.isPrimeMember,referrer:document.referrer,height:a(g).height(),width:a(g).width()};d=d.primeTooltip.url;
var q=a("#navbar"),n=a("#nav-link-prime"),t=null,v=c.memoize().on(function(b){var c=a(".nav-arrow",b);return 0<c.length?new p({base:n,target:c,offsetTo:q,alignTo:b,anchor:"top left",from:"center",to:"center"}):{align:function(){}}});e({url:d,data:f,error:function(){h.increment("nav-tooltip-Prime-errorCount")},success:function(c){c&&c.content&&(t=b({key:"primeFlyoutTT",event:"primeFlyoutTT",content:a("\x3cdiv\x3e\x3c/div\x3e").html(c.content),name:"primeFlyoutTT",className:"nav-prime-tt",timeout:1E4,
align:{base:n,from:"bottom center",to:"top center",constrainTo:q,constrainBuffer:[3,3,0,3],constrainChecks:[!0,!0,!1,!0]},arrow:"top",onAlign:function(){v(this.elem()).align()}}),t.fadeIn())}});return t})})(g.$Nav);(function(e){e.when("$","config","flyouts.create","util.ajax","metrics","page.domReady").iff({name:"config",prop:"pseudoPrimeFirstBrowse"}).run("tooltip.pseudoPrime",function(a,c,d,b,e){var f={triggerType:"load",referrer:document.referrer,height:a(g).height(),width:a(g).width()},m=c.pseudoPrimeFirstBrowse.url,
l=a("#nav-cart"),p=null;b({url:m,data:f,error:function(){e.increment("nav-pseudo-prime-first-browse-errorCount")},success:function(b){b&&b.content&&(p=d({key:"pseudoPrimeFirstBrowseMessage",link:l,event:"pseudoPrimeFirstBrowseMessage",arrow:"top",elem:a("\x3cdiv\x3e\x3c/div\x3e").html("\x3cdiv\x3e"+b.content+"\x3c/div\x3e"),className:"nav-pseudo-prime-first-browse-message",spinner:!1,animateDown:c.flyoutAnimation}),p.show())}});return p})})(g.$Nav);(function(e){e.when("$","$F","data","config","flyouts.create",
"flyouts.accessibility","debug.param").run("flyout.cart",function(a,c,d,b,k,f,m){if(!m("navShowCart")&&(b.cartFlyoutDisabled||b.ewc))return!1;var l=a("#nav-cart"),g=m=!1;b.beaconbeltCover&&(g=m=!0);var h=k({key:"cart",link:l,event:"cart",className:"nav-cartFlyout",arrow:"top",suspendTabbing:!0,cover:m,disableCoverPinned:g}),q=f({link:l,onEscape:function(){h.hide();l.focus()}});h.getPanel().onRender(function(){a("#nav-cart-flyout").removeClass("nav-empty");a(".nav-dynamic-full",h.elem()).addClass("nav-spinner");
e.when("CartContent").run("CartContentApply",function(b){d.observe("cartItems",function(c){b.render(c);var f=0;c.count&&(f=parseInt(c.count,10));c.fresh&&c.fresh.count?f+=parseInt(c.fresh.count,10):c.cart&&c.cart.fresh&&c.cart.fresh.count&&(f+=parseInt(c.cart.fresh.count,10));d({cartCount:f});a(".nav-dynamic-full",h.elem()).removeClass("nav-spinner");q.elems(a(".nav-hasPanel, a",h.elem()));h.isVisible()&&h.align()})})});h.onShow(c.once().on(function(){q.elems(a(".nav-hasPanel, a",h.elem()))}));h.onShow(function(){0<
a("#navbar.nav-pinned").length&&h.hide()});return h});e.when("$","data","nav.inline").run("setupCartCount",function(a,c){c.observe("cartCount",function(c){var b=a("#nav-cart-menu-button-count .nav-cart-count, #nav-cart .nav-cart-count"),e=a("#nav-cart .nav-cart-count");c+="";c.match(/^(|0|[1-9][0-9]*|99\+)$/)||(c=0);c=parseInt(c,10)||0;e.removeClass("nav-cart-0 nav-cart-1 nav-cart-10 nav-cart-20 nav-cart-100");var f;f=0===c?"nav-cart-0":10>c?"nav-cart-1":20>c?"nav-cart-10":100>c?"nav-cart-20":"nav-cart-100";
b.html(100<=c?"99+":c.toString());e.addClass(f);0===c?(a("#nav-cart-one, #nav-cart-many").hide(),a("#nav-cart-zero").show()):1>=c?(a("#nav-cart-zero, #nav-cart-many").hide(),a("#nav-cart-one").show()):(a("#nav-cart-zero, #nav-cart-one").hide(),a("#nav-cart-many").show())})});e.when("$","$F","util.templates","util.Ellipsis","util.inlineBlock","nav.inline","cartTemplateAvailable").build("CartContent",function(a,c,d,b,k){var f=e.getNow("config.doubleCart"),m=a("#nav-cart-flyout"),l={content:a("#nav-cart-standard")};
l.title=a(".nav-cart-title",l.content);l.subtitle=a(".nav-cart-subtitle",l.content);l.items=a(".nav-cart-items",l.content);var g={content:a("#nav-cart-pantry")};g.title=a(".nav-cart-title",g.content);g.subtitle=a(".nav-cart-subtitle",g.content);g.items=a(".nav-cart-items",g.content);var h={content:a("#nav-cart-fresh")};h.title=a(".nav-cart-title",h.content);h.subtitle=a(".nav-cart-subtitle",h.content);h.items=a(".nav-cart-items",h.content);var q=m.attr("data-one"),n=m.attr("data-many"),t=g.content.attr("data-box"),
v=g.content.attr("data-boxes"),r=g.content.attr("data-box-filled"),x=g.content.attr("data-boxes-filled"),z=function(c){c=a.extend(!0,{title:!0,subtitle:!0,boxes:0,items:[],count:0,$parent:null,doubleWide:!1},c);var f=c.$parent;c.title&&c.doubleWide?k(f.title):c.title?f.title.css({display:"block"}):f.title.hide();f.subtitle.html("").hide();if(c.subtitle){var e=[],g="";if(0<c.boxes){var h=Math.ceil(c.boxes);1===h?e.push(t.replace("{count}",h)):e.push(v.replace("{count}",h))}1===c.count?e.push(q.replace("{count}",
c.count)):1<c.count&&e.push(n.replace("{count}",c.count));if(0<c.boxes){var h=Math.floor(c.boxes),m=Math.round(1E3*(c.boxes-h))/10;0===h||0===m?e.push(r.replace("{pct}",0===m?100:m)):e.push(x.replace("{pct}",m))}for(h=0;h<e.length;h++)g+="\x3cspan class\x3d'nav-cart-subtitle-item "+(0===h?"nav-firstChild ":"")+(h===e.length-1?"nav-lastChild ":"")+"'\x3e"+e[h]+"\x3c/span\x3e";f.subtitle.html(g);c.doubleWide?k(f.subtitle):f.subtitle.css({display:"block"})}0<c.items.length&&f.items&&f.items.html(d.use("cart",
{items:c.items}));b.newInstance().elem(a(".nav-cart-item-title",f.content)).external(!0).dimensions(function(a){return{width:parseInt(a.css("width"),10),height:2*parseInt(a.css("line-height"),10)}}).truncate();f.content.show()},A=c.once().on(function(){m.addClass("nav-cart-double")}),u=c.once().on(function(){m.addClass("nav-cart-dividers")});return{render:function(b){b=a.extend(!0,{status:!1,count:0,items:[],pantry:{status:!1,count:0,weight:{unit:"",value:-1},boxes:0,items:[]},fresh:{status:!1,count:0,
items:[]}},b);m.removeClass("nav-cart-double nav-cart-dividers");var c={title:!1,subtitle:!1,count:b.count-b.pantry.count,items:b.items,$parent:l},d={count:b.pantry.count,boxes:parseFloat(b.pantry.boxes,10),items:b.pantry.items,$parent:g},e={count:b.fresh.count,items:b.fresh.items,$parent:h};if(b.status)m.addClass("nav-ajax-success");else return m.addClass("nav-ajax-error"),!1;if(0===b.items.length&&0===b.pantry.items.length&&0===b.fresh.items.length)return m.addClass("nav-empty").removeClass("nav-full"),
!0;m.removeClass("nav-empty").addClass("nav-full");if(0<b.items.length&&0===b.pantry.items.length&&0===b.fresh.items.length)5>=b.items.length?z(c):f?(A(),z(a.extend(c,{items:b.items.slice(0,10),doubleWide:!0}))):z(a.extend(c,{items:b.items.slice(0,5)}));else if(0===b.items.length&&0<b.pantry.items.length&&0===b.fresh.items.length)5>=b.pantry.items.length?z(d):(A(),z(a.extend(d,{items:b.pantry.items.slice(0,10),doubleWide:!0})));else if(0===b.items.length&&0===b.pantry.items.length&&0<b.fresh.items.length)z(a.extend(e,
{items:b.fresh.items.slice(0,5),doubleWide:!0}));else if(0<b.fresh.items.length&&0<b.items.length&&0===b.pantry.items.length)u(),z(a.extend(c,{items:b.items.slice(0,4),title:!0,subtitle:!0,doubleWide:!0})),z(a.extend(e,{items:b.fresh.items.slice(0,4),doubleWide:!0}));else if(0<b.fresh.items.length&&0===b.items.length&&0<b.pantry.items.length)u(),z(a.extend(d,{items:b.pantry.items.slice(0,4),doubleWide:!0})),z(a.extend(e,{items:b.fresh.items.slice(0,4),doubleWide:!0}));else if(0<b.items.length&&0<
b.pantry.items.length&&0===b.fresh.items.length)if(u(),4>=b.items.length+b.pantry.items.length)z(a.extend(c,{title:!0,subtitle:!0})),z(d);else{A();var e=Math.ceil(b.items.length/2),k=Math.ceil(b.pantry.items.length/2);2>=e||1>=k&&3===e?z(a.extend(c,{title:!0,subtitle:!0,doubleWide:!0})):z(a.extend(c,{items:b.items.slice(0,1>=k?6:4),title:!0,subtitle:!0,doubleWide:!0}));2>=k||1>=e&&3===k?z(a.extend(d,{doubleWide:!0})):z(a.extend(d,{items:b.pantry.items.slice(0,1>=e?6:4),doubleWide:!0}))}else 0<b.fresh.items.length&&
0<b.items.length&&0<b.pantry.items.length&&(u(),z(a.extend(c,{items:b.items.slice(0,4),title:!0,subtitle:!0,doubleWide:!0})),z(a.extend(d,{items:b.pantry.items.slice(0,4),doubleWide:!0})),z(a.extend(e,{items:b.fresh.items.slice(0,4),doubleWide:!0})));return!0}}})})(g.$Nav);(function(e){e.when("$","config","flyouts.create","dataPanel").run("flyout.wishlist",function(a,c,d,b){if(!c.accountList){var e=!!c.beaconbeltCover,f={createFlyout:function(){return d({key:"wishlist",link:a("#nav-link-wishlist"),
event:"wishlist",arrow:"top",cover:e,animateDown:c.flyoutAnimation})},createWishlistDataPanel:function(){return b({id:"nav-flyout-wl-items",dataKey:"wishlistItems",spinner:!0,visible:!1})},createAlexaListDataPanel:function(){return b({id:"nav-flyout-wl-alexa",dataKey:"alexaItems",spinner:!1,visible:!1})},setPanelVisibilityRules:function(a){a.onData(function(a){0===a.count?this.hide():this.show()});a.onTimeout(function(){this.hide()})},onFlyoutPanelRender:function(a){f.flyout.getPanel().onRender(function(b){if(!b.data||
!b.data.isTimeout){var d=f.flyout.elem();b=d;c.fullWidthCoreFlyout&&(b=d.find(".nav-column:first-child .nav-panel"));for(d=0;d<a.length;d++){var e=a[d];e.elem().prependTo(b).show();e.startTimeout()}}})},init:function(){var a=[];f.flyout=f.createFlyout();if(c.isRecognized){var b=f.createWishlistDataPanel();f.setPanelVisibilityRules(b);a.push(b);c.alexaListEnabled&&(b=f.createAlexaListDataPanel(),f.setPanelVisibilityRules(b),a.push(b))}f.onFlyoutPanelRender(a)}};f.init();return f.flyout}})})(g.$Nav);
(function(e){e.when("$","flyouts.create","config","dataPanel","SignInRedirect","nav.inline").run("flyout.accountList",function(a,c,d,b,e){if(d.accountList){var f=!!d.beaconbeltCover&&!d.primeDay,m={createAndShowListDataPanel:function(c,d,f,e,k,h){c=b({id:c,className:f,dataKey:d,spinner:e,visible:!1});this.setPanelVisibilityRules(c);this.setA11yRules(h,c);k?c.elem().appendTo(a("#nav-al-wishlist")):c.elem().insertAfter(a("#nav-al-title"));this.showListPanel(c);return c},showListPanel:function(a){a.show();
a.startTimeout()},setPanelVisibilityRules:function(a){a.onData(function(a){0===a.count?this.hide():this.show()});a.onTimeout(function(){this.hide()})},setA11yRules:function(a,b){b.onRender(function(b){a.a11ysetup&&a.a11ysetup()})}},l=a("#a-page"),p=a("body"),h=0,q=0,n=c({key:d.accountListFlyoutRedesign?"accountListRedesign":"accountList",className:"nav-coreFlyout",link:a("#nav-link-accountList"),cover:f,clickThrough:!0,sidePanel:!0,event:{t:"ya"},arrow:"top",animateDown:d.flyoutAnimation});n.getPanel().onData(function(b){d.signInOverride&&
(b=a('[data-nav-role\x3d"signin"]',n.elem()),a.each(b,function(b,c){e.setRedirectUrl(a(c),null,null)}))});n.a11ysetup=function(){if(!opts.suspendTabbing){var b=a([]);a.each(["#nav-flyout-ya-signin","#nav-flyout-ya-newCust","#nav-al-your-account","#nav-al-wishlist"],function(c,d){b=a.merge(b,n.elem().find(d).find(".nav-link,\x3ea,\x3espan"))});0<b.length?n.a11y.elems(b):n.a11y.elems(a(n.elem().find("a")))}};n.getPanel().onRender(function(a){d.isRecognized&&(m.createAndShowListDataPanel("nav-flyout-wl-items",
"wishlistItems","have-bot-border",!0,!1,n),d.alexaListEnabled&&m.createAndShowListDataPanel("nav-flyout-wl-alexa","alexaItems",d.isALFRedesignPT2?null:"have-bot-border",!1,d.isALFRedesignPT2,n))});d.accountListFlyoutRedesign&&(n.onShow(function(){var b=a("#nav-link-accountList"),b=b.offset().top+b.outerHeight();a("#nav-flyout-accountListRedesign").css("top",b-g.pageYOffset);h=g.pageYOffset;q=g.pageXOffset;p.addClass("lock-position").css({top:"-"+h+"px",width:"100%"});d.isTabletBrowser||p.css({position:"fixed",
"overflow-y":"scroll"});0!=q&&p.css({left:"-"+q+"px"});l.attr("aria-hidden","true")}),n.onHide(function(){p.attr("tabIndex",0).focus().removeAttr("tabIndex").removeClass("lock-position").css({position:"static",top:"",left:""});d.isTabletBrowser||p.css({"overflow-y":"auto"});g.scrollTo(q,h)}));return n}})})(g.$Nav);(function(e){e.when("$","config","util.cleanUrl").run("SignInRedirect",function(a,c,d){var b={setRedirectUrl:function(a,b,e){var k=a.attr("href");if(!k)return!0;b=b?b:g.location.href;var h=
a.attr("data-nav-ref")||!1;"nav-item-switch-account"===a.attr("id")&&(h="nav_youraccount_switchacct");b=d(b,{https:!0,encode:!0,ref:h});k=-1===k.indexOf("currentPageURL")?k.replace(/(openid.return_to(\%3D|\=))[^\&\?]+/g,"openid.return_to\x3d"+b):k.replace(/(currentPageURL(\%3D|\=))[^\&\?]+/g,"currentPageURL\x3d"+b);k=k.replace(/(pageType(\%3D|\=))[^\&\?]*/g,"pageType\x3d"+c.pageType);a.attr("href",k);e&&e(k)}},e=a('#navbar [data-nav-role\x3d"signin"]');a.each(e,function(c,d){b.setRedirectUrl(a(d),
null,null)});return b})})(g.$Nav);(function(e){e.when("$","data","config","page.domReady").run("timelineContent",function(a,c,d){if(d.timeline){d=a("#nav-timeline-wrapper");var b=a("#nav-timeline",d);c.observe("flyoutErrorContent",function(d){d=a("#nav-timeline-error",a(d)[0]);var f="\x3cdiv id\x3d'nav-timeline'\x3e\x3cdiv id\x3d'nav-timeline-data' class\x3d'nav-center'\x3e"+d[0].outerHTML+"\x3c/div\x3e\x3c/div\x3e";0===b.length&&1===d.length&&c({timelineContent:{html:f}})});1>b.length||(d.remove(),
c({timelineContent:{html:b[0].outerHTML}}))}});e.when("$","$F","flyouts.create","config","util.Aligner","flyouts.anchor","carousel","util.Ellipsis","data","provider.dynamicMenu","agent","log").run("flyout.timeline",function(a,c,d,b,e,f,g,l,p,h,q,n){if(b.timeline){c=a("#nav-recently-viewed");var t=d({key:"timeline",className:"nav-coreFlyout nav-fullWidthFlyout",link:c,cover:!!b.beaconbeltCover,clickThrough:!0,event:"timeline",arrow:"top",fullWidth:1,animateDown:b.flyoutAnimation}),v=!1;c.hover(function(){v=
!0},function(){v=!1});c.click(function(){a(this).blur();v&&(t.show(),v=!1)});var r=function(){l.newInstance().elem(a(".nav-timeline-asin-title",".nav-timeline-asin")).external(!0).dimensions(function(a){return{width:parseInt(a.css("width"),10),height:2*parseInt(a.css("line-height"),10)}}).truncate()},x=function(){p.observe("timelineContent",function(c){g.create(a("#nav-timeline-data"),t);b.timelineAsinPriceEnabled||r()})},z=function(){var c=function(b){var c=a(this),d=a(b.target),f=c.find(".nav-timeline-remove-item"),
e=c.find(".nav-timeline-remove-error-msg"),k=c.find(".nav-timeline-date");"mouseover"===b.type?(c.addClass("nav-change-dot"),b=e.css("display"),(d.hasClass("nav-timeline-remove-container")||0<d.parents(".nav-timeline-remove-container").length)&&"none"===b?(f.show(),k.hide()):"block"===b?(f.hide(),k.hide()):(f.hide(),k.show())):(c.removeClass("nav-change-dot"),f.hide(),e.hide(),k.show())},d=0;b.dynamicTimelineDeleteArgs&&(d=b.dynamicTimelineDeleteArgs);var f=function(a,c,d){c={lastItemTimeStamp:c,
isCalledFromTimelineDelete:1,fetchEmptyContent:d,pageType:b.pageType,subPageType:b.subPageType,metricKey:"timelineRefillMetric"};c[a]="timeline";h.boundFetch({data:c})()},e=function(a,c){c={asin:c,navDebugTimelineDeleteError:d,metricKey:"timelineDeleteMetric",pageType:b.pageType};n("Timeline delete on page: "+b.pageType);c[a]="timelineDelete";h.boundFetch({data:c})()},k=function(b){var d=a(this),h=d.parents(".nav-timeline-item"),l=d.find(".nav-timeline-remove-error-msg"),n=d.find(".nav-timeline-remove-item"),
t=h.attr("data-nav-timeline-item"),q=a("#nav-timeline-data"),r=q.attr("data-nav-timeline-length"),u=q.attr("data-nav-timeline-max-items-shown"),v=a(".nav-timeline-item:last"),x=v.prev().attr("data-nav-timeline-item-timestamp"),z=a(".nav-timeline-item \x3e .nav-timeline-dummy").length,E="timelineRefillContent"+t,H="timelineDeleteContent"+t,O=a(".nav-timeline-item");b=O.length;var R=a("#nav-timeline"),J=0;3===b?J=0<z?1:0:2===b&&(J=1);var S=a(".nav-carousel-container").length,P=function(){e(H,t);p.observe(H,
function(b){if(parseInt(b.html,10)){b=a(".nav-timeline-item");var c=b.length,f=h.find(".nav-start").length,e=h.find(".nav-timeline-date"),p=h.next(),t=p.find(".nav-timeline-date"),r=p.find(".nav-timeline-line"),u=a(".nav-timeline-hidden-item"),v=u.length;if(0<v&&(0<z||2===c)&&3>=c)b.remove(),q.addClass("nav-center"),q.css({width:"auto","float":"none"}),R.removeClass("nav-timeline-delete-enabled"),u.removeClass("nav-timeline-hidden-item");else{if(0<f)h.hide(),0<v&&u.removeClass("nav-timeline-hidden-item");
else{h.addClass("nav-timeline-shift");for(var x=!1,w,A=0;A<c;A++)w=O.eq(A),!x&&w.hasClass("nav-timeline-shift")&&(x=!0),x&&w.css({left:"-165px"})}0<v&&(c=u.attr("data-nav-timeline-length"),v=u.attr("data-nav-timeline-max-items-shown"),q.attr("data-nav-timeline-length",c-1),q.attr("data-nav-timeline-max-items-shown",v),u.removeAttr("data-nav-timeline-length"),u.removeAttr("data-nav-timeline-max-items-shown"),u.removeClass("nav-timeline-hidden-item"));h.remove();b.css({left:"0"});0<S&&g.readjust(q)}0<
e.length&&0===t.length&&p.find(".nav-timeline-remove-container").append('\x3cdiv class\x3d"nav-timeline-date"\x3e'+e.text()+"\x3c/div\x3e");0<f&&r.addClass("nav-start nav-edge")}else b=a(".nav-timeline-hidden-item"),0<b.length&&b.remove(),n.hide(),l.show(),d.bind("click",k)})};(function(){d.unbind("click");parseInt(r,10)>parseInt(u,10)||0<J?(f(E,x,J),p.observe(E,function(b){a(b.html).insertBefore(v);0===J&&(b=v.prev(),b.bind("mouseover mouseleave",c),b.find(".nav-timeline-remove-container").bind("click",
k));P()})):P()})()};a(".nav-timeline-item").bind("mouseover mouseleave",c);a(".nav-timeline-remove-container").bind("click",k)};t.getPanel().onRender(function(){b.timelineDeleteEnabled&&!q.touch&&z()});t.onShow(function(){x()});return t}});e.when("$","nav.createTooltip","config","flyout.timeline","data","page.domReady").run("timelineTooltipDynamic",function(a,c,d,b,e){d.timeline&&e.observe("timelineTooltipContent",function(b){if(b.html){var e=a("#navbar"),k=a("#nav-recently-viewed"),g=c({name:"timelineTT",
content:b.html,className:"nav-timeline-tt",timeout:"none",cover:!!d.beaconbeltCover,addCloseX:!0,align:{base:k,from:"bottom center",to:"top center",constrainTo:e,constrainBuffer:[3,3,0,3],constrainChecks:[!0,!0,!1,!0]},arrow:"top",clickCallback:function(){g.hide();k.trigger("mouseover")}});g.fadeIn()}})})})(g.$Nav);(function(e){e.when("$","flyouts.create","config").run("flyout.groceries",function(a,c,d){var b=!!d.beaconbeltCover;return c({key:"groceries",link:a("#nav-link-groceries"),cover:b,clickThrough:!0,
sidePanel:!0,event:"groceries",arrow:"top",animateDown:d.flyoutAnimation})})})(g.$Nav);(function(e,a){e.when("$","$F","data","config","flyouts.create","flyouts.accessibility").run("flyout.smile",function(c,d,b,e,f,g){var l=c("#nav-smile-your-charity-link");if(!l.length)return!1;var p=f({key:"smileSupportingCharity",link:l,clickThrough:!0,event:"smileSupportingCharity",arrow:"top",suspendTabbing:!0,cover:!!e.beaconbeltCover,animateDown:e.flyoutAnimation,align:{constrainTo:c("#navbar"),constrainBuffer:[3,
0,0,0],constrainChecks:[!0,!1,!1,!1]}});c(".nav-icon.nav-arrow",l).css({visibility:"hidden"});var h=!1,q=d.once().on(function(){h||a.when("A").execute(function(a){a.trigger("a:popover:show:pldn-xsite-popover")})}),n=function(){p.isVisible()&&p.getPanel().isRendered()&&q()};p.getPanel().onData(function(a){h=!!a.error});p.getPanel().onRender(function(){var a=this.elem();a.length&&(a.addClass("a-popover-inner"),p.align())});p.show.check(function(){return h||!p.getPanel().isRendered()?!1:!0});p.onShow(function(){n()});
p.getPanel().onRender(d.once().on(function(){h||c(".nav-icon.nav-arrow",l).css({visibility:"visible"});n()}));a.when("A").execute(function(a){a.on("pldn-changed-charity",function(c){a.get(c+"\x26isAUI\x3d1",{success:function(a){b({smileSupportingCharityContent:{html:a}})}})})});return p})})(g.$Nav,g.P);(function(e){e.when("$","config","nav.inline").run("enableNavbarTabbing",function(a,c){var d=a("#navbar [tabindex]").get(),b=d.length;if(!(2>b)){var e=Number.MIN_VALUE,f=0,g=a("#nav-logo a:first").attr("tabindex");
a("#nav-upnav").find("map area, a").each(function(){a(this).attr("tabindex",c.isDesktopHeaderFlex?0:g-1)});var l=a("#nav-xshop a:last-of-type"),f=parseInt(l.attr("tabindex"),10);a("#nav-swmslot").find("map area, a").each(function(){f+=1;a(this).attr("tabindex",c.isDesktopHeaderFlex?0:f)}).focus(function(){a("#navSwmHoliday").addClass("nav-focus")}).blur(function(){a("#navSwmHoliday").removeClass("nav-focus")});for(l=0;l<b;l++)f=parseInt(d[l].getAttribute("tabindex"),10),e<f&&(e=f);l=a("#nav-subnav");
d=l.children(".nav-a");b=d.length;if(0!==l.length&&2<=b)for(var l=e+b,p=0;p<b;p++)d.eq(p).hasClass("nav-right")?(d.eq(p).attr("tabindex",c.isDesktopHeaderFlex?0:l),--l):(e+=1,d.eq(p).attr("tabindex",c.isDesktopHeaderFlex?0:e))}});e.when("$","$F","config","now","logEvent","util.Proximity").run("setupSslTriggering",function(a,c,d,b,k,f){var m=d.sslTriggerType,l=d.sslTriggerRetry;if("pageReady"===m||"flyoutProximityLarge"===m){var p="https://"+g.location.hostname+"/empty.gif",h=0;d=c.after(l+1,!0).on(function(){(new Image).src=
p+"?"+b();h++;k({t:"ssl",id:h+"-"+m})});var q;q=l?c.debounce(45E3,!0).on(d):c.once().on(d);"pageReady"===m&&e.when("btf.full").run("NavbarSSLPageReadyTrigger",function(){if(l){var a=l,b=function(){q();0<a&&(a--,setTimeout(function(){b()},45100))};b()}else q()});if("flyoutProximityLarge"===m)var n=f.onEnter(a("#navbar"),[0,0,250,0],function(){n.unbind();q()},l?45E3:0)}})})(g.$Nav);(function(e,a){e.when("$","config","flyouts.anchor").run(function(a,d,b){d.ewc&&d.ewc.isMigrationTreatment||e.run("ewc.resetArrow",
function(){a("#nav-flyout-ewc .nav-ewc-arrow").length&&a(".nav-ewc-arrow").detach().appendTo(b())})});e.when("$","$F","config","flyouts.create","ewc.loadContent","data","logUeError","now","metrics","util.checkedObserver","compactEWCSmallScreenCheck").run(function(c,d,b,k,f,m,l,p,h,q,n){b.ewc&&b.ewc.isMigrationTreatment||e.run("ewc.flyout",function(){if(b.ewc&&!b.ewc.debugInlineJS){"function"===typeof g.uet&&g.uet("x4","ewc",{wb:1});var h=b.ewc.flyout,l=!1,p=!1;b.beaconbeltCover&&!b.ewc.enablePersistent&&
(p=l=!0);var x=c(g);c(document.documentElement);c("#nav-belt");c("#nav-cart");var z=b.ewc.timeout||3E4,A=b.ewc.isCompactEWCRendered,u=n.canCompactEWCHideContentOnPage,B=function(){return h.ableToPersist()&&(A?!u():!0)},C=function(){var a=g.document.documentElement.clientHeight,b=g.document.body;return"CSS1Compat"===g.document.compatMode&&a||b&&b.clientHeight||a};b.ewc.isEWCLogging&&(B(),C());var D=d.once().on(f);e.declare("ewc.cartCount",function(a){m.observe("cartCount",a)});var w=k({elem:c("#nav-flyout-ewc"),
key:"ewc",link:b.ewc.isTriggerEnabled?c("#nav-cart"):null,event:"ewc",className:"nav-ewcFlyout",cover:l,disableCoverPinned:p,anchor:c("#navbar"),timeoutDelay:z,aligner:function(a){var d=a.$flyout,e=c(".nav-flyout-body",d),f=c("#nav-belt");a=c("#nav-main");var k=f.outerHeight();a.outerHeight();c("#nav-tools").outerHeight();return function(){var a=f.offset().top,c=x.scrollTop(),g=C(),l=0,m=0;c<a?l=a-c:c<=a+k&&(m=a-c);a={top:l+"px",height:g-l+"px"};A&&B()?a.right=h.getEWCRightOffsetCssProperty?h.getEWCRightOffsetCssProperty():
"0":b.ewc.isCompactEWCRendered||e.css({top:m+"px",height:d.height()-m+"px"});d.css(a)}}});w.getPanel().onRender(function(){var a=w.elem();a.hasClass("nav-ewc-lazy-align")&&a.removeClass("nav-ewc-hide-head");b.ewc.isEWCStateExpanded||"function"===typeof g.uex&&g.uex("ld","ewc",{wb:1})});var y;b.ewc.pinnable&&(y=function(a){var d=a.elem(),e=d.find(".nav-ewc-pin-tail"),f=e.find(".nav-ewc-pin-button"),k=function(b,d){d=d||(a.isPersistent()?"crt_ewc_pin":"crt_ewc_unpin");c.ajax({type:"GET",cache:!1,url:"/gp/navigation/ajax/save-ewc-status.html/ref\x3d"+
d+b})},h=function(a){b.ewc.isEWCStateExpanded="1"===a;k("?persistent\x3d"+a)},l=function(){var a="?ttDisplayed\x3d1";b.ewc.ewcDebugTTP&&(a+="\x26ewcDebugTTP\x3d"+b.ewc.ewcDebugTTP);k(a,"crt_ewc_incttd")},m=function(a){a?e.removeClass("nav-ewc-unpin").addClass("nav-ewc-pin"):e.removeClass("nav-ewc-pin").addClass("nav-ewc-unpin")},n=d.find(".nav-ewc-pin-tt"),p=function(){return{fadeIn:function(){n.stop(!0,!0).css({top:f.position().top+f.height()/2-n.outerHeight(!0)/2+"px"}).fadeIn(200)},fadeOut:function(){n.stop(!0,
!0).fadeOut(200)},hide:function(){n.stop(!0,!0).hide()}}}();f.bind("mouseenter",function(){p.fadeIn()});f.bind("mouseleave",function(){p.fadeOut()});f.bind("click",function(){p.hide();e.hasClass("nav-ewc-pin")?(a.persist({noAnimation:!0}),h("1")):(a.unpersist({noAnimation:!0}),h("0"))});return{align:function(){var a=d.find(".nav-flyout-head");f.css({top:a.outerHeight()-a.height()+(parseInt(a.css("top"),10)||0)+250+"px"})},tryToShowTrainingTip:function(){e.hasClass("nav-ewc-pin")||(p.fadeIn(),setTimeout(function(){p.fadeOut()},
2E3),l())},resetVisibility:function(){(g.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>=b.ewc.viewportWidthForPersistent?(d.find(".nav-flyout-body").addClass("nav-ewc-unpinbody"),e.show()):(e.hide(),d.find(".nav-flyout-body").removeClass("nav-ewc-unpinbody"))},isVisible:function(){return e.is(":visible")},collapse:function(){m(!0)},expand:function(){D();m(!1)}}}(w));w.onAlign(function(){b.ewc.pinnable&&y.align()});w.onShow(function(){w.lock()});w.onRender(d.once().on(function(){"function"===
typeof g.uet&&g.uet("x5","ewc",{wb:1});var a=w.elem(),e=w.getPanel().elem(),f=c("#nav-cart"),k=a.find(".nav-cart");b.ewc.isEWCStateExpanded?(e.hide(),w.getPanel().render({html:" "})):a.find(".nav-flyout-body").append(e);m.observe("cartCount",function(){k.html(f.html())});b.ewc.pinnable&&(y.resetVisibility(),x.resize(d.throttle(300).on(y.resetVisibility)))}));w.ableToPersist=B;w.hasQualifiedViewportForPersistent=function(){return h.hasQualifiedViewportForPersistent?h.hasQualifiedViewportForPersistent():
!1};var E=function(){e.getNow("isAuiP")&&a.when("A").execute("ForceAuiResize",function(a){a.trigger("resize",g,{width:1,height:1})})};w.applyPageLayoutForPersistent=function(){h.applyPageLayoutForPersistent();"function"===typeof g.maintainHeight&&g.maintainHeight();E()};w.unapplyPageLayoutForPersistent=function(){h.unapplyPageLayoutForPersistent();E()};(function(){var a,d=function(b){b.stop(!1,!0).animate({left:"-"+b.width()+"px"},400,function(){a=setTimeout(function(){e(b)},2E3)})},e=function(b){b.stop(!0,
!0).fadeOut(400,function(){b.css({left:"",display:""})});clearTimeout(a)},f=function(a,b){var e={right:"-"+a[0].offsetWidth+"px"};b?a.css(e):(a.animate(e,400,function(){c(this).css("right","")}),d(c(".nav-flyout-tail",a)))},k=!1;b.ewc.pinnable&&(k?y.expand():y.collapse());w.isSlidedIn=function(){return k};w.slideIn=q({context:w,check:function(){if(k)return!1},observe:function(a){D();w.isVisible()||w.show();var b=this.elem();a=a.noAnimation;var d={right:h.getEWCRightOffsetCssProperty?h.getEWCRightOffsetCssProperty():
"0"};a?b.stop().css(d):(b.stop().animate(d,400),e(c(".nav-flyout-tail",b)));k=!0}});w.onSlideIn=w.slideIn.observe;w.onSlideIn(function(){b.ewc.pinnable&&y.expand()});w.slideOut=q({context:w,check:function(){if(!k)return!1},observe:function(a){w.isVisible()||w.show();f(this.elem(),a.noAnimation);k=!1}});w.onSlideOut=w.slideOut.observe;w.onSlideOut(function(){b.ewc.pinnable&&y.collapse()})})();(function(){var a=!1;w.persist=q({context:w,check:function(b){if(a)return!1},observe:function(b){a=!0;w.applyPageLayoutForPersistent();
w.slideIn({noAnimation:b.noAnimation});w.lock()}});w.onPersist=w.persist.observe;w.unpersist=q({context:w,check:function(b){if(!a)return!1},observe:function(b){a=!1;w.unlock();w.slideOut({noAnimation:b.noAnimation});w.unapplyPageLayoutForPersistent()}});w.onUnpersist=w.unpersist.observe;w.isPersistent=function(){return a}})();var F=function(){B()?w.persist({noAnimation:!0}):w.unpersist({noAnimation:!0})},G=function(a){c("#navbar").is(":hidden")?setTimeout(function(){G(a)},1E3):a()};G(function(){w.show();
x.scroll(function(){w.align()});x.resize(d.throttle(300).on(w.align));h.unbindEvents();A&&h.ableToPersist()&&(w.persist({noAnimation:!0}),g.addEventListener("load",F),c("#nav-flyout-ewc").addClass("nav-flyout-ewc-compact"));F();b.ewc.pinnable&&b.ewc.enableTrainingTip&&y.tryToShowTrainingTip();x.resize(d.throttle(300).on(F))});return w}})});e.when("$","$F","config","util.mouseOut","util.velocityTracker","ewc.flyout").run(function(a,d,b,k,f,m){b.ewc&&b.ewc.isMigrationTreatment||e.run("ewc.hoverTrigger",
function(){if(b.ewc.enableHover){var e=a("#nav-cart"),p=f(),h=k(500);h.add(e);h.add(m.elem());h.enable();e.hover(function(){p.enable()},function(){p.disable()});h.action(function(){m.hasQualifiedViewportForPersistent()||m.slideOut()});var q=d.debounce(500,!0).on(function(){m.hasQualifiedViewportForPersistent()||m.slideIn()});p.addThreshold({below:40},function(){q();p.disable()});var n=function(){var b=a(".nav-icon",e);m.hasQualifiedViewportForPersistent()?b.hide().css({visibility:"hidden"}):b.show().css({visibility:"visible"})};
n();a(g).resize(function(){n()})}})})})(g.$Nav,H);(function(e){e.when("$","metrics","page.domReady").run("upnavMetrics",function(a,c){var d=a("#nav-upnav");if(0!==d.length){a=d.find("a");var d=d.find("map area"),b=a.length,e=d.length;if(0!==b||0!==e)if(a=0<b?a.attr("href"):d.attr("href"))a=a.split("/"),1<a.length&&((a=a[a.length-1].split("?")[0].split("\x3d"))&&1<a.length&&"ref"===a[0]?c.increment("upnav-"+a[1]+"-show"):c.increment("upnav show"))}});e.when("$","config.upnavAiryVideoPlayerAlignment",
"page.domReady","Airy.PlayerReady").run("upnavAiryVideoAlignment",function(a,c){if(c){var d=a("#nav-airy-player-container .airy-renderer-container");if(0!==d.length){var b=a(".nav-airy-widget-wrapper"),e=function(){var a=b.width()/2,c=d.width()/2;d.css("left",Math.floor(a-c))};a(g).resize(function(){e()});e()}}})})(g.$Nav);(function(e){e.when("$","util.ajax","metrics","config").run("upnavSuppressionJS",function(a,c,d,b){function e(){var a=Date.now();g.ue_t0&&d.count("Nav:Upnav:Suppress:ClickTime",
Math.floor((a-g.ue_t0)/1E3));d.increment("Nav:Upnav:Suppression:Click");c({retryMetric:"nav-upnav-suppression-ajax-retry",errorMetric:"nav-upnav-suppression-ajax-error",url:"/gp/navigation/ajax/generic.html",dataType:"html",data:{ajaxTemplate:"upnavSuppression"},error:function(a,b,c){var d={attribution:"AmazonNavigationCards",logLevel:"ERROR"};a=" Upnav Suppression AJAX Call failed. Status Code : "+a.status+" Status text : "+b+" Exception : "+c;g.ueLogError&&(d.message=a,g.ueLogError(d))},success:function(b){d.increment("Nav:Upnav:Suppression:Success");
a&&d.count("Nav:Upnav:Suppress:TotalTime",Math.floor((Date.now()-a)/1E3))}})}b=a("#nav-upnav-close");var f=a("#nav-upnav");b.click(function(){e();f.hide()})})})(g.$Nav);(function(e){e.when("$","$F","config").iff({name:"config",prop:"newTabClick"}).run("newTabClick",function(a,c,d){var b=d.newTabClick.targetUrlPatterns;if(b&&0!==b.length){for(c=0;c<b.length;c++)b[c]=new RegExp(b[c]);var e=document.location.href.split(/#/)[0];a(document).click(function(c){var d=c.target||c.srcElement;if(!c.which||1===
c.which)if(d=a(d).parents("a:first, area:first").andSelf().filter("a:first, area:first").eq(0),0!==d.length){c=d.attr("href");var g;(g=0!==(d.attr("target")||"").length||!c||c.match(/^javascript\:/i))||(g=c.split(/#/)[0],g=0<=e.indexOf(g)?1:0);if(!(g=g||d.parents("#navbar").length)){a:{c=c.split("?")[0];for(g=0;g<b.length;g++)if(c.match(b[g])){c=1;break a}c=0}g=!c}g||d.attr("target","_blank")}})}})})(g.$Nav);(function(e){e.when("$","$F","data","flyouts.create","flyouts.anchor","util.Aligner","config.transientFlyoutTrigger").iff({name:"config",
prop:"transientFlyoutTrigger"}).run("flyout.transient",function(a,c,d,b,e,f,g){var l=a("#navbar"),p=a(g),h=function(){var a=p.offset().left,b=a+p.innerWidth(),a=(a+b)/2;q.elem().find(".nav-arrow").css({position:"absolute",left:a-q.elem().offset().left});q.align()},q=b({key:"transientFlyout",link:p,arrow:"top",aligner:function(a){var b=new f({base:a.$link,target:a.$flyout,from:"bottom right",to:"top center",anchor:"top",alignTo:e(),constrainTo:l,constrainBuffer:[3,0,0,3],constrainChecks:[!0,!1,!1,
!0],offsetTo:l});return function(){b.align()}}});q.onRender(c.once().on(function(){d.observe("transientFlyoutContent",function(){h()})}));q.onShow(function(){h()});return q})})(g.$Nav);(function(e){e.when("$","$F","agent","flyouts","config","constants","metrics","flyout.yourAccount","nav.inline").build("pinnedNav",function(a,c,d,b,e,f,m,l){if(e.pinnedNav){var p=!1,h=!1,q="nav-pinned",n,t,v,r,x,z=700,A,u,B,C,D,w,y,E,F;e.pinnedNavStart&&(z=e.pinnedNavStart);e.iPadTablet&&(w=e.iPadTablet);e.pinnedNavWithEWC&&
(q="nav-pinned nav-pinned-ewc");var G=c.once().on(function(){n=a(g);t=a("#navbar");B=a("#nav-belt");a("#nav-main");r=a("#nav-subnav");v=a("#nav-tools");u=a("#nav-shop");C=a("#nav-search");D=a("#nav-logo");A="\x3cdiv class\x3d'nav-divider'\x3e\x3c/div\x3e";x="\x3cdiv id\x3d'nav-sbd-pinned'\x3e\x3cspan class\x3d'nav-line1'\x3e\x3c/span\x3e\x3cspan class\x3d'nav-line2'\x3e\x3c/span\x3e\x3cspan class\x3d'nav-line3'\x3e\x3c/span\x3e\x3c/div\x3e";y=a(".nav-search-field \x3e input");E=a("#searchDropdownBox");
F=b.get("cart")||Q}),K=function(){var b="Search"===e.pageType;(!b&&0<r.children().length||b&&0===r.find(".nav-category-button").length)&&r.show();t.removeClass(q);B.css("width","100%");a("div",u).remove("#nav-sbd-pinned");a("div",v).remove(".nav-divider");w&&(y.unbind("focus"),E.unbind("click"));a("#navbar").hasClass("layout3")||a("#nav-belt \x3e .nav-left").css({width:a("#nav-logo").outerWidth()});l.unlock();F.unlock();h=!1},H=function(){w&&("twotabsearchtextbox"===document.activeElement.id&&y.blur(),
y.bind("focus",function(a){n.scrollTop(0,0)}),E.bind("click",function(a){n.scrollTop(0,0);E.blur()}));r.hide();t.addClass(q);B.css("width",L());t.css({top:"-55px"});D.css({top:"-55px"});C.css({top:"-55px"});t.animate({top:"0"},300);C.animate({top:"0"},300);D.animate({top:"0"},300);a("a",u).append(x);a(A).insertBefore("#nav-cart");l.lock();if(F.isVisible())F.onHide(c.once().on(function(){F.isVisible()||F.isLocked()||!h||F.lock()}));else F.lock();h=!0;a("#nav-search, #nav-link-yourAccount, #nav-cart").click(function(){var b=
a(this).attr("id");m.increment("nav-pinned-"+b+"-clicked")});a("#nav-link-shopall").hover(function(){var b=a(this).attr("id");m.increment("nav-pinned-"+b+"-hovered")},function(){})},Q={lock:c.noOp,unlock:c.noOp,isVisible:c.noOp,onHide:c.noOp},N=function(){var c=a("#nav-flyout-ewc");0<c.length?"0px"!==c.css("right")&&b.hideAll():b.hideAll()},L=function(){var a=v.width(),b=u.width();return n.width()-a-b+f.PINNED_NAV_SEARCH_SPACING},M=function(){var a=n.scrollTop();h&&a<z?(N(),K()):!h&&a>=z&&(N(),H())};
return{enable:function(){p||d.ie6||d.quirks||(G(),n.bind("scroll.navFixed",M),n.resize(c.throttle(300).on(function(){t.hasClass(q)&&B.css("width",L())})),M(),p=!0)},disable:function(){p&&(n.unbind("scroll.navFixed"),K(),p=!1)}}}})})(g.$Nav);(function(e){e.when("$","$F","config","flyouts.create","flyouts.accessibility").run("flyout.fresh",function(a,c,d,b,e){var f=a("#nav-link-fresh");if(!f)return!1;var g=b({key:"fresh",link:f,clickThrough:!0,event:"fresh",arrow:"top",suspendTabbing:!0,cover:!!d.beaconbeltCover,
animateDown:d.flyoutAnimation}),l=e({link:f,onEscape:function(){g.hide();f.focus()}});g.getPanel().onRender(c.once().on(function(){l.elems(a(".nav-hasPanel, a",g.elem()));g.align()}));g.onShow(c.once().on(function(){l.elems(a(".nav-hasPanel, a",g.elem()))}));return g})})(g.$Nav);(function(e){e.when("page.loaded","$").run("registerMoment",function(a,c){document.getElementById("countdown")&&c.getScript("https://images-na.ssl-images-amazon.com/images/G/01/poppin/JavaScript/moment.min._TTD_.js",function(){c.getScript("https://images-na.ssl-images-amazon.com/images/G/01/poppin/JavaScript/moment-timezone-with-data.min._TTD_.js",
function(){e.declare("moment",g.moment)})})});e.when("page.loaded","moment").run("countdowntimer",function(a,c){var d={log:function(a){},warn:function(a){}},b=document.getElementById("countdown");a=b.getAttribute("data-server-time-str");var e=b.getAttribute("data-timer-start-at"),f=b.getAttribute("data-live-start-at"),g=b.getAttribute("data-live-end-at"),l=b.getAttribute("data-live-days"),p=b.getAttribute("data-standby-text"),h=b.getAttribute("data-countdown-text-prefix"),b=b.getAttribute("data-live-text");
(function(a,b,e,f,g,h,k,l){var m="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),p=new Date(a);d.log("[poppinCountDown] loadServerTime: "+p);var C=new Date,D=function(a,b){var d=a.split(" "),e=d[0].split(":");a=p.getFullYear();var f=parseInt(p.getMonth(),10)+1,g=p.getDate(),h="pm"===d[1].toLowerCase()?parseInt(e[0],10)%12+12:parseInt(e[0],10)%12,e=e[1],d=d[2],k=c.tz(""+a+"-01-01T12:00:00","America/Los_Angeles").format("Z"),f=c.tz(""+a+"-"+(10>f?"0":"")+f+"-"+(10>g?"0":"")+g+"T12:00:00",
"America/Los_Angeles").format("Z"),d=k!==f?d[0]+"D"+d[1]:d[0]+"S"+d[1];for(a=new Date(""+m[parseInt(p.getMonth(),10)]+" "+g+" "+a+" "+h+":"+e+":0 "+d);b&&a.getTime()<=b.getTime();)a=new Date(a.getTime()+864E5);return a};a=D(b);var w=D(e,a),D=D(f,w);d.log("[csTimeStrTimerStartAt] csTimeStrTimerStartAt: "+b);d.log("[countdownStart] countdownStart: "+a);d.log("[csTimeStrLiveStartAt] csTimeStrLiveStartAt: "+e);d.log("[liveStart] liveStart: "+w);d.log("[csTimeStrLiveEndAt] csTimeStrLiveEndAt: "+f);d.log("[liveEnd] liveEnd: "+
D);var y=a.getTime(),E=w.getTime(),F=D.getTime(),G=function(){var a=function(a){document.getElementById("countdown-text").innerHTML=a},b=function(a){document.getElementById("countdown-timer").innerHTML=a},c=(new Date).getTime()-C.getTime(),d=function(a){a="UMTWRFS".charAt(a.getDay());var b;for(b=0;b<g.length;b++)if(g.charAt(b)===a)return!0;return!1},e=new Date(p.getTime()+c),c=e.getTime();if(c<y||g&&!d(e))setTimeout(G,y-c),a(h),b("");else if(c<E){var d=Math.round((E-c)/1E3),e=Math.floor(d/3600),f=
Math.floor(d%3600/60),f=10>f?"0"+f:f,d=d%60,d=10>d?"0"+d:d;a(k);b(" "+e+":"+f+":"+d);setTimeout(G,1E3*(Math.floor((c-y)/1E3)+1)-(c-y))}else c<F?(setTimeout(G,F-c),a(l)):a(h),b("")};G()})(a,e,f,g,l,p,h,b)})})(g.$Nav);(function(e){e.when("$","config","flyout.yourAccount","flyout.prime","flyout.wishlist","nav.inline").run("primeDayNav",function(a,c,d,b,e){c.primeDay&&(b.lock(),e.lock())})})(g.$Nav);(function(e,a){"object"===typeof g.P&&"function"===typeof g.P.when&&"function"===typeof g.P.register&&
"function"===typeof g.P.execute&&(a.when("A","a-modal","packardGlowIngressJsEnabled","packardGlowStoreName").execute("GLOWWidget",function(a,d,b,e){function f(a){g.ue&&"function"===typeof g.ue.count&&g.ue.count(a,(g.ue.count(a)||0)+1)}function m(){l.ajax({type:"POST",url:"/gp/glow/get-location-label.html",data:{storeContext:e,pageType:g.ue_pty?g.ue_pty:"NoPageType"},success:function(b){b=g.JSON.parse(b);b.deliveryLine1&&l("#glow-ingress-line1").html(b.deliveryLine1);b.deliveryLine2&&l("#glow-ingress-line2").html(b.deliveryLine2);
b.deliveryShortLine&&(l("#nav-packard-delivery").html(b.deliveryShortLine),b.customerIntent&&"REALM_DEFAULT"!==b.customerIntent.locationType&&l("#nav-packard-glow-fy-header").removeClass("aok-hidden"));if(b.selectedDestination&&(b.selectedDestination.destinationObfuscatedAddressId&&l("#unifiedLocation1ClickAddress").val(b.selectedDestination.destinationObfuscatedAddressId),b.selectedDestination.destinationType&&b.selectedDestination.destinationValue)){var f=d.get("glow-modal");f&&f.attrs("url","/gp/glow/get-address-selections.html?selectedLocationType\x3d"+
b.selectedDestination.destinationType+"\x26selectedLocationValue\x3d"+b.selectedDestination.destinationValue+"\x26deviceType\x3ddesktop\x26pageType\x3d"+(g.ue_pty?g.ue_pty:"NoPageType")+"\x26storeContext\x3d"+e)}a.trigger("packard:glow:destinationChangeNavAck")}})}if(b){var l=a.$;a.on("packard:glow:destinationChangeNav",m);a.on("a:popover:beforeShow:glow-modal",function(){"function"===typeof g.uet&&g.uet("bb","glow-modal-api-timer:desktop",{wb:1})});a.on("a:popover:ajaxContentLoaded:glow-modal",function(){"function"===
typeof g.uex&&g.uex("ld","glow-modal-api-timer:desktop",{wb:1})});a.on("a:popover:ajaxSuccess:glow-modal",function(){f("GLOW:fetch-modal:DESKTOP:success")});a.on("a:popover:ajaxFail:glow-modal",function(){f("GLOW:fetch-modal:DESKTOP:failure")});l("#nav-packard-glow-fy").click(function(){l("#nav-global-location-slot").click()})}}),e.when("$","nav.createTooltip","config","util.session","metrics","util.ajax","page.domReady").iff({name:"config",prop:"packardGlowTooltip"}).run("packardGlowTooltip",function(a,
d,b,e,f,g){var l=e.get("nav-packard-tt"),p=(new Date).getDate(),h=!0,q=0;l&&(h=p>=l.date+3,q=l.count);if(!l||3>q&&h)e.set("nav-packard-tt",{count:q+1,date:p}),g({url:b.dynamicMenuUrl,data:{packardContent:"packardGlowFlyout",pageType:b.pageType,subPageType:b.subPageType},error:function(){f.increment("nav-tooltip-packard-errorCount")},success:function(e){if(e&&e.packardContent.html){var g=d({content:a("\x3cdiv\x3e\x3c/div\x3e").html(e.packardContent.html),name:"packardTT",className:"nav-packard-tt",
timeout:7E3,cover:!1,align:{base:a("#nav-packard-glow-fy"),from:"bottom center",to:"top center",constrainTo:a("#navbar"),constrainBuffer:[3,3,0,0],constrainChecks:[!0,!0,!1,!0]},arrow:"top",clickCallback:function(){g.hide();a("#nav-packard-glow-fy").trigger("mouseover")}});g.fadeIn();f.increment("nav-tooltip-packard-show");b.pageType&&f.increment("nav-tooltip-packard-"+b.pageType.toLowerCase()+"-show")}}})}))})(g.$Nav,H);(function(e){e.when("$","$F","flyouts.create","config").run("flyout.packardGlow",
function(a,c,d,b){if(b.packardGlowFlyout)return a=a("#nav-packard-glow-fy"),d({key:"packard",className:"nav-coreFlyout",link:a,cover:!!b.beaconbeltCover,clickThrough:!1,arrow:"top",event:"packard"})})})(g.$Nav);(function(e){e.when("$","$F","agent","flyouts","config.fixedBarBeacon","nav.inline").build("fixedSubBar",function(a,c,d,b,e){var f=!1,m=!1,l,p,h,q,n,t=c.once().on(function(){l=a(g);p=a("#navbar");h=a("#nav-main");n=a("#nav-subnav");q=a("\x3cdiv\x3e\x3c/div\x3e").css({position:"relative",display:"none",
width:"100%",height:n.height()+"px"}).insertBefore(n)}),v=function(){p.removeClass("subnav-fixed");n.css({top:0});q.hide();m=!1},r=function(){var a=l.scrollTop();b.hideAll();e&&(a+=h.height());m&&q.offset().top>=a?v():!m&&n.offset().top<a&&(p.addClass("subnav-fixed"),a=e?h.height():0,n.css({top:a}),q.show(),m=!0)};return{enable:function(){f||d.ie6||d.quirks||(t(),l.bind("scroll.navFixed",r),r(),f=!0)},disable:function(){f&&(l.unbind("scroll.navFixed"),v(),f=!1)}}})})(g.$Nav);(function(e){e.when("$",
"config").run("genzXshopAlign",function(a,c){function d(){for(var b=a("#nav-xshop").children("a"),c=b.get(0).offsetTop,d=b.length-1;0<d;d--)b.get(d).offsetTop>c&&a(b.get(d)).addClass("nav-a-removed")}c.genz&&(a(g).resize(function(){for(var b=a("#nav-xshop").children("a"),c=0;c<b.length;c++)a(b.get(c)).removeClass("nav-a-removed");d()}),a(document).ready(function(){d();for(var b=a("#nav-xshop").children("a"),c=0;c<b.length;c++)a(b.get(c)).removeClass("nav-a-hidden")}))})})(g.$Nav);(function(e){e.when("util.ajax").build("util.ajaxReftagLogger",
function(a){return function(c){var d={attribution:"AmazonNavigationCards",logLevel:"ERROR"};return a({retryMetric:"nav-ajax-reftag-logger-retry",errorMetric:"nav-ajax-reftag-logger-error",url:"/gp/navigation/ajax/ajax-reftag-logger.html",data:{pageType:g.ue_pty?g.ue_pty:"NavUnknownPageType",ref:c},error:function(a,c,e){a=" Reftag logger AJAX Call failed. Status Code : "+a.status+" Status text : "+c+" Exception : "+e;g.ueLogError&&g.ueLogError(a,d)}})}})})(g.$Nav);(function(e,a){e.when("$","HamburgerMenuFirstLayerAJAXCall",
"SignInRedirect","metrics").run("HamburgerMenuFirstLayerAJAXCallDesktop",function(a,d,b,g){var f=function(){var d=a("#hmenu-customer-profile-link");b.setRedirectUrl(a(d),null,null);!0===e.getNow("navHMenuIconClicked")&&(g.increment("Nav:Hmenu:HMenuIconClickDelayedComplete"),setTimeout(function(){a("#nav-hamburger-menu").click()},50))};return function(){d("desktop",f)}})})(g.$Nav,H);(function(e,a){e.when("jQuery","hamburgerMenuIconAvailableOnLoad","config","HamburgerMenuFirstLayerAJAXCallDesktop",
"util.Proximity","agent").run("HamburgerMenuAJAXCall",function(a,d,b,e,f,m){var l="rtl"===a("body").css("direction"),p=function(){f.onEnter(a("#nav-hamburger-menu"),b.HmenuProximityArea,function(){e()},!1,b.fixedBarBeacon||l)};b.isTabletBrowser||m.touch||!b.HMenuIsProximity?d?g.onload=hamburgerAjaxCall:e():p()})})(g.$Nav,H);(function(e){e.when("$","metrics").run("searchDropdownMetrics",function(a,c){a(".nav-search-dropdown").change(function(){c.increment("Nav:SearchDropdown:Change")})})})(g.$Nav);
(function(e){e.when("$","metrics").run("accessibilityNav",function(a,c){document.body.addEventListener("keydown",function(){a("#navbar").removeClass("using-mouse")});document.body.addEventListener("mousedown",function(){a("#navbar").addClass("using-mouse")});a("#skiplink").focus(function(){c.increment("Nav:SkipLink:SkipLinkShow")});a("#skiplink").blur(function(){c.increment("Nav:SkipLink:SkipLinkAbandon")});a("#skiplink").keyup(function(c){13===c.keyCode&&a("#skiplink").click()});a("#skiplink").click(function(){var a=
document.getElementById("skippedLink");a.scrollIntoView(!0);a.focus();c.increment("Nav:SkipLink:SkipLinkClick")})})})(g.$Nav)});
/* ******** */
(function(R){var h=window.AmazonUIPageJS||window.P,n=h._namespace||h.attributeErrors,d=n?n("RetailSearchAutocompleteAssets",""):h;d.guardFatal?d.guardFatal(R)(d,window):d.execute(function(){R(d,window)})})(function(R,h,n){h.$Nav.when("$","nav.inline").run(function(d){h.$Nav.declare("config.blackbelt",0<d("#nav-belt").length)});h.$Nav.when("config.blackbelt").run(function(d){d?h.$Nav.when("searchApi").run(function(a){h.$Nav.declare("sxSearchApi",a)}):h.$Nav.declare("sxSearchApi")});h.$Nav.when("$",
"sxSearchApi","sx.iss.DomUtils").build("NavDomApi",function(d,a,f){function b(){if(g)return k().find('input[type\x3d"text"]');"undefined"===typeof m&&(m=d(v.searchBox));return m}function c(){if(g)return a.flyout.elem();"undefined"===typeof x&&(x=d(w),k().after(x));return x}function e(){if(g)return a.options().parents("select");"undefined"===typeof r&&(r=d(v.aliasDropdown));return r}function k(){return g?a.options().parents("form"):d(v.form)}function p(){var b=l(),a=c();!c().is(":visible")||1>a.html().length||
a.css({left:b.offset().left,width:b.width()})}function l(){q===n&&(q=d("#nav-iss-attach"));return q}var g=a!==n,v={searchBox:"#twotabsearchtextbox",searchSuggestions:"#srch_sggst",navBar:"#navbar",aliasDropdown:"#searchDropdownBox",dropdownId:"search-dropdown",form:"#nav-searchbar",issPrefixEl:"#issprefix",issFieldRestriction:"#issFieldRestriction",browseNodeId:"#issBrowseNodeId",issCridEl:"#isscrid",suggestion:".s-suggestion"},m,t,x,r,q,w='\x3cdiv id\x3d"'+v.dropdownId+'" class\x3d"search-dropdown"\x3e\x3c/div\x3e',
B=/search-alias\s*=\s*([\w-]+)/;a===n&&d(h).resize(p);return{getAliasDropdown:e,getSearchBox:b,getSearchBoxId:function(){return v.searchBox},getSearchSuggestions:function(){"undefined"===typeof t&&(t=d(v.searchSuggestions));return t},getKeyword:function(){var e;e=a!==n?a:b();return f.getKeyword(e)},setKeyword:function(e){if(a!==n)a.val(e);else return b().val(e)},getAliasFromDropdown:function(){var b=e().val();return(b=b&&b.match(B))?b[1]:n},getCategoryNameFromDropdown:function(b){var a="";b?(b=e().find('option[value$\x3d"search-alias\x3d'+
b+'"]'),a=0<b.length?d(b[0]).text():a):a=e().find("option:selected").text();return d.trim(a)},getDropdown:c,showDropdown:function(b){g?("undefined"!==typeof b&&a.flyout.elem().html(b),a.flyout.show()):("undefined"!==typeof b&&c().hide().html(b),b=l(),c().css({left:b.offset().left,width:b.width()}).show())},hideDropdown:function(){g?a.flyout.hide():c().hide()},getOption:function(b){if(!b)return e().find("option:selected");b=e().find('option[value$\x3d"search-alias\x3d'+b+'"]');return 0<b.length?d(b[0]):
d()},getForm:k,getIssPrefixElem:function(){return d(v.issPrefixEl)},getIssFieldRestrictionElem:function(){return d(v.issFieldRestriction)},getIssBrowseNodeIdElem:function(){return d(v.browseNodeId)},getIssCridElem:function(){return d(v.issCridEl)},getSuggestions:function(){return d(v.suggestion)},submitForm:function(){k().submit()},getOriginalSearchTerm:function(){return k().data("originalSearchTerm")},getOriginalAlias:function(){return k().data("originalAlias")},isSearchBoxFocused:function(){return b().get(0)===
document.activeElement},activateSearchBox:function(){k().addClass("nav-active")},deactivateSearchBox:function(){k().removeClass("nav-active")},getSearchApi:function(){return a}}});"use strict";h.$Nav.build("sx.iss.TemplateEngine",function(){var d={},a={allowUndefined:!0,allowMalformedHtml:!0},f=function c(e,k){var p=/^[a-zA-Z0-9_-]+$/.test(e)?d[e]=d[e]||c(document.getElementById(e).innerHTML):new Function("obj","var p\x3d[],print\x3dfunction(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g,
" ").replace(/'(?=[^#]*#>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<#=(.+?)#>/g,a.allowUndefined?"',$1,'":"',typeof($1)!\x3d\x3d\"undefined\"?$1:function(){throw 0}(),'").split("\x3c#").join("');").split("#\x3e").join("p.push('")+"');}return p.join('');");e=a.allowMalformedHtml?p:function(a){a=p(a);var e=document.createElement("div");e.innerHTML=a;if(e.innerHTML===a)return a;throw"Malformed html";};return k?e(k):e};return{template:f,templateWithOptions:function(c,e,k){var p=
a;a=e;c=f(c,k);a=p;return c}}});"use strict";h.$Nav.when("$").build("sx.iss.TemplateInstaller",function(d){function a(a,b){var c=document.createElement("script");c.setAttribute("type","text/html");c.setAttribute("id",a);c.text=b;return c}d("body");return{init:function(f){var b=document.createDocumentFragment(),c=f&&f.recentSearchesTreatment&&f.recentSearchesTreatment||"C";b.appendChild(a("s-suggestion",'\x3cdiv id\x3d"\x3c#\x3d suggestionId #\x3e"class\x3d"s-suggestion"data-alias\x3d"\x3c#\x3d alias #\x3e"data-keyword\x3d"\x3c#\x3d keyword #\x3e"data-store\x3d"\x3c#\x3d store #\x3e"data-isSc\x3d"\x3c#\x3d isSpellCorrected #\x3e"data-isFb\x3d"\x3c#\x3d isFallback #\x3e"data-type\x3d"\x3c#\x3d type #\x3e"data-nid\x3d"\x3c#\x3d browseNodeId #\x3e"data-reftag\x3d"\x3c#\x3d refTag #\x3e"data-crid\x3d"\x3c#\x3d completionResponseId #\x3e"\x3e\x3c# if (!skipDisplay) { for (var i \x3d 0; i \x3c highlightFragments.length; i++) {if (!highlightFragments[i].isHit) { #\x3e\x3cspan class\x3d"s-heavy"\x3e\x3c# } #\x3e\x3c#\x3d highlightFragments[i].text #\x3e\x3c# if (!highlightFragments[i].isHit) { #\x3e\x3c/span\x3e\x3c# } #\x3e\x3c# } #\x3e\x3c# } #\x3e\x3c# if (typeof storeHtml \x3d\x3d\x3d "string") { #\x3e \x3c#\x3d storeHtml #\x3e\x3c# } #\x3e\x3c/div\x3e'));
b.appendChild(a("suggestions-template",'\x3cdiv id\x3d"suggestions-template"\x3e\x3c# if (typeof suggestionTitle !\x3d\x3d "undefined") { #\x3e\x3cdiv id\x3d"suggestion-title"\x3e\x3c#\x3d suggestionTitle #\x3e\x3c/div\x3e\x3c# } #\x3e\x3c# if (typeof biaTitle !\x3d\x3d "undefined") { #\x3e\x3ca href\x3d"\x3c#\x3d biaWidgetUrl #\x3e" style\x3d"text-decoration: none !important;"\x3e\x3cp class\x3d"s-bia-suggestion"\x3e\x3cstrong\x3e\x3c#\x3d biaTitle #\x3e\x3c/strong\x3e\x3c/p\x3e\x3c/a\x3e\x3c# } #\x3e\x3cdiv id\x3d"suggestions" dir\x3d"auto"\x3e\x3c# if (typeof suggestions !\x3d\x3d "undefined") {for(var i\x3d0; i \x3c suggestions.length; i++) {var displayString \x3d suggestions[i].display; #\x3e\x3c#\x3d displayString #\x3e\x3c# }} #\x3e\x3c/div\x3e\x3c/div\x3e'));
b.appendChild(a("promoted-suggestion",'\x3cdiv class\x3d"s-suggestion s-suggestion-link-template"\x3e\x3ca href\x3d"\x3c#\x3d widgetItems[0].metadata.link_url #\x3e"\x3e\x3c#for (var i \x3d 0; i \x3c highlightFragments.length; i++) {if (highlightFragments[i].isHighlight) { #\x3e\x3cspan class\x3d"s-heavy"\x3e\x3c# } #\x3e\x3c#\x3d highlightFragments[i].text #\x3e\x3c# if (highlightFragments[i].isHighlight) { #\x3e\x3c/span\x3e\x3c# } #\x3e\x3c# } #\x3e\x3c/a\x3e\x3c/div\x3e'));"T2"===c?b.appendChild(a("s-recentSearch",
'\x3cdiv id\x3d"\x3c#\x3d suggestionId #\x3e" class\x3d"s-suggestion s-recentSearch" data-alias\x3d"\x3c#\x3d alias #\x3e" data-keyword\x3d"\x3c#\x3d keyword #\x3e" data-store\x3d"\x3c#\x3d store #\x3e" data-isSc\x3d"false" data-isFb\x3d"false" data-type\x3d"\x3c#\x3d type #\x3e"\x3e\x3cspan class\x3d"s-heavy"\x3e\x3c#\x3d bprefix #\x3e\x3c/span\x3e\x3c#\x3d prefix #\x3e\x3cspan class\x3d"s-heavy"\x3e\x3c#\x3d suffix #\x3e\x3c/span\x3e\x3c# if (typeof storeHtml \x3d\x3d\x3d "string") { #\x3e \x3c#\x3d storeHtml #\x3e\x3c# } #\x3e\x3cspan id\x3d"delete-\x3c#\x3d suggestionId #\x3e" class\x3d"s-suggestion-deleteDistinct"\x3e\x3ci id\x3d"delete-icon-\x3c#\x3d suggestionId #\x3e" class\x3d"a-icon a-icon-remove"\x3e\x3c/i\x3e\x3c/span\x3e \x3c/div\x3e')):
b.appendChild(a("s-recentSearch",'\x3cdiv id\x3d"\x3c#\x3d suggestionId #\x3e" class\x3d"s-suggestion s-recentSearch s-recentSearchDistinct" data-alias\x3d"\x3c#\x3d alias #\x3e" data-keyword\x3d"\x3c#\x3d keyword #\x3e" data-store\x3d"\x3c#\x3d store #\x3e" data-isSc\x3d"false" data-isFb\x3d"false" data-type\x3d"\x3c#\x3d type #\x3e"\x3e\x3cspan class\x3d"s-heavy"\x3e\x3c#\x3d bprefix #\x3e\x3c/span\x3e\x3c#\x3d prefix #\x3e\x3cspan class\x3d"s-heavy"\x3e\x3c#\x3d suffix #\x3e\x3c/span\x3e\x3c# if (typeof storeHtml \x3d\x3d\x3d "string") { #\x3e \x3c#\x3d storeHtml #\x3e\x3c# } #\x3e\x3cspan id\x3d"delete-\x3c#\x3d suggestionId #\x3e" class\x3d"s-suggestion-deleteDistinct"\x3e\x3ci id\x3d"delete-icon-\x3c#\x3d suggestionId #\x3e" class\x3d"a-icon a-icon-remove"\x3e\x3c/i\x3e\x3c/span\x3e \x3c/div\x3e'));
b.appendChild(a("s-separator",'\x3cdiv id\x3d"s-separator"\x3e\x3cdiv class\x3d"s-separator"\x3e\x3c/div\x3e\x3c/div\x3e'));b.appendChild(a("s-option",'\x3coption value\x3d"\x3c#\x3d value #\x3e"\x3e\x3c#\x3d store #\x3e\x3c/option\x3e'));b.appendChild(a("s-minimal",'\x3cdiv class\x3d"s-suggestion s-custom" data-url\x3d"\x3c#\x3d url #\x3e"\x3e\x3c#\x3d bprefix #\x3e\x3cspan class\x3d"s-heavy"\x3e\x3c#\x3d prefix #\x3e\x3c/span\x3e\x3c#\x3d suffix #\x3e\x3c/div\x3e'));b.appendChild(a("s-storeText",
'\x3cspan class\x3d"\x3c#\x3d cssClasses #\x3e"\x3e\x3c#\x3d store #\x3e\x3c/span\x3e'));b.appendChild(a("s-nextSearch",'\x3cdiv id\x3d"\x3c#\x3d suggestionId #\x3e" \x3c# if (nextSearchTemplateType \x3d\x3d\x3d "T2") { #\x3eclass\x3d"s-suggestion s-nextSearch s-nextSearch-block s-nextSearch-cell" \x3c# } else { #\x3eclass\x3d"s-suggestion s-nextSearch" \x3c# } #\x3edata-alias\x3d"\x3c#\x3d alias #\x3e" data-keyword\x3d"\x3c#\x3d keywords #\x3e" data-isSc\x3d"false" data-isFb\x3d"false" data-type\x3d"\x3c#\x3d type #\x3e"\x3e\x3c#\x3d keywords #\x3e\x3c/div\x3e'));
b.appendChild(a("s-qu-suggestion",'\x3cdiv id\x3d"\x3c#\x3d suggestionId #\x3e"class\x3d"s-suggestion s-qu-suggestion"data-keyword\x3d"\x3c#\x3d keyword #\x3e"data-store\x3d"\x3c#\x3d store #\x3e"data-isSc\x3d"\x3c#\x3d isSpellCorrected #\x3e"data-type\x3d"\x3c#\x3d type #\x3e"data-qu-type\x3d"\x3c#\x3d qu.type #\x3e"data-qu-value\x3d"\x3c#\x3d qu.value #\x3e"data-crid\x3d"\x3c#\x3d completionResponseId #\x3e"\x3e\x3cspan class\x3d"s-qu-display-string"\x3e\x3c#\x3d qu.displayString  #\x3e\x3c/span\x3e\x3c/div\x3e'));
b.appendChild(a("asin",'\x3cdiv class\x3d"s-asin-suggestion s-suggestion"\x3e\x3ca class\x3d"s-asin-sug-link" href\x3d"\x3c#\x3d widgetItems[0].metadata.link_url #\x3e"\x3e\x3cdiv class\x3d"s-asin-sug-left"\x3e\x3cdiv class\x3d"s-asin-image-container" style\x3d"opacity: 1;"\x3e\x3cimg class\x3d"s-asin-image" src\x3d"\x3c#\x3d widgetItems[0].metadata.image_url #\x3e"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"s-asin-sug-right"\x3e\x3cdiv class\x3d"s-size-mini s-sug-pp-caption"\x3e\x3c#\x3d widgetItems[0].metadata.asin_header #\x3e\x3c/div\x3e\x3cdiv class\x3d"s-asin-title"\x3e\x3c#\x3d widgetItems[0].metadata.asin_title #\x3e\x3c/div\x3e\x3c/div\x3e\x3c/a\x3e\x3c/div\x3e'));
b.appendChild(a("storefront",'\x3chr class\x3d"s-line-separator"\x3e\x3cdiv class\x3d"s-storefront-suggestion s-suggestion"\x3e\x3ca class\x3d"s-storefront-sug-link" href\x3d"\x3c#\x3d widgetItems[0].metadata.link_url #\x3e"\x3e\x3cdiv class\x3d"s-storefront-sug-left"\x3e\x3cdiv class\x3d"s-storefront-image-container" style\x3d"opacity: 1;"\x3e\x3cimg class\x3d"s-storefront-image" src\x3d"\x3c#\x3d widgetItems[0].metadata.image_url #\x3e"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"s-storefront-sug-right"\x3e\x3cdiv class\x3d"s-size-mini s-sug-sf-caption"\x3e\x3c#\x3d widgetItems[0].metadata.storefront_header #\x3e\x3c/div\x3e\x3cdiv class\x3d"s-storefront-title"\x3e\x3c#\x3d widgetItems[0].metadata.storefront_caption #\x3e\x3c/div\x3e\x3c/div\x3e\x3c/a\x3e\x3c/div\x3e'));
b.appendChild(a("keywords-link",'\x3cdiv class\x3d"s-suggestion s-suggestion-link-template"\x3e\x3ca href\x3d"\x3c#\x3d widgetItems[0].metadata.link_url #\x3e"\x3e\x3c#for (var i \x3d 0; i \x3c highlightFragments.length; i++) {if (highlightFragments[i].isHighlight) { #\x3e\x3cspan class\x3d"s-heavy"\x3e\x3c# } #\x3e\x3c#\x3d highlightFragments[i].text #\x3e\x3c# if (highlightFragments[i].isHighlight) { #\x3e\x3c/span\x3e\x3c# } #\x3e\x3c# } #\x3e\x3c/a\x3e\x3c/div\x3e'));b.appendChild(a("keywords-badge-link",
'\x3cdiv class\x3d"s-suggestion s-suggestion-link-template"\x3e\x3ca href\x3d"\x3c#\x3d widgetItems[0].metadata.link_url #\x3e"\x3e\x3c#for (var i \x3d 0; i \x3c highlightFragments.length; i++) {if (highlightFragments[i].isHighlight) { #\x3e\x3cspan class\x3d"s-heavy"\x3e\x3c# } #\x3e\x3c#\x3d highlightFragments[i].text #\x3e\x3c# if (highlightFragments[i].isHighlight) { #\x3e\x3c/span\x3e\x3c# } #\x3e\x3c# } #\x3e\x3c# if (widgetItems[0].metadata.badge_type \x3d\x3d\x3d "PRIME") { #\x3e\x3ci class\x3d"a-icon a-icon-prime a-icon-medium" role\x3d"img" aria-label\x3d"Amazon Prime"\x3e\x3c/i\x3e\x3c# } #\x3e\x3c/a\x3e\x3c/div\x3e'));
b.appendChild(a("pre-search-suggestion",'\x3cdiv id\x3d"pre-search-suggestion"\x3e\x3cdiv class\x3d"s-suggestion pss-dropdown-title"\x3e\x3c#\x3dmetadata[language]#\x3e\x3c/div\x3e\x3c# for(var i\x3d0; i \x3c widgetItems.length; i++) {var keywords \x3d widgetItems[i].metadata.keywords; #\x3e\x3cdiv class\x3d"s-suggestion s-heavy" data-alias\x3d"\x3c#\x3d alias #\x3e" data-keyword\x3d"\x3c#\x3d keywords #\x3e" data-type\x3d"a9" data-crid\x3d"\x3c#\x3d completionResponseId #\x3e" data-reftag\x3d"\x3c#\x3d refTag #\x3e"\x3e\x3c#\x3d keywords #\x3e\x3c/div\x3e\x3c#} #\x3e\x3c/div\x3e'));
b.appendChild(a("discover-top-grey",'\x3cdiv id\x3d"s-suggestion discover-suggestion"\x3e\x3cdiv class\x3d"discover-sug-container-top"\x3e\x3c# for(var i\x3d0; i \x3c widgetItems.length; i++) {var metadata \x3d widgetItems[i].metadata; #\x3e\x3cdiv class\x3d"discover-sug-column"\x3e\x3cdiv class\x3d"discover-sug-card"\x3e\x3ca class\x3d"discover-sug-link" href\x3d"\x3c#\x3d metadata.link_url #\x3e"\x3e\x3cdiv class\x3d"discover-sug-image-container"\x3e\x3cimg class\x3d"discover-sug-image" src\x3d"\x3c#\x3d metadata.image_url #\x3e"\x3e\x3cdiv class\x3d"discover-sug-image-background discover-sug-image-grey-shield"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"discover-sug-text"\x3e\x3c#\x3d metadata.text #\x3e\x3c/div\x3e\x3c/a\x3e\x3c/div\x3e\x3c/div\x3e\x3c#} #\x3e\x3c/div\x3e\x3chr class\x3d"discover-hr"\x3e\x3c/div\x3e'));
b.appendChild(a("discover-bot-grey",'\x3cdiv id\x3d"s-suggestion discover-suggestion"\x3e\x3chr class\x3d"discover-hr"\x3e\x3cdiv class\x3d"discover-sug-container-bot"\x3e\x3c# for(var i\x3d0; i \x3c widgetItems.length; i++) {var metadata \x3d widgetItems[i].metadata; #\x3e\x3cdiv class\x3d"discover-sug-column"\x3e\x3cdiv class\x3d"discover-sug-card"\x3e\x3ca class\x3d"discover-sug-link" href\x3d"\x3c#\x3d metadata.link_url #\x3e"\x3e\x3cdiv class\x3d"discover-sug-image-container"\x3e\x3cimg class\x3d"discover-sug-image" src\x3d"\x3c#\x3d metadata.image_url #\x3e"\x3e\x3cdiv class\x3d"discover-sug-image-background discover-sug-image-grey-shield"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"discover-sug-text"\x3e\x3c#\x3d metadata.text #\x3e\x3c/div\x3e\x3c/a\x3e\x3c/div\x3e\x3c/div\x3e\x3c#} #\x3e\x3c/div\x3e\x3c/div\x3e'));
b.appendChild(a("discover-top-clear",'\x3cdiv id\x3d"s-suggestion discover-suggestion"\x3e\x3cdiv class\x3d"discover-sug-container-top"\x3e\x3c# for(var i\x3d0; i \x3c widgetItems.length; i++) {var metadata \x3d widgetItems[i].metadata; #\x3e\x3cdiv class\x3d"discover-sug-column"\x3e\x3cdiv class\x3d"discover-sug-card"\x3e\x3ca class\x3d"discover-sug-link" href\x3d"\x3c#\x3d metadata.link_url #\x3e"\x3e\x3cdiv class\x3d"discover-sug-image-container"\x3e\x3cimg class\x3d"discover-sug-image" src\x3d"\x3c#\x3d metadata.image_url #\x3e"\x3e\x3cdiv class\x3d"discover-sug-image-background"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"discover-sug-text"\x3e\x3c#\x3d metadata.text #\x3e\x3c/div\x3e\x3c/a\x3e\x3c/div\x3e\x3c/div\x3e\x3c#} #\x3e\x3c/div\x3e\x3chr class\x3d"discover-hr"\x3e\x3c/div\x3e'));
b.appendChild(a("discover-bot-clear",'\x3cdiv id\x3d"s-suggestion discover-suggestion"\x3e\x3chr class\x3d"discover-hr"\x3e\x3cdiv class\x3d"discover-sug-container-bot"\x3e\x3c# for(var i\x3d0; i \x3c widgetItems.length; i++) {var metadata \x3d widgetItems[i].metadata; #\x3e\x3cdiv class\x3d"discover-sug-column"\x3e\x3cdiv class\x3d"discover-sug-card"\x3e\x3ca class\x3d"discover-sug-link" href\x3d"\x3c#\x3d metadata.link_url #\x3e"\x3e\x3cdiv class\x3d"discover-sug-image-container"\x3e\x3cimg class\x3d"discover-sug-image" src\x3d"\x3c#\x3d metadata.image_url #\x3e"\x3e\x3cdiv class\x3d"discover-sug-image-background"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"discover-sug-text"\x3e\x3c#\x3d metadata.text #\x3e\x3c/div\x3e\x3c/a\x3e\x3c/div\x3e\x3c/div\x3e\x3c#} #\x3e\x3c/div\x3e\x3c/div\x3e'));
b.appendChild(a("discover-top-refinement-desktop-top",'\x3cdiv class\x3d"discover-tr "\x3e\x3c#\x3d metadata.header #\x3e\x3cspan class\x3d"s-heavy"\x3e\x3c#\x3d metadata.headerSuffix #\x3e\x3c/span\x3e\x3col class\x3d"discover-tr-carousel-container "\x3e\x3c# for (var i \x3d 0; i \x3c widgetItems.length; i++) {var itemMetadata \x3d widgetItems[i].metadata; #\x3e\x3cli class\x3d"discover-tr-carousel-card discover-textnav-pill"\x3e\x3cdiv class\x3d"discover-textnav-pill"\x3e\x3cdiv data-keyword\x3d"\x3c#\x3d metadata.header #\x3e" class\x3d"s-suggestion discover-tr-suggestion"\x3e\x3ca href\x3d"\x3c#\x3d itemMetadata.link_url #\x3e"\x3e\x3c#\x3d itemMetadata.text #\x3e\x3c/a\x3e\x3c/div\x3e\x3c/div\x3e\x3c/li\x3e\x3c#} #\x3e\x3c/ol\x3e\x3c# var arrowImgSrc \x3d "https://m.media-amazon.com/images/G/01/shopbylook/shoppable-images/next_tab_control._CB416468320_.svg"; #\x3e\x3cdiv class\x3d"discover-tr-carousel-control discover-tr-carousel-control-left discover-tr-prevent-close"\x3e\x3cimg alt\x3d"" class\x3d"discover-tr-carousel-control-left discover-tr-prevent-close" src\x3d"\x3c#\x3d arrowImgSrc #\x3e"\x3e\x3c/div\x3e\x3cdiv class\x3d"discover-tr-carousel-control discover-tr-carousel-control-right discover-tr-prevent-close"\x3e\x3cimg alt\x3d"" class\x3d"discover-tr-carousel-control-right discover-tr-prevent-close" src\x3d"\x3c#\x3d arrowImgSrc #\x3e"\x3e\x3c/div\x3e\x3c/div\x3e\x3chr class\x3d"discover-hr"\x3e'));
b.appendChild(a("stores",'\x3c# var metadata \x3d widgetItems[0].metadata; #\x3e\x3cdiv class\x3d"s-suggestion s-store-suggestion" data-keyword\x3d"\x3c#\x3d metadata.text #\x3e"\x3e\x3ca class\x3d"s-store-sug-link" aria-label\x3d"\x3c#\x3d metadata.text #\x3e" href\x3d"\x3c#\x3d metadata.link_url #\x3e"\x3e\x3cdiv class\x3d"s-store-sug-logo-container" style\x3d"opacity: 1;"\x3e\x3cimg class\x3d"s-store-sug-logo" alt\x3d"\x3c#\x3d metadata.text #\x3e" src\x3d"\x3c#\x3d metadata.image_url #\x3e"\x3e\x3c/div\x3e\x3cdiv class\x3d"s-store-sug-text-container"\x3e\x3cdiv class\x3d"s-store-sug-text"\x3e\x3c# for (var i \x3d 0; i \x3c highlightFragments.length; i++) { #\x3e\x3c# if (highlightFragments[i].isHighlight) { #\x3e\x3cspan class\x3d"s-heavy"\x3e\x3c# } #\x3e\x3c#\x3d highlightFragments[i].text #\x3e\x3c# if (highlightFragments[i].isHighlight) { #\x3e\x3c/span\x3e\x3c# } #\x3e\x3c# } #\x3e\x3c/div\x3e\x3c/div\x3e\x3c/a\x3e\x3c/div\x3e'));
f&&f.shouldGetBIA&&b.appendChild(a("s-bia",'\x3ca id\x3d"\x3c#\x3d suggestionId #\x3e" href\x3d"\x3c#\x3d dp #\x3e" class\x3d"s-asin-sug-link"\x3e\x3cdiv class\x3d"s-asin-suggestion"\x3e\x3cdiv class\x3d"s-asin-sug-left"\x3e\x3cdiv class\x3d"s-asin-image-container" style\x3d"opacity: 1;"\x3e\x3cimg src\x3d"\x3c#\x3d image #\x3e" class\x3d"s-asin-image"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"s-asin-sug-right"\x3e\x3cdiv class\x3d"s-size-mini s-sug-pp-caption"\x3e\x3c#\x3d purchasedText #\x3e \x3c#\x3d purchaseDate #\x3e\x3c/div\x3e \x3cdiv class\x3d"s-asin-title"\x3e\x3c#\x3d title #\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3c/a\x3e'));
document.body.appendChild(b)}}});"use strict";h.$Nav.when("sx.iss.DebugUtils","sx.iss.DomUtils").build("sx.iss.EventBus.instance",function(d,a){return new function(){function f(b){var a=typeof b,c="";"object"===a&&b.hasOwnProperty("name")?c=b.name:"string"===a&&(c=b);return c}var b={},c={};this.listen=function(e,c,p){var l,g;if(a.isArray(e)){for(l=0;l<e.length;l++)g=e[l],this.listen(g,c,p),d.logDebug("Listening for: "+g);return this}g=f(e);b[g]||(b[g]=[]);b[g].push({f:c,o:p});d.logDebug("Listening for: "+
g);return this};this.trigger=function(a,c){a=f(a);d.logDebugWithTrace("Trigger: "+a,c);a=b[a];var p;if(a){for(p=0;p<a.length;p++)a[p].f.call(a[p].o,c);return this}};this.triggerThrottledEvent=function(a,k,p){var l=f(a);d.logDebugWithTrace("Trigger (throttled): "+l,k);var g=b[l];a=c[l];if(g)return p===n&&(p=100),a&&(clearTimeout(a),delete c[l]),a=setTimeout(function(){var b;for(b=0;b<g.length;b++)g[b].f.call(g[b].o,k);delete c[l]},p),c[l]=a,this}}});"use strict";h.$Nav.when("$","sx.iss.utils","sx.iss.Events",
"NavDomApi","sx.iss.DebugUtils","sx.iss.IssContext").build("sx.iss.PublicApi",function(d,a,f,b,c,e){function k(a){b.getSearchBox().focus(a)}function p(a){a===n?b.getSearchBox().blur():b.getSearchBox().blur(a)}var l=/node\s*=\s*([\d]+)/,g=/bbn\s*=\s*([\d]+)/,h=/^me=([0-9A-Z]*)/,m=/^\s+/,t=/\s+/g,x=/gp\/help\/customer\/display\.html/;return{searchAlias:function(){return b.getAliasFromDropdown()},searchNode:function(){var a=b.getAliasDropdown().val().match(l);return a?a[1]:null},bbn:function(){var a=
b.getAliasDropdown().val().match(g);return a?a[1]:null},merchant:function(){var a=b.getAliasDropdown().val().match(h);return a?a[1]:null},encoding:function(){var a=b.getForm().find('input[name^\x3d"__mk_"]');if(a.length)return[a.attr("name"),a.val()]},keyword:function(a){return a!==n?b.setKeyword(a):b.getKeyword().replace(m,"").replace(t," ")},submit:function(a){var e=b.getForm();e.submit(function(b){if(!(e&&e[0]&&e[0].action&&e[0].action.match(x)))return c.logDebugWithTrace("Attaching the submit event handler to the form..."),
a.call(this,b)})},suggest:function(b){a.eventBus.listen(f.globals.suggestionsRendered,function(a){var e=[];d.each(a.suggestions,function(a,b){"separator"!==b.type&&e.push(b)});b(a.searchTerm,e)})},onFocus:k,onBlur:p,focus:k,blur:p,keydown:function(a){var e="#"+b.getSearchBox().attr("id");b.getForm().delegate(e,"keydown",a)},setupFastLab:function(a){c.logDebugWithTrace("Weblabs are no longer triggered in the front end. Fastlab",a)}}});"use strict";h.$Nav.when("sx.iss.DebugUtils","sx.iss.DomUtils").build("sx.iss.IssContext",
function(d,a){var f;return{getConfiguration:function(){return f},setConfiguration:function(a){f=a}}});"use strict";h.$Nav.when("$","sx.iss.utils","sx.iss.SuggestionTypes","NavDomApi","sx.iss.ReftagBuilder","sx.iss.DebugUtils","sx.iss.DataAttributes").build("sx.iss.Reftag",function(d,a,f,b,c,e,k){return function(p,f,g){function d(a){return(new c).build(a,g.hasOwnProperty("shouldAddImeTag")&&g.shouldAddImeTag())}function m(b){if(b.suggestions===n||b.searchTerm===n)e.logDebug('"suggestions" or "searchTerm" is undefined',
b);else{for(var f=c.CONSTANTS.noSearchTermMatchInResults,k=b.searchTerm,g=b.suggestions,l=0;l<g.length;l++)if(k===g[l].keyword){f=c.CONSTANTS.searchTermMatchInResults;break}h(f);a.eventBus.trigger(p.reftagUpdatedAfterRender,b)}}function t(){h(c.CONSTANTS.noResults)}function x(a){if(a.suggestion===n||a.searchTerm===n)e.logDebug('"suggestion" or "searchTerm" is undefined',a);else{var b=a.suggestion.data(k.refTag.name);"string"===typeof b&&b.length?h(b,!0):h(d(a))}}function h(a,e){var p=/(ref=[\-\w]+)/,
f=b.getForm(),k=f.attr("action");p.test(k)?k=e?k.replace(p,c.CONSTANTS.reftagPrefix+a):k.replace(p,c.CONSTANTS.reftagBase+a):("/"!==k.charAt(k.length-1)&&(k+="/"),k+=a);f.attr("action",k)}f===n&&(f={});g===n&&(g={});a.eventBus.listen(p.selectionChange,x);a.eventBus.listen(p.suggestionsRendered,m);a.eventBus.listen(p.noSuggestions,t);return{create:d,updateReftagAfterRender:m,updateReftagAfterSelection:x,updateReftagAfterNoSuggestions:t,updateFormActionWithReftag:h}}});"use strict";h.$Nav.when("$",
"sx.iss.SuggestionTypes","sx.iss.DataAttributes","NavDomApi","sx.iss.DebugUtils").build("sx.iss.ReftagBuilder",function(d,a,f,b,c){function e(){function e(a){a!==n&&m.push(a);return this}function l(a){a=b.getOption(a.data("alias")).val();var e=a.indexOf("\x3d");if(-1===e)return"";a=a.substr(e+1);var e=a.indexOf("-"),c=a.substr(0,3);return e?c:c+a.charAt(e+1)}function g(g,d){var r=g.suggestion,q=g.searchTerm;g=g.previousSearchTerm;c.isDebugModeOn()&&c.logDebugWithTrace("Build reftag for search term: "+
q+" pre term:"+g,r);var w=h(r).reftag;e(k.base);d&&e(k.ime);var B;!0===r.data(f.fallback.name)?B=k.fallback:!0===r.data(f.spellCorrected.name)?B=k.spellCorrected:r.data(f.type.name)===a.help.name&&(B=k.help);d=B;d!==n?e(d):e(w);d=b.getDropdown().find(".s-suggestion");w=d.index(r)+1;c.isDebugModeOn()&&c.logDebugWithTrace("Display position of suggestion is: "+w,{suggestion:r,suggestions:d,suggestionsIndex:d.index(r),suggestionsPrevAll:r.prevAll().length,suggestionsPrevAllWithSelector:r.prevAll(".s-suggestion").length});
e(w);r===n?(e(k.undefinedSugg),r=l(r),e(r)):e(g?g.length:q.length);return m.join(k.separator)}function h(b){var e=a.a9;d.each(a,function(a,c){if(b.attr("data-type")===c.name)return e=c,!1});return e}function l(a){a=a.val();var b=a.indexOf("\x3d");if(""!==a||-1===b)return"";a=a.substr(b+1);var b=a.indexOf("-")+1,e=a.substr(0,3);return b?e:e+a.charAt(b)}var m=[];return{build:g,buildFull:function(a,b){return k.reftagBase+g(a,b)}}}var k={base:"ss",fallback:"fb",spellCorrected:"sc",undefinedSugg:"dd",
reftagBase:"ref\x3dnb_sb_",noResults:"noss",searchTermMatchInResults:"noss_1",noSearchTermMatchInResults:"noss_2",ime:"ime",separator:"_",help:"h",reftagPrefix:"ref\x3d"};e.CONSTANTS=k;return e});"use strict";h.$Nav.when("$","NavDomApi","sx.iss.DebugUtils","sx.iss.CommonSuggestionUtils").build("sx.iss.suggestionUtils",function(d,a,f,b){function c(a){return a?a.replace(k,""):n}function e(b){var e;"undefined"===typeof a.getAliasFromDropdown()&&b&&(e=b.searchAliasAccessor(d));return e}var k=/#(S|E)#/g;
return{getPrefixPos:b.getPrefixPos,getPrefixPosMultiWord:b.getPrefixPosMultiWord,splitStringForDisplay:b.splitStringForDisplay,markHighlight:function(a,e){var c=b.getPrefixPos(e,a);return-1<c?(a=b.splitStringForDisplay(e,c,a.length),a.bprefix+"#S#"+a.prefix+"#E#"+a.suffix):e},removeHighlightMark:c,splitHighlightedString:function(a){if(a&&6<a.length){var b=a.indexOf("#S#"),e=a.indexOf("#E#");if(-1<b&&-1<e&&b+3<e)return{bprefix:c(a.substr(0,b)),prefix:c(a.substr(b+3,e-b-3)),suffix:c(a.substr(e+3))}}return n},
buildHighlightFragments:b.buildHighlightFragments,getAlias:function(){return a.getAliasFromDropdown()},getAliasWithDeepNodeAliasBacked:function(b){var c=a.getAliasFromDropdown();return c?c:e(b)},getDeepNodeAlias:e,getDeepNodeCategoryName:function(b,e){var c;b&&(c=a.getCategoryNameFromDropdown(b)||e.searchAliasDisplayNameAccessor());return c},shouldRequestSuggestions:function(b,c){if(("a9"===b||"event-based"===b)&&c.hasOwnProperty("aliases")){var k=a.getAliasFromDropdown()||e(c.deepNodeISS);c="*"===
c.aliases||-1<c.aliases.indexOf(k);f.logDebug("Should we request suggestions for: alias : "+k+" provider : "+b+"? "+c);return c}return!0},isComplexLayoutScript:b.isComplexLayoutScript}});"use strict";h.$Nav.build("sx.iss.CommonSuggestionUtils",function(){function d(a,c){return a.toLowerCase().indexOf(c.toLowerCase())}function a(a,c,e){return{bprefix:a.substr(0,c),prefix:a.substr(c,e),suffix:a.substr(c+e)}}var f=/\s/;return{buildHighlightFragments:function(b){var c=b.searchTerm,e=b.keyword,k=d(e,c);
b.isHighlightDisabled?c=k="":b.isSpellCorrected||-1===k?(c=e,e=k=""):(k=a(e,k,c.length||0),c=k.bprefix,e=k.prefix,k=k.suffix);var f=b.serviceHighlighting;b=b.highlightDisabled;b=f&&f.length&&!b?f:[{isHighlight:!b,text:c},{isHighlight:!1,text:e},{isHighlight:!b,text:k}];return b},getPrefixPos:d,getPrefixPosMultiWord:function(a,c){c=a.toLowerCase().indexOf(c.toLowerCase());if(-1===c)return-1;if(0===c)return 0;a=a[c-1];return" "===a||"\t"===a||a.match(f)?c:-1},splitStringForDisplay:a,isComplexLayoutScript:function(a){return(a=
a.charCodeAt(0))?0>=(a-1536)*(a-2431):!1}}});"use strict";h.$Nav.when("sx.iss.suggestionUtils","sx.iss.CachingProvider.instance").build("sx.iss.commonUtils",function(d,a){function f(b){var c=!1;b&&(b=b.charAt(0),c=a.get("isComplexLayout",b),c===n&&(c=d.isComplexLayoutScript(b),a.put("isComplexLayout",b,c)));return c}var b=/\"/gi,c=/[&|]+/gi;return{suggestionUtils:d,isHighlightDisabled:function(a){return f(a&&a.length&&a[0].length?a[0]:n)},isHighlightDisabledForAPIV2:function(a){return f(a&&a.length&&
a[0].value&&a[0].value.length?a[0].value:n)},extractDomainFromUrl:function(a){return-1<a.indexOf("://")?a.split("/")[2]:a.split("/")[0]},pruneUndefined:function(a){if("object"!==typeof a)return a;for(var b in a)a[b]===n&&delete a[b];return a},findIndex:function(a,b){if(!Array.isArray(a)||0===a.length||"function"!==typeof b)return-1;for(var c=0;c<a.length;c++)if(b(a[c]))return c;return-1},isWeblabTreatment:function(a,b,c){return a!==n&&a.weblabTreatments!==n&&"string"===typeof b&&"string"===typeof c&&
""!==b&&""!==c&&(a=a.weblabTreatments[b],"string"===typeof a&&""!==a&&a===c)?!0:!1},getWeblabOverrideFromCookie:function(){for(var a=document.cookie.split(";"),f=0;f<a.length;f++){var d=a[f].trim();if(0===d.indexOf("experiment\x3d")){a=d.substring(11,d.length);a=a.replace(b,"");a=a.split(c);f="";for(d=0;d<a.length;d++)var l=a[d].trim(),f=f+l+",";0<f.length&&(f=f.substring(0,f.length-1));return f}}return""}}});"use strict";h.$Nav.when("$","sx.iss.TimingProvider.instance","sx.iss.EventBus.instance",
"sx.iss.commonUtils","sx.iss.DependenciesMet").build("sx.iss.utils",function(d,a,f,b){function c(a){var b={"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#39;","/":"\x26#x2F;"};return String(a).replace(/[&<>"'\/]/g,function(a){return b[a]})}var e=/[^\w]/;return{timingProvider:a,eventBus:f,suggestionUtils:b.suggestionUtils,now:function(){return(new Date).getTime()},escapeRegExp:function(a){return a.replace(/([.*+?\^${}()|\[\]\/\\])/g,"\\$1")},htmlDecode:function(a){var b=
a;a&&e.test(a)&&(b=d("\x3cdiv\x3e\x3c/div\x3e").html(a).text());return b=c(b)},htmlEncode:function(a){var b=a;a&&(b=d("\x3cdiv\x3e\x3c/div\x3e").text(a).html());return b},escapeHtmlTags:c,extractDomainFromUrl:b.extractDomainFromUrl,uiKeycode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},isHighlightDisabled:b.isHighlightDisabled,isHighlightDisabledForAPIV2:b.isHighlightDisabledForAPIV2,findIndex:b.findIndex,
pruneUndefined:b.pruneUndefined,isWeblabTreatment:b.isWeblabTreatment,getWeblabOverrideFromCookie:b.getWeblabOverrideFromCookie,numSuggestions:{MAX_NUMBER_OF_SUGGESTIONS:11,MOBILE:6}}});"use strict";h.$Nav.when("$").build("sx.iss.DomUtils",function(d){var a=/\+/g,f=/^\s+/;(function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(a,c){var e=this.length>>>0;c=Number(c)||0;c=0>c?Math.ceil(c):Math.floor(c);for(0>c&&(c+=e);c<e;c++)if(c in this&&this[c]===a)return c;return-1})})();return{isHoveredClass:"is-hovered",
getKeyword:function(a){return(a=a.val())?a.replace(f,""):a},isElHoveredOver:function(a){return a.hasClass("is-hovered")},hoverOverEl:function(a){return a.addClass("is-hovered")},hoverOutEl:function(a){return a.removeClass("is-hovered")},isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},getFormParams:function(b){b=b.split("?");for(var c=1<b.length?b[1]:n,c=c?c.split("\x26"):[],e=c.length,f;0<e--;)f=c[e].split("\x3d"),c[e]={name:f[0],value:f[1].replace(a," ")};return{uri:b[0],
formParams:c}},suggestionClass:".s-suggestion",hiddenInputValue:"frmDynamic",hiddenInputClass:".frmDynamic",areAnySuggestionsHoveredOver:function(a){return 0<a.find(".is-hovered").length},getCursorPosition:function(a){a=a.get(0);if("selectionStart"in a)return a.selectionStart;if(document.selection){a.focus();var c=document.selection.createRange(),e=c.text.length;c.moveStart("character",-a.value.length);return c.text.length-e}return-1}}});"use strict";h.$Nav.build("sx.iss.DebugUtils",function(){function d(){return b.iss||
b.isstrace}function a(){return b.isstrace}function f(a,b){d()&&h.console&&(b!==n?console.debug(a,b):console.debug(a))}var b={iss:!1,isstrace:!1,noiss:!1,isspolyfill:!1,isscf:!1};return{init:function(a){if(a&&0<a.length){a=a.substring(1).split("\x26");for(var e=0;e<a.length;e++){var f=a[e].split("\x3d");if("debug"===f[0]){for(var d in b)b.hasOwnProperty(d)&&(b[d]=-1!==f[1].indexOf(d)?!0:!1);break}}}},logDebug:f,logDebugWithTrace:function(b,e){f(b,e);a()&&console.trace()},isDebugModeOn:d,isDebugModeOnWithTrace:a,
isDisableISS:function(){return b.noiss},isUsingPolyFill:function(){return b.isspolyfill},isQIAEnabled:function(){return b.isscf}}});"use strict";h.$Nav.build("sx.iss.ObjectUtils",function(){return{freeze:function(d){Object.freeze&&d&&Object.freeze(d)}}});"use strict";h.$Nav.when("$","sx.iss.DebugUtils").run(function(d,a){a.isDisableISS()||(d.fn.delegate&&!a.isUsingPolyFill()||d.extend(d.fn,{delegate:function(f,b,c){return this.bind(b,function(b){var k=d(b.target);if(k.is(f)||0<k.parents(f).length)return a.logDebug("delegate ",
{selector:f,target:k,event:b}),c.apply(k,arguments)})}}),h.$Nav.declare("sx.iss.DependenciesMet"))});"use strict";h.$Nav.when("sx.iss.ConfigVariants").build("sx.iss.ConfigVariantUtil",function(d){return{augmentConfig:function(a){a&&a.obfMkt&&((Object.keys(d)||[]).forEach(function(f){var b=d[f],c=b.marketplaces||[];"function"===typeof c.indexOf&&-1!==c.indexOf(a.obfMkt)?a[f]=b.returnVal:a[f]=n}),a.crossCategoryEmphasisTreatment=!0)}}});"use strict";h.$Nav.when("sx.iss.utils").build("sx.iss.V2ResponseReformatter",
function(d){return{reformat:function(a){if(!a)return["",[],[],[],""];var f=a.prefix,b=a.responseId,c=[],e=[],k=[];(a.suggestions||[]).forEach(function(a,b){var f=a.type||"";if(""!==f&&"KEYWORD"===f){var f=[],h={},m;a.fallback&&f.push("fb");Array.isArray(a.highlightFragments)&&(m=[],a.highlightFragments.forEach(function(a){m.push({isHit:a.hit,text:a.text})}));h={sc:a.spellCorrected?"1":n,ghost:a.ghost?!0:n,source:f.length?f:n,highlightFragments:m};d.pruneUndefined(h);k.push(h);f=d.findIndex(a.scopes,
function(a){return"ALIAS"===a.type});if(-1!==f&&(e.push({name:a.scopes[f].display,alias:a.scopes[f].value}),1===b&&c[0]===a.value))return;c.push(a.value)}});e.length&&(k[0].nodes=e);return[f,c,k,[],b]}}});"use strict";h.$Nav.when("sx.iss.ObjectUtils").build("sx.iss.SuggestionTypes",function(d){var a={a9:{name:"a9",reftag:"i",templateId:"s-suggestion"},a9Xcat:{name:"a9-xcat",reftag:"c",templateId:"s-suggestion"},a9XOnly:{name:"a9-xcat-only",reftag:"xo",source:"xo",templateId:"s-suggestion"},nextSearch:{name:"nextSearch",
reftag:"nsis",templateId:"s-nextSearch"},recentSearch:{name:"recentSearch",reftag:"rsis",templateId:"s-recentSearch"},trendSearch:{name:"trendSearch",reftag:"trnd",templateId:"s-suggestion"},bia:{name:"bia",reftag:"bia",templateId:"s-bia"},qu:{name:"qu",reftag:"qu_au",templateId:"s-qu-suggestion"},help:{name:"help",reftag:"h",templateId:"s-suggestion"},KeywordSuggestion:{name:"KEYWORD",templateId:"s-suggestion"},BIASuggestion:{name:"BUY_IT_AGAIN"},TrendingSearchesSuggestion:{name:"TRENDING_SEARCHES"},
WidgetSuggestion:{name:"WIDGET"}};d.freeze(a);return a});"use strict";h.$Nav.when("sx.iss.ObjectUtils").build("sx.iss.InfoTypes",function(d){var a={actor:"actor",author:"author",director:"director",seasonTitle:"season_title",title:"title"};d.freeze(a);return a});"use strict";h.$Nav.build("sx.iss.DataAttributes",function(){return{fallback:{name:"isfb"},spellCorrected:{name:"issc"},type:{name:"type"},refTag:{name:"reftag"}}});"use strict";h.$Nav.build("sx.iss.TimingEvents",function(){return{latency:{group:"Latency",
events:{timeToDisplay:"timeToDisplay"}}}});"use strict";h.$Nav.when("sx.iss.DebugUtils").build("sx.iss.Events",function(d){function a(){var a=Date.now();return{uid:a,suggestionsReadyForDisplay:{name:"suggestionsReadyForDisplay-"+a},suggestionsReady:{name:"suggestionsReady-"+a},suggestionsRendered:{name:"suggestionsRendered-"+a},updateSearchBox:{name:"updateSearchBox-"+a},selectionChange:{name:"selectionChange-"+a},dropdownHidden:{name:"dropdownHidden-"+a},updateSearchTerm:{name:"updateSearchTerm-"+
a},suggestionClicked:{name:"suggestionClicked-"+a},suggestionsNeeded:{name:"suggestionsNeeded-"+a},a9SuggestionsNeeded:{name:"a9-suggestionsNeeded-"+a},recentSuggestionsNeeded:{name:"recent-suggestionsNeeded-"+a},biaSuggestionsNeeded:{name:"bia-suggestionsNeeded-"+a},biaSuggestionsReady:{name:"bia-suggestionsReady-"+a},trendingSuggestionsNeeded:{name:"trendSearch-suggestionsNeeded-"+a},trendingSuggestionsReady:{name:"trendSearch-suggestionsReady-"+a},eventBasedSuggestionsNeeded:{name:"event-based-suggestionsNeeded-"+
a},eventBasedSuggestionsReady:{name:"event-based-suggestionsReady-"+a},searchBoxUpdated:{name:"searchBoxUpdated-"+a},noSuggestions:{name:"nosuggestions-"+a},searchBoxFocusIn:{name:"searchBoxFocusIn-"+a},searchBoxFocusOut:{name:"searchBoxFocusOut-"+a},keydown:{name:"keydown-"+a},hideDropdown:{name:"hidedropdown-"+a},focusOnParent:{name:"focusOnParent-"+a},parentFocused:{name:"parentFocused-"+a},parentLostFocus:{name:"parentLostFocus-"+a},searchTermChanged:{name:"searchTermChanged-"+a},suggestionsDisplayed:{name:"suggestionsDisplayed-"+
a},upArrowPressed:{name:"upArrowPressed-"+a},downArrowPressed:{name:"downArrowPressed-"+a},blockSearchBoxFocusInOnce:{name:"blockSearchBoxFocusInOnce-"+a},allowSearchBoxFocusIn:{name:"allowSearchBoxFocusIn-"+a},reftagUpdatedAfterRender:{name:"reftagUpdatedAfterRender-"+a},onFocusWithSearchTerm:{name:"onFocusWithSearchTerm"},onFocusEmptySearchTerm:{name:"onFocusEmptySearchTerm"},onKeyPress:{name:"onKeyPress"},onPaste:{name:"onPaste"},onIMEAction:{name:"onIMEAction"}}}return{globals:{issLoaded:{name:"issLoaded"},
suggestionsRendered:{name:"suggestionsRendered"},initializeNavSearchBox:{name:"initializeSearchBox"}},createInstance:function(){return new a},createEvent:function(a,b){var c=b;b.hasOwnProperty("name")?c=b.name:"string"===typeof b?c=b:d.logDebug('Format of "event" parameter is not a string or an event object',b);return a+"-"+c}}});"use strict";h.$Nav.when("sx.iss.ObjectUtils").build("sx.iss.Platform",function(d){var a={name:"desktop",cid:"amazon-search-ui",callback:"String",needExtraParams:!0};d.freeze(a);
return a});"use strict";h.$Nav.build("sx.iss.ConfigVariants",function(){return{crossCategoryEmphasisTreatment:{marketplaces:"ATVPDKIKX0DER A1F83G8C2ARO7P A1PA6795UKMFR9 A21TJRUUN4KGV A13V1IB3VIYZZH A2EUQ1WTGCTBG2 APJ6JRA9NG5V4".split(" "),returnVal:!0},useAmazonEmberFontFamily:{marketplaces:"ATVPDKIKX0DER A1F83G8C2ARO7P A1PA6795UKMFR9 A21TJRUUN4KGV A13V1IB3VIYZZH A2EUQ1WTGCTBG2".split(" "),returnVal:!0}}});h.$Nav.when("$").build("sx.iss.TimingProvider.instance",function(d){return new function(){var a=
{};this.startTimer=function(d,b){a[d]||(a[d]={});a[d][b]={start:+new Date}};this.stopTimer=function(d,b){d=a[d]&&a[d][b];if(!d)return-1;d.end=+new Date;return d.end-d.start};this.getTimings=function(d){return a[d]};this.getTimingStats=function(f){var b={name:f},c=0,e=0,k=n,h=n,l=0,g=0,v=[],m=0,t=0;if(!a[f])return n;d.each(a[f],function(a,b){if(b.start&&b.end){g=b.end-b.start;v.push(g);l++;e+=g;if(!k||g<k)k=g;if(!h||g>h)h=g}});v.sort();b.n=l;b.avg=e/l;b.min=k;b.max=h;b.med=1===l?v[0]:l%2?(v[Math.floor(l/
2)]+v[Math.ceil(l/2)])/2:v[l/2];for(c=0;c<l;c++)m=v[c]-b.avg,m*=m,t+=m;b.stddev=Math.sqrt(t/l);return b};this.getTimingWithDisplayLatency=function(d,b){return(d=a[d]&&a[d][b])&&d.end&&d.start?d.end-d.start+100:-1}}});"use strict";h.$Nav.when("$","sx.iss.utils","sx.iss.Events","sx.iss.SuggestionTypes","sx.iss.DebugUtils","sx.iss.AjaxCallProvider","sx.iss.ISSAjaxUrlProvider","sx.iss.EventBasedSuggestionResultsProcessor","sx.iss.Platform").build("sx.iss.EventBasedSuggestionProvider",function(d,a,f,b,
c,e,k,p,l){var g=h.ue&&"function"===typeof h.ue.count&&h.ue.count;return function(d,h){function t(e){var l=e.searchTerm,k=e.keystroke;e=e.event;var t=this,r;r=d.disableAutocompleteOnFocus&&""===l?!0:!1;if(!r){r=[b.KeywordSuggestion.name,b.WidgetSuggestion.name];e=x(l,k,e);var A=w.buildUrl(e,r);t._requestCounter=(t._requestCounter||0)+1;t._lastRequestCounter=t._lastRequestCounter||0;var n=t._requestCounter;q.callService(A,function(b){if(n<t._lastRequestCounter)g&&g("iss-suggestion-processor:service-response-skipped",
1);else{g&&g("iss-suggestion-processor:service-response-skipped",0);t._lastRequestCounter=n;var e=new p(d),q;b&&b.suggestions?(q=e.processResults(b),g&&g("iss-suggestion-processor:service-response-empty",0)):(c.logDebugWithTrace("Event based suggestion provider service call response is empty",A),g&&g("iss-suggestion-processor:service-response-empty",1));b={searchTerm:l,keystroke:k,suggestionSets:q.augmentedSuggestions,suggestionTitleId:q.suggestionTitleId};e=f.createEvent("event-based",h.suggestionsReady);
a.eventBus.trigger(e,b)}})}}function x(b,c,e){b={b2b:d.b2b,fresh:d.fresh,ks:c,prefix:b,event:e,limit:"mobile"===l.name?a.numSuggestions.MOBILE:a.numSuggestions.MAX_NUMBER_OF_SUGGESTIONS};r&&delete b.ks;d.fb!==n&&(b.fb=d.fb);d&&d.isInternal&&(b.wc=a.getWeblabOverrideFromCookie());return b}var r=!1===d.isAPICachingDisabled,q=new e(d,"iss-api-v2",{cache:r}),w=new k(d);a.eventBus.listen(h.eventBasedSuggestionsNeeded,t,this);return{getName:function(){return"event-based"},produceSuggestions:t}}});"use strict";
h.$Nav.when("$","sx.iss.utils","NavDomApi","sx.iss.Events","sx.iss.SuggestionTypes","sx.iss.A9SuggestionResultsProcessors","sx.iss.DebugUtils","sx.iss.AjaxCallProvider","sx.iss.ISSAjaxUrlProvider","sx.iss.V2ResponseReformatter","sx.iss.BIAProvider").build("sx.iss.A9SuggestionProvider",function(d,a,f,b,c,e,k,h,l,g,v){var m=c.a9;return function(d,f,k){function q(){var b;b=f.aliases;(b=(b=f.implicitAlias?[f.implicitAlias]:"string"===typeof b?b.split(","):b)&&1===b.length?b[0]:f.removeDeepNodeISS?a.suggestionUtils.getAlias():
a.suggestionUtils.getAliasWithDeepNodeAliasBacked(f.deepNodeISS))||(b="aps");return b}var w=0,B=new e(f),O=new h(f,"iss-api-v2"),M=new l(f),K=f.shouldGetBIA?new v(f):n;a.eventBus.listen(k.a9SuggestionsNeeded,function(e){if(a.suggestionUtils.shouldRequestSuggestions("a9",f)){var d=e.searchTerm,l=e.keystroke,h=e.inputcopyselect;if(d&&d.length){q();var m=c.a9;e={b2b:f.b2b,fresh:f.fresh,ks:l,prefix:d};f.fb!==n&&(e.fb=f.fb);f&&f.isInternal&&(e.wc=a.getWeblabOverrideFromCookie());var p=[c.KeywordSuggestion.name];
f.shouldGetBIA&&(p=p.push([c.BIASuggestion.name]));e=M.buildUrl(e,p);var t=++w;O.callService(e,function(e){var p=g.reformat(e);if("undefined"!==typeof p)var w=q(),p=B.getResultsProcessor((m?m:c.a9).name).processResults(d,w,p);else p=void 0;f.shouldGetBIA&&(e=K.parseBIAResponse(e))&&(p.bia=e);a.timingProvider.stopTimer("a9",t);e={searchTerm:d,keystroke:l,inputcopyselect:h,suggestionSets:p};p=b.createEvent("a9",k.suggestionsReady);a.eventBus.trigger(p,e)});a.timingProvider.startTimer("a9",t)}else e=
{searchTerm:d,keystroke:l,suggestions:[]},p=b.createEvent("a9",k.suggestionsReady),a.eventBus.trigger(p,e)}},this);return{getName:function(){return"a9"},processResults:B.getResultsProcessor(m.name).processResults}}});"use strict";h.$Nav.when("$","sx.iss.utils","NavDomApi","sx.iss.DomUtils","sx.iss.SuggestionTypes","sx.iss.InfoTypes","sx.iss.DebugUtils","sx.iss.IssContext").build("sx.iss.A9SuggestionResultsProcessors",function(d,a,f,b,c,e,k,h){return function(e){function d(a){return{processResults:function(b,
e,c){k.logDebugWithTrace("Invalid suggestion type provided: "+a+" when asking for result processing");return""}}}function h(a,b){b={type:a.type,bprefix:a.bprefix,prefix:a.prefix,suffix:a.suffix,keyword:a.keyword,alias:a.alias||b,isSpellCorrected:a.isSpellCorrected,isFallback:a.isFallback,isDeepNode:a.isDeepNode,browseNodeId:a.browseNodeId,completionResponseId:a.completionResponseId,qu:a.qu,ghost:a.ghost,highlightFragments:a.highlightFragments,refTag:n};var d;if(b.type===c.a9Xcat.name||b.type===c.a9XOnly.name||
!0===b.isDeepNode){if(a.isFirst||!e.noXcats)a.store?d=a.store:a.isFirst&&(d=f.getCategoryNameFromDropdown())}else d=n;b.store=d;d=b.alias;a="/s?k\x3d"+encodeURIComponent(a.keyword);typeof d!==n&&(a+="\x26i\x3d"+encodeURIComponent(d));b.url=a;return b}var p={};p[c.a9.name]=new function(){var d=c.a9.name;return{processResults:function(g,k,q){var p=q[1],m=q[2]||[],O=0,M=[],K=[],G;q=q[4]||n;var A,N;N=!1;for(var J=0;J<m.length;J++){var D=m[J];if(D.hasOwnProperty("source"))for(var D=D.source,H=0;H<D.length;H++)if("fb"===
D[H]){N=!0;break}}J=!1;for(D=0;D<m.length;D++)if(H=m[D],H.hasOwnProperty("nodes")&&0<H.nodes.length){J=!0;break}D=-1;for(H=0;H<m.length;H++){var L=m[H];if(L.hasOwnProperty("author")&&0<L.author.length){D=H;break}}if(Array.isArray(m)&&0!==m.length)for(H=!1,L=0;L<m.length;L++){if(m[L]&&m[L].help){H=!0;break}}else H=!1;if(L=e.hasOwnProperty("cf")&&e.cf)for(var L=!1,P=0;P<m.length;P++){var I=m[P];if(I.hasOwnProperty("nodes")&&0<I.nodes.length&&I.hasOwnProperty("source")&&b.isArray(I.source)&&"xo"===I.source[0]){L=
!0;break}}!e.removeDeepNodeISS&&e.deepNodeISS&&(G=a.suggestionUtils.getDeepNodeAlias(e.deepNodeISS),A=a.suggestionUtils.getDeepNodeCategoryName(G,e.deepNodeISS));for(var P="undefined"!==typeof G,I=a.isHighlightDisabled(p),F=0;F<p.length;F++){var u={alias:G,category:A,searchTerm:g,keyword:p[F],isSpellCorrected:m&&m[F]&&"1"===m[F].sc,type:d,index:F,completionResponseId:q,highlightDisabled:I};if(e.removeDeepNodeISS){var y=a.suggestionUtils.getPrefixPos(u.keyword,u.searchTerm),z,C;u.highlightDisabled?
(z=u.keyword,y=C=""):u.isSpellCorrected||-1===y?(y=u.keyword,z=C=""):(C=a.suggestionUtils.splitStringForDisplay(u.keyword,y,u.searchTerm.length),y=C.bprefix,z=C.prefix,C=C.suffix);u={type:u.type,isSpellCorrected:u.isSpellCorrected,bprefix:y,prefix:z,suffix:C,keyword:u.keyword,isFirst:0===u.index,completionResponseId:u.completionResponseId}}else y=a.suggestionUtils.getPrefixPos(u.keyword,u.searchTerm),u.highlightDisabled?(z=u.keyword,y=C=""):u.isSpellCorrected||-1===y?(y=u.keyword,z=C=""):(C=a.suggestionUtils.splitStringForDisplay(u.keyword,
y,u.searchTerm.length),y=C.bprefix,z=C.prefix,C=C.suffix),u={type:u.type,isSpellCorrected:u.isSpellCorrected,bprefix:y,prefix:z,suffix:C,keyword:u.keyword,isFirst:0===u.index,alias:u.alias,store:u.category,isDeepNode:u.alias!==n&&u.category!==n,completionResponseId:u.completionResponseId};y=m[F];u.highlightFragments=y&&y.highlightFragments&&0<y.highlightFragments.length&&!I?y.highlightFragments:[{isHit:!1,text:u.bprefix},{isHit:!0,text:u.prefix},{isHit:!1,text:u.suffix}];D===F&&m[F].hasOwnProperty("author")&&
0<m[F].author.length&&(y=m[F].author||"",z=e.authorSuggestionText,y=y||"",z=z||"",""!==y&&(C="Explore books by "+y,""!==z&&-1!==z.indexOf("XXAUTHXX")&&(C=z.replace("XXAUTHXX",y)),y={displayString:C,type:"AUTHOR",value:y},u.type=c.qu.name,u.qu=y,u.suffix="",u.bprefix="",u.prefix="",u.keyword=""));0===F&&m[F].hasOwnProperty("ghost")&&(u.ghost=!0);H&&m[F]&&m[F].help&&(y=k,u.store=n,u.alias=y,u.type=c.help.name,u.isFallback=n);N||M.push(h(u,k));if(!e.noXcats&&J){if(!N&&0===F){if(e.removeDeepNodeISS||
!P)y=K,z=u,C=L,z.isFirst=!1,C?z.type=c.a9XOnly.name:(z.type=c.a9Xcat.name,C=f.getAliasFromDropdown(),z.store=f.getCategoryNameFromDropdown(C),z.alias=C,y.push(h(z)));(L||e.removeDeepNodeISS||!P)&&M.shift()}y=(z=m[F])&&z.source&&"fb"===z.source[0];z=z.nodes||[];for(C=0;C<z.length&&4>O;C++){var Q=z[C],E=L,S=y;u.store=Q.name;u.alias=Q.alias;u.browseNodeId=Q.browseNodeId;u.type=E?c.a9XOnly.name:c.a9Xcat.name;u.isFallback=S;K.push(h(u,k));O++}}}g={};g[c.a9.name]=M;g[L?c.a9XOnly.name:c.a9Xcat.name]=K;return g}}};
return{getResultsProcessor:function(a){return p.hasOwnProperty(a)?p[a]:new d(a)}}}});"use strict";h.$Nav.when("$","sx.iss.utils","NavDomApi","sx.iss.SuggestionTypes","sx.iss.Platform","sx.iss.Events").build("sx.iss.RecentSearchSuggestionProvider",function(d,a,f,b,c,e){function k(b,g){function k(a){var c=a.searchTerm;a=e.createEvent(p,g.suggestionsReady);c={searchTerm:c,suggestionSets:{}};b&&b.customerId?m(c,a):x(c,a,null)}function m(a,e){if("undefined"!==typeof h.iss.recentSearches)x(a,e,h.iss.recentSearches);
else{B("ajax:init",1);A&&A("bb","issRecentSearchAjax:success",{wb:1});A&&A("bb","issRecentSearchAjax:failure",{wb:1});var c=t();d.ajax({url:c,cache:!1,dataType:"json",type:"GET",timeout:2E3,success:function(b){A&&A("cf","issRecentSearchAjax:success",{wb:1});B("ajax:success",1);h.iss.recentSearches=b;x(a,e,b);A&&A("be","issRecentSearchAjax:success",{wb:1});N&&N("ld","issRecentSearchAjax:success",{wb:1})},error:function(c,d,f){A&&A("cf","issRecentSearchAjax:failure",{wb:1});B("ajax:error",1);d&&B("ajax:error:"+
d,1);h.ueLogError&&h.ueLogError({logLevel:"WARN",attribution:"iss-recent-search",message:"ISS AJAX call failed for recent search suggestions with responseText: "+(c&&c.responseText)+", pageType:"+(b&&b.pageType)+", status:"+d+", error:"+f});x(a,e);A&&A("be","issRecentSearchAjax:failure",{wb:1});N&&N("ld","issRecentSearchAjax:failure",{wb:1})}})}}function t(){var e=(b.protocol||h.parent.document.location.protocol||"http:")+"//"+a.extractDomainFromUrl(b.src)+"/suggestions/recent_searches/2017?client\x3damazon-search-ui\x26",
f="";d.each({mkt:b.mkt,r:b.requestId,s:b.sessionId,c:b.customerId,p:b.pageType,l:b.language,sv:c.name},function(a,b){f+=a+"\x3d"+b+"\x26"});return e+f}function x(b,e,c){var d=(c=r(c,b.searchTerm))&&c.length||0;0<d&&(b.suggestionSets[p]=c);B("provided",d);a.eventBus.trigger(e,b)}function r(a,b){if(!a||!a.suggestions)return null;a=a.suggestions.filter(function(a){return a&&"RECENT_SEARCH"===a.type});if(0>=a.length)return null;a=q(b,a);a=a.slice(0,Math.min(b?0:4,a.length));b||("undefined"===typeof J?
0<a.length&&(J=a):a=a.filter(function(a){for(var b=0;b<J.length;b++)if(a.keyword===J[b].keyword)return!0;return!1}));return a}function q(b,e){for(var c=[],d={},g=f.getAliasFromDropdown(),k=0;k<e.length;k++){var q=w(e[k]),m=q.displayAlias,h="",l="",v=q.keyword;if(!(d[q.keyword]||"T2"===K&&b&&g&&"aps"!==g&&q.alias!==g)){if("aps"===q.alias||b&&"T2"===K)m=n;if("undefined"!==typeof b&&b){h=a.suggestionUtils.getPrefixPos(q.keyword,b);if(0!==h)continue;v=a.suggestionUtils.splitStringForDisplay(q.keyword,
h,b.length);h=v.bprefix;l=v.prefix;v=v.suffix}q={type:p,alias:q.alias,store:m,keyword:q.keyword,bprefix:h,prefix:l,suffix:v,suggestionId:p+k,deleteUrl:q.deleteUrl};c.push(q);d[q.keyword]=!0}}return c}function w(b){var e="",c="",d=b.scopes.filter(function(a){return a&&"SEARCH_ALIAS"===a.scopeType});d&&0<d.length&&(e=d[0].scopeDisplay,c=d[0].scopeName);return{keyword:a.escapeHtmlTags(b.value),alias:a.escapeHtmlTags(c),displayAlias:e,deleteUrl:b.deleteUrl}}function B(a,b){a=M+":"+a;G&&G(a,(G(a)||0)+
b)}var O=this,M="iss:"+p,K=b&&b.recentSearchesTreatment&&b.recentSearchesTreatment||"C",G=h.ue&&"function"===typeof h.ue.count&&h.ue.count,A="function"===typeof h.uet&&h.uet,N="function"===typeof h.uex&&h.uex,J;(function(){"undefined"===typeof h.iss&&(h.iss={});var b=e.createEvent(p,g.suggestionsNeeded);a.eventBus.listen(b,k,O)})();B("init",1)}var p=b&&b.recentSearch&&b.recentSearch.name;k.prototype.getName=function(){return p};return k});"use strict";h.$Nav.when("$","sx.iss.utils","NavDomApi","sx.iss.SuggestionTypes",
"sx.iss.Events").build("sx.iss.NextSearchSuggestionProvider",function(d,a,f,b,c){function e(b,e){function g(b){b=b.searchTerm;var d={searchTerm:b,suggestionSets:{}},g=c.createEvent(k,e.suggestionsReady),q=f.getAliasFromDropdown();b&&b.length||"amazonfresh"===q||h.location.hostname&&h.location.hostname.match(/^smile/i)?a.eventBus.trigger(g,d):m(d,g)}function v(b,e,c){var f;if(c&&c.suggestions&&c.suggestions.headers&&c.suggestions.headers.originalKeywords&&c.suggestions.headers.title&&c.suggestions.headers.template&&
c.suggestions.suggestions&&c.suggestions.suggestions.length){f=c.suggestions.suggestions;c={type:k,nextSearchTemplateType:c.suggestions.headers.template,recentKeywords:c.suggestions.headers.originalKeywords,suggestionTitle:c.suggestions.headers.title};for(var g=0;g<f.length;g++)f[g].suggestionId=k+g,d.extend(f[g],c);f=f.slice(0,Math.min(4,f.length))}else f=null;c=f&&f.length||0;0<c&&(b.suggestionSets[k]=f);t("provided",c);a.eventBus.trigger(e,b)}function m(a,c){t("ajax:init",1);w&&w("bb","issNextSearchAjax:success",
{wb:1});w&&w("bb","issNextSearchAjax:failure",{wb:1});d.ajax({url:"/mn/search/next?dataVersion\x3dv0.2\x26format\x3djson\x26cid\x3de972f00d2cac731f276009b011fbd0abb715c84140e0a6f46ae489c58151968b",cache:!1,dataType:"json",type:"get",timeout:3E3,success:function(b){w&&w("cf","issNextSearchAjax:success",{wb:1});t("ajax:success",1);v(a,c,b);w&&w("be","issNextSearchAjax:success",{wb:1});n&&n("ld","issNextSearchAjax:success",{wb:1})},error:function(e,d,f){w&&w("cf","issNextSearchAjax:failure",{wb:1});
t("ajax:error:"+(d?d:"null"),1);v(a,c);h.ueLogError&&h.ueLogError({logLevel:"WARN",attribution:"iss-next-search",message:"ISS AJAX failed for next search suggestions with responseText: "+(e&&e.responseText)+", pageType:"+(b&&b.pageType)+", status:"+d+", error:"+f});w&&w("be","issNextSearchAjax:failure",{wb:1});n&&n("ld","issNextSearchAjax:failure",{wb:1})}})}function t(a,b){a=r+":"+a;q&&q(a,(q(a)||0)+b)}var x=this,r=b&&b.pageType?k+":"+b.pageType:k,q=h.ue&&"function"===typeof h.ue.count&&h.ue.count,
w="function"===typeof h.uet&&h.uet,n="function"===typeof h.uex&&h.uex;(function(){var b=c.createEvent(k,e.suggestionsNeeded);a.eventBus.listen(b,g,x)})();t("init",1)}var k=b&&b.nextSearch&&b.nextSearch.name+"";e.prototype.getName=function(){return k};return e});"use strict";h.$Nav.when("$","sx.iss.utils","sx.iss.TemplateEngine").build("sx.iss.SuggestionDisplayProvider",function(d,a,f){return function(a,c,e){var k,h;this.getDisplay=function(a){if(!k(a))return n;d.extend(a,e);return h(a)};k="string"===
typeof a?function(c){return c.type===a}:a;h=f.template(c)}});"use strict";h.$Nav.when("$","sx.iss.SuggestionTypes","sx.iss.TemplateEngine").build("sx.iss.WidgetDisplayProvider",function(d,a,f){return function(){this.getDisplay=function(b){return b&&b.type&&b.type.name&&b.type.name===a.WidgetSuggestion.name?f.template(b.template,b):null}}});"use strict";h.$Nav.when("sx.iss.utils","sx.iss.SuggestionTypes","sx.iss.TemplateEngine").build("sx.iss.IssDisplayProvider",function(d,a,f){var b=/\"/g;return function(c,
e,k,h,l){function g(a){d.eventBus.trigger(h.suggestionsNeeded,a)}function v(a){var c=e.sequence(a)||[];c.forEach(function(a){a.keyword&&(a.keyword=a.keyword.replace(b,"\x26quot"))});var f=a.searchTerm,g=a.keystroke,v=a.inputcopyselect,t=r++;d.timingProvider.startTimer("IssDisplayProvider",t);if(0===c.length)d.eventBus.trigger(h.noSuggestions,f);else{c=m(c,k);a={suggestions:c,suggestionTitle:l&&l.translatedStringsMap?l.translatedStringsMap[a.suggestionTitleId]:n,biaTitle:a.biaTitle?a.biaTitle:n,biaWidgetUrl:a.biaWidgetUrl?
a.biaWidgetUrl:n,viewAll:a.viewAll?a.viewAll:"",biaViewMore:a.biaViewMore?a.biaViewMore:n};!f&&c.filter(function(a){return a.type&&"trendSearch"===a.type}).length&&(a.suggestionTitle="Trending Searches");if(!f&&l.enableNextSearchSuggestions){var G=c.filter(function(a){return a.type&&"nextSearch"===a.type});G.length&&(a.suggestionTitle=G[0].suggestionTitle,a.nextSearchRecentKeywords=G[0].recentKeywords,a.nextSearchTemplateType=G[0].nextSearchTemplateType)}a=x(a);d.timingProvider.stopTimer("IssDisplayProvider",
t);d.eventBus.trigger(h.suggestionsReadyForDisplay,{searchTerm:f,keystroke:g,inputcopyselect:v,display:a,suggestions:c})}}function m(b,c){for(var e=0,d={},f=0;f<b.length;f++){var g=b[f];"type"in g&&(d[g.type]=(d[g.type]||0)+1);"separator"!==g.type&&(g.suggestionId="bia"===g.type||"biaViewMore"===g.type?"biaDiv"+e:"issDiv"+e,e++);var k=g,h;h="";if("undefined"===typeof g||g.type!==a.recentSearch.name)h=l.crossCategoryEmphasisTreatment?!0===g.isDeepNode?h+"s-highlight-secondary":h+"a-color-tertiary":
!0===g.isDeepNode?h+"s-highlight-secondary":h+"s-highlight-primary";k.cssClasses=h;for(var m,k=0;k<c.length&&!(m=c[k],h=g.isFallback&&1==d[a.a9Xcat.name],g.skipDisplay=h?!1:g.type===a.a9Xcat.name,m=t(m,g),"undefined"!==typeof g&&h&&(g.storeHtml=n),"undefined"===typeof g||g.type!==a.recentSearch.name||g.store||(g.storeHtml=n),"undefined"===typeof g||g.type!==a.trendSearch.name||g.store||(g.storeHtml=n),"undefined"===typeof g||g.type!==a.qu.name||g.store||(g.storeHtml=n),"undefined"===typeof g||g.type!==
a.help.name||g.store||(g.storeHtml=n),m=m.getDisplay(g));k++);g.display=m}return b}function t(a,b){var c=a;if(a.hasOwnProperty("provider")&&a.hasOwnProperty("partials")){for(c=0;c<a.partials.length;c++){var e=a.partials[c],d=e.provider.getDisplay(b);e.hasOwnProperty("formatter")&&(d=e.formatter.string.replace(e.formatter.toReplace,d));b[e.key]=d}c=a.provider}return c}var x=f.template(c),r=0;(function(){d.eventBus.listen(h.suggestionsReady,v,this);d.eventBus.listen(h.biaSuggestionsReady,v,this);d.eventBus.listen(["parentFocused",
"searchTermChanged"],g,this)})();return{processPartials:t,suggestionsReady:v}}});"use strict";h.$Nav.when("sx.iss.utils","sx.iss.Events").build("sx.iss.ArraySuggestionProvider",function(d,a){return function(f,b){function c(c){var f=[],g=c.searchTerm,h=c.keystroke;c=c.inputcopyselect;for(var m=g.toLowerCase(),t=d.isHighlightDisabled(e),n=0;n<e.length;n++){var r=e[n];if(-1!==r.toLowerCase().indexOf(m)&&10>f.length){var q=r,w=g,r={type:"array",keyword:q,url:k[n],isExactMatch:q===w};if(t)r.bprefix=r.suffix=
"",r.prefix=q;else{var B=d.suggestionUtils.getPrefixPos(q,w),q=d.suggestionUtils.splitStringForDisplay(q,B,w.length);r.bprefix=q.bprefix;r.prefix=q.prefix;r.suffix=q.suffix}f.push(r)}}f={searchTerm:g,keystroke:h,inputcopyselect:c,suggestionSets:{array:f}};g=a.createEvent("array",b.suggestionsReady);d.eventBus.trigger(g,f)}var e=f[0],k=f[1];(function(){var e=a.createEvent("array",b.suggestionsNeeded);d.eventBus.listen(e,c,this)})();return{name:"array"}}});"use strict";h.$Nav.when("$","sx.iss.utils",
"NavDomApi","sx.iss.Platform","sx.iss.Events","sx.iss.SuggestionTypes").build("sx.iss.ISSAjaxUrlProvider",function(d,a,f,b,c,e){return function(c){function p(l,g){var p=(c.protocol||h.parent.document.location.protocol||"http:")+"//"+a.extractDomainFromUrl(c.src)+"/api/2017/suggestions?",m={"session-id":c.sessionId,"customer-id":c.customerId,"request-id":c.requestId,"page-type":c.pageType,lop:c.language,"site-variant":b.name,"client-info":b.cid};c.obfMkt?m.mid=c.obfMkt:c.mkt&&(m["plain-mid"]=c.mkt);
f&&"function"===typeof f.getAliasFromDropdown&&(m.alias=f.getAliasFromDropdown(c));l&&d.each(l,function(a,b){m[a]=b});g&&Array.isArray(g)?m["suggestion-type"]=g:m["suggestion-type"]=e.KeywordSuggestion.name;return p+d.param(m,!0)}return{buildUrl:function(a,b){return p(a,b)}}}});"use strict";h.$Nav.when("$","sx.iss.utils","sx.iss.Platform","sx.iss.Events").build("sx.iss.AjaxCallProvider",function(d,a,f,b){return function(a,b,f){function p(a,c){a=b+":"+a;l&&l(a,(l(a)||0)+c)}var l=h.ue&&"function"===
typeof h.ue.count&&h.ue.count,g="function"===typeof h.uet&&h.uet,v="function"===typeof h.uex&&h.uex;p("init",1);var m=!1,t="json",n=2E3;f&&(m=f.cache?!0:!1,t=f.dataType?f.dataType:"json",n=f.timeout?f.timeout:2E3);return{callService:function(f,k,l){p("ajax:init",1);g&&g("bb",b+":success",{wb:1});g&&g("bb",b+":failure",{wb:1});d.ajax({url:f,cache:m,dataType:t,timeout:n,success:function(a){g&&g("cf",b+":success",{wb:1});p("ajax:success",1);"function"===typeof k&&k(a);g&&g("be",b+":success",{wb:1});
v&&v("ld",b+":success",{wb:1})},error:function(d,f,k){g&&g("cf",b+":failure",{wb:1});p("ajax:error",1);f&&p("ajax:error"+f,1);h.ueLogError&&h.ueLogError({logLevel:"WARN",attribution:b,message:"ISS AJAX call failed for "+b+" with responseText: "+(d&&d.responseText)+", pageType: "+(a&&a.pageType)+", status: "+f+", error: "+k});"function"===typeof l&&l();g&&g("be",b+":failure",{wb:1});v&&v("ld",b+":failure",{wb:1})}})},incrementCsmCount:p}}});"use strict";h.$Nav.when("$","sx.iss.utils","NavDomApi","sx.iss.DebugUtils").build("sx.iss.BIAProvider",
function(d,a,f,b){return function(a){var e=a.biaPurchasedText;return{getName:function(){return"bia"},parseBIAResponse:function(a){var c=a.suggestions.filter(function(a){return a&&"BUY_IT_AGAIN"===a.type});if(!(0>=c.length)){for(var d=[],g=0;g<c.length;g++){var h={type:"bia",dp:"/dp/"+c[g].value+"/ref\x3d"+c[g].refTag+"?crid\x3d"+a.responseId,title:c[g].asinTitle,price:c[g].displayPrice,image:c[g].imageUrl,purchaseDate:c[g].purchaseDateDisplay,purchasedText:e};"amazonfresh"===a.alias&&(h.dp+="\x26ppw\x3dfresh");
d.push(h)}if((c=f.getSearchBox().val())&&0!==c.length&&c===a.prefix&0<d.length)return b.logDebug("BIA asins exist for given prefix: ",a,d),d;1>d.length&&b.logDebug("No BIA ASINs for given prefix",a)}}}}});"use strict";h.$Nav.build("sx.iss.CachingProvider.instance",function(){return new function(){var d={};this.put=function(a,f,b){if(!d[a]||100<=d[a].size)d[a]={},d[a].size=0;d[a][f]===n&&d[a].size++;d[a][f]=b};this.get=function(a,f){return d[a]?d[a][f]:n}}});"use strict";h.$Nav.when("$","sx.iss.utils",
"sx.iss.DebugUtils","sx.iss.KeywordSuggestionProcessor","sx.iss.WidgetSuggestionProcessor").build("sx.iss.EventBasedSuggestionResultsProcessor",function(d,a,f,b,c){var e=h.ue&&"function"===typeof h.ue.count&&h.ue.count;return function(a){return{processResults:function(d){var h={};if(!d||!d.suggestions)return f.logDebugWithTrace("No suggestions in the response"),h;var h={KeywordSuggestion:new b(a,d)},g=new c(a,d);h.WidgetSuggestion=g;for(var g=d.suggestions,v,m,t=[],n=0;n<g.length;n++)v=g[n],(m=(m=
h[v.suggType])&&m.augmentSuggestion(v))?(t.push(m),e&&e("iss-suggestion-processor:dropped",0)):(f.logDebugWithTrace("Parsing the suggestions encountered an error",v),e&&e("iss-suggestion-processor:dropped",1));return h={augmentedSuggestions:t,suggestionTitleId:d.suggestionTitleId}}}}});"use strict";h.$Nav.when("$","sx.iss.utils","NavDomApi","sx.iss.SuggestionTypes","sx.iss.DebugUtils").build("sx.iss.KeywordSuggestionProcessor",function(d,a,f,b,c){var e=["ALIAS","BROWSE_NODE"],k=h.ue&&"function"===
typeof h.ue.count&&h.ue.count;return function(d,h){function g(a){if(a&&a.value&&a.value.length){k&&k("iss-suggestion-processor:keyword:valid-content",1);if(!d.noXcats&&a.scopes&&a.scopes.length&&e[0]==a.scopes[0].type&&a.scopes[0].display&&a.scopes[0].display.length&&a.scopes[0].value&&a.scopes[0].value.length){k&&k("iss-suggestion-processor:keyword:suppressed-xcat",0);var c=v(a);c.type=b.a9Xcat.name;c.store=a.scopes[0].display;a.scopes[0].type===e[0]&&(c.alias=a.scopes[0].value,2===a.scopes.length&&
a.scopes[1].type===e[1]&&(c.browseNodeId=a.scopes[1].value));c.url=m(a.value,a.scopes);return c}k&&k("iss-suggestion-processor:keyword:suppressed-xcat",1);c=v(a);c.type=b.a9.name;c.alias=x;c.store=n;c.url=m(a.value,[{value:c.alias,type:e[0]}]);return c}k&&k("iss-suggestion-processor:keyword:valid-content",0)}function v(b){var c,d,e;c=a.suggestionUtils.getPrefixPos(b.value,t);r?(d=b.value,c=e=""):b.isSpellCorrected||-1===c?(c=b.value,d=e=""):(e=a.suggestionUtils.splitStringForDisplay(b.value,c,t.length||
0),c=e.bprefix,d=e.prefix,e=e.suffix);var f=b.highlightFragments;return{keyword:b.value,bprefix:c,prefix:d,suffix:e,isSpellCorrected:b.spellCorrected,isFallback:b.fallback,highlightDisabled:r,highlightFragments:f&&f.length&&!r?f:[{isHit:!1,text:c},{isHit:!0,text:d},{isHit:!1,text:e}],browseNodeId:"",qu:{},ghost:b.ghost,refTag:b.refTag,completionResponseId:h.responseId}}function m(a,b){a="/s?k\x3d"+encodeURIComponent(a);b[0].type===e[0]&&(typeof b[0].value!==n&&(a+="\x26i\x3d"+encodeURIComponent(b[0].value)),
2==b.length&&typeof b[1].value!==n&&(a+="\x26srs\x3d"+encodeURIComponent(b[1].value)));return a}if(h){var t=h.prefix,x=f.getAliasFromDropdown()||"aps",r=a.isHighlightDisabledForAPIV2(h.suggestions);return{augmentSuggestion:g}}c.logDebugWithTrace("Service response is empty")}});"use strict";h.$Nav.when("$","sx.iss.utils","sx.iss.SuggestionTypes","sx.iss.DebugUtils","sx.iss.TemplateEngine").build("sx.iss.WidgetSuggestionProcessor",function(d,a,f,b,c){var e=h.ue&&"function"===typeof h.ue.count&&h.ue.count;
return function(h,p){return{augmentSuggestion:function(l){var g;d("#"+l.template).length?g=!0:(b.logDebugWithTrace("Suggestion template does not exist or is not installed with an id in the HTML equal to the template id: "+l.template),g=!1);if(!g)return e&&e("iss-suggestion-processor:widget:valid-content",0),null;e&&e("iss-suggestion-processor:widget:valid-content",1);g={type:f.WidgetSuggestion,keyword:l.value,refTag:l.refTag,widgetId:l.widgetId,template:l.template,metadata:d.extend({},l.metadata),
widgetItems:[]};for(var v in l.widgetItems)g.widgetItems.push({id:l.widgetItems[v].id,type:l.widgetItems[v].type,metadata:d.extend({},l.widgetItems[v].metadata)});if("promoted-suggestion"===g.template||"keywords-link"===g.template||"keywords-badge-link"===g.template||"stores"===g.template)l=l.widgetItems[0].metadata,g.searchTerm=p.prefix,g.keyword=l.text,g.serviceHighlighting=l.serviceHighlighting?l.serviceHighlighting:[],g.isHighlightDisabled=l.isHighlightDisabled?!0:!1,g.isSpellCorrected=!1,g.highlightFragments=
a.suggestionUtils.buildHighlightFragments(g);"pre-search-suggestion"===g.template&&(g.completionResponseId=p.responseId,g.alias=p.alias,g.language=h.language);var m;a:{try{c.templateWithOptions(g.template,{allowUndefined:!1,allowMalformedHtml:!1},g);m=!0;break a}catch(t){b.logDebugWithTrace("Suggestion template "+g.template+" failed with suggestion "+JSON.stringify(g))}m=!1}if(!m)return e&&e("iss-suggestion-processor:widget:template-filled",0),e&&e("iss-suggestion-processor:widget:"+g.widgetId+":filled",
0),e&&e("iss-suggestion-processor:widget:"+g.template+":filled",0),null;e&&e("iss-suggestion-processor:widget:template-filled",1);e&&e("iss-suggestion-processor:widget:"+g.widgetId+":filled",1);e&&e("iss-suggestion-processor:widget:"+g.template+":filled",1);return g}}}});"use strict";h.$Nav.when("$","sx.iss.utils","sx.iss.TimingEvents","sx.iss.TemplateEngine","NavDomApi","sx.iss.SuggestionTypes","sx.iss.ReftagBuilder","sx.iss.DataAttributes").build("sx.iss.DesktopSearchBoxEventHandler",function(d,
a,f,b,c,e,h,p){var l=c.getSearchApi();return function(g,h,m){function k(){M=!0;G||(G=!0)}function x(){K=!0}function r(a,b,e){a=d('\x3cinput type\x3d"hidden" /\x3e').attr("id",a).attr("name",b).attr("value",e);c.getForm().append(a)}function q(a){c.activateSearchBox()}function w(a){c.deactivateSearchBox()}a.eventBus.listen(g.selectionChange,function(d){B===n&&(B=c.getAliasFromDropdown());c.getIssBrowseNodeIdElem().remove();c.getIssFieldRestrictionElem().remove();if(!0===d.isScrollIntoSearchBox)d=d.previousSearchTerm,
c.getIssPrefixElem().remove(),c.getIssBrowseNodeIdElem().remove(),c.getIssFieldRestrictionElem().remove(),c.getIssCridElem().remove(),O.val(d),c.getAliasDropdown().val("search-alias\x3d"+B).trigger("change");else{var e=d.previousSearchTerm,h=a.timingProvider.getTimingWithDisplayLatency(f.latency.group,f.latency.events.timeToDisplay);e===n&&(e=c.getKeyword());h=e+","+c.getOriginalAlias()+","+h;e=c.getIssPrefixElem();0<e.length?e.attr("value",h):r("issprefix","sprefix",h);h=d.suggestion.attr("data-nid");
"undefined"!==typeof h&&""!==h&&(e=c.getIssBrowseNodeIdElem(),0<e.length?e.attr("value",h):r("issBrowseNodeId","n",h));if(h=d.suggestion.attr("data-crid"))e=c.getIssCridElem(),0<e.length?e.attr("value",h):r("isscrid","crid",h);d=d.suggestion;var m=d.attr("data-alias"),e=c.getOption(m),h=c.getAliasDropdown(),m="search-alias\x3d"+m;0===e.length?(e=d.data("store"),e!==n&&""!==e&&h.append(b.template("s-option",{value:m,store:e}))):m=e.val();a.eventBus.trigger(g.blockSearchBoxFocusInOnce);h.val(m).trigger("change");
c.setKeyword(d.attr("data-keyword"));a.eventBus.trigger(g.searchBoxUpdated,d)}});a.eventBus.listen(g.hideDropdown,function(b){!0!==M||!0!==K||27!==b.keyCode&&13!==b.keyCode?(c.hideDropdown(),c.getIssPrefixElem().remove(),c.getIssBrowseNodeIdElem().remove(),c.getIssFieldRestrictionElem().remove(),c.getIssCridElem().remove(),B=n):(M=K=!1,b={searchTerm:c.getKeyword(),keystroke:b.keyCode,event:g.onIMEAction.name},a.eventBus.triggerThrottledEvent(g.suggestionsNeeded,b))});a.eventBus.listen(g.suggestionClicked,
function(b){var d=b.suggestion;a.eventBus.trigger(g.updateSearchBox,d);b={suggestion:d,searchTerm:c.getKeyword(),previousSearchTerm:b.previousSearchTerm};a.eventBus.trigger(g.selectionChange,b);c.hideDropdown();d[0]&&d[0].dataset&&d[0].dataset.type===e.help.name&&m.modifyForm(d[0].dataset);d=d&&d.data(p.type.name);d!=e.a9.name&&d!=e.a9Xcat.name||c.submitForm()});a.eventBus.listen(g.noSuggestions,function(){c.hideDropdown()});a.eventBus.listen(g.suggestionsNeeded,function(){B=c.getAliasFromDropdown()});
l===n&&(a.eventBus.listen(g.searchBoxFocusIn,q),a.eventBus.listen(g.searchBoxFocusOut,w));l!==n?(l.on("compositionstart",k),l.on("compositionend",x)):d("#navbar").delegate("#twotabsearchtextbox","compositionstart",k).delegate("#twotabsearchtextbox","compositionend",x);var B,O=c.getSearchBox(),M=!1,K=!1,G=!1;return{getWasCompositionUsed:function(){return G}}}});h.$Nav.when("sx.iss.utils").build("sx.iss.A9SearchSuggestionEventHandler",function(d){return function(a){var f;this.getDelegateReqs=function(){return{selectors:".a9_suggestion,.suggestion_with_query_builder",
events:"click"}};this.handleEvent=function(b){var c=b.target||b.srcElement;b=parseInt(b.currentTarget.id.substr(6),10);c.className&&-1!=c.className.indexOf("suggest_builder")?d.eventBus.trigger(a.updateSearchTerm,f.suggestions[b].keyword):d.eventBus.trigger(a.suggestionClicked,{suggestion:f.suggestions[b]})};d.eventBus.listen(a.suggestionsDisplayed,function(a){f=a},this)}});h.$Nav.when("$","sx.iss.utils","NavDomApi","sx.iss.DomUtils","sx.iss.DebugUtils","sx.iss.SuggestionTypes","sx.iss.Events").build("sx.iss.RecentSearchSuggestionEventHandler",
function(d,a,f,b,c,e,k){var p=e&&e.recentSearch&&e.recentSearch.name;return function(e,g,k){function m(a){A=a}function t(a){a=a.currentTarget;var c;c=f.getKeyword();"T2"===e.recentSearchesTreatment&&c||(c=a.id,d("#delete-"+c).show());b.hoverOverEl(d(a))}function n(a){b.hoverOutEl(d(a.currentTarget))}function r(b){var e=d(this);c.logDebug("Suggestion clicked",e);var e=b.target||b.srcElement,f=b.currentTarget,h;h=parseInt(f.id.substr(6),10);e.className&&-1!=e.className.indexOf("a-icon-remove")&&(c.logDebug("Click is on the delete button"),
a.eventBus.trigger(g.blockSearchBoxFocusInOnce),q.call(G,A.suggestions[h],f),b.preventDefault())}function q(a,b){K("deleteRecentSearch",1);O(a);B(a);w(b)}function w(a){d(a).remove();0==d("#suggestions").children().length&&(c.logDebug("Removed all searches. Hiding dropdown"),f.hideDropdown());var b=f.getSearchBox();setTimeout(function(){b.trigger("focus","norefresh")},25)}function B(b){var c,e=-1,d;if(h.iss.recentSearches&&h.iss.recentSearches.suggestions){d=h.iss.recentSearches.suggestions;for(c=
0;c<d.length;c++){var f=d[c].scopes.filter(function(a){return a&&"SEARCH_ALIAS"===a.scopeType}),f=f&&0<f.length?f[0].scopeName:"";if(d[c].value===b.keyword&&f===b.alias||a.escapeHtmlTags(d[c].value)===b.keyword&&a.escapeHtmlTags(f)===b.alias){e=c;break}}-1!==e&&d.splice(e,1)}}function O(a){a.deleteUrl&&(a=M(a),K("ajax:delete:init",1),D&&D("bb","issRecentSearchDeleteAjax:success",{wb:1}),D&&D("bb","issRecentSearchDeleteAjax:failure",{wb:1}),d.ajax({url:a,cache:!1,dataType:"json",type:"DELETE",timeout:3E3,
success:function(a){D&&D("cf","issRecentSearchDeleteAjax:success",{wb:1});K("ajax:delete:success",1);c.logDebug("Recent search delete succeeded");D&&D("be","issRecentSearchDeleteAjax:success",{wb:1});H&&H("ld","issRecentSearchDeleteAjax:success",{wb:1})},error:function(a,b,d){D&&D("cf","issRecentSearchDeleteAjax:failure",{wb:1});K("ajax:delete:error",1);b&&K("ajax:delete:error:"+b,1);c.logDebug("Recent search delete failed");h.ueLogError&&h.ueLogError({logLevel:"WARN",attribution:"iss-recent-search-delete",
message:"ISS AJAX call failed for recent search deletion with responseText: "+(a&&a.responseText)+", pageType:"+(e&&e.pageType)+", status:"+b+", error:"+d});D&&D("be","issRecentSearchDeleteAjax:failure",{wb:1});H&&H("ld","issRecentSearchDeleteAjax:failure",{wb:1})}}))}function M(b){return(e.protocol||h.parent.document.location.protocol||"http:")+"//"+a.extractDomainFromUrl(e.src)+"/suggestions/recent_searches/2017?client\x3damazon-search-ui\x26"+b.deleteUrl}function K(a,b){a=N+":"+a;J&&J(a,(J(a)||
0)+b)}var G=this,A,N="iss:"+p,J=h.ue&&"function"===typeof h.ue.count&&h.ue.count,D="function"===typeof h.uet&&h.uet,H="function"===typeof h.uex&&h.uex;(function(){a.eventBus.listen(g.suggestionsRendered,m,this);k.delegate(".s-recentSearch","click",r).delegate(".s-recentSearch","mouseover",t).delegate(".s-recentSearch","mouseout",n)})()}});h.$Nav.when("$","sx.iss.utils","NavDomApi","sx.iss.DomUtils","sx.iss.DebugUtils","sx.iss.Events").build("sx.iss.TopRefinementSearchSuggestionEventHandler",function(d,
a,f,b,c,e){return function(b,e,l){function g(){d(".discover-tr-suggestion").length&&(w=d(".discover-tr-carousel-container"),r=d(".discover-tr-carousel-control-left"),q=d(".discover-tr-carousel-control-right"),w.scroll(function(){n(t())}),d(h).resize("resize",function(){n(t())}),n(t()))}function v(b){var d=b.target||b.srcElement;c.logDebug("Click is on the Discover scroll arrow.");d.className&&-1!=d.className.indexOf("discover-tr-carousel-control-left")?m("right"):d.className&&-1!=d.className.indexOf("discover-tr-carousel-control-right")&&
m("left");a.eventBus.trigger(e.blockSearchBoxFocusInOnce);var g=f.getSearchBox();setTimeout(function(){g.trigger("focus","norefresh")},25);b.preventDefault()}function m(a){["left","right"].includes(a)&&w.animate({scrollLeft:w.scrollLeft()+250*("left"===a?1:-1)})}function t(){var a=0!==w.scrollLeft(),b=w.scrollLeft()<w.get(0).scrollWidth-w.outerWidth(!0);return{left:a,right:b}}function n(a){a.left?r.show():r.hide();a.right?q.show():q.hide()}var r,q,w;(function(){a.eventBus.listen(e.suggestionsRendered,
g,this);l.delegate(".discover-tr-carousel-control","click",v)})()}});"use strict";h.$Nav.when("$","sx.iss.utils","sx.iss.DomUtils","sx.iss.TimingEvents","sx.iss.TemplateEngine","sx.iss.DebugUtils","sx.iss.DataAttributes","sx.iss.SuggestionTypes").build("sx.iss.SearchBoxEventHandler",function(d,a,f,b,c,e,k,p){var l=[37,38,39,40,91,92,93,192];return function(b,c,m){function t(){e.logDebug("blocking search box focus in ops");z=!1}function x(){setTimeout(function(){e.logDebug("Allowing search box focus in");
z=!0},50)}function r(a){Q=!0}function q(b){a.eventBus.trigger(m.keydown);var c=b.keyCode,d=c===E.UP,g=c===E.DOWN,h=d||g||c===E.LEFT||c===E.RIGHT,l;Q=!1;13===c&&(H(),a.eventBus.trigger(m.blockSearchBoxFocusInOnce));P.find("#suggestions-template").is(":visible")&&(h&&(H(),F===n&&(F=f.getKeyword(I)),(d=K(g,d))?J().removeClass("s-selected"):l=A(c),a.eventBus.trigger(m.selectionChange,{suggestion:l,isScrollIntoSearchBox:d,searchTerm:F,previousSearchTerm:u}),""!==I.val()&&b.preventDefault()),13===c&&(l=
D(),0<l.length&&(a.eventBus.trigger(m.suggestionClicked,{suggestion:l,searchTerm:F,previousSearchTerm:u}),d=l&&l.data(k.type.name),b.preventDefault(),d!=p.a9.name&&d!=p.a9Xcat.name&&(b=l.find("a").get(0))&&b.click()),C=setTimeout(function(){return function(){e.logDebug("hiding iss suggestion on key down (enter)");G(c)}}(),300)))}function w(c){c=c.keyCode;if(13===c)e.logDebug("hide iss drop down from keyup (enter)"),C&&(h.clearTimeout(y),C=n),G(c);else if(27===c)G(c);else if(F=f.getKeyword(I),F!==
u&&-1===l.indexOf(c)){if(F===n||""===F)if(u="",!b.enableNextSearchSuggestions&&"C"===b.recentSearchesTreatment){G();return}a.eventBus.triggerThrottledEvent(m.suggestionsNeeded,{searchTerm:F,keystroke:c,inputcopyselect:Q,event:m.onKeyPress.name});u=F}}function B(b){M();y=setTimeout(function(){return function(){G();a.eventBus.trigger(m.searchBoxFocusOut)}}(),300)}function O(b,c){M();a.eventBus.trigger(m.searchBoxFocusIn);!z&&b&&"focusin"===b.type?setTimeout(function(){e.logDebug("Allowing search box to be focused in");
z=!0},25):b&&"focusin"===b.type&&"norefresh"!==c&&((F=f.getKeyword(I))?b={searchTerm:F,keystroke:b.keyCode,event:m.onFocusWithSearchTerm.name}:(b={searchTerm:"",keystroke:b.keyCode,event:m.onFocusEmptySearchTerm.name},a.eventBus.triggerThrottledEvent(m.biaSuggestionsNeeded,"")),a.eventBus.triggerThrottledEvent(m.suggestionsNeeded,b))}function M(){"number"===typeof y&&h.clearTimeout(y);y=n}function K(a,b){var c=P.find(".s-suggestion"),e=c.index(d(".s-selected")),f=c.eq(e).hasClass("discover-tr-suggestion");
return 0===e&&b||e+1===c.length&&a||f&&b}function G(b){F=n;a.eventBus.trigger(m.hideDropdown,{keyCode:b})}function A(a){e.logDebug("highlighting suggestion");var b=J(),c=b.index(D());b.eq(c).hasClass("discover-tr-suggestion");var f=b.length,g=P.find(".s-suggestion.discover-tr-suggestion").length;if(a===E.UP){a=-1;var h=g<c&&c<=f;1>c?a=f-1:c===g?(g=d(".discover-tr-suggestion.discover-tr-last-selected"),a=0<g.length?J().index(g):0):h&&(a=c-1);g=a}else a===E.DOWN?(a=-1,-1===c||c===f-1?a=0:c<g?a=g:g<=
c&&c<f&&(a=c+1),g=a):a===E.LEFT?J().eq(c).hasClass("discover-tr-suggestion")?(f=-1,0===c?f=c:c<=g&&(f=c-1),g=f):g=c:J().eq(c).hasClass("discover-tr-suggestion")?(f=-1,c>=g-1?f=c:c<=g&&(f=c+1),g=f):g=c;b.eq(c).removeClass("s-selected");g=b.eq(g);g.addClass("s-selected");g.hasClass("discover-tr-suggestion")&&(b.eq(c).removeClass("discover-tr-last-selected"),g.addClass("discover-tr-last-selected"),N(g));return g}function N(a){if(0!==a.length){var b=d(".discover-tr-carousel-container");b.stop();var c=
b.outerWidth(!0)/2;a=a.get(0).offsetLeft+a.get(0).offsetWidth/2;b.animate({scrollLeft:a-c})}}function J(){return P.find(".s-suggestion")}function D(){return P.find(".s-suggestion.s-selected")}function H(){if(I&&I.length&&I[0]){var a=I[0].value?I[0].value.length:0;I[0].setSelectionRange(a,a)}}var L,P,I,F,u,y,z,C,Q,E={LEFT:37,UP:38,RIGHT:39,DOWN:40};(function(){if(c!==n){L=c.$form;P=c.$dropdown;I=c.$searchbox;z=!0;var b="#"+I.attr("id");L.delegate(b,"focusout",B).delegate(b,"focus",O).delegate(b,"keydown",
q).delegate(b,"keyup",w).delegate(b,"copy",r).delegate(b,"select",r);d(h).resize("resize",function(){N(d(".s-selected.discover-tr-suggestion"))});u=I.val();a.eventBus.listen(m.blockSearchBoxFocusInOnce,t);a.eventBus.listen(m.allowSearchBoxFocusIn,x)}})()}});h.$Nav.when("$","sx.iss.utils","NavDomApi","sx.iss.DomUtils","sx.iss.DebugUtils","sx.iss.DataAttributes","sx.iss.SuggestionTypes").build("sx.iss.SuggestionEventHandler",function(d,a,f,b,c,e,h){return function(f,l,g){l.delegate(".s-suggestion",
"click",function(b){var g=b.target||b.srcElement;g.className&&-1!=g.className.indexOf("a-icon-remove")?c.logDebug("SuggestionEventHander: click is on the delete button"):g.className&&-1!=g.className.indexOf("discover-tr-prevent-close")?c.logDebug("SuggestionEventHander: click is on scroll arrow"):(g=d(this),c.logDebug("Suggestion clicked",g),a.eventBus.trigger(f.suggestionClicked,{suggestion:g}),g=g&&g.data(e.type.name),g!=h.a9.name&&g!=h.a9Xcat.name||b.preventDefault())}).delegate(".s-suggestion",
"mouseover",function(a){b.hoverOverEl(d(a.currentTarget))}).delegate(".s-suggestion","mouseout",function(a){b.hoverOutEl(d(a.currentTarget))})}});"use strict";h.$Nav.when("$","sx.iss.utils","sx.iss.DebugUtils","sx.iss.DomUtils").build("sx.iss.CustomSearchBoxEventHandler",function(d,a,f,b){return function(c,e,h){function p(a){n.hide();"function"===typeof h.manualOverride&&(a=h.manualOverride(a),null!==a&&0<a.length&&l(a));d(h.submitId).removeAttr("disabled")}function l(a){g.find(b.hiddenInputClass).remove();
a=b.getFormParams(a);f.logDebug("Updating form with params.",a);g.attr("action",a.uri);var c="";a=a.formParams;for(var d=0;d<a.length;d++)var e=a[d],h=decodeURIComponent(e.value),c=c+('\x3cinput type\x3d"hidden" class\x3d"'+b.hiddenInputValue+'" name\x3d"'+e.name+'" value\x3d"'+h+'"/\x3e');g.append(c)}var g,n;g=c.$form;n=c.$dropdown;a.eventBus.listen(e.suggestionClicked,function(a){f.logDebug("Suggestion clicked",a);l(a.suggestion.data("url"));g.submit()});a.eventBus.listen(e.noSuggestions,function(a){p(a)});
a.eventBus.listen(e.suggestionsReadyForDisplay,function(a){2===a.suggestions.length&&"separator"===a.suggestions[1].type&&!0===a.suggestions[0].isExactMatch?(a=n.find(b.suggestionClass).eq(0),l(a.data("url"))):4<=a.searchTerm.length?p(a.searchTerm):d(h.submitId).attr("disabled","disabled")});a.eventBus.listen(e.hideDropdown,function(){n.hide()})}});"use strict";h.$Nav.when("$","sx.iss.utils","NavDomApi","sx.iss.DomUtils","sx.iss.DebugUtils","sx.iss.SuggestionTypes","sx.iss.Events").build("sx.iss.BIASuggestionEventHandler",
function(d,a,f,b,c,e,h){return function(a,b,c){c.delegate(".s-asin-sug-link","mouseover",function(a){d(a.currentTarget).find(".s-asin-sug-image").css("opacity","0.5")}).delegate(".s-asin-sug-link","mouseout",function(a){d(a.currentTarget).find(".s-asin-sug-image").css("opacity","1.0")})}});"use strict";h.$Nav.when("$","sx.iss.utils","NavDomApi","sx.iss.DomUtils","sx.iss.DebugUtils","sx.iss.SuggestionTypes","sx.iss.Events").build("sx.iss.QUSuggestionEventHandler",function(d,a,f,b,c,e,h){var p=e&&e.qu&&
e.qu.name,l={AUTHOR:"field-author"};return function(e,h,k){k.delegate(".s-qu-suggestion","mouseover",function(a){b.hoverOverEl(d(a.currentTarget))}).delegate(".s-qu-suggestion","mouseout",function(a){b.hoverOverEl(d(a.currentTarget))});a.eventBus.listen(h.searchBoxUpdated,function(a){c.logDebug("searchBox updated event",a);var b=a.attr("data-type")||"";if(""!==b&&b===p){var b=a.attr("data-qu-type"),e=a.attr("data-qu-value"),b=b||"",e=e||"";if(""!==b&&""!==e){var g=f.getIssFieldRestrictionElem();g&&
0<g.length&&g.remove();b=d('\x3cinput type\x3d"hidden" /\x3e').attr("id","issFieldRestriction").attr("name",l[b]).attr("value",e);f.getForm().append(b)}a=a.attr("data-keyword")||"";0<(f.getIssFieldRestrictionElem()||"").length&&1>a.length&&f.getSearchBox().val("")}})}});"use strict";h.$Nav.when("$","sx.iss.utils","NavDomApi","sx.iss.ReftagBuilder","sx.iss.DebugUtils","sx.iss.SuggestionTypes","sx.iss.Events").build("sx.iss.GhostSuggestionEventHandler",function(d,a,f,b,c,e,h){var p=/(ref=[\-\w]+)/,
l=[a.uiKeycode.BACKSPACE,a.uiKeycode.DELETE,a.uiKeycode.DOWN,a.uiKeycode.END,a.uiKeycode.ENTER,a.uiKeycode.ESCAPE,a.uiKeycode.HOME,a.uiKeycode.LEFT,a.uiKeycode.PAGE_DOWN,a.uiKeycode.PAGE_UP,a.uiKeycode.RIGHT,a.uiKeycode.TAB,a.uiKeycode.UP];return function(d,e){function h(a){if("object"!==typeof a||"string"!==typeof a.searchTerm||a.inputcopyselect||!Array.isArray(a.suggestions))return!1;var b=a.suggestions||[];return-1<l.indexOf(a.keystroke)||b===[]||b[0]===n?!1:(a=b[0])&&a.ghost}var k=!1;f.getDropdown();
var x=f.getSearchBox(),r=f.getForm();a.eventBus.listen(e.suggestionsRendered,function(a){if(h(a)){c.logDebug("renderGhostSuggestion: ",a);var b=a.searchTerm,d=f.getKeyword();b&&d&&b===d?(b=b.length,a=a.suggestions[0].keyword,d=a.length,x.val(a),x.focus(),x[0].setSelectionRange(b,d),k=!0):k=!1}else k=!1});a.eventBus.listen(e.reftagUpdatedAfterRender,function(a){if(h(a)&&k){a=a.searchTerm;a={suggestion:f.getDropdown().find(".s-suggestion").first(),searchTerm:a,previousSearchTerm:""};a=(new b).build(a,
!1);var c=r.attr("action");p.test(c)?c=c.replace(p,b.CONSTANTS.reftagBase+a):("/"!==c.charAt(c.length-1)&&(c+="/"),c+=a);r.attr("action",c)}})}});"use strict";h.$Nav.when("$","sx.iss.utils","NavDomApi","sx.iss.SuggestionTypes","sx.iss.ReftagBuilder").build("sx.iss.HelpSuggestionClickedUtil",function(d,a,f,b,c){var e=/(ref=[\-\w]+)/;return function(a,b){this.modifyForm=function(a){if(a&&a.keyword){f.getIssPrefixElem().remove();f.getIssBrowseNodeIdElem().remove();f.getIssFieldRestrictionElem().remove();
f.getIssCridElem().remove();var b=f.getForm();b.attr("action");var c;c=b.attr("action");c=e.exec(c);c=Array.isArray(c)&&c[1]?c[1]:"";b.attr("action","/gp/help/customer/display.html/"+c);a=d('\x3cinput type\x3d"hidden" /\x3e').attr("id","iss-help-keywords").attr("name","help_keywords").attr("value",a.keyword);b.append(a)}}}});"use strict";h.$Nav.when("sx.iss.utils","sx.iss.Events","sx.iss.TimingEvents","sx.iss.MetricsLogger").build("sx.iss.SuggestionAggregator",function(d,a,f,b){return function(c,
e,h,p){function l(g){d.timingProvider.startTimer(f.latency.group,f.latency.events.timeToDisplay);b.startEndToEndLogging();var l=g.searchTerm,p=g.keystroke,r=g.inputcopyselect;if(!v[l]){for(var q=0,w=0;w<c.length;w++)h&&h[w].supportsRequest&&!h[w].supportsRequest(g)||q++;v[l]={remainingProviders:q,searchTerm:l,keystroke:p,inputcopyselect:r,suggestionSets:{},suggestionTitleId:n};for(w=0;w<c.length;w++)h&&h[w].supportsRequest&&!h[w].supportsRequest(g)||(l=a.createEvent(c[w],e.suggestionsNeeded),d.eventBus.trigger(l,
g))}}function g(a){var b=v[a.searchTerm];if(b){var c=a.suggestionSets,f;for(f in c)c.hasOwnProperty(f)&&(b.suggestionSets[f]=c[f]);--b.remainingProviders||(delete v[b.searchTerm],b.suggestionSets=a.suggestionSets,b.suggestionTitleId=a.suggestionTitleId,d.eventBus.trigger(e.suggestionsReady,b))}}var v={};(function(){for(var b=0;b<c.length;b++){var f=a.createEvent(c[b],e.suggestionsReady);d.eventBus.listen(f,g,this)}d.eventBus.listen(e.suggestionsNeeded,l,this)})()}});"use strict";h.$Nav.when("$","sx.iss.utils",
"sx.iss.SuggestionTypes").build("sx.iss.SuggestionSequencer",function(d,a,f){return function(b){var c=[f.bia.name,f.a9XOnly.name,f.a9Xcat.name,f.a9.name,f.nextSearch.name,f.trendSearch.name,"array"];b&&"T1"===b.recentSearchesTreatment?c.splice(0,0,f.recentSearch.name):b&&"T2"===b.recentSearchesTreatment&&c.splice(c.indexOf(f.a9Xcat.name)+1,0,f.recentSearch.name);this.sequence=function(a){if(b&&b.isISSDesktopRefactorEnabled&&a)return a.suggestionSets;var d=a.suggestionSets;a=[];for(var h=this.isDeepNode(b),
l={},g={},n=0;n<c.length;n++){var m=c[n],t=d[m],x=0;if("undefined"!==typeof t&&0!==t.length){for(var r=0;r<t.length;r++){var q=t[r];if("keyword"in q){if(m===f.a9Xcat.name&&q.keyword in g||m!==f.a9Xcat.name&&q.keyword in l)continue;l[q.keyword]=!0;m!==f.a9Xcat.name&&(g[q.keyword]=!0)}q.dispIdx=a.length;a.push(q);x++}0<x&&!h&&(b.crossCategoryEmphasisTreatment||m===f.recentSearch.name||a.push({type:"separator"}))}}h&&(a=this.sequenceDeepNodeResults(a));d=a.length;0<d&&"separator"===a[d-1].type&&a.splice(-1,
1);return a};this.isDeepNode=function(b){if(b.removeDeepNodeISS)return!1;var c,d;b.deepNodeISS&&(c=a.suggestionUtils.getDeepNodeAlias(b.deepNodeISS),d=a.suggestionUtils.getDeepNodeCategoryName(c,b.deepNodeISS));return c!==n&&d!==n};this.sequenceDeepNodeResults=function(a){for(var b,c,d=[],g=0;g<a.length;g++)c=a[g],b!==f.a9Xcat.name&&b!==f.a9XOnly.name||c.type!==f.a9.name?d.push(c):d.unshift(c),b=c.type;return d}}});h.$Nav.when("$","sx.iss.utils","sx.iss.Events","NavDomApi").build("sx.iss.MetricsLogger",
function(d,a,f,b){function c(){var a=b.isSearchBoxFocused()?"iss-late":"iss-on-time";ue.tag(a)}function e(){uet("cf","iss-init-pc",n);uet("be","iss-init-pc",n);uex("ld","iss-init-pc",n)}function h(){return"function"===typeof uet&&"function"===typeof uex}var n={wb:1},l=!1;h()&&(a.eventBus.listen(f.globals.initializeNavSearchBox,c),a.eventBus.listen(f.globals.issLoaded,e));return{initPostSvcConnectionWarmupLogging:function(){l=!0},startEndToEndLogging:function(){h()&&uet("bb",l?"iss-end-to-end-a9-post-svc-connection-warmup":
"iss-end-to-end-a9",n)},stopEndToEndLogging:function(){if(h()){var a=l?"iss-end-to-end-a9-post-svc-connection-warmup":"iss-end-to-end-a9";uet("cf",a,n);uet("be",a,n);uex("ld",a,n)}}}});"use strict";h.$Nav.when("sx.iss.DebugUtils").build("sx.iss.MetricsTags",function(){return{INIT:"iss-init-pc",A9_END_TO_END:"iss-end-to-end-a9",A9_END_TO_END_MOBILE:"iss-end-to-end-a9-mobile",CRITICAL_FEATURE:"cf",BODY_END:"be",BODY_BEGIN:"bb",PAGE_LOAD:"ld",CUSTOM_WIDGET_OBJ:{wb:1}}});"use strict";h.$Nav.when("sx.iss.DebugUtils").build("sx.iss.CSMLogger",
function(d){var a="function"===typeof uet&&"function"===typeof uex;return{isEnabled:function(){return a},uet:function(){a?uet.apply(this,arguments):d.logDebugWithTrace("UET is undefined, unable to call with arguments: ",arguments)},uex:function(){a?uex.apply(this,arguments):d.logDebugWithTrace("UEX is undefined, unable to call with arguments: ",arguments)},ue:function(){a?ue.apply(this,arguments):d.logDebugWithTrace("UE is undefined, unable to call with arguments: ",arguments)}}});"use strict";h.$Nav.when("$",
"sx.iss.utils","sx.iss.TimingEvents","sx.iss.SuggestionTypes","sx.iss.SearchBoxEventHandler","sx.iss.EventBasedSuggestionProvider","sx.iss.A9SuggestionProvider","sx.iss.SuggestionAggregator","sx.iss.SuggestionDisplayProvider","sx.iss.WidgetDisplayProvider","sx.iss.NextSearchSuggestionProvider","sx.iss.RecentSearchSuggestionProvider","sx.iss.SuggestionSequencer","sx.iss.IssDisplayProvider","sx.iss.TemplateInstaller","sx.iss.SuggestionEventHandler","sx.iss.DesktopSearchBoxEventHandler","sx.iss.RecentSearchSuggestionEventHandler",
"sx.iss.TopRefinementSearchSuggestionEventHandler","sx.iss.BIASuggestionEventHandler","sx.iss.QUSuggestionEventHandler","sx.iss.GhostSuggestionEventHandler","NavDomApi","sx.iss.Events","sx.iss.Reftag","sx.iss.DebugUtils","sx.iss.MetricsLogger","sx.iss.CompletionServiceConnectionWarmer","sx.iss.HelpSuggestionClickedUtil","sx.iss.ConfigVariantUtil").build("sx.iss.IssParentCoordinator",function(d,a,f,b,c,e,k,n,l,g,v,m,t,x,r,q,w,B,O,M,K,G,A,N,J,D,H,L,P,I){return function(k){function m(){k.shouldGetBIA=
a.isWeblabTreatment(k.issNavConfig,"SEARCH_ISS_144171","T1");new B(k,E,A.getDropdown());new O(k,E,A.getDropdown());new c(k,S,E);new M(k,E,A.getDropdown());new K(k,E,A.getDropdown());new G(k,E);var d=new P(k,E);r.init(k);var f=[],h=[],u=new e(k,E);f.push(u.getName());h.push(u);u=[y(b.a9),new l("separator","s-separator"),y(b.a9Xcat),y(b.a9XOnly),y(b.qu),y(b.help),new g];k.shouldGetBIA&&u.push(y(b.bia));if(k&&k.enableNextSearchSuggestions){var z=new v(k,E);f.push(z.getName());h.push(z);u.push(y(b.nextSearch))}new x("suggestions-template",
new t(k),u,E,k);new n(f,E,h,k);a.eventBus.trigger(N.globals.initializeNavSearchBox);d=new w(E,k,d);new J(E,k,{shouldAddImeTag:d.getWasCompositionUsed});new q(E,A.getDropdown(),k)}function y(a){var c={provider:new l(a.name,a.templateId)},e;e=k.crossCategoryEmphasisTreatment?'\x3cspan style\x3d"padding-left: 16pt" class\x3d"a-size-mini"\x3e'+k.deptText+"\x3c/span\x3e":k.deptText;return a===b.a9Xcat||a===b.a9XOnly||a===b.recentSearch?d.extend(c,{partials:[{key:"storeHtml",provider:new l(a.name,"s-storeText"),
formatter:{string:e,toReplace:"{department}"}}]}):c.provider}function z(b){var c;if(c=!R){c=b&&b.suggestions&&b.suggestions.length&&0<b.suggestions.length&&"bia"===b.suggestions[0].type;var d=k&&k.recentSearchesTreatment&&k.recentSearchesTreatment||"C";c=k.enableNextSearchSuggestions||"C"!==d||c;0!==S.$searchbox.val().length||c?c=!0:(D.logDebug('Search term is empty, abort rendering for the search term "'+b.searchTerm+'"'),c=!1);c=!c}c||(A.showDropdown(b.display),a.timingProvider.stopTimer(f.latency.group,
f.latency.events.timeToDisplay),H.stopEndToEndLogging(),a.eventBus.trigger(E.suggestionsRendered,b),a.eventBus.trigger(N.globals.suggestionsRendered,b))}function C(){R=!1}function Q(){R=!0}"undefined"!==typeof k&&k||(k={});k.isInternal&&D.init(h.location.search);D.logDebugWithTrace("init-IssParent");var E,S,R=!1;D.isQIAEnabled()&&d.extend(k,{cf:1});I.augmentConfig(k);(function(){S={$form:A.getForm(),$dropdown:A.getDropdown(),$searchbox:A.getSearchBox(),$aliasDropDown:A.getAliasDropdown()};k.useAmazonEmberFontFamily&&
d("head").append('\x3cstyle\x3e.s-suggestion { padding: 8px 10px; font-size: 16px; font-family: "Amazon Ember"; cursor: pointer; }\x3c/style\x3e');E=N.createInstance();A.getForm().data("originalSearchTerm",A.getKeyword());A.getForm().data("originalAlias",A.getAliasFromDropdown());S.$aliasDropDown.focus(function(){a.eventBus.trigger(E.blockSearchBoxFocusInOnce)}).blur(function(){a.eventBus.trigger(E.allowSearchBoxFocusIn)});(new L(k,opts.obfuscatedMarketId,H)).initConnectionToSvc();a.eventBus.listen(E.suggestionsReadyForDisplay,
z);a.eventBus.listen(E.hideDropdown,C);a.eventBus.listen(E.suggestionsNeeded,Q);a.eventBus.listen(E.biaSuggestionsNeeded,Q);m()})()}});"use strict";h.$Nav.when("$","sx.iss.utils","sx.iss.SearchBoxEventHandler","sx.iss.SuggestionAggregator","sx.iss.SuggestionDisplayProvider","sx.iss.SuggestionSequencer","sx.iss.IssDisplayProvider","sx.iss.TemplateInstaller","sx.iss.SuggestionEventHandler","sx.iss.Events","sx.iss.DomUtils","sx.iss.ArraySuggestionProvider","sx.iss.CustomSearchBoxEventHandler").build("sx.iss.CustomParentCoordinator",
function(d,a,f,b,c,e,h,n,l,g,v,m,t){return function(x){var r,q;(function(){n.init();r=g.createInstance();var a=x.searchboxId,B=d(x.formId),O=d('\x3cdiv id\x3d"search-dropdown-custom" class\x3d"search-dropdown"\x3e\x3c/div\x3e');B.after(O);q={$form:B,$dropdown:O,$searchbox:d(a)};q.$dropdown.css({width:q.$searchbox.outerWidth()});new f(x,q,r);new l(r,q.$dropdown,x);new t(q,r,x);x.hasOwnProperty("src")&&v.isArray(x.src)&&(a=new m(x.src,r),new b([a.name],r));a=[new c("array","s-minimal")];new h("suggestions-template",
new e(x),a,r,x)})();a.eventBus.listen(r.suggestionsReadyForDisplay,function(b){q.$dropdown.html(b.display);q.$dropdown.show();a.eventBus.trigger(r.suggestionsRendered,b)});return{dropdownId:"search-dropdown-custom"}}});"use strict";h.$Nav.importEvent("jQuery",{as:"$",global:"jQuery"});h.$Nav.when("$","sx.iss.utils","sx.iss.Events","sx.iss.EventBasedSuggestionProvider","sx.iss.A9SuggestionProvider","sx.iss.A9SearchSuggestionEventHandler","sx.iss.NextSearchSuggestionProvider","sx.iss.RecentSearchSuggestionProvider",
"sx.iss.RecentSearchSuggestionEventHandler","sx.iss.TopRefinementSearchSuggestionEventHandler","sx.iss.SuggestionAggregator","sx.iss.SuggestionSequencer","sx.iss.SuggestionDisplayProvider","sx.iss.IssDisplayProvider","sx.iss.IssParentCoordinator","sx.iss.PublicApi","sx.iss.MetricsLogger","sx.iss.CustomParentCoordinator").build("sx.iss",function(d,a,f,b,c,e,h,n,l,g,v,m,t,x,r,q,w,B){b={Events:f,EventBasedSuggestionProvider:b,A9SuggestionProvider:c,A9SearchSuggestionEventHandler:e,NextSearchSuggestionProvider:h,
RecentSearchSuggestionProvider:n,RecentSearchSuggestionEventHandler:l,TopRefinementSearchSuggestionEventHandler:g,SuggestionAggregator:v,SuggestionSequencer:m,SuggestionDisplayProvider:t,IssDisplayProvider:x,IssParentCoordinator:r,CustomParentCoordinator:B,IssParentCoordinatorMobile:r,SuggestionSequencerMobile:m,isNewIss:!0};d.extend(b,b,q);a.eventBus.trigger(f.globals.issLoaded);return b});h.$Nav.when("sx.iss").run(function(d){h.$Nav.publish("sx.iss",d);h.$Nav.publish("search-js-autocomplete",d)});
"use strict";h.$Nav.when("$","sx.iss.SuggestionTypes").build("sx.iss.FilterIss",function(d,a){return function(f){return{removeFilteredAliases:function(b){f.filterAliases&&b[a.a9Xcat.name]&&(b[a.a9Xcat.name]=d.grep(b[a.a9Xcat.name],function(a){return-1===d.inArray(a.alias,f.filterAliases)}));return b}}}});"use strict";h.$Nav.when("sx.iss.DebugUtils").build("sx.iss.CompletionServiceWarmupConfig",function(){return{warmUpEnabled:function(d){switch(d){case "A1PA6795UKMFR9":case "A2EUQ1WTGCTBG2":case "A21TJRUUN4KGV":case "ATVPDKIKX0DER":d=
!0;break;default:d=!1}return d}}});"use strict";h.$Nav.when("$","sx.iss.DebugUtils","sx.iss.CompletionServiceWarmupConfig","sx.iss.SuggestionTypes","sx.iss.ISSAjaxUrlProvider","sx.iss.AjaxCallProvider").build("sx.iss.CompletionServiceConnectionWarmer",function(d,a,f,b,c,e){return function(d,h,l){this.initConnectionToSvc=function(){if(f.warmUpEnabled(h)){var g=new e(d,"iss-warmup"),l=(new c(d)).buildUrl({searchTerm:"a"},[b.KeywordSuggestion.name,b.WidgetSuggestion.name]);g.callService(l)}else a.logDebug("Warming up a connection to the completion svc is not enabled")}}})});
/* ******** */
(function(h){var p=window.AmazonUIPageJS||window.P,t=p._namespace||p.attributeErrors,a=t?t("P13NSharedSitewideJS",""):p;a.guardFatal?a.guardFatal(h)(a,window):a.execute(function(){h(a,window)})})(function(h,p,t){(function(a){h.register("p13n-sc-math",function(){return Math});h.register("p13n-sc-document",function(){return a});h.register("p13n-sc-window",function(){return p});h.register("p13n-sc-undefined",function(){});var f=function(){return"undefined"!==typeof a.hidden?function(){return a.hidden}:
"undefined"!==typeof a.msHidden?function(){return a.msHidden}:"undefined"!==typeof a.webkitHidden?function(){return a.webkitHidden}:function(){return!1}}(),k=function(){return p.P&&p.P.AUI_BUILD_DATE};k()?(h.when("jQuery").register("p13n-sc-jQuery",function(a){return a}),h.when("ready").register("p13n-sc-ready",function(){})):p.amznJQ&&(p.amznJQ.available("jQuery",function(){h.register("p13n-sc-jQuery",function(){return p.amznJQ.jQuery})}),p.amznJQ.onReady("jQuery",function(){h.register("p13n-sc-ready",
function(){})}),p.amznJQ.available("amazonShoveler",function(){h.register("p13n-sc-amznJQ-shoveler",function(){})}));var e=function(a,g){var b=g.getCarousel(a).dom.$container.data("aCarouselOptions");return b&&b.name?b.name:null},g=function(a,g,b){g=b.getCarousel(g);b=g.dom.$container.data("aCarouselOptions");if(!b)return"p13n-sc-carousel-"+a;b.name||(a="p13n-sc-carousel-"+a,b.name=a,g.setAttr("name",a));return b.name};h.register("p13n-sc-util",function(){var a=p.ueLogError;"function"!==typeof a&&
(a=function(a,d){if(d&&d.message)throw Error(d.message);if(a&&a.message)throw Error(a.message);});var m=function(b,d){a({logLevel:b,attribution:"P13NSharedSitewideJS",message:"[p13n-sc] "+d})};return{constants:{DATA_ATTR_P13N_FEATURE_NAME:"p13nFeatureName"},count:p.ue&&p.ue.count||function(){},isAUI:k,isPageHidden:f,getCarouselName:e,createCarouselName:g,log:{warn:function(a){m("WARN",a)},error:function(a){m("ERROR",a)}},parseInt:function(a){return parseInt(a,10)}}})})(document);h.when("p13n-sc-jQuery",
"p13n-sc-window","p13n-sc-util","p13n-sc-undefined").register("p13n-sc-heartbeat",function(a,f,k,e){var g=f.clearInterval,n={},m,b,d=function(){if(!m){var a=f.setInterval(function(){if(a!==m)g(a);else if(!k.isPageHidden()){var d=(new Date).getTime();(!b||200<d-b)&&l();b=(new Date).getTime()}},200);m=a}},l=function(){a.each(n,function(a,d){d.call(f)})};return{subscribe:function(a,b){n[a]||(n[a]=b,d())},unsubscribe:function(a){n[a]&&delete n[a];a=!0;for(var d in n)n.hasOwnProperty(d)&&(a=!1);a&&(g(m),
m=e)}}});h.when("p13n-sc-jQuery","p13n-sc-heartbeat").register("p13n-sc-call-on-visible",function(a,f){var k=[],e=a(p),g=function(){for(var a=e.scrollTop()+e.height(),g=e.scrollLeft()+e.width(),b=k.length-1;0<=b;b--){var d=k[b],l=d.callback,c=d.$element,r=d.distanceY,d=d.distanceX;if(0===c.parents("body").size())k.splice(b,1);else if(!c.is(":hidden")){var h=c.offset();a-r>h.top&&g-d>h.left&&(k.splice(b,1),l.call(null,c[0]))}}0===k.length&&f.unsubscribe("p13n-sc-call-on-visible")};return{register:function(n,
e,b){var d=b&&"undefined"!==typeof b.distance?b.distance:0,l=b&&"undefined"!==typeof b.distanceY?b.distanceY:d,c=b&&"undefined"!==typeof b.distanceX?b.distanceX:0;a(n).each(function(){k.push({$element:a(this),callback:e,distanceY:l,distanceX:c})});f.subscribe("p13n-sc-call-on-visible",g)}}});h.when("A","jQuery","p13n-sc-call-on-visible","p13n-sc-util","p13n-sc-math").register("p13n-sc-view-trigger",function(a,f,k,e,g){var n=function(b){var d=f(b);b=d.attr("data-params");var l=d.attr("data-url");if(b&&
l){b=a.parseJSON(b);var c=d.offset(),d=[c.top,c.left,d.height(),f(p).width()];b.elementRect=d.join(",");var e=0,k={cache:!0,crossDomain:!1,data:f.param(b,!1),error:function(a){a=a.status||0;3<=e||400<=a&&500>a||setTimeout(n,200*g.pow(2,e))},global:!1,url:l},n=function(){e+=1;f.ajax(k)};n()}},m=function(b){var d=f(b);if(1===d.size()){var l=d.attr("data-params"),l=l?a.parseJSON(l):{};if(!0===l.allowEmpty||0!==f.trim(d.text()).length){var c=d.height();!0!==l.allowEmpty&&5>c||(c=0,"number"===typeof l.distance&&
(c=l.distance),d.attr("data-p13n-sc-vt-initialized")||(d.attr("data-p13n-sc-vt-initialized",!0),k.register(b,function(){n(b)},{distance:c})))}}};e=function(){a.each(f(".p13n-sc-vt:not([data-p13n-sc-vt-initialized])"),function(a){m(a)})};h.execute(e);h.when("afterReady").execute("p13n-sc-view-trigger:init",e);return{initializeElement:m}});h.when("p13n-sc-jQuery","p13n-sc-util","p13n-sc-window","p13n-sc-document","p13n-sc-ready").register("p13n-sc-logger",function(a,f,k,e){function g(a){return a.join("")}
function n(d,b){var l=d.attr(b),c={};l!==t&&null!==l&&(c="undefined"!==typeof a.parseJSON?a.parseJSON(l):eval("("+l+")"));return c}function m(d,l){for(var b=[d.widget,":"],c=0;c<d.asins.length;c++){var f=d.asins[c];b.push(f.asin,"@");a.each(f,function(a,d){"asin"!==a&&b.push(a,"\x3d",d,"|")});b.splice(b.length-1,1);b.push(",")}0<d.asins.length&&b.splice(b.length-1,1);l&&(b.push(":","action\x3d",d.action),a.each(d.meta,function(a,d){b.push(",",a,"\x3d",d)}));return g(b)}function b(d,b){var l=n(a(b),
"data-p13n-asin-metadata");if(l&&l.asin){var c=l.asin,g=n(a(d),"data-p13n-asin-metadata");g&&a.extend(!0,l,g[c]);return l}}function d(d,b){var l=new Image;f.count("p13n:logger:attempt",1);l.onerror=function(){c++;f.count("p13n:logger:error",1)};l.src=g(["https:"===e.location.protocol?"https://":"http://",k.ue_furl||"fls-na.amazon.com","/1/","p13n-shared-components","/1/OP/p13n/",b,g(["?",a.param(n(a(d.featureElement),"data-p13n-global"))])])}function l(){return 3<c?(h||(f.count("p13n:logger:abort",
1),h=!0),!0):!1}var c=0,h=!1,u={},q={},y={logAction:function(c){if(!l())if("featureElement"in c)if("action"in c){var e=a(c.featureElement);c.widgetViewport&&a(c.widgetViewport);var k=e.offset().left,h=e.width()+k;c.asins=a.map(a(c.featureElement).find(".p13n-asin").filter(":visible"),function(c){var d=a(c).offset().left;if(!(d<k||d>h))return b(e,c)});c.meta=c.meta||{};var q=n(e,"data-p13n-feature-metadata");a.extend(!0,c.meta,q);c.widget=e.attr("data-p13n-feature-name");c.widget in u||(u[c.widget]=
{});if(0!==c.asins.length){for(var q=[],r=0;r<c.asins.length;r++)c.asins[r].asin in u[c.widget]||(u[c.widget][c.asins[r].asin]=!0,q.push(c.asins[r]));c.logOnlyOnNew&&0===q.length||(c.logOnlyNew&&0<q.length&&(c.asins=q),q=g(["action/",g([c.widget,"_:",c.action,"@v\x3d",c.eventtime||0,",impressed@v\x3d",c.asins.length]),"/",m(c,!0)]),c.replicateAsinImpressions&&(r=g(["asin/",m(c,!1)]),q=g(["batch/",q,"$",r])),d(c,q))}}else f.log.warn("action missing in eventData for logAction");else f.log.warn("featureElement missing in eventData for logAction")},
logAsyncAction:function(c){var d=(new Date).getTime(),b="number"===typeof c.initialDelay?c.initialDelay:400,l="number"===typeof c.timeout?c.timeout:5E3,g=a(c.featureElement);c.widget=g.attr("data-p13n-feature-name");c.widget in q&&k.clearTimeout(q[c.widget]);var e=function(){var a=c.isEventComplete(),b=(new Date).getTime();b-d<l&&!a?q[c.widget]=k.setTimeout(e,150):(a||("meta"in c||(c.meta={}),c.meta.err="notfinished"),c.eventtime=b-d,delete q[c.widget],y.logAction(c))};q[c.widget]=k.setTimeout(e,
b)},eventPending:function(c){return a(c).attr("data-p13n-feature-name")in q},impressAsin:function(c){if(!l())if("featureElement"in c)if("faceoutElement"in c){var e=a(c.faceoutElement),k=a(c.featureElement);c.widget=k.attr("data-p13n-feature-name");c.asins=[b(k,e)];e=g(["asin/",m(c,!1)]);d(c,e)}else f.log.warn("faceoutElement missing in eventData for logAction");else f.log.warn("featureElement missing in eventData for logAction")},resetImpressions:function(c){c in u&&(u[c]={})}};return y});h.when("jQuery",
"A","p13n-sc-call-on-visible","p13n-sc-logger","ready").register("p13n-sc-faceout-logger",function(a,f,k,e){var g=function(g,f){var b=a(g),d=a(f);1!==b.length||b.attr("data-p13n-sc-fl-initialized")||(b.attr("data-p13n-sc-fl-initialized",!0),k.register(b,function(){e.logAction({featureElement:d,action:"view",replicateAsinImpressions:!0})}))};f.on("p13n:faceoutsloaded",function(e){a(e).find(".p13n-asin:not([data-p13n-sc-fl-initialized])").each(function(a,b){g(b,e)})})});h.when("A","jQuery").register("p13n-sc-lazy-image-loader",
function(a,f){return{loadImages:function(k){a.executeDeferred();k.find(".p13n-sc-lazy-loaded-img").each(function(e,g){var k=f(g),m=k.find(".a-dynamic-image");m.load(function(){k.removeClass("p13n-sc-lazy-loaded-img")});a.loadDynamicImage(m)})}}});h.when("A","jQuery","p13n-sc-call-on-visible").register("p13n-sc-lazy-widget-loader",function(a,f,k){function e(a,e,k){a.find("."+e).each(function(a,d){var l=f(d),c=l.find(".lazy-widget-template");c.length&&(l.append(c.html()),c.remove(),k&&k(l))})}return{revealWidgets:function(){e(f(document),
"js-revealed-widget")},revealWhenVisible:function(a,n,m){k.register(a,function(a){e(f(a),"js-onvisible-widget",n)},m)}}});h.when("p13n-sc-jQuery","p13n-sc-util","p13n-sc-math").register("p13n-sc-line-truncator",function(a,f,k){function e(d){this.$element=d;this.$experimentElement=a("\x3cdiv\x3e").addClass("p13n-sc-offscreen-truncate");this.maxRows=d.attr("data-rows");this.lineHeight=this.getLineHeight();this.maxRows?this.lineHeight||f.log.error("Truncation element does not have a line height or it is zero"):
f.log.error("Truncation element missing necessary line number data")}var g=/(?=[ \-\/])|(?=[\u3105-\u312F])|(?=[\u31A0-\u31BA])|(?=[\u4E00-\u9FD5])|(?=[\u3400-\u4DB5])|(?=[\uF900-\uFAFF])|(?=[\u3040-\u309F])|(?=[\u30A0-\u30FF])|(?=[\u3190-\u319F])/,n=/[^\/\-\[\]():\s]/;e.prototype.truncate=function(){var d=a.trim(this.$element.html()),b=a.trim(this.$element.text()),d=m(d,this.$element,g);this.$element.append(this.$experimentElement);if(this.checkLineFit(d))this.$experimentElement.remove(),this.$element.html(d);
else{var c=this.truncateByToken(d);c?(this.$element.html(c),this.$element.attr({title:b})):f.log.error("Unable to successfully truncate line "+d);this.$experimentElement.remove()}};e.prototype.getLineHeight=function(){var a=this.$element.html();this.$element.html("\x26hellip;");var b=this.$element.innerHeight();this.$element.html(a);return b};e.prototype.checkLineFit=function(a){this.$experimentElement.html(a);a=this.$experimentElement.get(0).clientHeight/this.lineHeight;return k.round(a)<=this.maxRows};
e.prototype.truncateByToken=function(a){a=a.split(g);for(var b=1,c=a.length,e,f,m=0;b!==c;)if(e=k.floor((c+b)/2),f=a.slice(0,e).join("")+"\x26hellip;",this.checkLineFit(f)){if(1>=c-e){for(m=e;0<m&&!n.test(a[m-1]);)m--;break}b=e}else c=e;if(0!==m)return a.slice(0,m).join("")+"\x26hellip;"};var m=function(b,l,c){b=b.split(c);var e=k.floor(l.width()/parseInt(l.css("font-size"),10)),g=function(c){c=a("\x3cdiv\x3e").addClass("p13n-sc-offscreen-truncate").css("overflow","hidden").text(c).appendTo(l);var b=
c[0].clientWidth>=c[0].scrollWidth;c.remove();return b},f=function(c){var b=c.length-e;a.trim(c).length>e&&!g(c)&&(c=a.map(c,function(a,c){return c>e&&c<=b&&n.test(a)?"\x26shy;"+a:a}));return c};b=a.map(b,function(a){return f(a)});return b.join("")},b=function(){};h.when("A").execute("trigger-linestruncated",function(a){b=function(){a.trigger("p13n:linestruncated")}});return{truncateLines:function(d){d.find(".p13n-sc-truncate:visible, .p13n-sc-truncate-medium:visible, .p13n-sc-truncate-sky:visible").each(function(){var b=
new e(a(this));b&&(b.truncate(),a(this).addClass("p13n-sc-truncated").removeClass("p13n-sc-truncate p13n-sc-truncate-medium p13n-sc-truncate-sky"),a(this).removeClass(function(a,b){return(b.match(/p13n-sc-line-clamp-\d/g)||[]).join(" ")}))});b()}}});h.when("A","jQuery","p13n-sc-call-on-visible","p13n-sc-logger","p13n-sp-logging").register("p13n-sc-list-logger",function(a,f,k,e,g){a.on("p13n-sc-list-log",function(a,f){e.logAction({featureElement:a,action:f,replicateAsinImpressions:!0});g.logHiddenSponsoredProducts(a)})});
h.when("jQuery","A","p13n-sc-line-truncator","a-carousel-framework","p13n-sc-util").register("p13n-sc-carousel",function(a,f,k,e,g){function n(a){k.truncateLines(a.carousel.dom.$container)}function m(a){f.loadDynamicImage(a.carousel.dom.$container.find(".p13n-sc-dynamic-image"))}var b=function(a,c){var b=g.getCarouselName(c,e);b||(b=g.createCarouselName(a,c,e));var h=e.getCarousel(c).dom.$container;k.truncateLines(h);f.loadDynamicImage(h.find(".p13n-sc-dynamic-image"));d(c);f.on("a:carousel:"+b+":change:animating",
function(a){n(a);m(a);!1===a.newValue&&d(c)});f.on("a:carousel:"+b+":change:pageSize",function(a){n(a);m(a);d(c)});f.on("a:carousel:"+b+":change:loading",function(a){n(a);m(a);!1===a.newValue&&d(c)})},d=function(b){b=a(b);var c=b.find(".a-carousel-viewport"),d=0;c.find(".a-carousel-card").each(function(c,b){d=Math.max(d,a(b).height())});0<d&&(c.height(d),b.find(".p13n-sc-sunk-container").addClass("p13n-sc-sunken"))};h.when("afterReady","a-carousel-framework").execute("p13n-sc-carousel-add-truncation",
function(){a(".p13n-sc-carousel").each(b)});return{initializeElement:b}});h.when("A","jQuery","a-carousel-framework","p13n-sc-call-on-visible","p13n-sc-logger","p13n-sc-util","p13n-sp-logging","ready").register("p13n-sc-carousel-logger",function(a,f,k,e,g,n,m){function b(a,b){var d=a.getAttr("pageNumber"),e=a.dom.$container,l=e;e.find(".a-carousel-viewport")&&(l=e.find(".a-carousel-viewport"));e.data("p13nPreviousPage",d);g.logAsyncAction(f.extend(!0,{},{featureElement:e,widgetViewport:l,isEventComplete:function(){return 0===
e.find(".a-carousel-card-empty").size()&&!a.getAttr("animating")},meta:{p:d},replicateAsinImpressions:!0},b))}function d(a){l(a)&&e.register(a.dom.$container,function(){b(a,{action:"view"});m.logHiddenSponsoredProducts(a.dom.$container)})}var l=function(a){return"undefined"===typeof a?!1:a.dom.$container.data(n.constants.DATA_ATTR_P13N_FEATURE_NAME)?!0:!1};a.each(k.getAllCarousels(),function(a){a.dom.$container.hasClass("a-carousel-initialized")&&d(a)});a.on("a:carousel:init",function(a){d(a.carousel)});
f(document).delegate(".a-carousel-container[data-p13n-feature-name] .a-carousel-goto-nextpage","click",function(a){a=k.getCarousel(a.target);b(a,{action:"shovel_right",logOnlyOnNew:!0})});f(document).delegate(".a-carousel-container[data-p13n-feature-name] .a-carousel-goto-prevpage","click",function(a){a=k.getCarousel(a.target);b(a,{action:"shovel_left",logOnlyOnNew:!0})});f(document).delegate(".a-carousel-container[data-p13n-feature-name] .a-carousel-restart","click",function(a){a=k.getCarousel(a.target);
b(a,{action:"start_over",logOnlyOnNew:!0,meta:{op:a.dom.$container.data("p13nPreviousPage")}})});a.on("a:carousel:change:pageSize",function(a){a=a.carousel;l(a)&&a.dom.$container.hasClass("a-carousel-initialized")&&b(a,{action:"resize",logOnlyOnNew:!0})})});h.when("p13n-sc-jQuery","p13n-sc-window","p13n-sc-document","p13n-sc-call-on-visible","p13n-sc-logger","p13n-sc-util","p13n-sc-amznJQ-shoveler").register("p13n-sc-non-aui-carousel",function(a,f,k,e,g,n){var m=function(b){n.count("p13n-sc-non-aui-carousel:init",
1);var c=b.attr("data-widgetname"),d=a("#"+c+"Data");if(1!==d.length||b.attr("data-p13n-sc-carousel-initialized"))return!1;b.attr("data-p13n-sc-carousel-initialized",!0);var e=d.text().split(","),k=b.find(".shoveler-content \x3e ul"),m="input#"+c+"ShvlState",h=function(){},p=200,t=!1,A=function(){var c=p;b.find(".p13nimp, .p13n-asin").each(function(){var b=a(this).outerHeight(!0);b>c&&(c=b)});c>p&&(p=c,k.animate({height:c},200,"linear"));t||B()},B=function(){var a=p/2;b.find("a.next-button, a.back-button").css("top",
a);t=!0},v=b.find(".shoveler").shoveler(function(b,c){var g="",g="undefined"!==typeof f.JSON?JSON.parse(d.attr("data-ajax")):eval("("+d.attr("data-ajax")+")");g.asins=e.slice(b,b+c).join(",");g.count=c;g.offset=b;g=a.param(g);return d.attr("data-url")+"?"+g},e.length,{cellTransformer:function(a){return null===a?"":a},cellChangeSpeedInMs:30,preloadNextPage:!0,prevButtonSelector:"a.back-button",nextButtonSelector:"a.next-button",startOverSelector:"span.start-over",startOverLinkSelector:"a",horizPadding:14,
state:{ready:function(){return 0<a(m).val().length},get:function(){return parseInt(a(m).val(),10)},set:function(b){a(m).val(b)}},onUpdateUIHandler:function(){A();h()}}),z=0,C=function(){var b=a(f).width();z!==b&&(v.updateUI(),z=b)},x=null;b.resize(function(){x&&f.clearTimeout(x);x=f.setTimeout(C,100)});var w=function(c){g.logAsyncAction(a.extend(!0,{},{featureElement:b,isEventComplete:function(){return 0===b.find("li.shoveler-cell.shoveler-progress").size()},replicateAsinImpressions:!0},c))};w({action:"view",
meta:{p:v.getCurrentPage()+1}});b.find(".back-button").click(function(){w({action:"shovel_left",meta:{p:v.getCurrentPage()+1}})});b.find(".next-button").click(function(){w({action:"shovel_right",meta:{p:v.getCurrentPage()+1}})});b.find(".start-over-link").mousedown(function(){w({action:"start_over",meta:{p:1,op:v.getCurrentPage()+1}})});h=function(){g.eventPending(b)||w({action:"resize",page:v.getCurrentPage()+1,logOnlyOnNew:!0,initialDelay:2E3})}},b=function(b){var c={distanceY:-250,distanceX:0};
a(b).find(".p13n-sc-nonAUI-carousel").andSelf().filter(".p13n-sc-nonAUI-carousel").each(function(b,d){e.register(d,function(){m(a(d))},c)})},d=function(){b(k)};d();h.when("p13n-sc-ready").execute("p13n-sc-non-aui-carousel:readyInit",d);return{init:b}});h.when("p13n-sc-jQuery","p13n-sc-util").execute("p13n-sc-carousel-initialization-setup",function(a,f){f.isAUI()?h.when("a-carousel-framework").register("p13n-sc-carousel-init",function(a){return{init:function(){a.createAll()}}}):h.when("p13n-sc-non-aui-carousel").register("p13n-sc-carousel-init",
function(a){return{init:function(e){a.init(e)}}})});h.when("jQuery","A","p13n-sc-call-on-visible","p13n-sc-lazy-image-loader","p13n-sc-line-truncator","p13n-sc-list-logger").register("p13n-sc-static-list",function(a,f,k,e,g){function n(f){this.$container=a(f);e.loadImages(this.$container);g.truncateLines(this.$container)}h.when("afterReady").execute("p13n-sc-static-list:init",function(){function e(a){k.register(a,function(){var b=new n(a);f.trigger("p13n-sc-list-log",b.$container,"view")},b)}var b=
{distanceY:-500,distanceX:0};a(".p13n-sc-static-list").each(function(a,b){e(b)})});return n});h.when("A","jQuery","p13n-sc-util").execute("updateDpLink",function(a,f,k){var e=/([?&]preST=)([^&]*)/;a.on("a:image:load:p13nImage",function(a){var h=a.$imageElement[0];if("undefined"!==typeof h&&(k.count("p13n:dynImgCallback",(k.count("p13n:dynImgCallback")||0)+1),h=f(h).closest("a"),0<h.length)){var m=f(h).attr("href"),b=m.match(e);a=a.url.split("/").pop().split(".");f.isArray(a)&&3===a.length&&(a=encodeURIComponent(a[1]),
null!==b&&f.isArray(b)&&3===b.length&&b[2]!==a&&(a=m.replace(e,"$1"+a),f(h).attr("href",a)))}})});h.when("fresh-add-to-cart","a-carousel-framework").execute(function(a,f){a.attachCallbacks({success:function(a,e){var g=a.$target.parents(".p13n-asin").find(".s-add-to-cart-badge-position");g&&g.removeClass("aok-hidden");if((g=a.$declarativeParent.parents(".p13n-sc-carousel"))&&g.data()&&g.data("a-carousel-options")&&g.data("a-carousel-options").name&&(g=g.data("a-carousel-options").name,g=f.getCarouselByName(g),
null!==g)){var h=g.getAttr("fetchedItems"),m=a.data.position-1;0<=m&&(h[m]=h[m].replace("aok-hidden",""),g.setAttr("fetchedItems",h))}},error:function(a,e,g,f){a.$target.parents(".p13n-asin").find(".s-add-to-cart-badge-position").addClass("aok-hidden")},clientID:"p13n"})});h.when("A","p13n-sc-heartbeat","a-carousel-framework","p13n-sc-util").execute("p13n-sc-carousel-resize-detector",function(a,f,k,e){var g=a.$;f.subscribe("p13n-sc-carousel-resize-detector",a.throttle(function(){for(var a=g(".p13n-sc-carousel"),
f=a.length-1;0<=f;f--){var b=g(a[f]),d=b.width();if(d){var l=b.data("previous-width");b.data("previous-width",d);l&&d!==l&&(e.count("p13n:carousel:resize",(e.count("p13n:carousel:resize")||0)+1),(b=k.getCarousel(b))&&b.resize())}}},500))});h.when("A","p13n-sc-jQuery","a-modal").execute("desktop-carousel-add-to-list",function(a,f,k){a.declarative("p13n-sc-atl","click",function(e){var f=e.$declarativeParent.parents(".p13n-asin"),h=e.data.spinnerHTML,m=f.find(".p13n-sc-atl-alert-row"),b=f.find(".p13n-sc-atl-button");
b.hide();m.html(h);k.remove(m);var d=function(){var a=e.data.modalFailureMsg;f.find(".p13n-sc-atl-in-progress").hide();b.show();k.create(m,{name:"p13n-sc-failure-modal",content:a,width:400}).show()};a.post(e.data.addToListURL,{success:function(a){var b=e.data.inlineSuccessHTML,k=e.data.viewListText,h=a.listName,n=a.listExternalId;!a.hasError&&h&&n?(f.find(".p13n-sc-atl-in-progress").hide(),m.html(b),13<h.length&&(h=h.substring(0,10).concat("...")),a=f.find(".p13n-sc-atl-link"),a.attr("href","/hz/wishlist/ls/".concat(n).concat("/ref\x3dsc-atl-lists")),
a.attr("title",k),a.attr("alt",k),a.text(h)):a.hasError&&"INVALID_SESSION_ID"===a.error?p.location.href=a.loginUrl:d()},error:d,params:e.data.listArgs})})});h.when("A","jQuery","p13n-sc-util").register("p13n-sp-logging",function(a,f,h){return{logHiddenSponsoredProducts:function(a){a=a.find(".p13n-sp-log");0<a.length&&(0===a.height()?h.count("p13n:desktop:adblocked",1):h.count("p13n:desktop:adallowed",1))}}})});
/* ******** */
(function(d){var c=window.AmazonUIPageJS||window.P,f=c._namespace||c.attributeErrors,a=f?f("RecentHistoryFooterJS",""):c;a.guardFatal?a.guardFatal(d)(a,window):a.execute(function(){d(a,window)})})(function(d,c,f){d.when("p13n-sc-jQuery","p13n-sc-call-on-visible","p13n-sc-carousel-init","p13n-sc-util","p13n-sc-carousel","p13n-sc-ready").execute(function(a,u,v,n,p){var g,e,k,l,m,h=!1,x=function(){u.register(m,q,{distance:"-400"});d.when("A").execute(function(b){b.on("clickstream-changed",w)})},w=function(){h&&
q()},q=function(){h||l.show();var b=g.rhfHandlerParams;b.isAUI=c.P&&c.P.AUI_BUILD_DATE&&r(c.P.AUI_BUILD_DATE)?1:0;b.cardJSPresent=c.mix_d!==f;a.ajax({url:"/gp/recent-history-footer/external/rhf-handler.html",timeout:5E3,type:"POST",dataType:"json",data:b,success:y,error:t})},y=function(b){b.success&&"object"===typeof b&&"string"===typeof b.html||t();e.html(b.html);v.init(e);e.find(".p13n-sc-carousel").each(p.initializeElement);z();b=e.find(".rvi-with-titles");b.length&&p.initializeElement(0,b.find(".a-carousel-container"));
h=!0},t=function(){h||(e.hide(),k.show())},z=function(){a("#ybh-link").click(function(){a.ajax({url:"/gp/recent-history-footer/external/ybh-handler.html",timeout:2E3,type:"POST",dataType:"text",data:g.ybhHandlerParams,success:A})})},A=function(){a("#ybh-link").hide();a("#ybh-text-off").hide();a("#ybh-text-on").show()},r=function(b){b=b.split("-")[0].split(".").slice(0,3);for(var a=[3,15,8],c=Math.min(b.length,a.length),e=0;e<c;e++){var d=parseInt(b[e],10),f=a[e];if(d!==f)return d>f}return-1<b.length-
a.length};g=function(b){try{return"undefined"===typeof a.parseJSON?eval("("+b+")"):a.parseJSON(b)}catch(c){return f}}(a("#rhf-context script").html());e=a("#rhf-container");k=a("#rhf-error");l=a(".rhf-frame");m=a("#rhf");(function(){if("object"!==typeof g||null===g)return n.count("p13n:rhf:invalidPage",1),!1;if(!(c.P&&c.P.AUI_BUILD_DATE&&r(c.P.AUI_BUILD_DATE)))return n.count("p13n:rhf:unsupportedAUIVersion",1),!1;for(var b=[e,k,l,m],a=0;a<b.length;a++){var d=b[a];if("undefined"===typeof d||"undefined"===
typeof d.size||0===d.size())return!1}return!0})()&&x()})});
/* ******** */
(function(k){var d=window.AmazonUIPageJS||window.P,m=d._namespace||d.attributeErrors,a=m?m("InternationalCustomerPreferencesNavDesktopAssets",""):d;a.guardFatal?a.guardFatal(k)(a,window):a.execute(function(){k(a,window)})})(function(k,d,m){d.$Nav&&d.$Nav.when("$").run("icp.main",function(a){function h(e,d){if(e=a(d).attr("href"))e=e.replace("preferencesReturnUrl\x3d%2F","preferencesReturnUrl\x3d"+c),a(d).attr("href",e)}var c=encodeURIComponent(d.location.pathname+d.location.search);a("#icp-nav-dialog, #icp-nav-flyout").each(h);
a("#icp-touch-link-language, #icp-touch-link-country, #icp-touch-link-cop").each(h);a("*[id*\x3dicp-flyout-mkt-change]").each(h);d.$Nav.when("$","page.loaded").run("icp.latency_exp",function(a){if(a("#icp-country-button-experiment").length){var h=a("#icp-country-button-experiment").html(),n=a("#icp-country-button-experiment-url").html(),n=n.replace("preferencesReturnUrl\x3d%2F","preferencesReturnUrl\x3d"+c),h='\x3ca href\x3d"'+n+'" class\x3d"icp-button a-declarative" id\x3d"icp-touch-link-country"\x3e \x3cspan class\x3d"icp-flag-3 icp-flag-3-jp"\x3e\x3c/span\x3e\x3cspan class\x3d"icp-color-base"\x3e'+
h+"\x3c/span\x3e \x3c/a\x3e";a("#icp-country-button-experiment").replaceWith(a(h));a("#icp-country-button-experiment-url").remove();d.P&&d.P.AUI_BUILD_DATE&&k.when("a-modal","ready").execute(function(a){a.create("#icp-touch-link-country",{name:"select-country-modal",header:'\x3cdiv id\x3d"icp-country-ph"\x3e\x3c/div\x3e',footer:'\x3cdiv id\x3d"icp-country-pf"\x3e\x3c/div\x3e',width:600,closeButton:!1,cache:!1,url:"/gp/navigation-country/select-country-modal/ref\x3dfooter_country"})})}})});"use strict";
d.P&&d.P.AUI_BUILD_DATE&&(k.declare("icp-configure-modals",function(a,d){function c(b){return u.update({restoreFocusOnHide:!1,url:"/gp/customer-preferences/select-preferences-modal/ref\x3d"+b})}function e(b){return n.update({restoreFocusOnHide:!1,url:"/gp/navigation-country/select-country-modal/ref\x3d"+b})}var q=a("#icp-touch-link-country"),n=d.create(q,{name:"select-country-modal",header:'\x3cdiv id\x3d"icp-country-ph"\x3e\x3c/div\x3e',footer:'\x3cdiv id\x3d"icp-country-pf"\x3e\x3c/div\x3e',popoverLabel:q.find(".aok-hidden").html(),
width:600,closeButton:!1,cache:!1,url:"/gp/navigation-country/select-country-modal/ref\x3dfooter_country"}),k=a("#icp-touch-link-language"),u=d.create(k,{name:"customer-preferences-modal",header:'\x3cdiv id\x3d"icp-lang-ph"\x3e\x3c/div\x3e',footer:'\x3cdiv id\x3d"icp-lang-pf"\x3e\x3c/div\x3e',popoverLabel:k.find(".aok-hidden").html(),cache:!1,width:600,closeButton:!1});k.click(function(){c("footer_lang")});a("#icp-nav-dialog").click(function(){c("topnav_lang").show();return!1});q.click(function(){e("footer_country").show()});
a("*[id*\x3dicp-flyout-mkt-change]").click(function(){e(element).show()});return{language:u,country:n}}),k.when("A","a-modal","icp-configure-modals","ready").execute(function(a,d,c){c(a.$,d)}));"use strict";d.$Nav&&(d.$Nav.when("$","data","flyouts.create","flyouts.accessibility").build("flyout.icp.language.builder",function(a,h,c,e){var k=function(){return{extractLanguage:function(a){var b=(a||"").indexOf("#switch-lang\x3d");return-1===b?"":a.substr(b+13)},insertLanguage:function(a){return"#switch-lang\x3d"+
a}}}(),n,t;h.observe("data",function(a){var b=a||{},e=b.languages;a=b.inputs||{};var f=b.cop&&b.languages&&b.languages.strings?b.languages.strings.disclaimer||{}:b.disclaimer||{},c=[];if(e){var g=e.strings;b.cop&&g&&c.push({text:g.changeText+(g.helpLinkText?' \x3ca href\x3d"'+g.helpLinkHref+'" class\x3d"icp-flyout-learn-more"\x3e'+g.helpLinkText+"\x3c/a\x3e":"")});for(g=0;g<e.all.length;g++){var l;l=e.all[g];var p=l.current?'\x3ci class\x3d"icp-radio icp-radio-active"\x3e\x3c/i\x3e':'\x3ci class\x3d"icp-radio"\x3e\x3c/i\x3e',
r=l.current?null:k.insertLanguage(l.code);l={text:p+l.name,url:r};1===g&&(t=l.dividerBefore=!0);c.push(l)}}f.text?n='\x3cdiv class\x3d"icp-flyout-bottom"\x3e\x3cdiv class\x3d"icp-flyout-disclaimer"\x3e'+f.text+"\x3c/div\x3e\x3c/div\x3e":!b.cop&&b.helpLink&&b.helpLink.text&&b.helpLink.href&&c.push({text:'\x3cdiv class\x3d"icp-helplink"\x3e'+b.helpLink.text+"\x3c/div\x3e",url:b.helpLink.href});b.cop&&b.currency&&(f=b.currency,f.strings&&(f=f.strings,c.push({text:f.changeText+(f.helpLinkText?' \x3ca href\x3d"'+
f.helpLinkHref+'" class\x3d"icp-flyout-learn-more"\x3e'+f.helpLinkText+"\x3c/a\x3e":""),dividerBefore:e!==m}),g="\x3cspan\x3e"+f.currencyName+"\x3c/span\x3e",l=encodeURIComponent(d.location.pathname+d.location.search),g+='\x3ca href\x3d"'+f.changeHref.replace("%s",l)+'" class\x3d"icp-flyout-change"\x3e'+f.changeShortText+"\x3c/a\x3e",c.push({text:g})));b.marketplace&&(e=e!==m||b.cop&&b.currency!==m,b=b.marketplace,f=b.strings,b.country&&f.text&&(c.push({text:'\x3ci class\x3d"icp-flyout-flag icp-flyout-flag-'+
b.country+'"\x3e\x3c/i\x3e'+f.text,dividerBefore:e}),b.href&&f.link&&c.push({text:'\x3cdiv class\x3d"icp-mkt-change-lnk"\x3e'+f.link+"\x3c/div\x3e",url:b.href,id:"icp-flyout-mkt-change"})));h({icpContent:{template:{name:"itemList",data:{items:c,inputs:a}}}})});return function(e){e=e||{};var b=c({key:e.name,panelDataKey:"icpContent",link:e.target,event:"icp",arrow:"top",cover:e.isCoverEnabled}),h=a('\x3cform method\x3d"post" style\x3d"display:none"\x3e\x3cinput type\x3d"hidden" name\x3d"_url" value\x3d"" /\x3e\x3cinput type\x3d"text" name\x3d"LOP" value\x3d"" /\x3e\x3c/form\x3e');
b.getPanel().onData(function(c){b.elem().find("form").length||b.elem().append(h);n&&!b.elem().find(".icp-flyout-bottom").length&&b.elem().append(n);var m=b.elem().find(".nav-divider"),g=t?1:0;if(m.length>1+g)for(;g<=m.length;g++){var l=m.eq(g);l.addClass("icp-flyout-curr-divider");e.isHeader||(l.hide(),l.nextAll().hide())}if(c&&c.template&&c.template.data&&c.template.data.inputs)for(var p in c.template.data.inputs)h.append('\x3cinput name\x3d"'+p+'" value\x3d"'+c.template.data.inputs[p]+'"/\x3e');
var r=e.isHeader?"tn":"fo";b.elem().find('a[href*\x3d"#switch-lang"]').each(function(b,e){var c=a(e);c.click(function(a){a.preventDefault();a=k.extractLanguage(c.attr("href"));var b=d.location.pathname+d.location.search,e="icp_lop_"+a.replace("_","-")+"_"+r;h.attr("action","/gp/customer-preferences/save-settings/ref\x3d"+e);h.find('input[name\x3d"_url"]').val(b);h.find('input[name\x3d"LOP"]').val(a);h.submit()})})});return b}}),d.$Nav.when("provider.ajax","util.Proximity").build("flyout.icp.language.ajax",
function(a,d){var c=a({url:"/gp/customer-preferences/ajax/icp.html",data:{icpContent:"icp"}}).boundFetch();return function(a){a.onShow(c);a.link.focus(c);d.onEnter(a.link,[20,40,40,40],c)}}),d.$Nav.when("$","flyout.icp.language.builder","flyout.icp.language.ajax","config","page.loaded").run("flyout.icp.language",function(a,d,c,e){var k=a("#icp-nav-flyout");e=!!e.beaconbeltCover&&!e.primeDay;1===k.length&&c(d({name:"icp",target:k,isHeader:!0,isCoverEnabled:e}));a=a("#icp-touch-link-language");1===
a.find(".icp-up-down-arrow").length&&c(d({name:"icp-footer-flyout",target:a,isHeader:!1}))}))});
/* ******** */
(function(l){var k=window.AmazonUIPageJS||window.P,m=k._namespace||k.attributeErrors,a=m?m("GLUXAssets",""):k;a.guardFatal?a.guardFatal(l)(a,window):a.execute(function(){l(a,window)})})(function(l,k,m){l.when("A","GLUXConfig","GLUXWidget","GLUXWidgetController","GLUXRegionData","LocationTypes","GLUXMetrics","GLUXWeblabUtil","GLUXCartConflict").register("GLUXActionHandler",function(a,g,b,d,h,e,c,C,n){var q=C.doesWeblabMatchTreatment("PACKARD_GLOBAL_DESKTOP_124721",C.TREATMENTS.T1),D=a.$("#"+b.IDs.ADDRESS_LIST+
" li").length,w=a.$("#"+b.IDs.ADDRESS_LIST_DELIVERY+" li").length,x=a.$("#"+b.IDs.ADDRESS_LIST_PICKUP+" li").length,p=b.INITIAL_DISPLAY_ADDRESS_INDEX&&q?b.INITIAL_DISPLAY_ADDRESS_INDEX:4,t=p,z=p,u=p,E=g.ADDRESS_BOOK_URL,H=g.SIGNIN_URL,A="input[id^\x3d"+b.IDs.ZIP_UPDATE_INPUT+"]",B=function(b,d,e,c){a.$("#"+b+" li").show();e=c-1;a.$("#"+d).hide();return e},v=function(b,d){a.$("#"+b).show();a.$("[id\x3d"+d+"]").hide()},F=function(){var a={};k.location.href.replace(/[?&]+([^=&]+)=([^&#]*)/gi,function(b,
d,e){a[d]=e});return a},r=function(f,e){l.now("packardGlowStoreName").execute("setStoreContext",function(a){a&&(f.storeContext=a)});f.deviceType="web";f.pageType=k.ue_pty;f.actionSource="glow";f.almBrandId=F().almBrandId;d.resetErrors();a.post("/gp/delivery/ajax/address-change.html",{headers:{"anti-csrftoken-a2z":b?b.CSRF_TOKEN:"",contentType:"application/x-www-form-urlencoded;charset\x3dutf-8"},params:f,success:function(a){d.handleLocationUpdateResponse(a.sembuUpdated,a.isTransitOutOfAis,e)},error:function(a){d.handleLocationUpdateResponse(!1,
m,e)}})},G=function(a){l.now("GLUXExternalConfig").execute("updateDestinationHandler",function(b){b!==m&&b.updateDestinationHandler?b.updateDestinationHandler(addressID):r(a,e.TYPE_ADDRESS_ID)})},y=function(a){return a.replace(/[^A-Za-z0-9\- ]/g,"")},I=function(){[b.IDs.ADDRESS_LIST,b.IDs.ADDRESS_LIST_DELIVERY,b.IDs.ADDRESS_LIST_PICKUP].forEach(function(b){a.$("#"+b).find(".a-button-selected input").each(function(){this.setAttribute("disabled","disabled")})})};a.on("a:button-group:GLUXAddresses:toggle",
function(f){var c=f.selectedButton.buttonName;f=c.split(":")[0];var h=c.split(":")[1],c=a.$('input[name\x3d"'+String(c)+'"]');c.attr("deliverydestinationtype");if("MANAGE_ADDRESS"!==f){d.resetAddressRowState();q&&I();var t=e.TYPE_ACCOUNT_ADDRESS;0===parseInt(h,10)&&a.$("#"+b.IDs.DEAFULT_ADDRESS_TEXT).length&&(t=e.TYPE_DEFAULT_ADDRESS);var g={locationType:t,addressId:f,totalCustomerAddresses:D,selectedAddressIndex:h,almBrandId:F().almBrandId,storeRegionId:c.attr("storeregionid")};n.reset();d.clearPostalSelection();
d.clearCountrySelection();d.clearCitySelection();f=c.next().html();a.$("#"+b.IDs.ADDRESS_SUCCESS_PLACEHOLDER).html(f);c.blur();g.almBrandId&&g.storeRegionId?(l.now("packardGlowStoreName").execute("setStoreContext",function(a){a&&(g.storeContext=a)}),g.deviceType="web",n.getConflictSummary({data:g,updateDestination:G,hideWidget:d.hideWidget})):G(g)}});a.on("a:dropdown:GLUXCityList:select",function(f){f=f.value;var c=a.$("#"+b.IDs.CITY_VALUE).text(),h={locationType:e.TYPE_CITY,city:f,cityName:c};n.reset();
d.clearAddressSelection();d.clearAndReselectCityDropdown(f);d.clearPostalSelection();d.clearCountrySelection();a.$("#"+b.IDs.ADDRESS_SUCCESS_PLACEHOLDER).html(c);r(h,e.TYPE_CITY)});a.on("a:dropdown:GLUXCountryList:select",function(f){f=f.value;var c=a.$("#"+b.IDs.COUNTRY_VALUE).text(),g;2<f.length?(g=h.mapRegionCodeToLocationData(f))||(g={locationType:e.TYPE_REGION,addressLabel:f,countryCode:b.COUNTRY_CODE}):g={locationType:e.TYPE_COUNTRY,district:f,countryCode:f};n.reset();d.clearPostalSelection();
d.clearAddressSelection();d.clearAndReselectCountryDropdown(f);a.$("#"+b.IDs.ADDRESS_SUCCESS_PLACEHOLDER).html(c);r(g,e.TYPE_COUNTRY)});a.declarative(b.ACTIONS.MOBILE_BACK,"click touchstart",function(){d.restoreWidget(!0)});a.declarative(b.ACTIONS.MOBILE_CLOSE,"click touchstart",function(){d.hideWidget();c.logEvent(c.getEvents().view.close)});a.declarative(b.ACTIONS.DELIVERY_TAB,"click",function(){v(b.IDs.LINKS_DELIVERY,b.IDs.LINKS_PICKUP);c.logEvent(c.getEvents().click.tabChangeDelivery)});a.declarative(b.ACTIONS.DELIVERY_TAB,
"keyup",function(a){13===a.$event.which&&(v(b.IDs.LINKS_DELIVERY,b.IDs.LINKS_PICKUP),c.logEvent(c.getEvents().click.tabChangeDelivery))});a.declarative(b.ACTIONS.PICKUP_TAB,"click",function(){v(b.IDs.LINKS_PICKUP,b.IDs.LINKS_DELIVERY);c.logEvent(c.getEvents().click.tabChangePickup)});a.declarative(b.ACTIONS.PICKUP_TAB,"keyup",function(a){13===a.$event.which&&(v(b.IDs.LINKS_PICKUP,b.IDs.LINKS_DELIVERY),c.logEvent(c.getEvents().click.tabChangePickup))});a.declarative(b.ACTIONS.MORE_LINK,"click",function(){p=
B(b.IDs.ADDRESS_LIST,b.IDs.MORE_LINK,p,D);c.logEvent(c.getEvents().click.seeMore)});a.declarative(b.ACTIONS.MORE_LINK,"keyup",function(f){13===f.$event.which&&a.$("#"+b.IDs.MORE_LINK).click()});a.declarative(b.ACTIONS.MORE_LINK_DELIVERY,"click",function(){t=B(b.IDs.ADDRESS_LIST_DELIVERY,b.IDs.MORE_LINK_DELIVERY,t,w);c.logEvent(c.getEvents().click.seeMoreDelivery)});a.declarative(b.ACTIONS.MORE_LINK_DELIVERY,"keyup",function(f){13===f.$event.which&&a.$("#"+b.IDs.MORE_LINK_DELIVERY).click()});a.declarative(b.ACTIONS.MORE_LINK_PICKUP,
"click",function(){z=B(b.IDs.ADDRESS_LIST_PICKUP,b.IDs.MORE_LINK_PICKUP,z,x);c.logEvent(c.getEvents().click.seeMorePickup)});a.declarative(b.ACTIONS.MORE_LINK_PICKUP,"keyup",function(f){13===f.$event.which&&a.$("#"+b.IDs.MORE_LINK_PICKUP).click()});a.declarative(b.ACTIONS.MANAGE_ADDRESS_BOOK_LINK,"click touchstart",function(){k.location.href=E;c.logEvent(c.getEvents().click.manageAddressBook)});a.declarative(b.ACTIONS.MANAGE_ADDRESS_BOOK_LINK,"keyup",function(a){13===a.$event.which&&(k.location.href=
E,c.logEvent(c.getEvents().click.manageAddressBook))});a.declarative(b.ACTIONS.SPECIFY_LOCATION_LINK,"click",function(){v(b.IDs.SPECIFY_LOCATION_DIV,b.IDs.SPECIFY_LOCATION_LINK);c.logEvent(c.getEvents().click.showSpecifyLocation)});a.declarative(b.ACTIONS.SPECIFY_LOCATION_LINK,"keyup",function(f){13===f.$event.which&&a.$("#"+b.IDs.SPECIFY_LOCATION_LINK).click()});a.declarative(b.ACTIONS.POSTAL_UPDATE,"click touchstart",function(){var f=a.$(A);if(2===f.length){var c;c=[];for(var h=0;h<f.length;h++){var g=
y(a.$(f[h]).val().toUpperCase());c.push(g);a.$(f[h]).attr("value",g)}f=y(a.$("#"+b.IDs.ZIP_DELIMITER).text()||"");c=c.join(f);f={locationType:e.TYPE_LOCATION_INPUT,zipCode:c}}else c=y(a.$("#"+b.IDs.ZIP_UPDATE_INPUT).val()),f={locationType:e.TYPE_LOCATION_INPUT,zipCode:c},a.$("#"+b.IDs.ZIP_UPDATE_INPUT).attr("value",c);n.reset();d.clearAddressSelection();d.clearCountrySelection();a.$("#"+b.IDs.ADDRESS_SUCCESS_PLACEHOLDER).html(c);a.$("#"+b.IDs.ZIP_BUTTON).removeClass("a-button-focus");q&&a.$("#"+b.IDs.ZIP_CONFIRMATION_VALUE).html(c);
r(f,e.TYPE_POSTAL_CODE)});a.declarative(b.ACTIONS.POSTAL_INPUT,"keyup",function(f){var d=a.$(A);if(13===f.$event.which)a.$("#"+b.IDs.ZIP_BUTTON).find("input").click(),c.logEvent(c.getEvents().click.keypressEnterPostal);else if(2===d.length){var e=a.$(d[0]),h=a.$(d[1]);f=f.$event.which;String.fromCharCode(f).match(/\w/)?(d=a.$(A),2===d.length&&(f=parseInt(e.attr("maxlength"),10),e=e.val().length,f===e&&h.focus())):8===f&&0===h.val().length&&e.focus()}});a.declarative(b.ACTIONS.MOBILE_COUNTRY_SELECT,
"click",function(a){var b=a.data.value,b={locationType:e.TYPE_COUNTRY,district:b,countryCode:b};a.$currentTarget.addClass("a-active");d.clearPostalSelection();n.reset();d.clearAddressSelection();d.clearAndReselectCountryDropdown(a);r(b,e.TYPE_COUNTRY)});a.on("a:popover:beforeHide:glow-modal",function(){d.restoreWidget();c.logEvent(c.getEvents().view.close);t=z=p=u;n.substitute()});a.declarative(b.ACTIONS.MOBILE_CITY_SELECT,"click",function(a){var b={locationType:e.TYPE_CITY,city:a.data.value,cityName:a.data.name};
a.$currentTarget.addClass("a-active");n.reset();d.clearAddressSelection();d.clearAndReselectCityDropdown(a);d.clearPostalSelection();d.clearCountrySelection();r(b,e.TYPE_CITY)});a.declarative(b.IDs.MOBILE_CITY_LINK,"touchend",function(a){a.$event.stopPropagation();a.$event.preventDefault();d.showCitySelection();c.logEvent(c.getEvents().click.citySelector)});a.declarative(b.IDs.MOBILE_POSTAL_CODE_LINK,"touchend",function(a){a.$event.stopPropagation();a.$event.preventDefault();d.showZipCodeInput();
c.logEvent(c.getEvents().click.postalInput)});a.declarative(b.IDs.MOBILE_COUNTRY_LINK,"touchend",function(a){a.$event.stopPropagation();a.$event.preventDefault();d.showCountrySelection();c.logEvent(c.getEvents().click.countrySelector)});a.declarative(b.ACTIONS.SIGNIN,"click touchstart",function(){var a=H+k.location.pathname,b=k.ue_pty;if("Search"===b||"Detail"===b)a+=k.location.search;k.location.href=a;c.logEvent(c.getEvents().click.signIn)});a.declarative(b.ACTIONS.CHANGE_POSTAL_CODE_LINK,"click",
function(){d.replacePostalCodeConfirmationWithInput();c.logEvent(c.getEvents().click.changePostalCodeFromConfirm)});a.declarative(b.ACTIONS.CHANGE_POSTAL_CODE_LINK,"keyup",function(c){13===c.$event.which&&a.$("#"+b.IDs.CHANGE_POSTAL_CODE_LINK).click()});return{STATIC_DEVICE_TYPE:"web",updateDestination:r,sanitize:y}});l.declare("GLUXConfig",{SIGNIN_URL:"/gp/sign-in.html?ie\x3dUTF8\x26useRedirectOnSuccess\x3d1\x26path\x3d",ADDRESS_BOOK_URL:"/a/addresses",POSTAL_CODE_TO_CITY_LOOKUP_BASE_URL:"/gp/glow/lookup-zipcode.html?"});
l.when("A").execute(function(a){a.on("a:popover:ajaxSuccess:glow-modal",function(a){var b=a.popover;l.when("A","a-modal","GLUXWidget").execute("gluxWidgetInit",function(a,h,e){b.isActive()&&1==b.$container.length&&(a=b.$container[0].getElementsByClassName("a-popover-header-content"),1==a.length&&(a=a[0])&&e.GLOW_TITLE&&(a.innerText=e.GLOW_TITLE))})})});l.when("A","a-modal","GLUXWidget","GLUXRefreshController","GLUXMetrics","GLUXWeblabUtil","LocationTypes","GLUXCartConflict").register("GLUXWidgetController",
function(a,g,b,d,h,e,c,k){function n(){g.get(a.$("#nav-global-location-slot")).hide()}function q(){a.$("#"+b.IDs.ZIP_INPUT_SECTION).hide();a.$("#"+b.IDs.ZIP_CONFIRMATION_SECTION).show()}function m(){a.$("#"+b.IDs.ZIP_CONFIRMATION_SECTION).hide();a.$("#"+b.IDs.ZIP_INPUT_SECTION).show()}function w(){[b.IDs.ADDRESS_LIST,b.IDs.ADDRESS_LIST_DELIVERY,b.IDs.ADDRESS_LIST_PICKUP].forEach(function(b){a.$("#"+b).find("input[disabled]").each(function(){this.removeAttribute("disabled");a.$(this).parent().parent().removeClass("a-button-focus");
a.$(this).parent().parent().removeClass("a-button-selected")})})}function x(c){var e=g.get(a.$("#nav-global-location-slot")),d=e.getContent();if(d){var k=d.prop("innerHTML"),l=e.attrs("header");c&&(a.$("#"+b.IDs.SUCCESS_SUB_TEXT).addClass("GLUX_Hidden"),a.$("#"+b.IDs.SUCCESS_SUB_TEXT_AIS_EGRESS).removeClass("GLUX_Hidden"));c=a.$("#"+b.IDs.SUCCESS_DIALOG).clone().removeClass("GLUX_Hidden").prop("outerHTML");var q=a.$("#"+b.IDs.SUCCESS_FOOTER).prop("innerHTML"),p=b.CONFIRM_HEADER;0<a.$(d).find("#GLUXHiddenSuccessDialog").length&&
(a.state.replace("GLUXInfo",{oldContent:k,oldHeader:l}),e.update({content:c,footer:q,width:375,header:p}),a.declarative("GLUXConfirmAction","click",n))}else h.logEvent(h.getEvents().error.missingContent)}var p=e.doesWeblabMatchTreatment("PACKARD_GLOBAL_DESKTOP_124721",e.TREATMENTS.T1);return{handleLocationUpdateResponse:function(g,m,u){if(g)e.doesWeblabMatchTreatment("F3_CART_CONFLICT_243249",e.TREATMENTS.T1)&&e.doesWeblabMatchTreatment("F3_CART_CONFLICT_WEB_REFACTOR_306057",e.TREATMENTS.T1)&&u===
c.TYPE_ADDRESS_ID&&k.resolve(),p?m?(x(m),d.subscribeAfterHidePopoverEvent()):("POSTAL_CODE"===u&&q(),l.when("CondoEvents").execute(function(b){a.trigger(b.FEATURE_NOTIFY,"AddressList","CustomerIntent")})):m?(x(m),d.subscribeAfterHidePopoverEvent()):(n(),l.when("CondoEvents").execute(function(b){a.trigger(b.FEATURE_NOTIFY,"AddressList","CustomerIntent")})),h.logLocationChange(u);else switch(u){case "ADDRESS_ID":a.$("#"+b.IDs.ADDRESS_SET_ERROR).show();h.logEvent(h.getEvents().error.addressSelection);
break;case "POSTAL_CODE":a.$("#"+b.IDs.ZIP_ERROR).show();h.logEvent(h.getEvents().error.postalInput);break;case "COUNTRY":a.$("#"+b.IDs.ADDRESS_SET_ERROR).show();h.logEvent(h.getEvents().error.addressSelection);break;case "POSTAL_CODE_WITH_CITY":a.$("#"+b.IDs.POSTAL_CODE_WITH_CITY_ERROR_MSG).removeClass("GLUX_Hidden"),h.logEvent(h.getEvents().error.postalCodeWithCityInput)}},resetErrors:function(){a.$("#"+b.IDs.ADDRESS_SET_ERROR).hide();a.$("#"+b.IDs.ZIP_ERROR).hide()},restoreWidget:function(){l.when("CondoAPI").execute(function(a){a.restoreTakeover()})},
hideWidget:n,resetAddressRowState:w,clearAddressSelection:function(){[b.IDs.ADDRESS_LIST,b.IDs.ADDRESS_LIST_DELIVERY,b.IDs.ADDRESS_LIST_PICKUP].forEach(function(b){a.$("#"+b+" li\x3espan\x3espan").removeClass("a-button-selected");a.$("#"+b+" li\x3espan\x3espan").removeClass("a-button-focus")});w()},clearPostalSelection:function(){p&&m();var c="input[id^\x3d"+b.IDs.ZIP_UPDATE_INPUT+"]";a.$(c).val("");a.$(c).attr("value","")},clearCountrySelection:function(){var c=b.COUNTRY_LIST_PLACEHOLDER;a.$("#"+
b.IDs.COUNTRY_VALUE).text(c);a.$("#"+b.IDs.COUNTRY_LIST_DROPDOWN).removeClass("a-button-focus")},clearCitySelection:function(){var c=b.CITY_LIST_PLACEHOLDER;a.$("#"+b.IDs.CITY_VALUE).text(c);a.$("#"+b.IDs.CITY_LIST_DROPDOWN).removeClass("a-button-focus")},clearAndReselectCountryDropdown:function(c){a.$("#"+b.IDs.COUNTRY_LIST+' optgroup option[selected\x3d"selected"]').each(function(){a.$(this).removeAttr("selected")});(c=a.$("#"+b.IDs.COUNTRY_LIST+' optgroup option[value\x3d"'+c+'"]'))&&a.$(c).attr("selected",
"selected")},clearAndReselectCityDropdown:function(c){a.$("#"+b.IDs.CITY_LIST+' optgroup option[selected\x3d"selected"]').each(function(){a.$(this).removeAttr("selected")});(c=a.$("#"+b.IDs.CITY_LIST+' optgroup option[value\x3d"'+c+'"]'))&&a.$(c).attr("selected","selected")},replacePostalCodeInputWithConfirmation:q,replacePostalCodeConfirmationWithInput:m}});l.when("A").register("GLUXRefreshController",function(a){function g(){a.trigger("packard:glow:destinationChangeNav")}return{notifyDestinationChangeNav:g,
subscribeAfterHidePopoverEvent:function(){a.on("a:popover:afterHide:glow-modal",function(){g();a.off("a:popover:afterHide:glow-modal")})},getAfterHidePopoverEvent:"a:popover:afterHide:glow-modal"}});"use strict";l.when("A","jQuery","GLUXMetrics","GLUXWeblabUtil").register("GLUXCartConflict",function(a,g,b,d){function h(){var a="storeRegionId addressId almBrandId deviceType locationType storeContext".split(" ");return null!=e&&a.every(function(a){return e.hasOwnProperty(a)})}var e=null,c=!0,l=d.doesWeblabMatchTreatment("PACKARD_GLOBAL_DESKTOP_124721",
d.TREATMENTS.T1);return{reset:function(){e=null;c=!0},getConflictSummary:function(d){e=d.data;h()?a.post("/afx/cartconflicts/getconflictsummary",{timeout:5E3,success:function(a){!1===a.isSuccess||!1===a.canShopRegion||!1===a.hasConflicts?(c=!1,d.updateDestination(e)):(c=!0,l||d.hideWidget())},error:function(){b.logEvent(b.getEvents().cartConflict.getSummaryError);d.updateDestination(e)},params:{newRegionId:e.storeRegionId,newAddressId:e.addressId,brandId:e.almBrandId,client:"glow"}}):(b.logEvent(b.getEvents().cartConflict.validateDataError),
d.updateDestination(e))},resolve:function(){h()&&a.post("/afx/cartconflicts/resolve",{timeout:5E3,success:function(){b.logEvent(b.getEvents().cartConflict.resolveSuccess)},error:function(){b.logEvent(b.getEvents().cartConflict.resolveError)},params:{newRegionId:e.storeRegionId,newAddressId:e.addressId,brandId:e.almBrandId,client:"glow"}})},substitute:function(){try{if(h()&&c){var a=g.param({newRegionId:e.storeRegionId,newAddressId:e.addressId,brandId:e.almBrandId,client:"glow",deviceType:e.deviceType,
locationType:e.locationType,storeContext:e.storeContext,sourceUrl:k.location.pathname+k.location.search});b.logEvent(b.getEvents().cartConflict.substituteSuccess);k.location.href="/afx/cartconflicts/resolve/substitute?"+a}}catch(d){b.logEvent(b.getEvents().cartConflict.substituteError)}}}});l.when("A","GLUXWidget").register("LocationTypes",function(a,g){return{TYPE_LOCATION_INPUT:"LOCATION_INPUT",TYPE_DEFAULT_ADDRESS:"DEFAULT_ADDRESS",TYPE_ACCOUNT_ADDRESS:"ACCOUNT_ADDRESS",TYPE_ADDRESS_ID:"ADDRESS_ID",
TYPE_POSTAL_CODE:"POSTAL_CODE",TYPE_POSTAL_CODE_WITH_CITY:"POSTAL_CODE_WITH_CITY",TYPE_GPS_INPUT:"GPS_INPUT",TYPE_COUNTRY:"COUNTRY",TYPE_CITY:"CITY",TYPE_REGION:"REGION",TYPE_PCD:"PCD"}});l.when("A","GLUXWidget","LocationTypes").register("GLUXRegionData",function(a,g,b){var d={"FR-CH":{countryCode:"FR",zipCode:"20000"}};return{getRegions:function(){return d},mapRegionCodeToLocationData:function(a){a=d.hasOwnProperty(a)?{addressLabel:a,countryCode:d[a].countryCode,zipCode:d[a].zipCode,locationType:b.TYPE_REGION}:
null;return a}}});l.when("A","ready","navCF").execute(function(a){a=a.$;var g=k.ue_pty;if(g&&("Detail"===g||"DetailAW"===g)&&0!==a("#glow-ingress-block").length&&(g=a("#addToCart"),0!==g.length)){if(0===a("#addToCart input[name\x3ddropdown-selection]").length){var b=a("#nav-global-location-slot #unifiedLocation1ClickAddress");0!==b.length&&b.clone().attr("id","cartAddressNew").appendTo(g)}0===a("#addToCart input[name\x3ddropdown-selection-ubb]").length&&(a=a("#nav-global-location-slot #ubbShipTo"),
0!==a.length&&a.clone().attr("id","cartAddressUsed").appendTo(g))}});l.when("A","GLUXWidget").register("GLUXMetrics",function(a){function g(a,b){k.ueLogError&&a&&k.ueLogError({message:a},{logLevel:b||"ERROR",attribution:"GLOW"})}function b(a){k.ue?k.ue.count(a,(k.ue.count(a)||0)+1):g("Failed to increment metrics counter: "+a+" because window.ue is not present.","ERROR")}var d={click:{signIn:"click.signIn",seeMore:"click.seeMore",seeMoreDelivery:"click.seeMoreDelivery",seeMorePickup:"click.seeMorePickup",
tabChangeDelivery:"click.tabDelivery",tabChangePickup:"click.tabPickup",postalInput:"click.postalInput",postalCodeWithCityInput:"click.postalCodeWithCityInput",gpsInput:"click.gpsInput",countrySelector:"click.countrySelector",citySelector:"click.citySelector",keypressEnterPostal:"click.keypressEnterPostal",manageAddressBook:"click.manageAddressBook",showSpecifyLocation:"click.showSpecifyLocation",changePostalCodeFromConfirm:"click.changePostalCodeFromConfirm",freshPickupLocationC:"click.freshPickupLocationC",
freshPickupLocationT1:"click.freshPickupLocationT1"},postalCodeLookup:{ajaxSuccessWithValidResponse:"postalCodeLookup.ajaxSuccessWithValidResponse",ajaxSuccessWithEmptyCityListOrErrorMessage:"postalCodeLookup.ajaxSuccessWithEmptyCityListOrErrorMessage",ajaxFailure:"postalCodeLookup.ajaxFailure"},view:{open:"view.open",close:"view.close"},error:{addressSelection:"error.addressSelection",postalInput:"error.postalInput",postalCodeWithCityInput:"error.postalCodeWithCityInput",gpsInput:"error.gpsInput",
missingContent:"error.getContent",pcdInput:"error.pcdInput"},cartConflict:{getSummarySuccess:"success.cartConflict.getConflictSummary",getSummaryError:"error.cartConflict.getConflictSummary",resolveSuccess:"success.cartConflict.resolve",resolveError:"error.cartConflict.resolve",substituteSuccess:"success.cartConflict.substitute",substituteError:"error.cartConflict.substitute",validateDataError:"error.cartConflict.data"},locationChange:"locationChange"};return{getPageType:function(){return k.ue_pty},
getEvents:function(){return d},logLocationChange:function(a){b("GLOW."+d.locationChange+"."+a)},logEvent:function(a){b("GLOW."+a)},logError:function(a,b){g(a,b)}}});l.when("A","GLUXWidget").register("GLUXWeblabUtil",function(a,g){return{TREATMENTS:{C:"C",T1:"T1",T2:"T2"},doesWeblabMatchTreatment:function(a,d){return g.WEBLABS&&g.WEBLABS[a]===d}}})});
/* ******** */
(function(u){var v=window.AmazonUIPageJS||window.P,y=v._namespace||v.attributeErrors,H=y?y("AssociatesSiteStripeJS",""):v;H.guardFatal?H.guardFatal(u)(H,window):H.execute(function(){u(H,window)})})(function(u,v,y){var H=H||function(b,t){var r={},h=r.lib={},f=function(){},q=h.Base={extend:function(a){f.prototype=this;var c=new f;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();
a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},a=h.WordArray=q.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=t?c:4*a.length},toString:function(a){return(a||e).stringify(this)},concat:function(a){var c=this.words,d=a.words,l=this.sigBytes;a=a.sigBytes;this.clamp();if(l%4)for(var b=0;b<a;b++)c[l+
b>>>2]|=(d[b>>>2]>>>24-b%4*8&255)<<24-(l+b)%4*8;else if(65535<d.length)for(b=0;b<a;b+=4)c[l+b>>>2]=d[b>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<32-c%4*8;a.length=b.ceil(c/4)},clone:function(){var a=q.clone.call(this);a.words=this.words.slice(0);return a},random:function(c){for(var d=[],l=0;l<c;l+=4)d.push(4294967296*b.random()|0);return new a.init(d,c)}}),g=r.enc={},e=g.Hex={stringify:function(a){var c=a.words;
a=a.sigBytes;for(var d=[],l=0;l<a;l++){var b=c[l>>>2]>>>24-l%4*8&255;d.push((b>>>4).toString(16));d.push((b&15).toString(16))}return d.join("")},parse:function(c){for(var d=c.length,l=[],b=0;b<d;b+=2)l[b>>>3]|=parseInt(c.substr(b,2),16)<<24-b%8*4;return new a.init(l,d/2)}},c=g.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],l=0;l<a;l++)d.push(String.fromCharCode(c[l>>>2]>>>24-l%4*8&255));return d.join("")},parse:function(c){for(var d=c.length,l=[],b=0;b<d;b++)l[b>>>2]|=(c.charCodeAt(b)&
255)<<24-b%4*8;return new a.init(l,d)}},p=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(c.stringify(a)))}catch(d){throw Error("Malformed UTF-8 data");}},parse:function(a){return c.parse(unescape(encodeURIComponent(a)))}},l=h.BufferedBlockAlgorithm=q.extend({reset:function(){this._data=new a.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=p.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(c){var d=this._data,l=d.words,h=d.sigBytes,
e=this.blockSize,g=h/(4*e),g=c?b.ceil(g):b.max((g|0)-this._minBufferSize,0);c=g*e;h=b.min(4*c,h);if(c){for(var f=0;f<c;f+=e)this._doProcessBlock(l,f);f=l.splice(0,c);d.sigBytes-=h}return new a.init(f,h)},clone:function(){var a=q.clone.call(this);a._data=this._data.clone();return a},_minBufferSize:0});h.Hasher=l.extend({cfg:q.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){l.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},
finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(c,d){return(new a.init(d)).finalize(c)}},_createHmacHelper:function(a){return function(c,l){return(new d.HMAC.init(a,l)).finalize(c)}}});var d=r.algo={};return r}(Math);(function(b){function t(a,c,b,h,e,g,f){a=a+(c&b|~c&h)+e+f;return(a<<g|a>>>32-g)+c}function r(a,c,b,h,g,e,f){a=a+(c&h|b&~h)+g+f;return(a<<e|a>>>32-e)+c}function h(a,c,b,h,e,g,f){a=a+(c^b^h)+e+f;return(a<<g|a>>>32-
g)+c}function f(a,c,b,h,g,e,f){a=a+(b^(c|~h))+g+f;return(a<<e|a>>>32-e)+c}for(var q=H,a=q.lib,g=a.WordArray,e=a.Hasher,a=q.algo,c=[],p=0;64>p;p++)c[p]=4294967296*b.abs(b.sin(p+1))|0;a=a.MD5=e.extend({_doReset:function(){this._hash=new g.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,d){for(var b=0;16>b;b++){var e=d+b,g=a[e];a[e]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}var b=this._hash.words,e=a[d+0],g=a[d+1],q=a[d+2],p=a[d+3],B=a[d+4],D=a[d+5],F=a[d+6],z=a[d+
7],G=a[d+8],x=a[d+9],w=a[d+10],C=a[d+11],v=a[d+12],J=a[d+13],u=a[d+14];a=a[d+15];d=b[0];var k=b[1],m=b[2],n=b[3];d=t(d,k,m,n,e,7,c[0]);n=t(n,d,k,m,g,12,c[1]);m=t(m,n,d,k,q,17,c[2]);k=t(k,m,n,d,p,22,c[3]);d=t(d,k,m,n,B,7,c[4]);n=t(n,d,k,m,D,12,c[5]);m=t(m,n,d,k,F,17,c[6]);k=t(k,m,n,d,z,22,c[7]);d=t(d,k,m,n,G,7,c[8]);n=t(n,d,k,m,x,12,c[9]);m=t(m,n,d,k,w,17,c[10]);k=t(k,m,n,d,C,22,c[11]);d=t(d,k,m,n,v,7,c[12]);n=t(n,d,k,m,J,12,c[13]);m=t(m,n,d,k,u,17,c[14]);k=t(k,m,n,d,a,22,c[15]);d=r(d,k,m,n,g,5,c[16]);
n=r(n,d,k,m,F,9,c[17]);m=r(m,n,d,k,C,14,c[18]);k=r(k,m,n,d,e,20,c[19]);d=r(d,k,m,n,D,5,c[20]);n=r(n,d,k,m,w,9,c[21]);m=r(m,n,d,k,a,14,c[22]);k=r(k,m,n,d,B,20,c[23]);d=r(d,k,m,n,x,5,c[24]);n=r(n,d,k,m,u,9,c[25]);m=r(m,n,d,k,p,14,c[26]);k=r(k,m,n,d,G,20,c[27]);d=r(d,k,m,n,J,5,c[28]);n=r(n,d,k,m,q,9,c[29]);m=r(m,n,d,k,z,14,c[30]);k=r(k,m,n,d,v,20,c[31]);d=h(d,k,m,n,D,4,c[32]);n=h(n,d,k,m,G,11,c[33]);m=h(m,n,d,k,C,16,c[34]);k=h(k,m,n,d,u,23,c[35]);d=h(d,k,m,n,g,4,c[36]);n=h(n,d,k,m,B,11,c[37]);m=h(m,
n,d,k,z,16,c[38]);k=h(k,m,n,d,w,23,c[39]);d=h(d,k,m,n,J,4,c[40]);n=h(n,d,k,m,e,11,c[41]);m=h(m,n,d,k,p,16,c[42]);k=h(k,m,n,d,F,23,c[43]);d=h(d,k,m,n,x,4,c[44]);n=h(n,d,k,m,v,11,c[45]);m=h(m,n,d,k,a,16,c[46]);k=h(k,m,n,d,q,23,c[47]);d=f(d,k,m,n,e,6,c[48]);n=f(n,d,k,m,z,10,c[49]);m=f(m,n,d,k,u,15,c[50]);k=f(k,m,n,d,D,21,c[51]);d=f(d,k,m,n,v,6,c[52]);n=f(n,d,k,m,p,10,c[53]);m=f(m,n,d,k,w,15,c[54]);k=f(k,m,n,d,g,21,c[55]);d=f(d,k,m,n,G,6,c[56]);n=f(n,d,k,m,a,10,c[57]);m=f(m,n,d,k,F,15,c[58]);k=f(k,m,
n,d,J,21,c[59]);d=f(d,k,m,n,B,6,c[60]);n=f(n,d,k,m,C,10,c[61]);m=f(m,n,d,k,q,15,c[62]);k=f(k,m,n,d,x,21,c[63]);b[0]=b[0]+d|0;b[1]=b[1]+k|0;b[2]=b[2]+m|0;b[3]=b[3]+n|0},_doFinalize:function(){var a=this._data,c=a.words,g=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var h=b.floor(g/4294967296);c[(e+64>>>9<<4)+15]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;c[(e+64>>>9<<4)+14]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;a.sigBytes=4*(c.length+1);this._process();a=this._hash;c=a.words;
for(g=0;4>g;g++)e=c[g],c[g]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;return a},clone:function(){var a=e.clone.call(this);a._hash=this._hash.clone();return a}});q.MD5=e._createHelper(a);q.HmacMD5=e._createHmacHelper(a)})(Math);"use strict";u.when("A","amzn-ss-app-config").register("amzn-ss-link-id",function(b,t){var r=function(b){if("string"!==typeof b.tag)throw Error("Invalid Tag");var f=b.linkCode,q=b.toolCreation,a=parseInt(t.getMarketplaceId(),10),g={p_parameter:"SS v2",test_name:t.getTestName()},
e,c;if("string"!==typeof f||2>f.length||3<f.length)throw Error("Invalid LinkCode");if("string"!==typeof q||null===q.match(/^(AC|SS|Pubstudio|Feeds|PAAPI)$/i))throw Error("Invalid ToolCreation");if(isNaN(a))throw Error("Invalid Marketplace");f=t.getForesterAssocLinksUrl();for(e in b)b.hasOwnProperty(e)&&(g[e]=b[e]);g.createTime=(new Date).getTime();try{c=H.MD5(JSON.stringify(g)).toString()}catch(r){c="z7b5638deb81af5805803e8dc94cfdez"}this.linkId=c;b={linkId:c,trackingParams:g,_v:1};(new Image).src=
f+encodeURIComponent(JSON.stringify(b));this.get=function(){return this.linkId}};return{get:function(b){return(new r(b)).get()}}});"use strict";u.when("A").register("amzn-ss-make-xhr",function(b){var t=b.$;return{makeXHR:function(b){t.ajax({url:b.url,timeout:b.timeout?b.timeout:3E3,data:b.data,method:b.methodType,dataType:b.dataType,cache:b.cache,success:function(b){return function(f){b.successCBArgs.push(f);b.successCB.apply(y,b.successCBArgs)}}(b),error:function(b){return function(f,q,a){b.failureCBArgs.push(f);
b.failureCBArgs.push(q);b.failureCBArgs.push(a);b.failureCB.apply(y,b.failureCBArgs)}}(b)})}}});"use strict";u.when("A","amzn-ss-app-config","amzn-ss-make-xhr").register("amzn-ss-third-party-module",function(b,t,r){var h=function(f,a){f.status=a?a.status:0;b.trigger("amzn-ss-third-party-excluded-asin-callback",f)},f=function(f,a,g,e){f.status=0;b.trigger("amzn-ss-third-party-excluded-asin-callback",f)};return{isThirdPartyExcludedAsin:function(b){r.makeXHR({url:"/associates/sitestripe/validateAsin",
methodType:"GET",data:{asin:b.asin,marketplaceId:t.getMarketplaceId()},dataType:"json",successCB:h,failureCB:f,successCBArgs:[b],failureCBArgs:[b]})}}});"use strict";u.when("A","ready").register("amzn-ss-widget-utils",function(b){var t=b.$;return{toggleCheckbox:function(b,h){h=t("#"+h);var f=h.find("i"),q=h.find("input");b?(h.attr("aria-checked","true"),f.removeClass("a-icon-checkbox-inactive"),f.addClass("a-icon-checkbox-active"),q.attr("checked","checked")):(h.attr("aria-checked","false"),f.removeClass("a-icon-checkbox-active"),
f.addClass("a-icon-checkbox-inactive"),q.removeAttr("checked"))},toggleRadioButton:function(b,h){h=t("#"+h);var f=h.find("i"),q=h.find("input");b?(h.attr("aria-checked","true"),f.removeClass("a-icon-radio-inactive"),f.addClass("a-icon-radio-active")):(h.attr("aria-checked","false"),f.removeClass("a-icon-radio-active"),f.addClass("a-icon-radio-inactive"));q.attr("checked",b)},isCheckboxChecked:function(b){return"true"===t("#"+b).attr("aria-checked")?!0:!1},isRadioButtonChecked:function(b){return"true"===
t("#"+b).attr("aria-checked")?!0:!1}}});"use strict";u.when("twisterModule","amzn-ss-store-tag").execute(function(b,t){b=b.getState();b!==y&&t.setTwisterState(b)});"use strict";u.when("A","amzn-ss-app-config","amzn-ss-store-tag","amzn-ss-make-xhr","ready").execute(function(b,t,r,h){b=b.$;var f=t.getForesterPublisherStudioUrl(),q=function(a){var b=r.getGlobalStoreTag();return{pParameter:"SS v2",testName:t.getTestName(),storeId:b.storeId,trackingId:b.trackingId,marketplaceId:t.getMarketplaceId(),asin:r.getAsin(),
url:v.location.href,toolCreation:"SS",createTime:(new Date).getTime(),event:a.dataset.eventName}};b("body").delegate(".amzn-ss-wrap-content","click",function(a){(a=a.target)&&a.dataset&&a.dataset.eventName&&(a=q(a),h.makeXHR({url:f+encodeURIComponent(JSON.stringify(a)),methodType:"GET",dataType:"json",successCB:function(){},failureCB:function(){},successCBArgs:[],failureCBArgs:[]}))})});"use strict";u.when("A","a-dropdown","amzn-ss-app-config","amzn-ss-store-tag","amzn-ss-store-tag-manager","ready").execute(function(b,
t,r,h,f){b=f.getGlobalStore();var q=f.getGlobalTag();if(b===y||""===b.trim())h.populateStoreTagDropdown();else{f=["text","image","text-image"];r=f.length;var a=[],g=[];a[0]=b;g[0]=q;for(b=0;b<r;b++)h.updateDropdown(t.getSelect("amzn-ss-store-id-dropdown-"+f[b]),a),h.updateDropdown(t.getSelect("amzn-ss-tracking-id-dropdown-"+f[b]),g)}});"use strict";u.when("A","amzn-ss-default-store-tag","amzn-ss-make-xhr","ready").register("amzn-ss-store-tag-manager",function(b,t,r){var h=b.$,f={},q=[],a=!1,g=t.getDefaultStoreId(),
e=t.getDefaultTrackingId(),c=function(a,c,b,d,e){a=[a,c,b,d,e];r.makeXHR({url:"/associates/sitestripe/getStoreTagMap",methodType:"GET",data:{marketplaceId:t.getMarketplaceId()},dataType:"json",timeout:8E3,successCB:v,successCBArgs:a,failureCB:E,failureCBArgs:a})},p=function(a,c,b){b&&1===b.status&&(g=a,e=c)},l=function(){},d=function(a,c){a===g&&c===e||r.makeXHR({url:"/associates/sitestripe/setDefaultStoreTag",methodType:"GET",data:{marketplaceId:t.getMarketplaceId(),storeId:a,trackingId:c},dataType:"json",
successCB:p,failureCB:l,successCBArgs:[a,c],failureCBArgs:[]})},A=function(a,c,b){"function"===typeof a&&a.apply(c,b)},v=function(c,l,p,t,F,z){if(z)if(1===z.status){z=z.storeTagMap;var r=0,x=[],w;for(w in z)z.hasOwnProperty(w)&&(x[r++]=w);w=!1;r=g;-1===h.inArray(r,x)&&(r=x[0],w=!0);var C=e,E=z[r];-1===h.inArray(C,E)&&(C=E[0],w=!0);f=z;a=!0;q=x;w&&d(r,C);w=[];switch(t){case "storeArray":w=[x,l];break;case "tagArray":w=F&&-1!==h.inArray(F,x)?[z[F],l]:[[],l];break;case "storeTagMap":w=[z,l]}A(c,p,w)}else 2===
z.status&&(A(c,p,[y,l]),b.trigger("amzn-ss-action-disable-ss"))},E=function(a,c,b,d,e,g,f,l){A(d,g,[y,e,a,c,b])};return{getGlobalStore:function(){return g},getGlobalTag:function(){return e},fetchStores:function(b,d,e){a?A(b,e,[q,d]):c(b,d,e,"storeArray","")},fetchTags:function(b,d,e,g){a?-1===h.inArray(g,q)?A(b,e,[[],d]):A(b,e,[q,d]):c(b,d,e,"tagArray",g)},fetchStoreTagMap:function(b,d,e){a?A(b,e,[f,d]):c(b,d,e,"storeTagMap","")},updateGlobalStoreTag:d,isStoreTagMapAssigned:function(){return a}}});
"use strict";u.when("A","a-popover","amzn-ss-app-config","amzn-ss-make-xhr","ready").register("amzn-ss-sitestripe",function(b,t,r,h){var f=function(a,c,b){v.location.reload(!1)},q=function(a,c){v.location.reload(!1)},a=function(a){v.location.reload(!1)},g=function(a,c,b){v.location.reload(!1)};b.declarative("amzn-ss-action-toggle-ss","click",function(a){a=a.data;h.makeXHR({url:"hide"===a.action?"/associates/sitestripe/hideSiteStripe":"/associates/sitestripe/showSiteStripe",methodType:"GET",data:{marketplaceId:r.getMarketplaceId()},
dataType:"json",successCB:q,failureCB:f,successCBArgs:[a],failureCBArgs:[a]})});b.on("amzn-ss-action-disable-ss",function(){h.makeXHR({url:"/associates/sitestripe/disableSiteStripe",methodType:"GET",data:{marketplaceId:r.getMarketplaceId()},dataType:"json",successCB:a,failureCB:g,successCBArgs:[],failureCBArgs:[]})});return{getLanguagePreferance:function(){var a=r.getLanguageCodeCookieName();return document.cookie.replace(new RegExp("(?:(?:^|.*;\\s*)"+a+"\\s*\\\x3d\\s*([^;]*).*$)|^.*$"),"$1")},addActiveToPopoverContainer:function(a){a.$trigger&&
(a.$trigger.closest("li").addClass("active"),a.$container&&a.$container.addClass(a.$trigger.data("a-class")))},removeActiveFromPopoverContainer:function(a){a.$trigger&&a.$trigger.closest("li").removeClass("active")},getUpdatedUrl:function(){var a=r.getRetailWebsiteUrl(),c=v.location.pathname,c=c.replace(/\/$/,"");-1<c.indexOf("/ref\x3d")&&(c=c.replace(/(\/ref=)[^?"]+/ig,""));a+=c+"/ref\x3d__REFTAG__";if(1==!!document.documentMode){var c=decodeURIComponent(v.location.search),b=[/(&?language=)[^&"]+/ig,
/(&?linkId=)[^&"]+/ig,/(&?tag=)[^&"]+/ig,/(&?creative=)[^&"]+/ig,/(&?camp=)[^&"]+/ig,/(&?creativeASIN=)[^&"]+/ig,/(&?linkCode=)[^&"]+/ig];if(c)for(var g=0;g<b.length;g++)c=c.replace(b[g],"");else c="?ie\x3dUTF8";c=encodeURI(c)}else c=new URLSearchParams(v.location.search),c.delete("language"),c.delete("linkId"),c.delete("tag"),c.delete("creative"),c.delete("camp"),c.delete("creativeASIN"),c.delete("linkCode"),c="?"+c.toString();return a+c}}});"use strict";u.when("A","a-dropdown","a-button","amzn-ss-app-config",
"amzn-ss-sitestripe","amzn-ss-make-xhr","amzn-ss-store-tag-manager").register("amzn-ss-store-tag",function(b,t,r,h,f,q,a){var g=b.$,e=h.isDetailPage(),c={storeId:a.getGlobalStore(),trackingId:a.getGlobalTag()},p=function(a){return t.getSelect("amzn-ss-store-id-dropdown-"+a)},l=function(a){return t.getSelect("amzn-ss-tracking-id-dropdown-"+a)},d=function(a){var c=r(".amzn-ss-get-link-btn");!0===a?c.enable():c.disable()},A=function(){var a=f.getUpdatedUrl();return"1"!==e?"NA":v(a)},v=function(a){for(var c=
[/\/gp\/product\/([a-zA-Z0-9]{10})/,/\/dp\/([a-zA-Z0-9]{10})/],b=0;b<c.length;b++){var d=c[b].exec(a);if(d)return d[1]}return"NA"},E=function(a,c){for(var b=[],d=a.getOptions().size(),g=0;g<d;g++)b[g]=g;a.removeOptions(b);b=[];for(g=0;g<c.length;g++)b[g]={text:c[g],value:c[g]};a.addOptions(b)},I=function(a,b){if(a){var d=p(b),e=l(b),f=d.val(),h=e.val();a=a[f];f!==y&&a!==y&&"object"===typeof a&&(c.storeId=d.val(),E(e,a),e.setValue(-1===g.inArray(h,a)?a[0]:h),u(b))}},u=function(a){var g=l(a);c.trackingId=
g.val();d(!0);switch(a){case "text":b.trigger("amzn-ss-text-popover-store-tag-updated",c);break;case "image":b.trigger("amzn-ss-image-popover-get-link",c);break;case "text-image":b.trigger("amzn-ss-text-image-popover-get-link",c)}},B=function(a,b){var d=c.storeId,e=c.trackingId,f=p(b);b=l(b);a=a[d];a!==y&&-1!==g.inArray(e,a)&&(f.setValue(d),E(b,a),b.setValue(e))},D=function(a,c){if(a){var b=c.length,d=0,g=[],e;for(e in a)a.hasOwnProperty(e)&&(g[d++]=e);for(d=0;d<b;d++)E(p(c[d]),g),B(a,c[d])}};b.declarative("amzn-ss-get-link",
"click",function(a){b.trigger("amzn-ss-text-popover-get-link",c)});b.on("amzn-ss-store-tag-change-event",B);return{getLongUrlTemplate:function(a){var c=f.getUpdatedUrl(),c=c.replace("__REFTAG__",a);if("1"===e){a=A();var b=v(c),c=a!==b?c.replace(b,a):c}c+="\x26linkCode\x3d__LINKCODE__\x26tag\x3d__TRACKINGID__\x26linkId\x3d__LINKID__";f.getLanguagePreferance()&&(c+="\x26language\x3d__LANGUAGE__");return c},getAsin:A,getGlobalStoreTag:function(){return c},enableGetLinkButton:d,updateDefaultStoreTagAtServer:function(){a.updateGlobalStoreTag(c.storeId,
c.trackingId)},setTwisterState:function(a){},updateDropdown:E,handleStoreDropdownChange:function(c){a.fetchStoreTagMap(I,c)},handleTagDropdownChange:u,populateStoreTagDropdown:function(c){a.isStoreTagMapAssigned()?a.fetchStoreTagMap(D,[c]):a.fetchStoreTagMap(D,["text","image","text-image"])}}});"use strict";u.when("A","a-popover","a-modal","amzn-ss-link-id","amzn-ss-app-config","amzn-ss-store-tag","amzn-ss-widget-utils","amzn-ss-make-xhr","amzn-ss-sitestripe","amzn-ss-third-party-module").register("amzn-ss-text-popover",
function(b,t,r,h,f,q,a,g,e,c){var p=b.$,l=f.isDetailPage();r=f.getStringMap();var d,A=!1,v=!1,E=p("#amzn-ss-text-link"),u=p(".amzn-ss-popover-spinner"),y=p(".amzn-ss-popover-third-party-message"),B=p("#amzn-ss-popover-text-preload-content-container"),D=p(".amzn-ss-popover-link-failure-message"),F=p("#amzn-ss-txt-success-msg"),z=p("#amzn-ss-txt-failure-msg"),G=p("#amzn-ss-txt-update-msg"),x=p("#amzn-ss-loading-spinner"),w=p("#amzn-ss-text-fulllink-textarea"),C=p("#amzn-ss-text-shortlink-textarea"),
K=function(){u.hide();y.hide();D.hide();B.hide()},J=function(){F.hide();z.hide();G.hide();x.hide()},L={name:"amzn-ss-popover-text-preload-content",popoverLabel:r.amzn_ss_popover_title_txt,header:r.amzn_ss_popover_title_txt,activate:"onclick",width:560},k={toolCreation:"SS",adUnitType:"TEXT",adUnitDescription:"Product links Text only link",destinationType:"1"===l?"ASIN":"MULTIPLE",marketplaceId:f.getMarketplaceId()},m=function(){a.toggleRadioButton(!1,"amzn-ss-full-link-radio-button");a.toggleRadioButton(!1,
"amzn-ss-short-link-radio-button")},n=function(a,c){K();c&&!0===c.isOk?null===c.shortUrl?y.show():(B.show(),J(),F.show(),q.enableGetLinkButton(!1),A=!0,w.hide(),C.show(),C.text(c.shortUrl),setTimeout(function(){C.select()},10)):N(a)},N=function(a,c,b,d){K();a?(B.show(),J(),z.show()):D.show()},O=function(c,b){d=q.getLongUrlTemplate(f.getRefTag().textLink);k.store=c.storeId;k.tag=c.trackingId;k.asin=q.getAsin();k.adUnitSubType="ShortLinks";k.linkCode="1"===l?f.getLinkCode().textShortLink_dp:f.getLinkCode().textShortLink_ndp;
c=h.get(k);var p=d.replace("__LINKCODE__",k.linkCode),p=p.replace("__LANGUAGE__",e.getLanguagePreferance()),p=p.replace("__TRACKINGID__",k.tag),p=p.replace("__LINKID__",c);x.show();g.makeXHR({url:"/associates/sitestripe/getShortUrl",methodType:"GET",data:{longUrl:p,marketplaceId:k.marketplaceId},dataType:"json",successCB:n,failureCB:N,successCBArgs:[b],failureCBArgs:[b]});m();a.toggleRadioButton(!0,"amzn-ss-short-link-radio-button");w.hide();C.show()};C.bind("click",function(){p(this).select()});
w.bind("click",function(){p(this).select()});b.declarative("amzn-ss-get-link-shortlink","click",function(c){m();a.toggleRadioButton(!0,"amzn-ss-short-link-radio-button");w.hide();C.show();C.select()});b.declarative("amzn-ss-get-link-fulllink","click",function(c){if(A){A=!1;k.adUnitSubType="FullLinks";k.linkCode="1"===l?f.getLinkCode().textLongLink_dp:f.getLinkCode().textLongLink_ndp;c=h.get(k);var b=d.replace("__LINKCODE__",k.linkCode),b=b.replace("__LANGUAGE__",e.getLanguagePreferance()),b=b.replace("__TRACKINGID__",
k.tag),b=b.replace("__LINKID__",c);w.text(b)}m();a.toggleRadioButton(!0,"amzn-ss-full-link-radio-button");C.hide();w.show();w.select()});b.declarative("amzn-ss-show-text-popover","click",function(a){v||(q.getAsin(),a=t.create(E,L),K(),u.show(),a.show(),O(q.getGlobalStoreTag(),!1))});b.on("a:popover:beforeShow:amzn-ss-popover-text-preload-content",function(a){q.populateStoreTagDropdown("text")});b.on("a:popover:show:amzn-ss-popover-text-preload-content",function(a){v=!0;e.addActiveToPopoverContainer(a.popover)});
b.on("a:popover:afterHide:amzn-ss-popover-text-preload-content",function(a){v=!1;e.removeActiveFromPopoverContainer(a.popover);q.updateDefaultStoreTagAtServer()});b.on("a:dropdown:amzn-ss-store-id-dropdown-text:select",function(a){q.handleStoreDropdownChange("text")});b.on("a:dropdown:amzn-ss-tracking-id-dropdown-text:select",function(a){q.handleTagDropdownChange("text")});b.on("amzn-ss-text-popover-get-link",function(a){O(a,!0)});b.on("amzn-ss-text-popover-store-tag-updated",function(a){J();G.show();
C.text("");w.text("");A=!1})});"use strict";u.when("A","a-popover","amzn-ss-link-id","amzn-ss-app-config","amzn-ss-store-tag","amzn-ss-widget-utils","amzn-ss-sitestripe","amzn-ss-third-party-module").register("amzn-ss-image-popover",function(b,t,r,h,f,q,a,g){var e=b.$,c,p={},l=h.getLinkCode(),d=h.getStringMap(),A=!1,v=e("#amzn-ss-image-link"),E=e(".amzn-ss-popover-spinner"),u=e(".amzn-ss-popover-third-party-message"),M=e(".amzn-ss-popover-link-failure-message"),B=e("#amzn-ss-popover-image-preload-content-container"),
D=e("#amzn-ss-image-textarea"),F=function(){E.hide();u.hide();M.hide();B.hide()},z={name:"amzn-ss-popover-image-preload-content",popoverLabel:d.amzn_ss_popover_title_img,header:d.amzn_ss_popover_title_img,activate:"onclick",width:530},G={toolCreation:"SS",adUnitType:"Image",adUnitSubType:"Product link",destinationType:"ASIN",pageType:"ProductLinks",subPageType:"Individual",marketplaceId:h.getMarketplaceId()},x=function(a,b,d,g){q.toggleRadioButton(!1,"amzn-ss-small-image-radio-button");q.toggleRadioButton(!1,
"amzn-ss-medium-image-radio-button");q.toggleRadioButton(!1,"amzn-ss-large-image-radio-button");q.toggleRadioButton(!0,a);p[b]===y&&(G.linkCode=g,a=r.get(G),g=c.replace(/__LINKCODE__/g,g),g=g.replace(/__LINKID__/g,a),p[b]=g.replace("__IMAGEFORMAT__",b));d&&(e("#amzn-ss-preview-image-link").empty(),e("#amzn-ss-preview-image-link").append(p[b]));D.text(p[b]);setTimeout(function(){D.select()},10)},w=function(b){var d=f.getLongUrlTemplate(h.getRefTag().imageLink);G.store=b.storeId;G.tag=b.trackingId;
G.asin=f.getAsin();p={};b=G.asin;var g=G.tag;c=h.getVendingHtml().imageLink;a.getLanguagePreferance()&&(c=h.getVendingHtmlWithLanguagePreferance().imageLink);c=c.replace("__LONGURL__",d);c=c.replace("__WIDGETSERVERHOST__",h.getWidgetServerHost());c=c.replace("__IMPRESSIONRECORDERURL__",h.getImpressionRecorderUrl());c=c.replace(/__ASIN__/g,b);c=c.replace(/__TRACKINGID__/g,g);c=c.replace(/__LANGUAGE__/g,a.getLanguagePreferance());c=c.replace("__LOCALE__",h.getLocale());c=c.replace("__ASSOCPROGRAMID__",
h.getAssocProgramId());x("amzn-ss-medium-image-radio-button","_SL160_",!0,l.mediumImageLink)};D.bind("click",function(){e(this).select()});d=function(a){switch(a.action){case "amzn-ss-get-small-image":x("amzn-ss-small-image-radio-button","_SL110_",!1,l.smallImageLink);break;case "amzn-ss-get-medium-image":x("amzn-ss-medium-image-radio-button","_SL160_",!1,l.mediumImageLink);break;case "amzn-ss-get-large-image":x("amzn-ss-large-image-radio-button","_SL250_",!1,l.largeImageLink)}};b.declarative("amzn-ss-get-small-image",
"click",d);b.declarative("amzn-ss-get-medium-image","click",d);b.declarative("amzn-ss-get-large-image","click",d);b.declarative("amzn-ss-show-image-popover","click",function(a){if(!A){a=f.getAsin();var c=t.create(v,z);F();E.show();c.show();g.isThirdPartyExcludedAsin({asin:a,$popoverTrigger:v})}});b.on("a:popover:beforeShow:amzn-ss-popover-image-preload-content",function(a){f.populateStoreTagDropdown("image")});b.on("a:popover:show:amzn-ss-popover-image-preload-content",function(c){A=!0;a.addActiveToPopoverContainer(c.popover)});
b.on("a:popover:afterHide:amzn-ss-popover-image-preload-content",function(c){A=!1;a.removeActiveFromPopoverContainer(c.popover);f.updateDefaultStoreTagAtServer()});b.on("a:dropdown:amzn-ss-store-id-dropdown-image:select",function(){f.handleStoreDropdownChange("image")});b.on("a:dropdown:amzn-ss-tracking-id-dropdown-image:select",function(){f.handleTagDropdownChange("image")});b.on("amzn-ss-image-popover-get-link",w);b.on("amzn-ss-third-party-excluded-asin-callback",function(a){if(v===a.$popoverTrigger)switch(F(),
a.status){case 1:w(f.getGlobalStoreTag());B.show();setTimeout(function(){D.select()},10);break;case 2:u.show();break;default:M.show()}})});"use strict";u.when("A","a-popover","a-checkbox","amzn-ss-link-id","amzn-ss-app-config","amzn-ss-store-tag","amzn-ss-sitestripe","amzn-ss-third-party-module").register("amzn-ss-text-image-popover",function(b,t,r,h,f,q,a,g){var e=b.$,c,p=!1,l=f.getStringMap(),d=e("#amzn-ss-text-image-link"),A=e(".amzn-ss-popover-spinner"),v=e(".amzn-ss-popover-third-party-message"),
u=e(".amzn-ss-popover-link-failure-message"),I=e("#amzn-ss-popover-text-image-preload-content-container"),y=e("#amzn-ss-preview-text-image-link"),B=e("#amzn-ss-text-image-textarea"),D=r("#amzn-ss-text-image-open-link-checkbox"),F=r("#amzn-ss-text-image-show-border-checkbox"),z=function(){A.hide();v.hide();u.hide();I.hide()},G={name:"amzn-ss-popover-text-image-preload-content",popoverLabel:l.amzn_ss_popover_title_txt_img,header:l.amzn_ss_popover_title_txt_img,activate:"onclick",width:530},x={toolCreation:"SS",
adUnitType:"Text and Image",adUnitSubType:"Product link widget showing text and image",destinationType:"ASIN",adUnitDescription:"Product link text and image",adUnitScriptType:"Iframe",pageType:"ProductLinks",servedInd:"Y",subPageType:"Individual",linkCode:f.getLinkCode().textImageLink,marketplaceId:f.getMarketplaceId()},w=function(a){a=F.isChecked()?a.replace("__SHOWBORDER__","true"):a.replace("__SHOWBORDER__","false");a=D.isChecked()?a.replace("__OPENINNEWWINDOW__","true"):a.replace("__OPENINNEWWINDOW__",
"false");a=F.isChecked()?a.replace("__TEMPSHOWBORDER__","bc1\x3d000000"):a.replace("__TEMPSHOWBORDER__","bc1\x3dFFFFFF");return a=D.isChecked()?a.replace("__TEMPOPENINNEWWINDOW__","_blank"):a.replace("__TEMPOPENINNEWWINDOW__","_top")},C=function(){var a=c,a=w(a),b=f.getVendingHtml().textImageLink,b=b.replace("__TEXTIMAGESRC__",a);y.empty();y.append(b);B.text(b);setTimeout(function(){B.select()},10)},H=function(b){q.getLongUrlTemplate(f.getRefTag().textImageLink);x.store=b.storeId;x.tag=b.trackingId;
x.asin=q.getAsin();b=h.get(x);var d=x.asin,g=x.tag;c=f.getVendingHtml().textImageSrc;a.getLanguagePreferance()&&(c=f.getVendingHtmlWithLanguagePreferance().textImageSrc);c=c.replace(/__ASIN__/g,d);c=c.replace("__WIDGETSERVERHOST__",f.getWidgetServerHost());c=c.replace("__OLDWIDGETSERVERHOST__",f.getOldWidgetServerHost());c=c.replace("__LINKID__",b);c=c.replace(/__TRACKINGID__/g,g);c=c.replace(/__LANGUAGE__/g,a.getLanguagePreferance());c=c.replace(/__LOCALE__/g,f.getLocale());c=c.replace("__ASSOCPROGRAMID__",
f.getAssocProgramId());C()};B.bind("click",function(){e(this).select()});b.declarative("amzn-ss-show-text-image-popover","click",function(a){if(!p){a=q.getAsin();var c=t.create(d,G);z();A.show();c.show();g.isThirdPartyExcludedAsin({asin:a,$popoverTrigger:d})}});b.declarative("amzn-ss-text-image-checkbox-updated","change",C);b.on("a:popover:beforeShow:amzn-ss-popover-text-image-preload-content",function(a){q.populateStoreTagDropdown("text-image")});b.on("a:popover:show:amzn-ss-popover-text-image-preload-content",
function(c){p=!0;a.addActiveToPopoverContainer(c.popover)});b.on("a:popover:afterHide:amzn-ss-popover-text-image-preload-content",function(c){p=!1;a.removeActiveFromPopoverContainer(c.popover);q.updateDefaultStoreTagAtServer()});b.on("amzn-ss-text-image-popover-get-link",H);b.on("a:dropdown:amzn-ss-store-id-dropdown-text-image:select",function(){q.handleStoreDropdownChange("text-image")});b.on("a:dropdown:amzn-ss-tracking-id-dropdown-text-image:select",function(){q.handleTagDropdownChange("text-image")});
b.on("amzn-ss-third-party-excluded-asin-callback",function(a){if(d===a.$popoverTrigger)switch(z(),a.status){case 1:H(q.getGlobalStoreTag());I.show();setTimeout(function(){B.select()},10);break;case 2:v.show();break;default:u.show()}})});"use strict";u.when("A","a-popover","amzn-ss-link-id","amzn-ss-app-config","amzn-ss-store-tag","amzn-ss-sitestripe","amzn-ss-make-xhr","amzn-ss-third-party-module","ready").register("amzn-ss-social-share-handler",function(b,t,r,h,f,q,a,g){var e=b.$,c=h.isDetailPage(),
p=!1,l=h.getStringMap(),d=e(".amzn-ss-popover-spinner"),A=e(".amzn-ss-popover-third-party-message"),u=e(".amzn-ss-popover-link-failure-message"),E=null,I={toolCreation:"SS",ad_unit_type:"Text",ad_unit_description:"SiteStripe Share on Media",destination_type:"1"===c?"ASIN":"Multiple",page_type:"1"===c?"Detail":"Gateway",served_ind:"N"},H={popoverLabel:l.social_share_header_link,header:l.social_share_header_link,activate:"onclick",width:530},B=function(){d.hide();A.hide();u.hide()},D={facebook:{server:"//www.facebook.com",
template:"/share.php?u\x3d__FULLURL__"},twitter:{server:"https://twitter.com",template:"/intent/tweet?original_referer\x3d__FULLURL__\x26text\x3d__DESCRIPTION__\x26related\x3d__RELATEDACCOUNTS__\x26url\x3d__SHORTURL__\x26via\x3d__VIA__",relatedAccounts:"amazondeals,amazonmp3"},ameba:{server:"https://blog.ameba.jp",template:"/ucs/entry/srventryinsertinput.do?entry_text\x3d__HTMLTAG__"},goo:{server:"https://blog.goo.ne.jp",template:"/admin/newentry/?fid\x3dbookmarklet\x26title\x3d__TITLE__\x26burl\x3d__FULLURL__"},
livedoor:{server:"https://livedoor.blogcms.jp",template:"//select/article/edit?_body\x3d__HTMLTAG__"},hatena:{server:"https://blog.hatena.ne.jp",template:"/my/edit?body\x3d[asin:__ASIN__:detail]"}},F=function(){var a="";if("1"!==h.isDetailPage()){var c=e("meta[name\x3ddescription]");c&&c.attr("content")?a=c.attr("content"):e("title")&&e("title")[0]&&(a=e("title")[0].text)}else document.getElementById("productTitle")&&(a=document.getElementById("productTitle").innerText);a&&(a=a.replace(/\r?\n|\r/g,
""),a=a.trim());return a},z=function(a,c,b,d){d=d.replace("\x26linkId\x3d__LINKID__","");var g=f.getGlobalStoreTag(),e=h.getLinkCode().shareLongLink,k=h.getCampaign();creative=l["shareOnCcmid_"+c+"_"+b];creative===y&&(creative=l["shareOnCcmid_"+b]);b=creative;d=d.replace("__LINKCODE__",e);d=d.replace("__LANGUAGE__",q.getLanguagePreferance());d=d.replace("__TRACKINGID__",g.trackingId);d=d.replace("__ASIN__",a);d=d.replace("__CAMP__",k);d=d.replace("__CCMID__",b);I.store_id=g.storeId;I.tag=g.trackingId;
I.asin=a;I.linkCode=e;I.destination_url=d;"twitter"===c?I.ad_unit_description="SiteStripe Share on Twitter":"facebook"===c&&(I.ad_unit_description="SiteStripe Share on Facebook");a=r.get(I);return d=(d+"\x26linkId\x3d__LINKID__").replace("__LINKID__",a)},G=function(a,c){c&&c.isOk&&a(c.shortUrl)},x=function(a,c,b,d){a(d)},w=function(a,c){a(c)},C=function(a,c,b,d){a(d)},K=function(c){return new Promise(function(b,d){a.makeXHR({url:"/assoc/sitestripe/get_product_info?skip_sentry\x3dtrue",methodType:"GET",
data:{ASIN:c,MARKETPLACEID:Associates.marketplaceId},dataType:"json",successCB:w,failureCB:C,successCBArgs:[b],failureCBArgs:[d]})})},J=function(c){return new Promise(function(b,d){a.makeXHR({url:"/associates/sitestripe/getShortUrl",methodType:"GET",data:{longUrl:c,marketplaceId:h.getMarketplaceId()},dataType:"json",successCB:G,failureCB:x,successCBArgs:[b],failureCBArgs:[d]})})},L=function(a,b){var d=F(),g="";if("1"==c){var e=h.getImageLinkTemplate(),l=e.imageLinkTemplate;q.getLanguagePreferance()&&
(l=e.imageLinkLangPrefTemplate);l=l.replace("__WIDGETSERVERHOST__",h.getWidgetServerHost());l=l.replace("__ASIN__",b);l=l.replace("__TRACKINGID__",f.getGlobalStoreTag().trackingId);l=l.replace("__LANGUAGE__",q.getLanguagePreferance());l=l.replace("__LOCALE__",h.getLocale());(b=l=l.replace("__IMAGEFORMAT__","_SL160_"))&&(g='\x3cimg src\x3d"'+b+'"\x3e')}return encodeURIComponent('\x3ca  href\x3d"'+a+'"\x3e'+g+d+"\x3c/a\x3e")},k=function(a){var b,d,g,e=f.getAsin(),k=a.sharePlatform;K(e).then(function(a){var l=
"",k=0,m="",p="",q="",r="";a&&a[e]&&(productData=a[e],l=productData.contributor_name,k=productData.price,m=productData.currency,p=productData.currency_icon,q=productData.savings_percentage,r=productData.title);k&&(k=k.toFixed(2));d={asin:e,brand:l,price:k,currency:m,currency_icon:p,savings:q,title:r};a=d;a.asin===y||"NA"===a.asin?g=h.getGenericMessageId():(l=h.getBaseMessageId(),h.getShareOnHasDeals()?10<a.savings?l+="4":(l+="2",a.price&&0!==a.price||(l+=h.getNoPricePrefix())):l+="1",a.brand||(l+=
h.getNoBylinePrefix()),g=l);a=f.getLongUrlTemplate("as_li_ss_shr");"1"===c&&(a+="\x26creativeASIN\x3d__ASIN__");b=a+"\x26camp\x3d__CAMP__\x26creative\x3d__CCMID__"}).catch(function(a){b=f.getLongUrlTemplate("as_li_ss_shr")}).finally(function(){var a=z(e,k,g,b),c=D[k].server+D[k].template;switch(k){case "facebook":c=c.replace("__FULLURL__",encodeURIComponent(a));break;case "twitter":var f,m;J(a).then(function(a){m=a}).catch(function(a){m=""}).finally(function(){var b=f=d===y?{shortUrl:m,fullurl:a}:
{shortUrl:m,title:d.title,brand:d.brand,price:d.price,currency:d.currency,currency_icon:d.currency_icon,fullurl:a},e=c,k,p,n;(p=l[g])&&0!==p.length||(p="__TITLE__");n=268;"string"==typeof b.shortUrl&&(n-=b.shortUrl.length+1);h.getShareOnHasDeals()&&b.price&&(b.currency||b.currency_icon)&&(k=b.currency_icon?b.currency_icon+b.price:b.price+b.currency,p=p.replace("__PRICE__",k));b.brand&&(p=p.replace("__BRAND__",b.brand));k=b.title?b.title:F();n-=p.length-9;"string"==typeof k&&k.length>n&&(k=k.substring(0,
n-3),k+="...");p=p.replace("__TITLE__",k);e=e.replace("__SHORTURL__",encodeURIComponent(b.shortUrl||""));b=e.replace("__FULLURL__",encodeURIComponent(b.fullurl));b=b.replace("__DESCRIPTION__",encodeURIComponent(p));b=b.replace("__VIA__","amazon");e=b=b.replace("__RELATEDACCOUNTS__",D.twitter.relatedAccounts);E&&E.hide();v.open(e,"_blank","toolbar \x3d no, location \x3d yes, status \x3d no, menubar \x3d no, scrollbars \x3d yes, resizable \x3d yes, width \x3d 700, height \x3d 400")});break;case "ameba":var p=
L(a,e),c=c.replace("__HTMLTAG__",p);break;case "goo":p=F();c=c.replace("__TITLE__",p);c=c.replace("__FULLURL__",encodeURIComponent(a));break;case "livedoor":p=L(a,e);c=c.replace("__HTMLTAG__",p);break;case "hatena":c=c.replace("__ASIN__",e)}"twitter"!=k&&(E&&E.hide(),v.open(c,"_blank","toolbar \x3d no, location \x3d yes, status \x3d no, menubar \x3d no, scrollbars \x3d yes, resizable \x3d yes, width \x3d 700, height \x3d 400"))})};b.on("a:popover:show:amzn-ss-popover-social-share-preload-content",
function(a){p=!0});b.on("a:popover:afterHide:amzn-ss-popover-social-share-preload-content",function(a){p=!1});b.declarative("amzn-ss-share-on-platform","click",function(a){if(!p){var b=e("#amzn-ss-social-share-"+a.data.sharePlatform);H.name="amzn-ss-popover-social-share-preload-content-"+a.data.sharePlatform;E=t.create(b,H);B();E.show();d.show();c?g.isThirdPartyExcludedAsin({asin:f.getAsin(),sharePlatform:a.data.sharePlatform,isSocialShare:!0}):k({sharePlatform:a.data.sharePlatform})}});b.on("amzn-ss-third-party-excluded-asin-callback",
function(a){if(a.isSocialShare)switch(a.status){case 1:k(a);break;case 2:B();A.show();break;default:B(),u.show()}})});"use strict";u.when("A","a-popover","a-switch","amzn-ss-sitestripe","amzn-ss-make-xhr","amzn-ss-app-config").register("amzn-ss-sitestripe-settings",function(b,t,r,h,f,q){var a=b.$;f=a("#amzn-ss-settings-toggle-switch");var g=a("#amzn-ss-settings-popover-container"),e=r.getSwitch(f),c=a("#amzn-ss-settings-popover-link"),p={name:"amzn-ss-settings-popover-preload-content",popoverLabel:q.getStringMap().amzn_ss_popover_title_settings,
header:q.getStringMap().amzn_ss_popover_title_settings,activate:"onclick",width:300};b.declarative("amzn-ss-turnoff-message-got-it","click",function(a){e.isOn()||b.trigger("amzn-ss-action-disable-ss")});b.declarative("amzn-ss-settings-popover","click",function(a){a=t.create(c,p);g.show();a.show()});b.on("a:popover:show:amzn-ss-settings-popover-preload-content",function(a){h.addActiveToPopoverContainer(a.popover)});b.on("a:popover:afterHide:amzn-ss-settings-popover-preload-content",function(a){a=a.popover;
e.isOn(!0);h.removeActiveFromPopoverContainer(a)});b.on("a:switch:amzn-ss-settings-toggle-switch:flip",function(c){e.isOn()?(e.label(q.getStringMap().amzn_ss_popover_content_sett_turnoff_ss),a("#amzn-ss-turnoff-message").fadeOut()):(e.label(q.getStringMap().amzn_ss_popover_content_sett_turnedoff),a("#amzn-ss-turnoff-message").fadeIn())})});v.Associates||(v.Associates={});Associates.siteStripeInitLibrary=function(b){function t(a,b){if(a===b)return!0;for(;b&&b!==a;)b=b.parentNode;return b===a}function r(a){return a=
a.replace(/(assoc_ss_ref=)[^\&]+/,"$1"+encodeURIComponent(Associates.RetailWebsiteUrl+v.location.pathname+q()))}Associates.AttachEventListener=function(a,b,e){a.addEventListener?a.addEventListener(b,e,!1):a.attachEvent("on"+b,e)};Associates.absPos=function(a){if(a.offsetParent){for(var b=0,e=0;a;)e+=a.offsetTop,b+=a.offsetLeft,a=a.offsetParent;return{x:b,y:e}}};String.prototype.Associates_containsToken=function(a){return(new RegExp("(?:^| )"+a+"(?: |$)")).test(this)};String.prototype.Associates_replaceToken=
function(a,b){return this.replace(new RegExp("(?:^| )"+a+"(?: |$)"),"")};Associates.ButtonStateMachine=function(a){this.item=a;this.setDOMHandlers();for(a=a.firstChild;a&&(!a.className||!a.className.Associates_containsToken("button_left_cap"));)a=a.nextSibling;this.end_cap=a};Associates.ButtonStateMachine.prototype.setDOMHandlers=function(){var a=this;Associates.AttachEventListener(this.item,"mouseover",function(b){a.setHovered(!0)});Associates.AttachEventListener(this.item,"mouseout",function(b){a.setHovered(!1)});
Associates.AttachEventListener(this.item,"mousedown",function(b){a.setPressed(!0)});Associates.AttachEventListener(this.item,"mouseup",function(b){a.setPressed(!1)});Associates.AttachEventListener(this.item,"click",function(b){a.click(b)})};Associates.ButtonStateMachine.prototype.click=function(a){var b=this.item.getElementsByTagName("A")[0];a=a.target?a.target:a.srcElement;if(b&&b!=a)if(this.item.className.Associates_containsToken("menu_button"))if(b.click)b.click();else{if(b.onclick)b.onclick()}else this.setHovered(!1),
"_blank"==b.target?v.open(b.href,b.target):document.location=b.href};Associates.ButtonStateMachine.prototype._setButtonState=function(a){a.match(/^(hover|down|normal)$/)&&("normal"==a&&(a=""),this.item.className=this.item.className.Associates_replaceToken("(?:hover_button|down_button)",""),this.end_cap.className=this.end_cap.className.Associates_replaceToken("(?:hover_left_cap|down_left_cap)",""),""!=a&&(this.item.className=this.item.className+" "+a+"_button",this.end_cap.className=this.end_cap.className+
" "+a+"_left_cap"))};Associates.ButtonStateMachine.prototype.setHovered=function(a){this.hovered=a;this.lock_pressed||this._setButtonState(a?"hover":"normal")};Associates.ButtonStateMachine.prototype.setPressed=function(a){a?this._setButtonState("down"):this._setButtonState(this.hovered?"hover":"normal")};Associates.ButtonStateMachine.prototype.lockPressed=function(a){this.lock_pressed=a;this.setPressed(a)};Associates.ButtonStateMachine.initButtonsFoundInElement=function(a){a=a.getElementsByTagName("DIV");
for(var b=0;b<a.length;b++)a[b].className.Associates_containsToken("button")&&!a[b].className.Associates_containsToken("disabled_button")&&(a[b].Associates_button_state_machine&&a[b].Associates_button_state_machine.setDOMHandlers?a[b].Associates_button_state_machine.setDOMHandlers():a[b].Associates_button_state_machine=new Associates.ButtonStateMachine(a[b]))};Associates.ButtonStateMachine.init=function(){try{document.execCommand("BackgroundImageCache",!1,!0)}catch(b){}var a=document.getElementById(Associates.siteStripePrefix+
"wrap");Associates.ButtonStateMachine.initButtonsFoundInElement(a)};Associates.SiteStripeSettingsAndSofty={};Associates.SiteStripeSettingsAndSofty.init=function(a){var b=a("#"+Associates.siteStripePrefix+"_share_on_softy_arrow"),e=a("#"+Associates.siteStripePrefix+"softy_wrap"),c=a("#"+Associates.siteStripePrefix+"_share_page_trigger"),f=a("#"+Associates.siteStripePrefix+"_settings_button"),l=a("#"+Associates.siteStripePrefix+"settings_wrap"),d=a("#"+Associates.siteStripePrefix+"_short_link_trigger"),
h=a("#"+Associates.siteStripePrefix+"_assoc_wrap"),q=a("."+Associates.siteStripePrefix+"_assoc_x_button"),v=a("#"+Associates.siteStripePrefix+"_assoc_shortlink_loader"),u=a("#"+Associates.siteStripePrefix+"_assoc_shortlink_iframe");if(Associates.isAui)b.click(function(a){e.show();a.preventDefault();a.stopPropagation();c[0].Associates_button_state_machine.lockPressed(!0)}),e.mouseleave(function(){e.hide();c[0].Associates_button_state_machine.lockPressed(!1)}),f.click(function(a){l.show();a.preventDefault();
a.stopPropagation();f[0].Associates_button_state_machine.lockPressed(!0)}),l.mouseleave(function(){l.hide();f[0].Associates_button_state_machine.lockPressed(!1)}),d.click(function(a){var b=r(u.data("src"));u.prop("src",b);u[0].contentWindow.focus();v.show();h.show();a.preventDefault();a.stopPropagation();d[0].Associates_button_state_machine.lockPressed(!0)}),q.click(function(a){h.hide();u.prop("src","about:blank");u[0].contentWindow.blur();d[0].Associates_button_state_machine.lockPressed(!1);a.preventDefault();
a.stopPropagation()}),a(document).mousedown(function(a){"undefined"===typeof f[0]||t(l[0],a.target)||(l.hide(),f[0].Associates_button_state_machine.lockPressed(!1));"undefined"===typeof c[0]||t(e[0],a.target)||(e.hide(),c[0].Associates_button_state_machine.lockPressed(!1));"undefined"===typeof d[0]||t(h[0],a.target)||(h.hide(),u.prop("src","about:blank"),u[0].contentWindow.blur(),d[0].Associates_button_state_machine.lockPressed(!1))}),l.click(function(a){a.stopPropagation();return!0}),e.click(function(a){a.stopPropagation();
return!0}),h.click(function(a){a.stopPropagation();return!0});else{d.unbind().click(function(){var a=r(u.attr("data-src"));u.attr("src",a);v.show()});b.amazonPopoverTrigger({localContent:"#"+Associates.siteStripePrefix+"softy_wrap",width:null,skin:null,locationOffset:[-70,-12],closeEventInclude:["MOUSE_LEAVE"],onShow:function(){c[0].Associates_button_state_machine.lockPressed(!0)},onHide:function(){c[0].Associates_button_state_machine.lockPressed(!1)}});f.amazonPopoverTrigger({localContent:"#"+Associates.siteStripePrefix+
"settings_wrap",width:null,skin:null,locationOffset:[0,-16],closeEventInclude:["MOUSE_LEAVE"],onShow:function(){f[0].Associates_button_state_machine.lockPressed(!0)},onHide:function(){f[0].Associates_button_state_machine.lockPressed(!1)}});var y=d.amazonPopoverTrigger({localContent:"#"+Associates.siteStripePrefix+"_assoc_wrap",width:null,skin:null,locationOffset:[0,-10],closeEventInclude:["CLICK_OUTSIDE"],onShow:function(){d[0].Associates_button_state_machine.lockPressed(!0);u[0].contentWindow.focus()},
onHide:function(){d[0].Associates_button_state_machine.lockPressed(!1);u.attr("src","about:blank");u[0].contentWindow.blur()}});q.click(function(){y.amznPopoverHide()})}Associates.ButtonStateMachine.init()};Associates.SiteStripeLightbox={};Associates.SiteStripeLightbox.init=function(a){var g=a("#"+Associates.siteStripePrefix+"_page_trigger"),e=a("#"+Associates.siteStripePrefix+"_product_trigger"),c=a("#"+Associates.siteStripePrefix+"_widget_trigger");if(Associates.isAui)g.click(function(a){a.stopPropagation();
a.preventDefault();u.when("A","a-modal").execute(function(a,b){var c=b.create(g,{url:r(Associates.lightboxURL),width:685,cache:0,name:"assoc_modal"});a.on("a:popover:afterHide:assoc_modal",function(a){b.remove(a.popover)});c.show()})}),e.click(function(a){a.stopPropagation();a.preventDefault();u.when("A","a-modal").execute(function(a,b){var c=b.create(e,{url:r(Associates.lightboxURL),width:685,cache:0,name:"assoc_modal"});a.on("a:popover:afterHide:assoc_modal",function(a){b.remove(a.popover)});c.show()})}),
c.click(function(a){a.stopPropagation();a.preventDefault();u.when("A","a-modal").execute(function(a,b){var e=b.create(c,{url:Associates.widgetLightboxURL,width:1038,cache:0,name:"assoc_modal"});a.on("a:popover:afterHide:assoc_modal",function(a){b.remove(a.popover)});e.show()})});else{var p={width:685,destination:function(){return r(Associates.lightboxURL)},closeEventExclude:["CLICK_OUTSIDE"],locationOffset:[0,-50],modal:!0};g.amazonPopoverTrigger(p);e.amazonPopoverTrigger(p);c.amazonPopoverTrigger({width:1038,
destination:Associates.widgetLightboxURL,closeEventExclude:["CLICK_OUTSIDE"],locationOffset:[0,-50],modal:!0})}a("#"+Associates.siteStripePrefix+"_share_page_trigger").click(h);a("#"+Associates.siteStripePrefix+"softy_wrap #"+Associates.siteStripePrefix+"softy .button").click(function(c){c.stopPropagation();c=a("span.button_content span",this).attr("name");var d=f(c);this.Associates_button_state_machine.setHovered(!1);a("#"+Associates.siteStripePrefix+"_share_on_softy_arrow").click();if(d){b("#"+
Associates.siteStripePrefix+"_share_on_"+c);var d=v.Associates.SocialShareAttributes[c].hoverText,e=b("#"+Associates.siteStripePrefix+"_share_on_softy_text"),g=v.Associates.SocialShareAttributes.shareDefault.platform,h=b("#"+Associates.siteStripePrefix+"_share_on_softy");h.removeClass(g);h.addClass(c);h.attr("title",d);e.attr("title",d);v.Associates.SocialShareAttributes.shareDefault.platform=c}});p=a("#"+Associates.siteStripePrefix+"_share_excluded_trigger");Associates.isAui?p.click(function(a){u.when("A",
"a-modal").execute(function(a,b){var c=b.create(a.$("#"+Associates.siteStripePrefix+"_share_excluded_trigger"),{content:"\x3cspan\x3e"+Associates.thirdPartyExcludedMessage+"\x3c/span\x3e",width:685,name:"assoc_modal"});a.on("a:popover:afterHide:assoc_modal",function(a){b.remove(a.popover)});c.show()});a.stopPropagation();a.preventDefault()}):p.amazonPopoverTrigger({width:685,localContent:"\x3cspan\x3e"+Associates.thirdPartyExcludedMessage+"\x3c/span\x3e",closeEventExclude:["CLICK_OUTSIDE"],locationOffset:[0,
-50],modal:!0})};var h=function(a){return b("#"+Associates.siteStripePrefix+"_share_on_softy_arrow").length&&a.pageX>=b("#"+Associates.siteStripePrefix+"_share_on_softy_arrow").offset().left?b("#"+Associates.siteStripePrefix+"_share_on_softy_arrow").click():f(v.Associates.SocialShareAttributes.shareDefault.platform)},f=function(a){var g="",e=v.Associates.SocialShareAttributes.asin,c=v.Associates.SocialShareAttributes[a].blockNonDetail;if(v.Associates.SocialShareAttributes.thirdPartyExcludedAsin)return Associates.isAui?
u.when("A","a-modal","ready").execute(function(a,b){var c=b.create(a.$("div#assoc_logo"),{content:"\x3cspan\x3e"+Associates.thirdPartyExcludedMessage+"\x3c/span\x3e",width:685,name:"assoc_modal"});a.on("a:popover:afterHide:assoc_modal",function(a){b.remove(a.popover)});c.show()}):b.AmazonPopover.displayPopover({width:685,localContent:"\x3cspan\x3e"+Associates.thirdPartyExcludedMessage+"\x3c/span\x3e",closeEventExclude:["CLICK_OUTSIDE"],locationOffset:[0,-50],modal:!0}),!1;if(!e){if(c)return Associates.isAui?
u.when("A","a-modal","ready").execute(function(a,b){var c=b.create(a.$("div#assoc_logo"),{content:"\x3cspan\x3e"+Associates.onlyDetailMessage+"\x3c/span\x3e",width:685,name:"assoc_modal"});a.on("a:popover:afterHide:assoc_modal",function(a){b.remove(a.popover)});c.show()}):b.AmazonPopover.displayPopover({width:685,localContent:"\x3cspan\x3e"+Associates.onlyDetailMessage+"\x3c/span\x3e",closeEventExclude:["CLICK_OUTSIDE"],locationOffset:[0,-50],modal:!0}),!1;g=null;null!=b("meta[name\x3ddescription]")&&
(g=b("meta[name\x3ddescription]").attr("content"));null!=g&&0!=g.length||null==b("title")||null==b("title")[0]||(g=b("title")[0].text);g=null!=g?g.substring(0,140<g.length?140:g.length):"";g="\x26message\x3d"+encodeURIComponent(g)}e=v.Associates.SocialShareAttributes.shareDefault.platform==a?"":"true";Associates.shareSocialURL=r(Associates.shareSocialURL);v.open(Associates.shareSocialURL+g+"\x26socialPlatform\x3d"+a+"\x26reqEmb\x3d"+e,"_blank","location\x3dyes,width\x3d700,height\x3d400");return!0},
q=function(){var a=decodeURIComponent(v.location.search),b=[/(&?linkId=)[^&"]+/ig,/(&?tag=)[^&"]+/ig,/(&?creative=)[^&"]+/ig,/(&?camp=)[^&"]+/ig,/(&?creativeASIN=)[^&"]+/ig,/(&?linkCode=)[^&"]+/ig];if(a)for(var e=0;e<b.length;e++)a=a.replace(b[e],"");else a="?ie\x3dUTF8";return encodeURI(a)};Associates.SiteStripeLightbox.showLightbox=function(a,b){a("#"+Associates.siteStripePrefix+"_"+b+"_trigger").trigger("click")};Associates.isAui?u.register("assoc_ss",function(){return{init:function(a){Associates.SiteStripeSettingsAndSofty.init(a)},
initLightbox:function(a){Associates.SiteStripeLightbox.init(a)},showLightbox:function(a,b){Associates.SiteStripeLightbox.showLightbox(a,b)}}}):amznJQ.declareAvailable("assoc_ss")};Associates!==y&&Associates.isAui!==y&&Associates.initModules===y&&(Associates.initModules=!0,Associates.isAui?u.when("A","ready").execute(function(b){Associates.siteStripeInitLibrary(b.$)}):amznJQ.available("popover",function(){Associates.siteStripeInitLibrary(jQuery)}))});
/* ******** */
(function(g){var e=window.AmazonUIPageJS||window.P,k=e._namespace||e.attributeErrors,b=k?k("GlowToasterAssets",""):e;b.guardFatal?b.guardFatal(g)(b,window):b.execute(function(){g(b,window)})})(function(g,e,k){g.when("A","a-alert","glow-toaster-action-registry","glow-toaster-overlay","glow-toaster-strings").register("glow-toaster",function(b,d,c,a,l){function n(f){e.ue&&"function"===typeof e.ue.count&&e.ue.count(f,(e.ue.count(f)||0)+1)}function m(){return b.capabilities.mobile?"MOBILE":"DESKTOP"}var h=
b.$;b.on("a:sheet:afterHide:wfm_mweb_qr_bottom_sheet",function(){g.register("QRClosed",function(){})});var p=function(f){this.animationEnabled=!0;this.params=f||{};this.slot="DEFAULT";this.csrfToken="";this.type=k;this.blocking=!1;this.automaticAction=k;this.executeAction={OPEN_GLOW:this.openGlowAutomaticAction};this.FETCH_TOASTER_SUCCESS_METRIC="GLOW:fetch-toaster:"+m()+":success";this.FETCH_TOASTER_FAILURE_METRIC="GLOW:fetch-toaster:"+m()+":failure";this.GLOW_TOATER_SCOPE="glow-toaster-api-timer-"+
m();this.slots={DEFAULT:b.capabilities.mobile?"#nav-subnav-toaster":"#nav-main .nav-left",SUBNAV:"#nav-subnav-toaster"};this.selectors={navbar:"#navbar",subnav:"#nav-subnav",toaster:".glow-toaster",actionButton:".glow-toaster-button",actionError:".glow-toaster-error"};this.endpoint="/gp/glow/get-toaster.html";this.refreshXhr=k;this.initEvents()};h.extend(p.prototype,{initEvents:function(){b.on("packard:glow:destinationChangeAll",this.handleGlowAddressChange.bind(this));b.on("a:popover:beforeShow",
this.handlePopoverBeforeShow.bind(this));b.on("a:popover:afterHide",this.handlePopoverAfterHide.bind(this));b.on("a:sheet:beforeShow",this.handleSheetBeforeShow.bind(this));b.on("a:sheet:afterHide",this.handleSheetAfterHide.bind(this));b.on.ready(this.handlePageReady.bind(this));h(e).bind("beforeunload",this.handleBeforeUnload.bind(this));h(e).bind("focusin",this.handleFocusIn.bind(this))},refresh:function(){this.ready&&(this.hide(),this.abortRefresh(),"function"===typeof e.uet&&e.uet("bb",this.GLOW_TOATER_SCOPE,
{wb:1}),this.refreshXhr=b.get(this.endpoint,{params:this.params,cache:!1,success:function(f,a,b){n(this.FETCH_TOASTER_SUCCESS_METRIC);"string"===typeof f&&(this.update(f),"function"===typeof e.uex&&e.uex("ld",this.GLOW_TOATER_SCOPE,{wb:1}))}.bind(this),error:function(f,a,b){n(this.FETCH_TOASTER_FAILURE_METRIC)}.bind(this)}))},remove:function(){this.getToasterElement().remove()},show:function(){!b.capabilities.mobile&&"DEFAULT"==this.slot||!this.animationEnabled?this.getToasterElement().show():this.getToasterElement().slideDown();
this.blocking&&a.show();this.getToasterElement().attr("tabindex",-1).focus();b.capabilities.isAmazonApp&&b.capabilities.ios&&e.scrollTo(0,-999)},hide:function(){!b.capabilities.mobile&&"DEFAULT"==this.slot||!this.animationEnabled?this.getToasterElement().hide():this.getToasterElement().slideUp();this.blocking&&a.hide()},isHidden:function(){return!this.getToasterElement().length||this.getToasterElement().is(":hidden")},isVisible:function(){return!this.isHidden()},showError:function(f){this.setError(f);
this.show()},showErrorID:function(f){f=l.get(f);this.showError(f)},setError:function(f){var a=this.getToasterElement().find(this.selectors.actionError),a=d(a);a.text(f||"");f?a.show():a.hide()},clearError:function(){this.setError("")},isActionFailureEmulated:function(){return/[?&]glowToasterActionEmulateFailure=1(&|$)/.test(location.href)},syncOverlay:function(){this.blocking?a.show():a.hide()},update:function(f){f=f.trim();var a=!f.length;this.remove();a||(a=h(f).hide(),a.is(this.selectors.toaster)||
(a=this.createFatalErrorToaster(f)),this.importProps(a),this.attachActions(a),this.syncOverlay(),this.getContainerElement().append(a),this.show())},createFatalErrorToaster:function(f){var a="glow-toaster glow-toaster-theme-alert glow-toaster-slot-default a-padding-medium",c="";b.capabilities.isAmazonApp?a+=" glow-toaster-app":b.capabilities.mobile||(a+=" nav-coreFlyout nav-flyout",c='\x3cdiv class\x3d"nav-arrow"\x3e\x3cdiv class\x3d"nav-arrow-inner"\x3e\x3c/div\x3e\x3c/div\x3e');f=h('\x3cdiv class\x3d"'+
a+'" data-toaster-slot\x3d"DEFAULT"\x3e\x3cdiv class\x3d"glow-toaster-content"\x3e'+c+'\x3cdiv class\x3d"glow-toaster-body"\x3e'+f+"\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e");f.hide();return f},getCurrentContainer:function(){return this.slots[this.slot]},getContainerElement:function(){var a=this.getCurrentContainer();return h(a)},getToasterElement:function(){var a=this.getCurrentContainer();return h(a+" "+this.selectors.toaster)},importProps:function(a){a=a.data();a.toasterSlot&&(this.slot=a.toasterSlot);
this.type=a.toasterType||k;this.blocking=!!parseInt(a.toasterBlocking);this.automaticAction=a.toasterAutomaticAction||k;this.csrfToken=a.toasterCsrftoken||a.csrfToken||""},attachActions:function(a){a.bind("click touchstart",this.selectors.actionButton,this.handleActionButtonClick.bind(this));this.automaticAction&&this.executeAction[this.automaticAction]&&this.executeAction[this.automaticAction].call(this)},abortRefresh:function(){this.refreshXhr&&(this.refreshXhr.abort(),this.refreshXhr=k)},handleActionButtonClick:function(a){h(a.target).is("a")||
(a.stopImmediatePropagation(),a.preventDefault());a=h(a.target).data();if(a.actionType){var b=c.getByActionType(a.actionType);b&&("SET_POSTAL_CODE"===a.actionType&&(a.actionParams.zipCode=h("input#glow-toaster-postal-code-input").val()),b.handle(this,a.actionParams))}},handleGlowAddressChange:function(){this.refresh()},handlePopoverBeforeShow:function(b){b=b&&b.popover&&b.popover.type;this.blocking&&"modal"==b&&this.isVisible()&&a.hide()},handlePopoverAfterHide:function(b){b=b&&b.popover&&b.popover.type;
this.blocking&&"modal"==b&&this.isVisible()&&a.show()},handleSheetBeforeShow:function(){this.blocking&&this.isVisible()&&a.hide()},handleSheetAfterHide:function(){this.blocking&&this.isVisible()&&a.show()},handleBeforeUnload:function(){this.abortRefresh()},handlePageReady:function(){this.ready=!0;this.refresh()},handleFocusIn:function(b){if(this.blocking&&a.isVisible()){var c=this.getToasterElement(),l=h(this.selectors.subnav).has(b.target).length,d=h(this.selectors.navbar).add(this.getContainerElement()).has(b.target).length;
b=this.getContainerElement().has(b.target).length;if(l||!d&&!b)c.focus(),a.sync()}},openGlowAutomaticAction:function(){var a=e.location.pathname.includes("storefront"),b=this.openGlow.bind(this);a?(g.when("A","FMCShowQrCodeTrue","QRClosed").execute(function(){b()}),g.when("A","FMCShowQrCodeFalse").execute(function(){b()})):this.openGlow()},openGlow:function(){var a=h("#nav-global-location-slot .a-declarative"),b=h("#nav-global-location-slot.a-declarative");a&&a.length?a.click():b&&b.length&&b.click()}});
return p});"use strict";g.when("A").register("glow-toaster-string-container",function(b){var d=b.$;b=function(b){this.stringMap=b||{}};d.extend(b.prototype,{get:function(b){return this.stringMap[b]!==k?this.stringMap[b]:""},load:function(b){d.extend(this.stringMap,b)}});return b});"use strict";g.when("glow-toaster-string-container").register("glow-toaster-strings",function(b){return new b({"glow-toaster-address-change-error":"An address change error has occurred. Please try again.","glow-toaster-unknown-error":"An error has occurred. Please try again."})});
"use strict";g.when("A","glow-toaster").register("glow-toaster-manager",function(b,d){var c=function(){};b.$.extend(c.prototype,{toasters:[],create:function(a){a=new d(a);this.toasters.push(a);return a},getAll:function(){return this.toasters}});return new c});"use strict";g.when("A").register("glow-toaster-overlay",function(b){var d=b.$,c=function(){this.overlayClass="glow-toaster-overlay";this.overlayLockClass="glow-toaster-overlay-lock";this.insertAfterSelector="#nav-subnav-toaster";this.$overlay=
k;this.$body=d(document.body);this.animationEnabled=!0};d.extend(c.prototype,{hide:function(){this.$overlay&&(this.$body.removeClass(this.overlayLockClass),this.animationEnabled?this.$overlay.fadeOut():this.$overlay.hide())},show:function(){this.$overlay||(this.createOverlay(),this.initEvents());this.sync();this.$body.addClass(this.overlayLockClass);this.animationEnabled?this.$overlay.fadeIn():this.$overlay.show()},isVisible:function(){return!!(this.$overlay&&this.$overlay.length&&this.$overlay.is(":visible"))},
isHidden:function(){return!this.isVisible()},sync:function(){this.scrollTop();this.syncSize()},scrollTop:function(){d(document).scrollTop(0)},createOverlay:function(){this.$overlay=d("\x3cdiv\x3e").addClass(this.overlayClass).height(0).insertAfter(this.insertAfterSelector);b.capabilities.touch&&this.disableTouch()},disableTouch:function(){this.$overlay.bind("click touchstart",function(a){a.cancelable&&a.preventDefault()})},initEvents:function(){d(e).bind("resize",this.syncSize.bind(this))},syncSize:function(){if(this.$overlay&&
this.$overlay.length){var a=this.getScreenHeight();this.$overlay.height(a);var b=this.getDocumentHeight();b>a&&this.$overlay.height(b)}},getScreenHeight:function(){return d(e).height()},getDocumentHeight:function(){return d(document).height()}});return new c});"use strict";g.when("A","glow-toaster-set-address-action","glow-toaster-select-location-action","glow-toaster-dismiss-action","glow-toaster-set-postalcode-action").register("glow-toaster-action-registry",function(b,d,c,a,l){var e=function(a){this.actions=
a||[];this.hashActionsByType()};b.$.extend(e.prototype,{getByActionType:function(a){return this.actionsByType[a]},getAll:function(){return this.actions},hashActionsByType:function(){this.actionsByType=b.reduce(this.actions,function(a,b){a[b.name]=b;return a},{})}});return new e([d,c,a,l])});"use strict";g.when("A").register("glow-toaster-dismiss-action",function(b){var d=function(){};b.$.extend(d.prototype,{name:"DISMISS",endpoint:"/gp/glow/dismiss-toaster.html",errorStringID:"glow-toaster-unknown-error",
handle:function(c,a){c.hide();b.post(this.endpoint,{params:a,success:function(a,b,d){"object"!==typeof a||!a.success||c.isActionFailureEmulated()?c.showErrorID(this.errorStringID):c.refresh()}.bind(this),error:function(a,b,d){c.showErrorID(this.errorStringID)}.bind(this)})}});return new d});"use strict";g.when("A").register("glow-toaster-select-location-action",function(b){var d=b.$,c=function(){};d.extend(c.prototype,{name:"SELECT_LOCATION",errorStringID:"glow-toaster-unknown-error",handle:function(a,
b){a.hide();this.showAddressSelector(a,b)},showAddressSelector:function(a,c){b.capabilities.isAmazonApp?this.showAppAddressSelector(a,c):this.showWebAddressSelector(a)},showAppAddressSelector:function(a,b){this.csmLogCount(a);g.when("BottomSheetPlugin").execute(function(a){a.ShowBottomSheet({useCase:"LocUX",paramsInJson:b||{}})})},showWebAddressSelector:function(a){var b=d("#nav-global-location-slot .a-declarative"),c=d("#nav-global-location-slot.a-declarative"),e=a.isActionFailureEmulated();b.length&&
!e?(b.click(),this.csmLogCount(a)):c.length&&!e?(c.click(),this.csmLogCount(a)):(a.showErrorID(this.errorStringID),this.csmLogCount(a,!0))},csmLogCount:function(a,b){e.ue&&e.ue.count&&(a="GlowToaster:"+(b?"SelectLocationFailed":"SelectLocation")+":"+a.type+":"+this.getDeviceType()+":",e.ue.count(a,1))},getDeviceType:function(){return b.capabilities.isAmazonApp?"APP":b.capabilities.tablet?"TABLET":b.capabilities.mobile?"MOBILE":"DESKTOP"}});return new c});"use strict";g.when("A").register("glow-toaster-set-address-action",
function(b){var d=function(){};b.$.extend(d.prototype,{name:"SET_ADDRESS",endpoint:"/gp/delivery/ajax/address-change.html",errorStringID:"glow-toaster-address-change-error",forceReload:!0,handle:function(c,a){if(a&&a.addressID){c.hide();var d="generic";c.params&&c.params.storeName&&(d=c.params.storeName);b.post(this.endpoint,{headers:{"anti-csrftoken-a2z":c&&c.csrfToken?c.csrfToken:""},params:{locationType:"ACCOUNT_ADDRESS",addressId:a.addressID,storeContext:d,deviceType:"web",pageType:e.ue_pty,actionSource:"glow-toaster",
toasterType:c.type},success:function(a,b,d){"object"!==typeof a||!a.sembuUpdated||c.isActionFailureEmulated()?c.showErrorID(this.errorStringID):this.refreshGlowIngress()}.bind(this),error:function(a,b,d){c.showErrorID(this.errorStringID)}.bind(this)})}},refreshGlowIngress:function(){b.capabilities.isAmazonApp?g.when("BottomSheetPlugin").execute(function(b){b.UpdateGlowIngress({});this.onGlowIngressRefreshComplete()}.bind(this)):(b.trigger("packard:glow:destinationChangeNav"),this.onGlowIngressRefreshComplete())},
onGlowIngressRefreshComplete:function(){this.forceReload?e.location.reload():toaster.refresh()}});return new d});"use strict";g.when("A").register("glow-toaster-set-postalcode-action",function(b){var d=b.$,c=function(){};d.extend(c.prototype,{name:"SET_POSTAL_CODE",endpoint:"/gp/delivery/ajax/address-change.html",forceReload:!0,handle:function(a,c){c&&null!==c.zipCode&&c.zipCode!==k&&b.post(this.endpoint,{headers:{"anti-csrftoken-a2z":a&&a.csrfToken?a.csrfToken:""},params:{locationType:"LOCATION_INPUT",
zipCode:this.preparePostalCodeForSubmit(c.zipCode),deviceType:"web",pageType:e.ue_pty,actionSource:"glow-toaster",toasterType:a.type},success:function(b,e,g){"object"!==typeof b||!b.sembuUpdated||a.isActionFailureEmulated()?(a.showError(c.inputError),d("input#glow-toaster-postal-code-input").addClass("a-form-error")):this.refreshGlowIngress()}.bind(this),error:function(b,d,e){a.showError(c.inputError)}.bind(this)})},refreshGlowIngress:function(){b.capabilities.isAmazonApp?g.when("BottomSheetPlugin").execute(function(a){a.UpdateGlowIngress({});
this.onGlowIngressRefreshComplete()}.bind(this)):(b.trigger("packard:glow:destinationChangeNav"),this.onGlowIngressRefreshComplete())},preparePostalCodeForSubmit:function(a){return a.replace(/[^A-Za-z0-9- /]+/g,"")},onGlowIngressRefreshComplete:function(){this.forceReload?e.location.reload():toaster.refresh()}});return new c})});
/* ******** */
(function(d){var b=window.AmazonUIPageJS||window.P,f=b._namespace||b.attributeErrors,a=f?f("AmazonBusinessRetailNavigationAssets",""):b;a.guardFatal?a.guardFatal(d)(a,window):a.execute(function(){d(a,window)})})(function(d,b,f){(function(a){a.when("$","$F","flyouts.create","config","flyouts.anchor","data","provider.dynamicMenu","agent","log").run("flyout.abAcquisition",function(a,c,b,e,d,f,h,k,l){c=a("#nav-ab-acquisition");if(!c)return!1;var g=b({key:"abAcquisition",className:"nav-coreFlyout",link:c,
cover:!!e.beaconbeltCover,clickThrough:!0,event:"abAcquisition",arrow:"top",animateDown:e.flyoutAnimation});c.click(function(){a(this).blur();g.show()});return g})})(b.$Nav);(function(a){a.when("$","$F","flyouts.create","config").run("flyout.abActivation",function(a,c,b,e){c=a("#nav-ab-activation");if(!c)return!1;var d=b({key:"abActivation",className:"nav-coreFlyout",link:c,cover:!!e.beaconbeltCover,clickThrough:!0,event:"abActivation",arrow:"top",animateDown:e.flyoutAnimation});c.click(function(){a(this).blur();
d.show()});return d})})(b.$Nav)});
/* ******** */