(function(d){var l=window.AmazonUIPageJS||window.P,D=l._namespace||l.attributeErrors,r=D?D("InContextDetailPageAssets@container","InContextDetailPageAssets"):l;r.guardFatal?r.guardFatal(d)(r,window):r.execute(function(){d(r,window)})})(function(d,l,D){function r(b,a,c){a in b?Object.defineProperty(b,a,{value:c,enumerable:!0,configurable:!0,writable:!0}):b[a]=c;return b}function u(b,a){if(!(b instanceof a))throw new TypeError("Cannot call a class as a function");}var F=function(){return function(b,
a){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b)){var c=[],e=!0,f=!1,m=D;try{for(var d=b[Symbol.iterator](),w;!(e=(w=d.next()).done)&&(c.push(w.value),!a||c.length!==a);e=!0);}catch(k){f=!0,m=k}finally{try{if(!e&&d["return"])d["return"]()}finally{if(f)throw m;}}return c}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),H="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(b){return typeof b}:function(b){return b&&"function"===typeof Symbol&&
b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},x=function(){function b(a,b){for(var c=0;c<b.length;c++){var f=b[c];f.enumerable=f.enumerable||!1;f.configurable=!0;"value"in f&&(f.writable=!0);Object.defineProperty(a,f.key,f)}}return function(a,c,e){c&&b(a.prototype,c);e&&b(a,e);return a}}();d.when("A","icdp-constants","icdp-common-utils","icdp-controller-factory","icdp-state-updater","icdp-state-getter","icdp-client-data","icdp-prefetch").register("icdp",function(b,a,c,e,f,m,d,w){b=
a.stateModelAttrConstants;var k=b.LIST,n=b.CLIENT_ID,p=a.metrics.ICDP_CONTAINER_LOAD_INIT;b=a.fatalMetrics;var q=b.ICDP_INIT_FAIL,t=b.ICDP_LOAD_FAIL;a=a.errorMessages;var h=a.ICDP_INIT_FAILED_MESSAGE,l=a.ICDP_LOAD_FAILED_MESSAGE,B=a.ICDP_LIST_UNAVAILABLE_MESSAGE,y=a.ICDP_STATE_UNAVAILABLE_MESSAGE,A={};return function(){function a(b){u(this,a);try{this.icdpController=null;A=b.viewCallbacks?b.viewCallbacks:{};if(b&&b.state)f.updateState(b.state);else throw c.logger({},t,y),Error(y);this.successCallback=
b.callbacks&&b.callbacks.success?b.callbacks.success:function(){};this.failureCallback=b.callbacks&&b.callbacks.failure?b.callbacks.failure:function(){};this.icdpControllerFactory=new e;this.successCallback()}catch(z){c.logger(z,q,h),!this.failureCallback&&b.callbacks&&b.callbacks.failureCallback?b.callbacks.failureCallback(z):this.failureCallback(z)}}x(a,[{key:"loadICDP",value:function(a){var b=[];try{c.logCounter(p);var e=Date.now(),C={};a.clientData&&"object"===H(a.clientData)&&!Array.isArray(a.clientData)&&
(C=a.clientData);C.icdpClickTime=e;d.setClientData(C);A=a.viewCallbacks?a.viewCallbacks:{};if(a&&a.state)f.updateState(a.state);else throw c.logger({},t,y),Error(y);b=m.getStateAttribute(k);if(!b||0===b.length)throw c.logger({},t,B),Error(B);this.icdpController=this.icdpControllerFactory.getICDPController(b,A);this.icdpController.setupClientToContainerBridge(m.getStateAttribute(n));this.icdpController.loadContainer()}catch(g){c.logger(g,t,l),this.failureCallback(g)}}},{key:"prefetchICDP",value:function(a){w.prefetchICDP(a)}},
{key:"removePrefetchedIFrames",value:function(a){f.removePrefetchedIFrames(a)}},{key:"removeAllPrefetchedIFrames",value:function(){f.removeAllPrefetchedIFrames()}}]);return a}()});d.when("A").register("icdp-base-to-page-interface",function(b){return{updateInterfaces:function(a){}}});d.when("A").register("icdp-base-to-container-interface-provider",function(b){return{removeLoader:function(){}}});d.when("A").register("icdp-noclient-to-container-interface-provider",function(b){return{}});d.when("A").register("icdp-noclient-to-page-interface",
function(b){return{updateInterfaces:function(a){}}});d.when("A").register("icdp-host-to-container-interface-provider-registry",function(b){var a={buyAgain:"icdp-buyAgain-to-container-interface-provider",noClient:"icdp-noclient-to-container-interface-provider"};return function(b){return a[b]||a.noClient}});d.when("A").register("icdp-container-to-page-interaction-interface-registry",function(b){var a={buyAgain:"icdp-buyAgain-to-page-interface",noClient:"icdp-noclient-to-page-interface"};return function(b){return a[b]||
a.noClient}});d.when("A","icdp-host-to-container-interface-provider-registry","icdp-container-to-page-interaction-interface","icdp-client-data").register("icdp-setup-container-to-page-bridge",function(b,a,c,e){var f=b.$;return{setupClientToContainerBridge:function(b){var m=a(b);d.now("container-bridge-registered").execute(function(a){a||(d.declare("container-bridge-registered",!0),d.when("A",m,"icdp-base-to-container-interface-provider").register("icdp-container-to-page-bridge",function(a,d,p){return{framePageReady:function(a,
e,f){c.updateInterfaces({iframeA:e,iframeP:a,callbacks:f,clientId:b})},containerCallbacks:f.extend(d,p),clientId:b,getClientData:e.getClientData}}))})}}});d.when("A","mash").register("icdp-mash",function(b,a){b.on("icdp-mash-cart-did-update",function(b){a.cart.didUpdate(b)});b.on("icdp-mash-show-alert",function(b){a.showAlert(b)});b.on("icdp-mash-show-login-dialog",function(b){a.showLoginDialog(b)});b.on("icdp-amazon-cordova-notification-vibrate",function(a){amazon.cordova.notification.vibrate(a.duration)})});
d.when("A","icdp-page-events-schema-validators").register("icdp-page-events-registry",function(b,a){return{"icdp-redirect-to-dp":{validateSchema:a.validateRedirectToDp},"icdp-change-asin":{validateSchema:a.validateChangeAsin},"icdp-content-height-change":{validateSchema:a.validateContentHeightChange},"idcp-content-load":{validateSchema:a.validateContentLoad},"icdp-mash-cart-did-update":{validateSchema:a.validateMashCartDidUpdate},"icdp-mash-show-alert":{validateSchema:a.validateMashShowAlert},"icdp-mash-show-login-dialog":{validateSchema:a.validateMashShowLoginDialog},
"icdp-amazon-cordova-notification-vibrate":{validateSchema:a.validateAmazonCordovaNotificationVibration},"icdp-update-fdp-state":{validateSchema:a.validateUpdateFdpState},"ax:atc":{validateSchema:a.cartQsAtc},"ax:qs:update":{validateSchema:a.cartQsUpdate},"quantity-selector-widget:sync-stepper-quantity":{validateSchema:a.almQsSync},"ICDP:Promotions:Redeem:Success":{validateSchema:a.promotionsSync},"icdp-close-sheet":{validateSchema:a.validateCloseSheet},"icdp-close-sheet-and-redirect":{validateSchema:a.validateCloseSheetAndRedirect}}});
d.when("A","icdp-container-to-page-interaction-interface-registry","icdp-page-events-registry","icdp-common-utils","icdp-constants").register("icdp-container-to-page-interaction-interface",function(b,a,c,e,f){var m=f.fatalMetrics.ICDP_PAGE_EVENT_VALIDATION_FAILED,h=f.errorMessages.ICDP_PAGE_EVENT_VALIDATION_FAILED_MESSAGE;return{updateInterfaces:function(f){(function(a,b){f.iframeA.off(a);f.iframeA.on(a,b)})("icdp-page-notify-container",function(a){var f=a&&a.eventName;f&&(c[f]?c[f].validateSchema(a.arguments)?
b.trigger(a.eventName,a.arguments):e.logger({},m,h+f):b.trigger(a.eventName,a.arguments))});var k={callbacks:f.callbacks},n=a(f.clientId);d.when(n).execute(function(a){a.updateInterfaces(k)});d.when("icdp-base-to-page-interface").execute(function(a){a.updateInterfaces(k)})}}});d.when("A").register("icdp-page-events-schema-validators",function(b){return{validateRedirectToDp:function(a){return!0},validateChangeAsin:function(a){return!(!a||!a.asin)},validateContentHeightChange:function(a){return!(!a||
!a.height)},validateContentLoad:function(a){return!(a&&0!==Object.keys(a).length)},validateMashCartDidUpdate:function(a){return!0},validateMashShowAlert:function(a){return!0},validateMashShowLoginDialog:function(a){return!0},validateAmazonCordovaNotificationVibration:function(a){return!(!a||!a.duration)},validateUpdateFdpState:function(a){return!(a&&0!==Object.keys(a).length)},cartQsAtc:function(a){return!!(a&&a.quantity&&a.itemId&&a.asin&&a.$faceoutContainer)},cartQsUpdate:function(a){return!!(a&&
null!=a.quantity&&a.itemId&&a.asin&&a.$faceoutContainer)},almQsSync:function(a){return!!(a&&a.asin&&a.selectedQuantity&&a.storeId)},promotionsSync:function(a){return!!(a&&a.asin&&a.promotionId)},validateCloseSheet:function(a){return!0},validateCloseSheetAndRedirect:function(a){return!(!a||!a.url||"string"!==typeof a.url)}}});d.when("A").register("icdp-hostpage-view",function(b){return function(){function a(b){u(this,a);this.viewInterface=b;this.callbacks=this.callbackRegistry()}x(a,[{key:"bindViewCallbacks",
value:function(a){var b=this;Object.keys(a).forEach(function(c){b.callbacks[c]=a[c]})}},{key:"callbackRegistry",value:function(){return{beforeSheetShow:function(){},afterSheetShow:function(){},beforeSheetHide:function(){},afterSheetHide:function(){},updateCartValue:function(){}}}}]);return a}()});d.when("A","a-carousel-framework").register("icdp-carousel-manager",function(b,a){return function e(){u(this,e)}});d.when("A").register("icdp-carousel-view",function(b){return function c(){u(this,c)}});d.when("A",
"a-sheet","a-sheet-util","icdp-constants","icdp-iframe-view","icdp-skeleton-view","icdp-state-getter","icdp-state-updater","icdp-container-utils","icdp-common-utils","icdp-client-data","icdp-custom-aui-sheet-apis","icdp-sheet-mash-support").register("icdp-sheet-view",function(b,a,c,e,f,d,h,w,k,n,p,q,t){c=e.containerSelectors;var m=c.CONTAINER_NAME,v=c.CONTAINER_WRAPPER,B=c.CONTAINER_CLOSE_SELECTOR,y=c.AUI_BOTTOM_SHEET_CLOSE_SELECTOR,A=e.icdpLayoutSelectors.ICDP_PPD,I=e.icdpLayoutStyles.ICDP_PADDING_TOP,
C=e.metrics.ICDP_CONTAINER_LOAD_COMPLETE;c=e.stateModelAttrConstants;var z=c.CLIENT_ID,E=c.PREFETCHED_IFRAME,G=e.events.ICDP_HEIGHT_CHANGE_EVENT,g=void 0,r=b.$;return function(){function c(a){u(this,c);this.viewInterface=a;this.afterHideCallback=this.contentHeight=this.skeleton=this.iframe=this.sheet=null;g=this;this.subscribeToEvents()}x(c,[{key:"resetSheetVariables",value:function(){this.contentHeight=null;p.setClientData(null);g.afterHideCallback=null;g.sheet.$container.css({height:"",maxHeight:""})}},
{key:"getSheetParams",value:function(){return{name:m,inlineContent:this.getInlineContentTemplate()}}},{key:"getInlineContentTemplate",value:function(){return'\x3cdiv id\x3d"icdp-container" class\x3d"icdp-container"\x3e\n                        \x3cdiv class\x3d"icdp-container-head"\x3e\n                            \x3ca class\x3d"icdp-close" tabindex\x3d"0" role\x3d"button"\n                                aria-label\x3d"Product quick view. Close"\n                                data-csa-c-type\x3d"uxElement" data-csa-c-element-type\x3d"navigational" data-csa-c-action\x3d"icdp-close-button-click" \x3e\n                                \x3ci class\x3d"a-icon a-icon-close icdp-close-icon" role\x3d"presentation"\x3e\x3c/i\x3e\n                            \x3c/a\x3e\n                        \x3c/div\x3e\n                        \x3cdiv class\x3d"icdp-container-body"\x3e\n                        \x3c/div\x3e\n                    \x3c/div\x3e'}},
{key:"createAUISheetInstance",value:function(){this.sheet||(this.sheet=a.create(this.getSheetParams()))}},{key:"showSheet",value:function(){this.sheet._height=k.getIcdpContainerStartingHeight();this.sheet?this.sheet.show():a.showSheet(this.sheet)}},{key:"updateSheetCSS",value:function(a){a?(this.sheet.$container.addClass(v),this.sheet.$contentContainer.addClass(v)):(this.sheet.$container.removeClass(v),this.sheet.$contentContainer.removeClass(v))}},{key:"changeHeight",value:function(a,b){g.sheet.$container.css("height",
n.getMinimumValue(a,b))}},{key:"changeHeightConstraints",value:function(a){g.sheet.$container.css("maxHeight",a)}},{key:"updateSheetHeight",value:function(){var a=k.getIcdpContainerMaxHeight(),c=k.getIcdpContainerStartingHeight();b.delay(function(){g.changeHeightConstraints(a);g.changeHeight(c,a)},0)}},{key:"loadIFrame",value:function(){this.iframe=h.getPrefetchedIframe(h.getURL());this.iframe||(this.iframe=new f(h.getURL(),!1));this.skeleton=new d;var a=this.sheet.$container.find(".icdp-container-body");
a&&(a.css("overflow-y","hidden"),a.append(this.skeleton.getSkeleton(),this.iframe.getIFrame()))}},{key:"logUsedPrefetch",value:function(a){var b=h.getStateAttribute(z);r.ajax({type:"POST",url:"/util/secondary/log-prefetch-impression",data:{subPageType:b,relatedRequestId:a},dataType:"text",cache:!1,success:function(a,b,c){a=c.getResponseHeader("x-amz-rid");l.ue&&l.ues&&l.ues("id2",a)}})}},{key:"unloadIFrame",value:function(){this.iframe&&this.iframe.unload();this.skeleton&&this.skeleton.unload();delete h.getStateAttribute(E)[h.getURL()]}},
{key:"addStylesToICDPLayout",value:function(){var a=this.iframe.$element[0]?this.iframe.$element[0].contentDocument:null;a&&(r(a).find(A).css("padding-top",I),r(a).find(A).append(r(document.createElement("div")).attr({style:"height:32px; width:100%; position:fixed !important; top:0; left:0; background-color:#FFFFFF"})))}},{key:"toggleCrossButtonHandler",value:function(a){var b=this.sheet.$container.find(B);a&&b.length?b.bind("click touch",g.hideSheet.bind(g)):b.unbind("click touch",g.hideSheet.bind(g))}},
{key:"toggleSheetCloseButtonFocusHandler",value:function(a){var b=this.sheet.$container.find(y);a&&b.length?b.bind("focus",g.setFocusToCloseButton.bind(g)):b.unbind("focus",g.setFocusToCloseButton.bind(g))}},{key:"setFocusToCloseButton",value:function(){var a=this.sheet.$contentContainer.find(".icdp-close");a.length?a.first().focus():""}},{key:"hideSheet",value:function(){this.sheet&&this.sheet.hide()}},{key:"resizeBottomSheet",value:function(a,c){var e=G+":"+g.getSheetParams().name;if(g.sheet._animating){if(!b.isListening(e))b.on(e,
function(){q.changeHeight(g.sheet,{height:g.contentHeight||k.getIcdpContainerStartingHeight(),maxHeight:k.getIcdpContainerMaxHeight(),duration:.3});b.off(e)})}else b.isListening(e)&&b.off(e),q.changeHeight(g.sheet,{duration:.3,height:a,maxHeight:c})}},{key:"safetyResizeBottomSheet",value:function(){g.resizeBottomSheet(g.contentHeight||k.getIcdpContainerStartingHeight(),k.getIcdpContainerMaxHeight())}},{key:"addSheetInstrumentation",value:function(){var a=g.sheet.$container[0];a.getAttribute("data-csa-c-id")||
(a.setAttribute("data-csa-c-type","slot"),a.setAttribute("data-csa-c-content-id","icdp-web-container-content"),a.setAttribute("data-csa-c-slot-id","icdp-web-container-slot"),a.setAttribute("data-csa-c-component","bottomsheet"),l.csa("Content",{element:a}))}},{key:"subscribeToEvents",value:function(){this.subscribeToAUISheetCallbacks();this.subscribeToChangeHeightEvent();this.subscribeToICDPContentLoadEvent();this.subscribeToOrientationChangeEvent();this.subscribeToICDPHideSheetEvents()}},{key:"removeSkeleton",
value:function(){g.skeleton&&g.skeleton.unload();var a=this.sheet.$container.find(".icdp-container-body");a&&a.css("overflow-y","visible")}},{key:"subscribeToICDPHideSheetEvents",value:function(){b.on("icdp-close-sheet",function(){g.sheet.hide()});b.on("icdp-close-sheet-and-redirect",function(a){g.sheet.hide();a&&a.url&&"string"===typeof a.url&&(g.afterHideCallback=function(){var c=0;n.isAndroidAmazonApp()&&(c=350);b.delay(function(){l.location.href=a.url},c)})})}},{key:"executeAfterHideCallback",
value:function(){g.afterHideCallback&&"function"===typeof g.afterHideCallback&&g.afterHideCallback()}},{key:"subscribeToICDPContentLoadEvent",value:function(){b.on("icdp-remove-skeleton",function(a){g.removeSkeleton()});b.on("icdp-content-load",function(a){g.addStylesToICDPLayout();g.removeSkeleton();g.iframe.isPrefetched?(n.logCounter(h.getStateAttribute(z)+":prefetchIFrameLoaded"),a=g.iframe.getXAmzRid(),g.logUsedPrefetch(a)):n.logCounter(h.getStateAttribute(z)+":IFrameLoaded")})}},{key:"subscribeToChangeHeightEvent",
value:function(){b.on("icdp-content-height-change",function(a){var b=k.getIcdpContainerMaxHeight(),c=Math.min(g.contentHeight||k.getIcdpContainerStartingHeight(),b),e=Math.min(a.height,b);(e>c||Math.abs(c-e)>=k.getIcdpContainerResizeThreshold())&&g.resizeBottomSheet(a.height,b);g.contentHeight=a.height});b.on("resize",function(){var a=k.getIcdpContainerMaxHeight(),b=g.contentHeight||k.getIcdpContainerStartingHeight();g.resizeBottomSheet(b,a)})}},{key:"subscribeToOrientationChangeEvent",value:function(){r(l).bind("orientationchange",
function(a){b.delay(function(){var a=k.getIcdpContainerMaxHeight();g.changeHeightConstraints(a);g.changeHeight(g.contentHeight,a)},150)})}},{key:"subscribeToAUISheetCallbacks",value:function(){b.on("a:sheet:beforeShow:"+this.getSheetParams().name,function(a){g.updateSheetCSS(!0);g.toggleCrossButtonHandler(!0);g.loadIFrame();g.addSheetInstrumentation();g.viewInterface.beforeSheetShowCallback();g.updateSheetHeight();t.registerMashEvents()});b.on("a:sheet:afterHide:"+this.getSheetParams().name,function(a){g.updateSheetCSS();
g.toggleCrossButtonHandler();g.unloadIFrame();g.viewInterface.afterSheetHideCallback();g.executeAfterHideCallback();g.resetSheetVariables();g.toggleSheetCloseButtonFocusHandler();t.deregisterMashEvents()});b.on("a:sheet:afterShow:"+this.getSheetParams().name,function(a){g.toggleSheetCloseButtonFocusHandler(!0);n.logCounter(C);g.safetyResizeBottomSheet();b.trigger(G+":"+g.getSheetParams().name)});b.on("a:sheet:beforeHide:"+this.getSheetParams().name,function(a){})}}]);return c}()});d.when("A","a-sheet-util",
"prv:a-sheet-constants","icdp-constants").register("icdp-custom-aui-sheet-apis",function(b,a,c,e){var f=e.events.ICDP_HEIGHT_CHANGE_EVENT;return{changeHeight:function(e,h){2===e._version&&e._fullScreen&&(e._fullScreen=!1,e._active&&e.$container.removeClass("a-sheet-full-screen"));var m=!1!==h.persist,k=1E3*parseFloat(h.duration),n=h.height,p=Math.min(Math.max(n,0),h.maxHeight),q=e.$container;if(e._animating||!b.isFiniteNumber(p))return d.log("Failed to change bottom sheet height: "+(e._animating?
"bottom sheet is animating":"height is not finite"),"WARN","changeHeight"),!1;m&&(e._height=n);if(!e._active||p===q.height())return a.triggerEvent(c.events.changeHeight,e),!0;b.isFiniteNumber(k)||(k=e._duration);var t=function(){e._animating=!1;b.trigger(f+":"+e._name);a.triggerEvent(c.events.changeHeight,e)};0<k&&(e._animating=!0,e._autoHeight&&q.css("height",q.height()+"px"));e.updatePosition();b.animationFrameDelay(function(){b.animate(q,{height:p+"px",maxHeight:h.maxHeight},k,"ease-out",t)});
return!0}}});d.register("icdp-sheet-mash-support",function(){return{registerMashEvents:function(){},deregisterMashEvents:function(){}}});d.when("A","icdp-constants","icdp-state-model","icdp-asin-model","icdp-url-builder","icdp-common-utils").register("icdp-state-manager",function(b,a,c,e,f,d){b=a.stateModelAttrConstants;var m=b.LIST,w=b.CLIENT_ID,k=b.EXPERIENCE,n=b.SWIPE_DIRECTION,p=b.SELECTED_INDEX,q=b.TREATMENT,t=b.SELECTED_ASIN_DATA,l=b.IS_FDP,v=b.PREFETCHED_IFRAME,B=a.urlConstants.IS_FULLY_SELECTED,
y=null,A=function(){function a(b){u(this,a);this.state=new c;this.updateState(b)}x(a,[{key:"getStateAttribute",value:function(a){switch(a){case m:a=this.state.getList();break;case w:a=this.state.getClientId();break;case k:a=this.state.getExperience();break;case p:a=this.state.getSelectedIndex();break;case n:a=this.state.getSwipeDirection();break;case q:a=this.state.getTreatment();break;case t:a=this.state.getSelectedAsin();break;case l:a=this.state.getIsFdp();break;case v:a=this.state.getPrefetchedIFrames();
break;default:a={}}return a}},{key:"getURL",value:function(){var a=this.getStateAttribute(t),b=a.getIcdpUrl();b||(b=f.buildIcdpUrl(a.getAsin(),this.state.getExperience(),this.state.getClientId(),this.state.getTreatment(),a.getClientUrlParams()),a.icdpUrl=b);return b}},{key:"getPrefetchedIframe",value:function(a){return this.state.getPrefetchedIFrames()[a]}},{key:"updateState",value:function(a){var b=this;try{Object.keys(a).forEach(function(c){switch(c){case m:b.updateList(a[c]);break;case w:b.updateClientId(a[c]);
break;case k:b.updateExperience(a[c]);break;case p:b.updateSelectedIndex(a[c]);break;case n:b.updateSwipeDirection(a[c]);break;case q:b.updateTreatment(a[c]);break;case t:b.updateSelectedAsinData(a[c]);break;case l:b.updateIsFdp(a[c]);break;case v:b.updatePrefetchedIFrames(a[c])}})}catch(E){}}},{key:"removeAllPrefetchedIFrames",value:function(){this.state.prefetchedIFrames={}}},{key:"removePrefetchedIFrames",value:function(a){var b=this;Array.isArray(a)&&a.forEach(function(a){a.asin&&(a=f.buildIcdpUrl(a.asin,
b.getStateAttribute(k),b.getStateAttribute(w),b.getStateAttribute(q),a.urlParameters),delete b.getStateAttribute(v)[a])})}},{key:"updateIsFdp",value:function(a){this.state.isFdp=a}},{key:"updatePrefetchedIFrames",value:function(a){var b=this.getStateAttribute(v),c=Object.keys(a);c.forEach(function(e){b[c]=a[c]});this.state.prefetchedIFrames=b}},{key:"updateSelectedAsinData",value:function(a){var b=this.getStateAttribute(t);a&&a.twisterAsin&&(b.twisterAsin=a.twisterAsin);a&&a.hasOwnProperty(B)&&(b.isFullySelected=
!!a.isFullySelected)}},{key:"updateClientId",value:function(a){this.state.clientId=a}},{key:"updateExperience",value:function(a){this.state.experience=a}},{key:"updateList",value:function(a){var b=this;try{(function(){var c=[];a.forEach(function(a){var b=new e;b.asin=a.asin;b.clientUrlParams=a.urlParameters;c.push(b)});b.state.list=c})()}catch(E){}}},{key:"updateSelectedIndex",value:function(a){this.state.selectedIndex=a}},{key:"updateSwipeDirection",value:function(a){try{this.state.swipeDirection=
a}catch(z){}}},{key:"updateTreatment",value:function(a){try{this.state.treatment=a}catch(z){}}}]);return a}();return function(a){y||(y=new A(a));return y}});d.when("A","icdp-state-manager").register("icdp-state-getter",function(b,a){b=a();return{getStateAttribute:b.getStateAttribute.bind(b),getURL:b.getURL.bind(b),getPrefetchedIframe:b.getPrefetchedIframe.bind(b)}});d.when("A","icdp-state-manager").register("icdp-state-updater",function(b,a){b=a();return{updateState:b.updateState.bind(b),removeAllPrefetchedIFrames:b.removeAllPrefetchedIFrames.bind(b),
removePrefetchedIFrames:b.removePrefetchedIFrames.bind(b)}});d.when("A").register("icdp-state-model",function(b){return function(){function a(b){u(this,a);this.clientId="icdpClient";this.experience="inspiration";this.treatment="";this.selectedIndex=0;this.list=[];this.swipeDirection="";this.isFdp=!1;this.prefetchedIFrames={}}x(a,[{key:"getClientId",value:function(){return this.clientId}},{key:"getExperience",value:function(){return this.experience}},{key:"getTreatment",value:function(){return this.treatment}},
{key:"getSelectedIndex",value:function(){return this.selectedIndex}},{key:"getList",value:function(){return this.list}},{key:"getSwipeDirection",value:function(){return this.swipeDirection}},{key:"getSelectedAsin",value:function(){var a=this.getSelectedIndex();return this.getList()[a]}},{key:"getIsFdp",value:function(){return this.isFdp}},{key:"getPrefetchedIFrames",value:function(){return this.prefetchedIFrames}}]);return a}()});d.when("A","icdp-constants").register("icdp-asin-model",function(b,
a){var c=a.urlConstants.CLIENT_REF_MARKER;return function(){function a(){u(this,a);this.twisterAsin=this.icdpUrl=this.clientUrlParams=this.asin="";this.isFullySelected=!1}x(a,[{key:"getAsin",value:function(){return this.asin}},{key:"getClientUrlParams",value:function(){return this.clientUrlParams}},{key:"getIcdpUrl",value:function(){return this.icdpUrl}},{key:"getTwisterAsin",value:function(){return this.twisterAsin}},{key:"isFullySelectedState",value:function(){return this.isFullySelected}},{key:"getClientRefMarker",
value:function(){var a="";this.clientUrlParams&&(a=this.clientUrlParams[c]);return a}}]);return a}()});d.when("A").register("icdp-client-data",function(b){var a=void 0;return{getClientData:function(){return a},setClientData:function(b){a=b}}});d.when("A","icdp-constants","icdp-state-getter","icdp-common-utils","icdp-url-builder").register("icdp-iframe-view",function(b,a,c,e,f){var d=a.containerSelectors.ICDP_IFRAME_ID;a=a.stateModelAttrConstants;var h=a.CLIENT_ID,w=a.PREFETCHED_IFRAME;return function(){function a(b,
c){u(this,a);this.url=b;this.$element=this.getContentTemplate();this.headers={};this.isPrefetched=c&&this.isIFrameSrcdocSupported();this.init(b)}x(a,[{key:"getIFrame",value:function(){return this.$element[0]}},{key:"unload",value:function(){this.$element.remove()}},{key:"getContentTemplate",value:function(){var a=b.$(document.createElement("iframe"));a.attr({id:d,height:"100%",allowTransparency:!1,style:"visibility:visible; opacity:1; background-color:#FFFFFF; display: block;",sandbox:"allow-scripts allow-modals allow-forms allow-same-origin allow-top-navigation-by-user-activation allow-popups allow-top-navigation",
title:"Product quick view.","data-csa-c-type":"widget","data-csa-c-content-id":"icdp-web-container-iframe-content","data-csa-c-slot-id":"icdp-web-container-iframe-slot"});return a}},{key:"init",value:function(a){var f=this;this.isPrefetched?(this.trackRequest(a,function(a){f.headers=a.headers;f.getIFrame().srcdoc=a.content;f.getIFrame().onload=function(){b.trigger("icdp-remove-skeleton")}}),e.logCounter("icdp:"+c.getStateAttribute(h)+":iframe:content-rendered-through:srcdoc")):(this.getIFrame().src=
a,this.getIFrame().onload=function(){b.trigger("icdp-remove-skeleton")},e.logCounter("icdp:"+c.getStateAttribute(h)+":iframe:content-rendered-through:src"))}},{key:"trackRequest",value:function(a,b){var d=new XMLHttpRequest,p=f.addPrefetchParamToURL(a);d.open("GET",p,!0);d.onreadystatechange=function(){if(d.readyState===XMLHttpRequest.DONE){var f={headers:d.getAllResponseHeaders(),content:d.responseText,status:d.status};200!==d.status&&(delete c.getStateAttribute(w)[a],e.logger({},"icdp_prefetch_url_request_failed",
"Url request failed with status code: "+d.status));b(f)}};d.send()}},{key:"getResponseHeaders",value:function(){return this.headers}},{key:"getXAmzRid",value:function(){var a=this.getResponseHeaders();if("string"!==typeof a)return null;var b=null;a.trim().split("\n").forEach(function(a){a=a.split(": ");var c=F(a,2);a=c[0];c=c[1];a&&c&&(a=a.trim().toLowerCase(),c=c.trim(),"x-amz-rid"===a&&(b=c))});return b||null}},{key:"setHeight",value:function(a){this.$element.css("height",a)}},{key:"isIFrameSrcdocSupported",
value:function(){return"srcdoc"in this.getIFrame()}}]);return a}()});d.when("A").register("icdp-page-view",function(b){var a=void 0;return function(){function c(b){u(this,c);this.viewInterface=b;a=this;this.subscribeToEvents()}x(c,[{key:"subscribeToIcdpChangeAsinEvent",value:function(){b.on("icdp-change-asin",function(b){a.viewInterface.updateState({selectedASINData:{twisterAsin:b.asin,isFullySelected:b.isFullySelected}})})}},{key:"subscribeToUpdateFdpStateEvent",value:function(){b.on("icdp-update-fdp-state",
function(b){a.viewInterface.updateState({isFdp:!0})})}},{key:"subscribeToEvents",value:function(){this.subscribeToIcdpChangeAsinEvent();this.subscribeToUpdateFdpStateEvent()}}]);return c}()});d.when("A","icdp-constants").register("icdp-skeleton-view",function(b,a){var c=a.containerSelectors.ICDP_SKELETON_ID;return function(){function a(){u(this,a);this.$element=this.getContentTemplate()}x(a,[{key:"getSkeleton",value:function(){return this.$element}},{key:"unload",value:function(){this.$element&&(this.$element.remove(),
this.$element=null)}},{key:"getContentTemplate",value:function(){var a=b.$(document.createElement("div"));a.attr({id:c});a.append(this.getTitle(),this.getImage(),this.getTwister(),this.getOfferDetails(),this.getActionBar());return a}},{key:"getTitle",value:function(){return"\x3cdiv class\x3d'a-section a-spacing-none a-padding-base'\x3e\n                        \x3cdiv class\x3d'icdp-skeleton-text-extra-large a-spacing-mini'\x3e\x3c/div\x3e\n                        \x3cdiv class\x3d'icdp-skeleton-text-extra-large a-spacing-mini'\x3e\x3c/div\x3e\n                        \x3cdiv class\x3d'icdp-skeleton-text-small'\x3e\x3c/div\x3e\n                    \x3c/div\x3e"}},
{key:"getImage",value:function(){return"\x3cdiv class\x3d'a-section'\x3e\n                        \x3cdiv class\x3d'icdp-skeleton-image-block a-spacing-base'\x3e\x3c/div\x3e\n                        \x3cdiv class\x3d'icdp-skeleton-image-swatches aok-align-center-horizontally'\x3e\x3c/div\x3e\n                    \x3c/div\x3e"}},{key:"getTwister",value:function(){return"\x3chr class\x3d'a-spacing-mini'\x3e\n                    \x3cdiv class\x3d'a-section a-spacing-none a-padding-base'\x3e\n                        \x3cdiv class\x3d'icdp-skeleton-text-base a-spacing-mini'\x3e\x3c/div\x3e\n                    \x3c/div\x3e\n                    \x3chr class\x3d'a-spacing-none'\x3e"}},
{key:"getOfferDetails",value:function(){return"\x3cdiv class\x3d'a-section a-spacing-none a-padding-base'\x3e\n                        \x3cdiv class\x3d\"icdp-skeleton-text-tall-mini a-spacing-mini\"\x3e\x3c/div\x3e\n                        \x3cdiv class\x3d\"icdp-skeleton-text-tall-small a-spacing-mini\"\x3e\x3c/div\x3e\n                        \x3cdiv class\x3d\"icdp-skeleton-text-small\"\x3e\x3c/div\x3e\n                    \x3c/div\x3e\n                    \x3cdiv class\x3d'a-section a-spacing-none a-padding-base'\x3e\n                        \x3cdiv class\x3d'icdp-skeleton-text-micro'\x3e\x3c/div\x3e\n                    \x3c/div\x3e\n                    \x3cdiv class\x3d'a-section a-spacing-none a-padding-base'\x3e\n                        \x3cdiv class\x3d'icdp-skeleton-text-extra-large a-spacing-mini'\x3e\x3c/div\x3e\n                        \x3cdiv class\x3d'icdp-skeleton-text-extra-large'\x3e\x3c/div\x3e\n                    \x3c/div\x3e\n                    \x3cdiv class\x3d'a-section a-spacing-none a-padding-base'\x3e\n                        \x3cdiv class\x3d'icdp-skeleton-text-medium a-spacing-mini'\x3e\x3c/div\x3e\n                        \x3cdiv class\x3d'icdp-skeleton-text-large'\x3e\x3c/div\x3e\n                    \x3c/div\x3e"}},
{key:"getActionBar",value:function(){return"\x3cdiv class\x3d'a-row a-padding-base icdp-skeleton-action-bar'\x3e\n                        \x3cdiv class\x3d'a-column a-spacing-base icdp-skeleton-button'\x3e\x3c/div\x3e\n                        \x3cdiv class\x3d\"a-column a-spacing-base icdp-skeleton-button a-span-last\"\x3e\x3c/div\x3e\n                    \x3c/div\x3e"}}]);return a}()});d.when("A").register("icdp-multi-asin-view-controller",function(b){var a=void 0,c=function(){function a(b){u(this,
a)}x(a,[{key:"loadContainer",value:function(a){}}]);return a}();return function(b){a||(a=new c(b));return a}});d.when("A","single-asin-view-interface-factory","icdp-sheet-view","icdp-hostpage-view","icdp-state-updater","icdp-setup-container-to-page-bridge","icdp-page-view").register("icdp-single-asin-view-controller",function(b,a,c,e,f,d,h){var m=void 0,k=function(){function b(d){u(this,b);a.init(this);this.stateUpdater=f;this.icdpSheet=new c(a.getSheetInterface());this.hostPage=new e(a.getHostPageInterface());
this.hostPage.bindViewCallbacks(d);this.icdpSheet.createAUISheetInstance();this.icdpPageView=new h(a.getIcdpPageInterface())}x(b,[{key:"loadContainer",value:function(){this.icdpSheet.showSheet()}},{key:"setupClientToContainerBridge",value:function(a){d.setupClientToContainerBridge(a)}}]);return b}();return function(a){m||(m=new k(a));return m}});d.when("A","icdp-single-asin-view-controller","icdp-multi-asin-view-controller").register("icdp-controller-factory",function(b,a,c){return function(){function b(a){u(this,
b);this.icdpController=null}x(b,[{key:"getICDPController",value:function(b,e){1<b.length?this.icdpController=c(e):1===b.length&&(this.icdpController=a(e));return this.icdpController}}]);return b}()});d.when("A","icdp-sheet-interface","icdp-hostpage-interface","icdp-page-interface").register("single-asin-view-interface-factory",function(b,a,c,e){var d=null;return{init:function(a){d=a},getSheetInterface:function(){return a(d)},getHostPageInterface:function(){return c(d)},getIcdpPageInterface:function(){return e(d)}}});
d.when("A").register("multi-asin-view-interface-factory",function(b){return{init:function(a){}}});d.when("A").register("icdp-hostpage-interface",function(b){return function(a){return{}}});d.when("A").register("icdp-sheet-interface",function(b){return function(a){return{beforeSheetShowCallback:function(){a.hostPage.callbacks.beforeSheetShow()},afterSheetHideCallback:function(){a.hostPage.callbacks.afterSheetHide()},updateState:function(b){a.stateUpdater.updateState(b)}}}});d.when("A").register("icdp-page-interface",
function(b){return function(a){return{updateState:function(b){a.stateUpdater.updateState(b)}}}});d.when("A","icdp-constants").register("icdp-common-utils",function(b,a){var c=a.FATAL,e=a.ATTRIBUTION,f=a.configs,m=f.LANDSCAPE,h=f.PORTRAIT;f=a.devices;var w=f.M_WEB,k=f.M_APP,n=a.stateModelAttrConstants.CLIENTS_WITH_CHROME;return{logger:function(a,b,f){l.ue&&b&&l.ue.count(b,1);d.log(f+" : "+(a&&a.message?a.message:""),c,e)},logCounter:function(a,b){l.ue&&l.ue.count&&(b=b||(l.ue.count(a)||0)+1,l.ue.count(a,
b))},getViewPortHeight:function(){return l.visualViewport?l.visualViewport.height:l.innerHeight},isAmazonApp:function(){return b.capabilities&&b.capabilities.isAmazonApp},isAndroidAmazonApp:function(){return b.capabilities&&b.capabilities.android&&this.isAmazonApp()},getDeviceOrientation:function(){if(l.matchMedia("(orientation: portrait)").matches)return h;if(l.matchMedia("(orientation: landscape)").matches)return m},getDeviceType:function(){return this.isAmazonApp()?k:w},getMinimumValue:function(a,
b){return Math.min(a,b)||a||b},isChromePresent:function(a){return n.includes(a)}}});d.when("A").register("icdp-config",function(b){b={mApp:{portrait:{startingContainerHeightInPx:450},landscape:{withChrome:{startingContainerHeightInPx:225},withoutChrome:{startingContainerHeightInPx:250}}},mWeb:{portrait:{startingContainerHeightInPx:450},landscape:{startingContainerHeightInPx:250}}};var a={mApp:{portrait:{resizeThresholdInPx:70}},mWeb:{portrait:{resizeThresholdInPx:70}}};return{C:{mApp:{portrait:{withChrome:{offsetTopInPx:44},
withoutChrome:{offsetTopInPx:100}},landscape:{withChrome:{offsetTopInPx:44},withoutChrome:{offsetTopInPx:80}},resizeThreshold:0},mWeb:{offsetTopInPx:80,resizeThreshold:0}},T1:b,T2:b,T3:a,T4:a}});d.when("A","icdp-config","icdp-constants","icdp-state-getter","icdp-common-utils").register("icdp-config-parser",function(b,a,c,e,d){function f(b,c,e,f){var k=a[e];if(!k)return null;e=k[d.getDeviceType()];if(!e)return k[b];c=e[c];f=f?r:v;return(f=c&&c[f]?c[f]:null)&&f[b]?f[b]:c&&c[b]?c[b]:e[b]}function h(a){var b=
e.getStateAttribute(l),c=d.getDeviceOrientation(),h=d.isChromePresent(e.getStateAttribute(k));(b=f(a,c,b,h))||(b=f(a,c,n,h));return b}b=c.stateModelAttrConstants;var l=b.TREATMENT,k=b.CLIENT_ID,n=c.treatments.WEBLAB_TREATMENT_C;c=c.configs;var p=c.OFFSET_TOP_PX,q=c.STARTING_CONTAINER_HEIGHT_PX,t=c.RESIZE_THRESHOLD,r=c.WITH_CHROME,v=c.WITHOUT_CHROME;return{getStartingContainerHeight:function(){return h(q)},getOffsetTop:function(){return h(p)},getContainerResizeThreshold:function(){return h(t)}}});
d.when("A").register("icdp-constants",function(b){return{FATAL:"fatal",ERROR:"error",ATTRIBUTION:"InContextDetailPage",stateModelAttrConstants:{CLIENT_ID:"clientId",PREFETCHED_IFRAME:"prefetchedIFrame",LIST:"list",CALLBACKS:"callbacks",SUCCESS_CALLBACK_KEY:"success",SUCCESS_CALLBACK:"successCallback",FAILURE_CALLBACK_KEY:"failure",FAILURE_CALLBACK:"failureCallback",SELECTED_INDEX:"selectedIndex",SWIPE_DIRECTION:"swipeDirection",EXPERIENCE:"experience",TREATMENT:"treatment",SELECTED_ASIN_DATA:"selectedASINData",
CLIENTS_WITH_CHROME:["buyAgain"],CLIENTS_WITHOUT_CHROME:["sbi"],IS_FDP:"isFdp"},containerSelectors:{CONTAINER_NAME:"icdp-container-name",CONTAINER_WRAPPER:"icdp-container-wrapper",IFRAME:"iframe",DISMISS_ICDP_ACTION:"dismiss-icdp-sheet",CONTAINER_CLOSE_SELECTOR:".icdp-close",ICDP_IFRAME_ID:"icdp-iFrame",ICDP_SKELETON_ID:"icdp-skeleton",AUI_BOTTOM_SHEET_CLOSE_SELECTOR:"button.a-sheet-close"},icdpLayoutStyles:{ICDP_PADDING_TOP:"32px"},icdpLayoutSelectors:{ICDP_PPD:"#icdp-ppd"},metrics:{ICDP_CONTAINER_LOAD_INIT:"icdp_container_load_init",
ICDP_CONTAINER_LOAD_COMPLETE:"icdp_container_load_complete"},fatalMetrics:{ICDP_INIT_FAIL:"icdp_initialisation_failed",ICDP_LOAD_FAIL:"icdp_container_loading_failed",ICDP_LIST_UNAVAILABLE:"icdp_asin_list_unavailable",ICDP_INVALID_SELECTED_ASIN:"icdp_invalid_selected_asin",ICDP_PAGE_EVENT_VALIDATION_FAILED:"icdp_page_event_schema_validation_failed"},errorMessages:{ICDP_INIT_FAILED_MESSAGE:"ICDP initialisation failed.",ICDP_LOAD_FAILED_MESSAGE:"ICDP Container loading failed.",ICDP_LIST_UNAVAILABLE_MESSAGE:"ICDP ASIN list is unavailable.",
ICDP_STATE_UNAVAILABLE_MESSAGE:"ICDP State is unavailable",ICDP_INVALID_SELECTED_ASIN_MESSAGE:"ICDP Selected ASIN is invalid",ICDP_PAGE_EVENT_VALIDATION_FAILED_MESSAGE:"ICDP Page event schema validation failed: "},urlConstants:{ICDP_URL_PATH:"/icdp",ICDP_REQUEST_KEY:"icdpRequest",ICDP_CLIENT_ID_KEY:"icdpClientId",ICDP_EXP_KEY:"icdpExp",DP_URL_PATH:"/dp",REF_MARKER_KEY:"ref_",ICDP_STRING:"icdp",REF_MARKER_DELIMITER:"_",REF_MARKER_INGRESS:"ingress",PAGE_EXPERIENCES_KEY:"pageExperiences",DEVICE_TYPES_KEY:"deviceTypes",
DP_EGRESS_POINTS_KEY:"dpEgressPoints",CLIENT_REF_MARKER:"clientRefMarker",TWISTER_FULLY_SELECTION_KEY:"psc",URL_PARAM_VALUE_ONE:"1",IS_FULLY_SELECTED:"isFullySelected",SBO:"sbo",PREFETCH_URL_PARAM:"isPrefetch\x3dY"},treatments:{WEBLAB_TREATMENT_C:"C",WEBLAB_TREATMENT_T1:"T1",WEBLAB_TREATMENT_T2:"T2"},configs:{LANDSCAPE:"landscape",PORTRAIT:"portrait",OFFSET_TOP_PX:"offsetTopInPx",RESIZE_THRESHOLD:"resizeThresholdInPx",STARTING_CONTAINER_HEIGHT_PX:"startingContainerHeightInPx",WITH_CHROME:"withChrome",
WITHOUT_CHROME:"withoutChrome"},devices:{M_APP:"mApp",M_WEB:"mWeb"},events:{ICDP_HEIGHT_CHANGE_EVENT:"icdp-height-change-event"}}});d.when("A","icdp-constants","icdp-ref-marker-builder").register("icdp-url-builder",function(b,a,c){function e(a,c){function e(a,b){return d.push(a+"\x3d"+b)}var d=[];return{buildUrl:function(){if(!d||0===d.length)return a+"/"+c;var b=d.join("\x26");return a+"/"+c+"?"+b},setClientUrlParams:function(a){a&&Object.entries(a).forEach(function(b){var c=F(b,2);b=c[0];c=c[1];
b&&c&&"string"===typeof b&&"string"===typeof a[b]&&e(b,c)});return this},setIcdpExp:function(a){a&&e(l,a);return this},setIcdpClientId:function(a){a&&e(h,a);return this},setIcdpRequest:function(a){a&&e(m,a);return this},setRefMarker:function(a){a&&e(n,a);return this},setFullySelectedStateParam:function(a){a&&e(p,q);return this},setSboParam:function(){var a=b.$;(a=a("#icdp-iFrame").contents().find(".icdp-mod-swatch-button.a-button-selected").find("input.a-button-input").data("stereotype"))&&e(t,encodeURIComponent(a));
return this}}}a=a.urlConstants;var d=a.ICDP_URL_PATH,m=a.ICDP_REQUEST_KEY,h=a.ICDP_CLIENT_ID_KEY,l=a.ICDP_EXP_KEY,k=a.DP_URL_PATH,n=a.REF_MARKER_KEY,p=a.TWISTER_FULLY_SELECTION_KEY,q=a.URL_PARAM_VALUE_ONE,t=a.SBO,r=a.REF_MARKER_INGRESS,v=a.PREFETCH_URL_PARAM,u=a.CLIENT_REF_MARKER;return{buildIcdpUrl:function(a,b,f,k,h){var m="";h&&(m=h[u]);m&&(m=m.slice(0,36));m=c(f).prependComponent(m).appendComponent(r).build();return e(d,a).setIcdpClientId(f).setIcdpRequest(b).setIcdpExp(k).setRefMarker(m).setClientUrlParams(h).buildUrl()},
buildDPUrl:function(a,b,c,d){return e(k,a).setRefMarker(c).setClientUrlParams(b).setFullySelectedStateParam(d).setSboParam().buildUrl()},addPrefetchParamToURL:function(a){return-1===a.indexOf("?")?a+"?"+v:a+"\x26"+v}}});d.when("A").execute(function(b){d.when("MShopChrome","3p-promise").execute(function(a,c){(function(){return new c(function(c,d){a.getBottomBarsHeight({successCallback:function(a){b.trigger("icdp-chrome-height-util",{chromeHeight:a})},failCallback:function(a){b.trigger("icdp-chrome-height-util",
{chromeHeight:null})}})})})()})});d.when("A","icdp-common-utils","icdp-config-parser","icdp-constants").register("icdp-container-utils",function(b,a,c,e){function d(){var b=a.getViewPortHeight(),e=c.getOffsetTop()||44;return b-e}return{getIcdpContainerMaxHeight:d,getIcdpContainerStartingHeight:function(){return c.getStartingContainerHeight()||d()},getIcdpContainerResizeThreshold:function(){return c.getContainerResizeThreshold()||0}}});d.when("A").register("icdp-ref-marker-abbreviations",function(b){var a=
{pageExperiences:{inspire:"ins",sbi:"sbi",buyAgain:"ba"},deviceTypes:{mWeb:"mweb",mApp:"msp"},dpEgressPoints:{seeAllDetails:"sd",seeAllDetailsFallbackCX:"sdfcx",mediaBlock:"mb",title:"title",review:"review"}};return function(b,e){return b&&e&&a[b]&&a[b][e]?a[b][e]:""}});d.when("A","icdp-constants","icdp-common-utils","icdp-ref-marker-abbreviations").register("icdp-ref-marker-builder",function(b,a,c,e){b=a.urlConstants;var d=b.REF_MARKER_DELIMITER,m=b.ICDP_STRING,h=b.DEVICE_TYPES_KEY,l=b.PAGE_EXPERIENCES_KEY;
return function(a){function b(a){a&&(f=f?f+d+a:a);return this}var f=m;b(e(l,a));b(function(){var a=c.getDeviceType();return e(h,a)}());return{build:function(){return f},appendComponent:b,prependComponent:function(a){a&&(f=f?a+d+f:a);return this}}}});d.when("A","icdp-constants","icdp-url-builder","icdp-state-getter","icdp-ref-marker-builder","icdp-ref-marker-abbreviations").register("icdp-dp-redirector",function(b,a,c,d,f,m){function e(a){var b=d.getStateAttribute(n),e=b.getTwisterAsin()||b.getAsin();
var h=b.getClientRefMarker();var l=d.getStateAttribute(k);a=m(q,a);h=f(l).appendComponent(a).appendComponent(h).build();return c.buildDPUrl(e,b.getClientUrlParams(),h,b.isFullySelectedState())}var l=a.stateModelAttrConstants,k=l.CLIENT_ID,n=l.SELECTED_ASIN_DATA,p=l.IS_FDP,q=a.urlConstants.DP_EGRESS_POINTS_KEY;b.on("icdp-redirect-to-dp",function(a){d.getStateAttribute(p)||b.trigger("icdp-close-sheet-and-redirect",{url:e(a.dpEgressPoint)})})});d.when("A","icdp-constants","icdp-state-getter").register("icdp-storefront-redirector",
function(b,a,c){function d(a){l.history.back();b.delay(function(){l.location.href=a},0)}var f=a.stateModelAttrConstants.IS_FDP;b.on("icdp-redirect-to-alm-storefront",function(a){c.getStateAttribute(f)||d(a.storefrontUrl)})});d.when("A","icdp-sheet-view","icdp-url-builder","icdp-constants","icdp-iframe-view","icdp-state-updater","icdp-state-getter").register("icdp-prefetch",function(b,a,c,d,f,l,h){var e=d.stateModelAttrConstants.PREFETCHED_IFRAME;b=d.stateModelAttrConstants;var k=b.EXPERIENCE,m=b.CLIENT_ID,
p=b.TREATMENT;return{prefetchICDP:function(a){Array.isArray(a)&&a.forEach(function(a){if(a.asin){a=c.buildIcdpUrl(a.asin,h.getStateAttribute(k),h.getStateAttribute(m),h.getStateAttribute(p),a.urlParameters);var b=new f(a,!0);l.updateState(r({},e,r({},a,b)))}})}}})});
/* ******** */
(function(b){var c=window.AmazonUIPageJS||window.P,d=c._namespace||c.attributeErrors,a=d?d("InContextDetailPageAssets@buyAgain","InContextDetailPageAssets"):c;a.guardFatal?a.guardFatal(b)(a,window):a.execute(function(){b(a,window)})})(function(b,c,d){b.when("A").register("icdp-buyAgain-to-container-interface-provider",function(a){return{updateCartValueOnBAFaceOut:function(){}}});b.when("A").register("icdp-buyAgain-to-page-interface",function(a){return{updateInterfaces:function(a){}}})});
/* ******** */
