'use strict';mix_d("CustomerReviewsSummarizationCards__cr-ratings-histogram:cr-ratings-histogram__NBJ6qUAa","require exports tslib @c/metrics @c/remote-operations @c/scoped-dom @p/A".split(" "),function(y,l,m,z,A,B,C){function t(a){return a&&"object"===typeof a&&"default"in a?a:{"default":a}}function D(a){if(a&&a.__esModule)return a;var b=Object.create(null);a&&Object.keys(a).forEach(function(c){if("default"!==c){var d=Object.getOwnPropertyDescriptor(a,c);Object.defineProperty(b,c,d.get?d:{enumerable:!0,
get:function(){return a[c]}})}});b["default"]=a;return b}var E=t(A),F=t(B),G=t(C),e=function(a){return"true"==(null===a||void 0===a?void 0:a.toLowerCase())},w=function(a,b){var c=a.dataset.arpLinkRefTag||"",d=a.dataset.celWidgetName||"",n=e(a.dataset.excludeHistogram),p=e(a.dataset.excludeDivider),q=e(a.dataset.isMobile),r=e(a.dataset.isCnMarketplace),g=a.dataset.refTag||"",u=a.dataset.reviewsRatingsHelpPageUrl||"";var f=(f=a.dataset.starRatingSize)?"small"==f.toLowerCase()?"Small":"mini"==f.toLowerCase()?
"Mini":"medium"==f.toLowerCase()?"Medium":"Unspecified":"Unspecified";var h=(h=a.dataset.starType)?"brand"==h.toLowerCase()?"Brand":"Review":"Review";return{arpLinkRefTag:c,asin:b,celWidgetName:d,excludeHistogram:n,excludeDivider:p,isMobile:q,isCNMarketplace:r,refTag:g,reviewsRatingsHelpPageUrl:u,starRatingSize:f,starType:h,updateReviewsRatingsExplanation:e(a.dataset.updateReviewsRatingsExplanation),shouldOpenHelpPageInNewTab:e(a.dataset.shouldOpenHelpPageInNewTab),usePrimaveraChanges:e(a.dataset.usePrimaveraChanges)}},
v,k,x=function(a,b){G["default"].on("a:pageUpdate",function(){return m.__awaiter(void 0,void 0,void 0,function(){var c,d,n,p,q,r;return m.__generator(this,function(g){switch(g.label){case 0:return[4,new Promise(function(u,f){y(["@p/customer-reviews-twister-update"],function(h){u(D(h))},f)})];case 1:c=g.sent();d=c.default.getDisplayedASIN();n=v||"";if(!d||d===n)return[3,3];p=w(b,d);q=E["default"].setup();return[4,q.getValueHTML(p)];case 2:r=g.sent(),a.innerHTML=r.outerHTML,v=d,k=(null!==k&&void 0!==
k?k:0)+1,z.count("cr-ratings-histogram:dp:twister-page-update",k),g.label=3;case 3:return[2]}})})})};l._operationNames=["getValueHTML"];l.attachTwisterUpdateEventListener=x;l.card=function(){return m.__awaiter(void 0,void 0,void 0,function(){var a,b;return m.__generator(this,function(c){a=F["default"].cardRoot.firstChild;if(b=null===a||void 0===a?void 0:a.firstChild)v=b.dataset.asin||"",x(a,b);return[2]})})};l.getParamList=w});
