'use strict';mix_d("BuffetDisclaimersCards__buffet-disclaimers-card:buffet-disclaimers-card__eoWBnXnL","require exports tslib @c/remote-operations @c/scoped-dom @c/navigation @c/aui-utils @c/metrics".split(" "),function(Ea,ra,t,Fa,Ga,Ha,S,Ia){function ia(a){return a&&"object"===typeof a&&"default"in a?a:{"default":a}}function Ja(a){if(a&&a.__esModule)return a;var c=Object.create(null);a&&Object.keys(a).forEach(function(b){if("default"!==b){var f=Object.getOwnPropertyDescriptor(a,b);Object.defineProperty(c,
b,f.get?f:{enumerable:!0,get:function(){return a[b]}})}});c["default"]=a;return c}var Ka=ia(Fa),n=ia(Ga),La=ia(Ha),sa;(function(a){a.BEFORE_FIRST_OPEN="before first open";a.OPEN="open";a.CLOSE="close"})(sa||(sa={}));var ta;(function(a){a.RIGHT_OUT_OF_SCREEN="-120%";a.INSIDE_SCREEN="0px"})(ta||(ta={}));var K;(function(a){a.MOBILE="mobile";a.DESKTOP="desktop"})(K||(K={}));var L;(function(a){a.ATF="ATF";a.BTF="BTF"})(L||(L={}));var N;(function(a){a.SW="SW";a.CER="CER";a.GPSR="GPSR";a.ENV="ENV"})(N||
(N={}));var X;(function(a){a.Sidesheet="Sidesheet";a.BTF="BTF"})(X||(X={}));var ua;(function(a){a.FATAL="FATAL";a.ERROR="ERROR";a.WARN="WARN"})(ua||(ua={}));var v;(function(a){a[a.PSI=0]="PSI";a[a.RSP_MANUFACTURER=1]="RSP_MANUFACTURER";a[a.PD=2]="PD";a[a.RED=3]="RED";a[a.LEGAL_WARNINGS_SW=4]="LEGAL_WARNINGS_SW";a[a.LEGAL_WARNINGS_CER=5]="LEGAL_WARNINGS_CER"})(v||(v={}));var d;(function(a){a[a.RSP=0]="RSP";a[a.MANUFACTURER=1]="MANUFACTURER";a[a.PSI=2]="PSI";a[a.PD=3]="PD";a[a.RED=4]="RED";a[a.SAFETYWARNING=
5]="SAFETYWARNING";a[a.CERTIFICATION=6]="CERTIFICATION"})(d||(d={}));var m;(function(a){a.CLIENT_LOAD="Buffet.Client.Load";a.RED_LOADED_CHARGER_INCLUDED="Buffet.Client.RedChargerIncludedLoaded";a.RED_LOADED_NO_CHARGER_INCLUDED="Buffet.Client.RedNoChargerIncludedLoaded";a.INGRESS_LINK_CLICK="Buffet.Sidesheet.IngressLinkClick";a.RSP_INGRESS_LINK_CLICK="Buffet.Sidesheet.RspIngressLinkClick";a.PD_INGRESS_LINK_CLICK="Buffet.Sidesheet.PdIngressLinkClick";a.PSI_INGRESS_LINK_CLICK="Buffet.Sidesheet.PsiIngressLinkClick";
a.SAFETY_WARNING_PICTOGRAM_CLICK="Buffet.Sidesheet.SafetyWarningPicClick";a.SAFETY_WARNING_PICTOGRAM_LOADED="Buffet.Sidesheet.SafetyWarninPicLoaded";a.CERTIFICATION_INGRESS_LINK_CLICK="Buffet.Sidesheet.CertificationIngressLinkClick";a.CERTIFICATION_INGRESS_LINK_LOADED="Buffet.Sidesheet.CertificationIngressLinkLoaded";a.CERTIFICATION_PICTOGRAM_CLICK="Buffet.Sidesheet.CertificationPicClick";a.CERTIFICATION_PICTOGRAM_LOADED="Buffet.Sidesheet.CertificationPicLoaded";a.RED_ICON_CLICK_CHARGER_INCLUDED=
"Buffet.Sidesheet.RedIconClickChargerIncluded";a.RED_ICON_CLICK_NO_CHARGER_INCLUDED="Buffet.Sidesheet.RedIconClickNoChargerIncluded";a.RED_LINK_CLICK_CHARGER_INCLUDED="Buffet.Sidesheet.RedLinkClickChargerIncluded";a.RED_LINK_CLICK_NO_CHARGER_INCLUDED="Buffet.Sidesheet.RedLinkClickNoChargerIncluded";a.SIDESHEET_OPENED="Buffet.Sidesheet.Open";a.SIDESHEET_CLOSED="Buffet.Sidesheet.Close";a.SIDESHEET_DWELL_TIME="Buffet.Sidesheet.DwellTime";a.SIDESHEET_CONTENT_LOADED="Buffet.SdesheetContent.Load";a.SIDESHEET_CONTENT_LOAD_LATENCY=
"Buffet.SidesheetContent.LoadLatency";a.PSI_PILL_CLICK="Buffet.SidesheetContent.PsiPillClick";a.MANUFACTURER_PILL_CLICK="Buffet.SidesheetContent.ManufacturerPillClick";a.RSP_PILL_CLICK="Buffet.SidesheetContent.RspPillClick";a.PD_PILL_CLICK="Buffet.SidesheetContent.PdPillClick";a.RED_PILL_CLICK="Buffet.SidesheetContent.RedPillClick";a.PSI_ZOOM_IN_CLICK="Buffet.SidesheetContent.PsiZoomInClick";a.PSI_ZOOM_OUT_CLICK="Buffet.SidesheetContent.PsiZoomOutClick";a.PD_SIDESHEET_WINDOW_OPEN_CLICK="Buffet.SidesheetContent.PdWindowOpen";
a.GPSR_EXPANDER_OPEN="Buffet.Sidesheet.GpsrExpanderOpen";a.ENVIORNMENTAL_EXPANDER_OPEN="Buffet.Sidesheet.EnviornmantalExpanderOpen";a.SAFETY_WARNINGS_EXPANDER_OPEN="Buffet.Sidesheet.SafetyWarningsExpanderOpen";a.CERTIFICATIONS_EXPANDER_OPEN="Buffet.Sidesheet.CertificationsExpanderOpen";a.PD_BTF_WINDOW_OPEN_CLICK="Buffet.BtfContent.PdWindowOpen";a.MISSING_ASIN_ERROR="Buffet.MissingAsin.Error";a.MISSING_CRUCIAL_ELEMENTS_ERROR="Buffet.MissingCrucialElements.Error";a.MISSING_GPSR_CONTENT_ERROR="Buffet.MissingGpsrContent.Error";
a.MISSING_PD_ELEMENTS_ERROR="Buffet.MissingExpectedPdElements.Error";a.SIDESHEET_OPEN_ERROR="Buffet.Sidesheet.Open.Error";a.SIDESHEET_CONTENT_LOAD_ERROR="Buffet.Sidesheet.ContentLoad.Error";a.ALL_AAPI_CALL_FAIL="Buffet.AllAapiCall.FAIL";a.RSP_MANUFACTURER_AAPI_CALL_FAIL="Buffet.RspManufacturerAapiCall.FAIL";a.PSI_AAPI_CALL_FAIL="Buffet.PsiAapiCall.FAIL";a.PD_AAPI_CALL_FAIL="Buffet.PdAapiCall.FAIL";a.RED_AAPI_CALL_FAIL="Buffet.RedAapiCall.FAIL";a.LEGAL_WARNINGS_AAPI_FAIL="Buffet.LegalWarningsAapiCall.FAIL"})(m||
(m={}));var va=new Map([[d.RSP,{aapiCallFailMetric:m.RSP_MANUFACTURER_AAPI_CALL_FAIL,pillClickMetric:m.RSP_PILL_CLICK}],[d.MANUFACTURER,{aapiCallFailMetric:m.RSP_MANUFACTURER_AAPI_CALL_FAIL,pillClickMetric:m.MANUFACTURER_PILL_CLICK}],[d.PSI,{aapiCallFailMetric:m.PSI_AAPI_CALL_FAIL,pillClickMetric:m.PSI_PILL_CLICK}],[d.PD,{aapiCallFailMetric:m.PD_AAPI_CALL_FAIL,pillClickMetric:m.PD_PILL_CLICK}],[d.RED,{aapiCallFailMetric:m.RED_AAPI_CALL_FAIL,pillClickMetric:m.RED_PILL_CLICK}],[d.SAFETYWARNING,{aapiCallFailMetric:m.LEGAL_WARNINGS_AAPI_FAIL}],
[d.CERTIFICATION,{aapiCallFailMetric:m.LEGAL_WARNINGS_AAPI_FAIL}]]),Ma=new Map([[d.RSP,v.RSP_MANUFACTURER],[d.MANUFACTURER,v.RSP_MANUFACTURER],[d.PSI,v.PSI],[d.PD,v.PD],[d.RED,v.RED],[d.SAFETYWARNING,v.LEGAL_WARNINGS_SW],[d.CERTIFICATION,v.LEGAL_WARNINGS_CER]]),Na=new Map([[N.GPSR,m.GPSR_EXPANDER_OPEN],[N.ENV,m.ENVIORNMENTAL_EXPANDER_OPEN],[N.SW,m.SAFETY_WARNINGS_EXPANDER_OPEN],[N.CER,m.CERTIFICATIONS_EXPANDER_OPEN]]),aa=function(a,c){a&&!a.classList.contains(c)&&a.classList.add(c)},ba=function(a,
c){a&&a.classList.contains(c)&&a.classList.remove(c)},ja=function(a){if(!a.every(function(c){return c})||!a.map(function(c){return null===c||void 0===c?void 0:c.id}).every(function(c){return c}))throw Error("Some HTML elements are missing.");},wa=function(a){return{html:a.innerHTML,className:a.className,style:a.style.cssText}},ca=function(a,c){a.innerHTML=c.html;a.className=c.className;a.style.cssText=c.style},G;(function(a){a.LANDING_ASIN="buffet-btf-asin";a.OPEN_BUTTON_IMG_DOC_CONT="buffet-sidesheet-ingress";
a.DISCLAIMER_CONTENT="buffet-disclaimer-content";a.CLOSE_BUTTON="buffet-sidesheet-close";a.DARKENED_BACKGROUND="buffet-darkened-background";a.SIDESHEET_ROOT="buffet-sidesheet-root";a.SIDESHEET="buffet-sidesheet";a.SIDESHEET_CONTENT="buffet-sidesheet-content";a.SIDESHEET_CONTENT_HEADER="buffet-sidesheet-content-header";a.SIDESHEET_SUB_CONTENT="buffet-sidesheet-sub-content";a.SIDESHEET_CONTENT_BUFFER_SPINNER="buffet-sidesheet-content-spinner";a.SIDESHEET_ERROR_ALERT="buffet-sidesheet-error-alert";a.SIDESHEET_GPSR_PILLS_CONTAINER=
"buffet-sidesheet-gpsr-pills-container";a.SIDESHEET_ENV_PILLS_CONTAINER="buffet-sidesheet-env-pills-container";a.SIDESHEET_RSP_PILL="buffet-sidesheet-rsp-pill";a.SIDESHEET_MANUFACTURER_PILL="buffet-sidesheet-manufacturer-pill";a.SIDESHEET_PSI_PILL="buffet-sidesheet-psi-pill";a.SIDESHEET_RSP_CONTENT="buffet-sidesheet-rsp-content-container";a.SIDESHEET_MANUFACTURER_CONTENT="buffet-sidesheet-manufacturer-content-container";a.SIDESHEET_PSI_CONTENT="buffet-sidesheet-psi-content-container";a.SIDESHEET_PSI_CAROUSEL=
"buffet-psi-component";a.SIDESHEET_RED_CONTENT="buffet-sidesheet-red-content-container";a.SIDESHEET_RED_PILL="buffet-product-red-pill";a.SIDESHEET_PD_CONTENT="buffet-sidesheet-product-docs-content-container";a.SIDESHEET_PD_PILL="buffet-product-docs-pill";a.RSP_MANUFACTURER_AAPI_FAIL="buffet-sidesheet-rsp-manufacturer-aapi-fail";a.PSI_AAPI_FAIL="buffet-sidesheet-psi-aapi-fail";a.PD_AAPI_FAIL="buffet-sidesheet-pd-aapi-fail";a.RED_AAPI_FAIL="buffet-sidesheet-mobile-red-aapi-fail";a.SIDESHEET_PD_LINKS_SECTION=
"product-docs-links";a.SIDESHEET_PD_LINK="product-docs-ingress-";a.SIDESHEET_PD_URL="buffet-product-docs-url-";a.SIDESHEET_PD_LIST_SIZE="product-docs-list-size";a.BTF_PD_LINKS_SECTION="product-docs-btf-links";a.BTF_PD_LINK="product-docs-btf-ingress-";a.BTF_PD_URL="buffet-product-docs-btf-url-";a.BTF_PD_LIST_SIZE="product-docs-btf-list-size";a.PRODUCT_DOCS_BTF="product-docs-btf-section";a.GPSR_EXPANDER="buffet-sidesheet-gpsr-expander";a.GPSR_EXPANDER_HEADER="buffet-sidesheet-gpsr-expander-header";
a.ENVIRONMENTAL_EXPANDER="buffet-sidesheet-env-expander";a.ENVIRONMENTAL_EXPANDER_HEADER="buffet-sidesheet-env-expander-header";a.DYNAMIC_DOCUMENTS_INGRESS="buffet-dynamic-product-docs-ingress-btf";a.DYNAMIC_CONTACTS_INGRESS="buffet-dynamic-contacts-ingress-btf";a.DYNAMIC_IMAGES_INGRESS="buffet-dynamic-images-ingress-btf";a.SIDESHEET_SAFETY_WARNINGS_CONTENT="sidesheet-safety-warnings-content-container";a.SIDESHEET_CERTIFICATIONS_CONTENT="sidesheet-certifications-content-container";a.SAFETY_WARNINGS_EXPANDER_HEADER=
"sidesheet-safety-warnings-expander-header";a.CERTIFICATIONS_EXPANDER_HEADER="sidesheet-certifications-expander-header";a.LEGAL_WARNINGS_AAPI_FAIL="legal-warnings-aapi-fail"})(G||(G={}));var xa;(function(a){a.DE="A1PA6795UKMFR9";a.FR="A13V1IB3VIYZZH";a.IT="APJ6JRA9NG5V4";a.ES="A1RKKUPIHCS9HS";a.NL="A1805IZSGTT6HS";a.SE="A2NODRKZP88ZB9";a.PL="A1C3SOZRARQ6R3";a.BE="AMEN7PMS3EDWL";a.IE="A28R8C7NBKEWEA"})(xa||(xa={}));var r=function(a,c,b,f){void 0===f&&(f=1);Ia.count(a+"."+c+"."+b,f)},ka=function(a,
c,b,f,g,k){var e=b.SIDESHEET_PD_LINKS_SECTION,l=b.SIDESHEET_PD_LIST_SIZE,h=b.SIDESHEET_PD_LINK,q=b.SIDESHEET_PD_URL,w=m.PD_SIDESHEET_WINDOW_OPEN_CLICK;a===X.BTF&&(e=b.BTF_PD_LINKS_SECTION,l=b.BTF_PD_LIST_SIZE,h=b.BTF_PD_LINK,q=b.BTF_PD_URL,w=m.PD_BTF_WINDOW_OPEN_CLICK);a=n["default"].cardRoot.querySelector("#"+e);l=n["default"].cardRoot.querySelector("#"+l);if(a&&l)for(a=function(z){var p=n["default"].cardRoot.querySelector("#"+h+z);z=n["default"].cardRoot.querySelector("#"+q+z);if(p&&z){var A=z.value;
p.addEventListener("click",function(){c?p.setAttribute("href",A):f.openWindow(A,"ProductDisplay");r(g,k,w)})}else r(g,k,m.MISSING_PD_ELEMENTS_ERROR)},b=0;b<parseInt(l.value);b++)a(b);else r(g,k,m.MISSING_PD_ELEMENTS_ERROR)},ya=function(a,c,b){if(a){var f=!1,g=a.querySelectorAll("li"),k=a.querySelectorAll("img");g.forEach(function(e,l){e.style.maxWidth="1600px";0===l?e.style.marginLeft="0px":l===g.length-1&&(e.style.marginRight="0px")});k.forEach(function(e){e.addEventListener("click",function(){return t.__awaiter(void 0,
void 0,void 0,function(){return t.__generator(this,function(l){switch(l.label){case 0:return f?(r(c,b,m.PSI_ZOOM_OUT_CLICK),g.forEach(function(h){h.style.width=""}),k.forEach(function(h){h.style.maxWidth="100%";var q=n["default"].cardRoot.querySelector("#"+h.id+"-zoomed-out").value;h.src=q}),f=!1):(r(c,b,m.PSI_ZOOM_IN_CLICK),g.forEach(function(h){h.style.width="1600px"}),k.forEach(function(h){h.style.maxWidth="1600px";var q=n["default"].cardRoot.querySelector("#"+h.id+"-zoomed-in").value;h.src=q}),
f=!0),[4,e.decode()];case 1:return l.sent(),e.scrollIntoView({block:"center",inline:"center"}),[2]}})})})})}},la=new Map([[N.SW,Array.from([d.SAFETYWARNING])],[N.CER,Array.from([d.CERTIFICATION])],[N.ENV,Array.from([d.RED])],[N.GPSR,Array.from([d.PSI,d.MANUFACTURER,d.RSP,d.PD])]]),Oa=function(a){return new Map([[d.RSP,{contentElement:n["default"].cardRoot.querySelector("#"+a.SIDESHEET_RSP_CONTENT),pillElement:n["default"].cardRoot.querySelector("#"+a.SIDESHEET_RSP_PILL)}],[d.MANUFACTURER,{contentElement:n["default"].cardRoot.querySelector("#"+
a.SIDESHEET_MANUFACTURER_CONTENT),pillElement:n["default"].cardRoot.querySelector("#"+a.SIDESHEET_MANUFACTURER_PILL)}],[d.PSI,{contentElement:n["default"].cardRoot.querySelector("#"+a.SIDESHEET_PSI_CONTENT),pillElement:n["default"].cardRoot.querySelector("#"+a.SIDESHEET_PSI_PILL)}],[d.PD,{contentElement:n["default"].cardRoot.querySelector("#"+a.SIDESHEET_PD_CONTENT),pillElement:n["default"].cardRoot.querySelector("#"+a.SIDESHEET_PD_PILL)}],[d.RED,{contentElement:n["default"].cardRoot.querySelector("#"+
a.SIDESHEET_RED_CONTENT),pillElement:n["default"].cardRoot.querySelector("#"+a.SIDESHEET_RED_PILL)}],[d.SAFETYWARNING,{contentElement:n["default"].cardRoot.querySelector("#"+a.SIDESHEET_SAFETY_WARNINGS_CONTENT)}],[d.CERTIFICATION,{contentElement:n["default"].cardRoot.querySelector("#"+a.SIDESHEET_CERTIFICATIONS_CONTENT)}]])},da=function(a){return new Map([[N.SW,{headerElement:n["default"].cardRoot.querySelector("#"+a.SAFETY_WARNINGS_EXPANDER_HEADER)}],[N.CER,{headerElement:n["default"].cardRoot.querySelector("#"+
a.CERTIFICATIONS_EXPANDER_HEADER)}],[N.GPSR,{headerElement:n["default"].cardRoot.querySelector("#"+a.GPSR_EXPANDER_HEADER),pillContainerElement:n["default"].cardRoot.querySelector("#"+a.SIDESHEET_GPSR_PILLS_CONTAINER)}],[N.ENV,{headerElement:n["default"].cardRoot.querySelector("#"+a.ENVIRONMENTAL_EXPANDER_HEADER),pillContainerElement:n["default"].cardRoot.querySelector("#"+a.SIDESHEET_ENV_PILLS_CONTAINER)}]])},Pa=function(a,c){switch(c){case d.RSP:case d.MANUFACTURER:return a.RSP_MANUFACTURER_AAPI_FAIL;
case d.PSI:return a.PSI_AAPI_FAIL;case d.PD:return a.PD_AAPI_FAIL;case d.RED:return a.RED_AAPI_FAIL;case d.SAFETYWARNING:case d.CERTIFICATION:return a.LEGAL_WARNINGS_AAPI_FAIL}},za=function(a){switch(a){case d.RSP:case d.MANUFACTURER:return v.RSP_MANUFACTURER;case d.PSI:return v.PSI;case d.PD:return v.PD;case d.RED:return v.RED;case d.SAFETYWARNING:return v.LEGAL_WARNINGS_SW;case d.CERTIFICATION:return v.LEGAL_WARNINGS_CER}},Qa=function(a,c){a.forEach(function(b,f){switch(f){case d.RSP:case d.MANUFACTURER:case d.PSI:case d.RED:case d.PD:b.contentElement&&
b.pillElement||(a.delete(f),c.delete(za(f)));case d.SAFETYWARNING:case d.CERTIFICATION:b.contentElement||(a.delete(f),c.delete(za(f)))}})},Z=function(a){var c;try{for(var b=t.__values(la.keys()),f=b.next();!f.done;f=b.next()){var g=f.value;if(la.get(g).includes(a))return g}}catch(e){var k={error:e}}finally{try{f&&!f.done&&(c=b.return)&&c.call(b)}finally{if(k)throw k.error;}}throw Error("Content type not found in Expanders-ContentType mapping!");},Ra=function(a,c){var b,f,g,k,e,l;try{for(var h=t.__values(c.keys()),
q=h.next();!q.done;q=h.next()){var w=q.value,z=null===(e=c.get(w))||void 0===e?void 0:e.pillContainerElement;if(z){var p=0;try{for(var A=(f=void 0,t.__values(a.keys())),H=A.next();!H.done;H=A.next()){var B=H.value;Z(B)===w&&a.get(B).pillElement&&p++}}catch(D){f={error:D}}finally{try{H&&!H.done&&(g=A.return)&&g.call(A)}finally{if(f)throw f.error;}}z.setAttribute("role","tablist");z.setAttribute("aria-orientation","horizontal");1===p&&z.setAttribute("aria-label","Tab navigation with single tab")}}}catch(D){var x=
{error:D}}finally{try{q&&!q.done&&(b=h.return)&&b.call(h)}finally{if(x)throw x.error;}}x=function(D){var O=a.get(D),C=O.pillElement,P=O.contentElement;O=Z(D);O=null===(l=c.get(O))||void 0===l?void 0:l.pillContainerElement;if(C&&P&&O){C.id||(C.id="tab-"+D);C.setAttribute("role","tab");C.setAttribute("aria-selected","false");C.setAttribute("tabindex","-1");C.removeAttribute("type");if(C.hasAttribute("buttonType")){var T=C.getAttribute("buttonType");C.removeAttribute("buttonType");C.setAttribute("data-button-type",
T||"")}P.setAttribute("role","tabpanel");P.setAttribute("tabindex","0");P.addEventListener("keydown",function(y){"Tab"===y.key&&y.shiftKey&&(y.preventDefault(),C.focus());"Escape"===y.key&&(y.preventDefault(),C.focus())});T=U(C,O);C.addEventListener("click",T);C.addEventListener("keydown",function(y){var R=y.target,M=R.parentElement;if(M){var I=Array.prototype.slice.call(M.children).filter(function(Y){return"tab"===Y.getAttribute("role")}),V=I.indexOf(R);switch(y.key){case "ArrowLeft":case "ArrowUp":y.preventDefault();
0<V&&(y=I[V-1],y.focus(),y.click(),U(y,M)());break;case "ArrowRight":case "ArrowDown":y.preventDefault();V<I.length-1&&(y=I[V+1],y.focus(),y.click(),U(y,M)());break;case "Home":y.preventDefault();I[0].focus();I[0].click();U(I[0],M)();break;case "End":y.preventDefault();I[I.length-1].focus();I[I.length-1].click();U(I[I.length-1],M)();break;case "Enter":case " ":y.preventDefault();R.click();U(R,M)();break;case "Tab":if("true"===R.getAttribute("aria-selected"))if((M=R.getAttribute("aria-controls"))&&
n["default"].cardRoot){if(M=n["default"].cardRoot.querySelector("#"+M))y.preventDefault(),M.focus()}else P&&(y.preventDefault(),P.focus())}}});O=Array.prototype.slice.call(O.children).filter(function(y){return"tab"===y.getAttribute("role")});C===O[0]&&(C.setAttribute("aria-selected","true"),C.setAttribute("tabindex","0"),P.setAttribute("tabindex","0"));D=P.id||"panel-"+D;P.id||(P.id=D);C.setAttribute("aria-controls",D)}};try{for(var E=t.__values(a.keys()),F=E.next();!F.done;F=E.next())B=F.value,x(B)}catch(D){var u=
{error:D}}finally{try{F&&!F.done&&(k=E.return)&&k.call(E)}finally{if(u)throw u.error;}}},U=function(a,c){return function(){setTimeout(function(){var b=a.offsetLeft,f=a.offsetWidth,g=c.offsetWidth,k=b+f;f=Math.max(0,Math.min(b-g/2+f/2,c.scrollWidth-g));try{a.scrollIntoView({behavior:"auto",block:"nearest",inline:"center"}),c.scrollLeft=f}catch(e){c.scrollLeft=f}setTimeout(function(){var e=c.scrollLeft;if(b<e||k>e+g)b<e?c.scrollLeft=b:k>e+g&&(c.scrollLeft=k-g)},100)},50)}},Ca=function(a,c,b){var f;
void 0===b&&(b=!1);var g=Z(a);try{for(var k=t.__values(c.keys()),e=k.next();!e.done;e=k.next()){var l=e.value;switch(l){case d.PSI:case d.MANUFACTURER:case d.RSP:case d.PD:case d.RED:var h=c.get(l),q=Z(l);if(q===g)l===a?Aa(h):Ba(h);else if(b){var w=l;a:{var z=void 0,p=void 0,A=new Set(c.keys()),H=la.get(q);if(H){try{for(var B=t.__values(H),x=B.next();!x.done;x=B.next()){var E=x.value;if(A.has(E)){var F=E;break a}}}catch(D){p={error:D}}finally{try{x&&!x.done&&(z=B.return)&&z.call(B)}finally{if(p)throw p.error;
}}F=null}else throw Error("Expander must be defined in Expander-ContentType mapping!");}w===F?Aa(h):Ba(h)}}}}catch(D){var u={error:D}}finally{try{e&&!e.done&&(f=k.return)&&f.call(k)}finally{if(u)throw u.error;}}},Aa=function(a){aa(a.pillElement,"a-button-selected");a.pillElement.setAttribute("aria-selected","true");a.pillElement.setAttribute("tabindex","0");ba(a.contentElement,"aok-hidden");a.contentElement.setAttribute("tabindex","0");a.contentElement.setAttribute("aria-hidden","false");a.contentElement.setAttribute("aria-label",
(a.pillElement.textContent||"Tab")+" content");a.contentElement.removeAttribute("aria-labelledby");if(!a.contentElement.id)if(a.pillElement.id)a.contentElement.id="panel-"+a.pillElement.id;else{var c=a.pillElement.getAttribute("data-content-type")||"unknown";a.contentElement.id="panel-"+c+"-"+Date.now()}a.pillElement.setAttribute("aria-controls",a.contentElement.id);a.pillElement.hasAttribute("data-keyboard-handler")||(a.pillElement.addEventListener("keydown",function(b){if("Tab"===b.key&&b.shiftKey){var f=
a.pillElement.closest('[role="tablist"]');f&&(f=f.closest(".a-expander-container"))&&(f=f.querySelector(".a-expander-header"))&&(b.preventDefault(),f.focus())}}),a.pillElement.setAttribute("data-keyboard-handler","true"));a.pillElement.focus();(c=a.pillElement.closest('[role="tablist"]'))&&U(a.pillElement,c)()},Ba=function(a){ba(a.pillElement,"a-button-selected");a.pillElement.setAttribute("aria-selected","false");a.pillElement.setAttribute("tabindex","-1");aa(a.contentElement,"aok-hidden");a.contentElement.setAttribute("tabindex",
"-1");a.contentElement.setAttribute("aria-hidden","true")},Da=function(a){var c,b;try{for(var f=t.__values(Object.values(N)),g=f.next();!g.done;g=f.next()){var k=g.value,e=null===(b=da(a).get(k))||void 0===b?void 0:b.headerElement,l=null===e||void 0===e?void 0:e.getAttribute("aria-expanded");e&&"true"===l&&e.click()}}catch(q){var h={error:q}}finally{try{g&&!g.done&&(c=f.return)&&c.call(f)}finally{if(h)throw h.error;}}},ma,na,Q=new Set(Object.values(v).filter(function(a){return"number"===typeof a})),
J,Sa=Object.keys(v).length/2,Xa=function(a,c,b,f,g,k,e,l,h,q,w){return t.__awaiter(void 0,void 0,void 0,function(){var z,p,A,H,B,x,E;return t.__generator(this,function(F){switch(F.label){case 0:z=Date.now();p=n["default"].cardRoot.querySelector("#"+e.SIDESHEET_CONTENT);A=n["default"].cardRoot.querySelector("#"+e.SIDESHEET_CONTENT_BUFFER_SPINNER);H=n["default"].cardRoot.querySelector("#"+e.SIDESHEET_ERROR_ALERT);B=[p,A,H];try{ja(B)}catch(u){return r(b,g,m.MISSING_CRUCIAL_ELEMENTS_ERROR),[2,[a,c]]}a&&
(ma=wa(A),na=wa(p));if(c)return[3,5];F.label=1;case 1:return F.trys.push([1,3,,4]),ca(A,ma),ca(p,na),x=n["default"].cardRoot.querySelector("#"+e.SIDESHEET_SUB_CONTENT),J=Oa(e),E=da(e),Ta(x,b,g),Qa(J,Q),Ra(J,E),Ua(b,g),[4,Va(k,e,l,b,g,f,w)];case 2:F.sent();if(Q.size===Sa)throw r(b,g,m.ALL_AAPI_CALL_FAIL),Error();A.style.opacity="0";r(b,g,m.SIDESHEET_CONTENT_LOAD_LATENCY,Date.now()-z);S.delay(function(){aa(A,"aok-hidden");ba(x,"aok-hidden");p.style.opacity="1"},200);c=!0;return[3,4];case 3:return F.sent(),
r(b,g,m.SIDESHEET_CONTENT_LOAD_ERROR),ca(A,ma),ca(p,na),ba(H,"aok-hidden"),A.style.opacity="0",S.delay(function(){aa(A,"aok-hidden");p.style.opacity="1"},200),[3,4];case 4:return[3,6];case 5:0!==Q.size&&Q.forEach(function(u){return t.__awaiter(void 0,void 0,void 0,function(){var D,O,C,P,T,y,R,M,I,V,Y,oa,ea,pa,fa,qa,ha;return t.__generator(this,function(W){switch(W.label){case 0:D=u;switch(D){case v.PSI:return[3,1];case v.RSP_MANUFACTURER:return[3,3];case v.PD:return[3,5];case v.RED:return[3,7];case v.LEGAL_WARNINGS_SW:return[3,
9];case v.LEGAL_WARNINGS_CER:return[3,11]}return[3,13];case 1:return[4,k.getPsiContent({asin:l})];case 2:return(O=W.sent())&&"false"===O.querySelector("#"+e.PSI_AAPI_FAIL).value?(Q.delete(v.PSI),C=J.get(d.PSI).contentElement,C.style.opacity="0",S.delay(function(){C.innerHTML=O.outerHTML;C.style.opacity="1"},500),P=n["default"].cardRoot.querySelector("#"+e.SIDESHEET_PSI_CAROUSEL),ya(P,b,g)):r(b,g,m.PSI_AAPI_CALL_FAIL),[3,13];case 3:return[4,k.getRspManufacturerContent({asin:l})];case 4:return(T=W.sent())&&
"false"===T.querySelector("#"+e.RSP_MANUFACTURER_AAPI_FAIL).value?(Q.delete(v.RSP_MANUFACTURER),y=T.querySelector("#"+e.SIDESHEET_RSP_CONTENT),R=T.querySelector("#"+e.SIDESHEET_MANUFACTURER_CONTENT),M=J.get(d.RSP).contentElement,I=J.get(d.MANUFACTURER).contentElement,M.style.opacity="0",I.style.opacity="0",S.delay(function(){M.innerHTML=y.innerHTML;I.innerHTML=R.innerHTML;M.style.opacity="1";I.style.opacity="1"},500)):r(b,g,m.RSP_MANUFACTURER_AAPI_CALL_FAIL),[3,13];case 5:return[4,k.getPdContent({asin:l})];
case 6:return(V=W.sent())&&"false"===V.querySelector("#"+e.PD_AAPI_FAIL).value?(Q.delete(v.PD),Y=J.get(d.PD).contentElement,Y.style.opacity="0",S.delay(function(){Y.innerHTML=V.innerHTML;ka(X.Sidesheet,f,e,w,b,g);Y.style.opacity="1"},500)):r(b,g,m.PD_AAPI_CALL_FAIL),[3,13];case 7:return[4,k.getRedContent({asin:l})];case 8:return(oa=W.sent())&&"false"===oa.querySelector("#"+e.RED_AAPI_FAIL).value?(Q.delete(v.RED),ea=J.get(d.RED).contentElement,ea.style.opacity="0",S.delay(function(){ea.innerHTML=oa.innerHTML;
ea.style.opacity="1"},500)):r(b,g,m.RED_AAPI_CALL_FAIL),[3,13];case 9:return[4,k.getSafetyWarningContent({asin:l})];case 10:return(pa=W.sent())&&"false"===pa.querySelector("#"+e.LEGAL_WARNINGS_AAPI_FAIL).value?(Q.delete(v.LEGAL_WARNINGS_SW),fa=J.get(d.SAFETYWARNING).contentElement,fa.style.opacity="0",S.delay(function(){fa.innerHTML=pa.innerHTML;fa.style.opacity="1"},500)):r(b,g,m.LEGAL_WARNINGS_AAPI_FAIL),[3,13];case 11:return[4,k.getCertificationContent({asin:l})];case 12:return(qa=W.sent())&&"false"===
qa.querySelector("#"+e.LEGAL_WARNINGS_AAPI_FAIL).value?(Q.delete(v.LEGAL_WARNINGS_CER),ha=J.get(d.CERTIFICATION).contentElement,ha.style.opacity="0",S.delay(function(){ha.innerHTML=qa.innerHTML;ha.style.opacity="1"},500)):r(b,g,m.LEGAL_WARNINGS_AAPI_FAIL),[3,13];case 13:return[2]}})})}),F.label=6;case 6:return Wa(e,h,a,q,b,g),a=!1,[2,[a,c]]}})})},Ua=function(a,c){var b,f,g=function(h){switch(h){case d.PSI:case d.MANUFACTURER:case d.RSP:case d.PD:case d.RED:null===(f=J.get(h))||void 0===f?void 0:f.pillElement.addEventListener("click",
function(){Ca(h,J);r(a,c,va.get(h).pillClickMetric)})}};try{for(var k=t.__values(J.keys()),e=k.next();!e.done;e=k.next())g(e.value)}catch(h){var l={error:h}}finally{try{e&&!e.done&&(b=k.return)&&b.call(k)}finally{if(l)throw l.error;}}},Va=function(a,c,b,f,g,k,e){return t.__awaiter(void 0,void 0,void 0,function(){var l,h,q,w,z,p,A,H,B,x,E,F;return t.__generator(this,function(u){switch(u.label){case 0:l=null,u.label=1;case 1:u.trys.push([1,28,29,30]),h=t.__values(J.keys()),q=h.next(),u.label=2;case 2:if(q.done)return[3,
27];w=q.value;z=J.get(w);p=void 0;A=w;switch(A){case d.PSI:return[3,3];case d.MANUFACTURER:return[3,5];case d.RSP:return[3,5];case d.PD:return[3,8];case d.RED:return[3,10];case d.SAFETYWARNING:return[3,12];case d.CERTIFICATION:return[3,14]}return[3,16];case 3:return[4,a.getPsiContent({asin:b})];case 4:return p=u.sent(),[3,16];case 5:return null!==l?[3,7]:[4,a.getRspManufacturerContent({asin:b})];case 6:l=u.sent(),u.label=7;case 7:return p=l,[3,16];case 8:return[4,a.getPdContent({asin:b})];case 9:return p=
u.sent(),[3,16];case 10:return[4,a.getRedContent({asin:b})];case 11:return p=u.sent(),[3,16];case 12:return[4,a.getSafetyWarningContent({asin:b})];case 13:return p=u.sent(),[3,16];case 14:return[4,a.getCertificationContent({asin:b})];case 15:return p=u.sent(),[3,16];case 16:if(!p||!z.contentElement||"false"!==(null===(F=p.querySelector("#"+Pa(c,w)))||void 0===F?void 0:F.value))return[3,25];Q.delete(Ma.get(w));H=w;switch(H){case d.PSI:return[3,17];case d.RSP:return[3,18];case d.MANUFACTURER:return[3,
19];case d.PD:return[3,20];case d.RED:return[3,22];case d.SAFETYWARNING:return[3,22];case d.CERTIFICATION:return[3,22]}return[3,24];case 17:return z.contentElement.innerHTML=p.outerHTML,u=n["default"].cardRoot.querySelector("#"+c.SIDESHEET_PSI_CAROUSEL),ya(u,f,g),[3,24];case 18:u=z;var D=p.querySelector("#"+c.SIDESHEET_RSP_CONTENT);u.contentElement.innerHTML=D.innerHTML;return[3,24];case 19:return u=z,D=p.querySelector("#"+c.SIDESHEET_MANUFACTURER_CONTENT),u.contentElement.innerHTML=D.innerHTML,[3,
24];case 20:return[4,Ya(z,p,c,k,e,f,g)];case 21:return u.sent(),[3,24];case 22:return z.contentElement.innerHTML=p.outerHTML,[4,void 0];case 23:return u.sent(),[3,24];case 24:return[3,26];case 25:r(f,g,va.get(w).aapiCallFailMetric),u.label=26;case 26:return q=h.next(),[3,2];case 27:return[3,30];case 28:return B=u.sent(),x={error:B},[3,30];case 29:try{q&&!q.done&&(E=h.return)&&E.call(h)}finally{if(x)throw x.error;}return[7];case 30:return[2]}})})},Ya=function(a,c,b,f,g,k,e){return t.__awaiter(void 0,
void 0,void 0,function(){return t.__generator(this,function(l){a.contentElement.innerHTML=c.outerHTML;ka(X.Sidesheet,f,b,g,k,e);return[2]})})},Ta=function(a,c,b){try{ja([a])}catch(f){throw r(c,b,m.MISSING_CRUCIAL_ELEMENTS_ERROR),Error();}},Wa=function(a,c,b,f,g,k){var e,l,h=Z(c);Da(a);var q,w=null===(q=da(a).get(h))||void 0===q?void 0:q.headerElement;q=null===w||void 0===w?void 0:w.getAttribute("aria-expanded");w&&"false"===q&&(w.click(),r(g,k,Na.get(h)));(b||f)&&Ca(c,J,b);c=null===(e=J.get(c))||
void 0===e?void 0:e.pillElement;a=null===(l=da(a).get(h))||void 0===l?void 0:l.pillContainerElement;c&&a&&U(c,a)()};ra._operationNames=[];ra.card=function(){return t.__awaiter(void 0,void 0,void 0,function(){var a,c,b,f,g,k,e,l,h,q,w,z,p,A;return t.__generator(this,function(H){switch(H.label){case 0:r(K.DESKTOP,L.BTF,m.CLIENT_LOAD);a=n["default"].cardRoot.querySelector("#"+G.LANDING_ASIN);if(!a||!a.value)return r(K.DESKTOP,L.BTF,m.MISSING_ASIN_ERROR),[2];(c=n["default"].cardRoot.querySelectorAll("[id^='"+
G.SIDESHEET_CERTIFICATIONS_CONTENT+"']"))&&0<c.length&&(r(K.DESKTOP,L.BTF,m.CERTIFICATION_PICTOGRAM_LOADED),c.forEach(function(B){B.addEventListener("click",function(x){return t.__awaiter(void 0,void 0,void 0,function(){return t.__generator(this,function(E){x.preventDefault();r(K.DESKTOP,L.BTF,m.CERTIFICATION_PICTOGRAM_CLICK);La["default"].setLocation("https://www.amazon.com/b?node=122527263011&ref=jpmainfo");return[2]})})})}));return[4,new Promise(function(B,x){Ea(["@p/buffet-sidesheet"],function(E){B(Ja(E))},
x)})];case 1:b=H.sent().default;n["default"].cardRoot.querySelector("#"+G.PRODUCT_DOCS_BTF)&&ka(X.BTF,!1,G,b,K.DESKTOP,L.BTF);f=n["default"].cardRoot.querySelectorAll("[id^='"+G.SIDESHEET_SAFETY_WARNINGS_CONTENT+"']");g=n["default"].cardRoot.querySelector("#"+G.OPEN_BUTTON_IMG_DOC_CONT);k=n["default"].cardRoot.querySelector("#"+G.DARKENED_BACKGROUND);e=n["default"].cardRoot.querySelector("#"+G.CLOSE_BUTTON);l=[];l=0<f.length||0<c.length?[k,e]:[g,k,e];try{ja(l)}catch(B){return r(K.DESKTOP,L.BTF,m.MISSING_CRUCIAL_ELEMENTS_ERROR),
[2]}h=Ka["default"].setup(["getRspManufacturerContent","getPsiContent","getPdContent","getSafetyWarningContent","getCertificationContent"]);b.initializeBuffetSidesheet(G.SIDESHEET,G.CLOSE_BUTTON,G.DARKENED_BACKGROUND,!1);q=!0;w=!1;g&&g.addEventListener("click",function(B){return t.__awaiter(void 0,void 0,void 0,function(){return t.__generator(this,function(x){switch(x.label){case 0:return[4,p(d.PSI)(B)];case 1:return x.sent(),[2]}})})});f&&0<f.length&&(r(K.DESKTOP,L.BTF,m.SAFETY_WARNING_PICTOGRAM_LOADED),
f.forEach(function(B){B.addEventListener("click",function(x){return t.__awaiter(void 0,void 0,void 0,function(){return t.__generator(this,function(E){switch(E.label){case 0:return r(K.DESKTOP,L.BTF,m.SAFETY_WARNING_PICTOGRAM_CLICK),[4,p(d.SAFETYWARNING)(x)];case 1:return E.sent(),[2]}})})})}));p=function(B){return function(x){return t.__awaiter(void 0,void 0,void 0,function(){var E;return t.__generator(this,function(F){switch(F.label){case 0:return x.preventDefault(),r(K.DESKTOP,L.BTF,m.INGRESS_LINK_CLICK),
b.showBuffetSidesheet(G.SIDESHEET,G.CLOSE_BUTTON,G.DARKENED_BACKGROUND,!1),e.focus(),r(K.DESKTOP,L.BTF,m.SIDESHEET_OPENED),[4,Xa(q,w,K.DESKTOP,!1,L.BTF,h,G,a.value,B,!1,b)];case 1:E=t.__read.apply(void 0,[F.sent(),2]);q=E[0];if(w=E[1])r(K.DESKTOP,L.BTF,m.SIDESHEET_CONTENT_LOADED),z=Date.now();return[2]}})})}};A=function(){b.closeBuffetSidesheet(G.SIDESHEET,G.CLOSE_BUTTON,G.DARKENED_BACKGROUND,!1);Da(G);r(K.DESKTOP,L.BTF,m.SIDESHEET_CLOSED);w&&r(K.DESKTOP,L.BTF,m.SIDESHEET_DWELL_TIME,Date.now()-z)};
e.addEventListener("click",function(){A()});k.addEventListener("click",function(){A()});return[2]}})})}});
