Mutual Respect or We Will Riot and Kill Some of Their Own

Isn’t she just precious? Delicate features, swan-like neck. Smile is a little forced but overall………not bad.

See the source image

Too bad she respects neither the culture nor the people who believe the cultures bedrock values as she mocks our vice pres. for his religion. I wonder how he female genital mutilation  worked out. All little tags of labia or particles of clitoris left after the holy deed was done?. Lets feel sorry for her. She has been mutilated and she thinks its alright.  OR  She may be part of the ten percent  who have not had the job done. But if so, I hope she faired well and I hope her life of numb sex goes well.

I ALWAYS LOVE THESE CITY COUNCIL MEETINGS, THEY ALWAYS HAVE PREMO GOODIES SURE AM GLAD I’M ON SCHOOL BOARD!

Image result for cartoon transgenders      The is a vast chasm between indoctrination and objective education. Considering our students have all the resources they need, it seems odd that American students have some of the worst  academic scores of all the developed nations.   

Advertisements

Lipstick on a Pig

Now that she is safely enscosed in her congressional position, Ms. Ortiz reveals the basic motivation for her run for office.  POWER!  In a rather tame exchange on Twitter she threatened the presidents son for expressing his opinion about a twitter POTUS had made and that she took umbrage to.

The essence of her statement was …”Now that I have the power you had better whatch what ya say ! I can subpoena you!

Such a statement could not have meen made if she were aware that her position was an office of trust and that she SERVED the American public rather than “rule the mob”. with her position in congress.

This further clarifies the lefts mindset of government as the new ARISTOCRACY.

In control of their own wage increases. and virtually impossible to terminate, the new bureaucrat will minister bribes to the mobs. Ya know. Like give them all a ‘bamaphone.

Democrat Ocasio-Cortez Threatens Donald Trump Jr. with Subpoena Over Meme

 

 

Redistributing Wealth With Big Foot.

France and the rest of the European Union should hire a sleuth to sleuth the truth concerning that successful socialist country.that no ones been talking about and no one can find.

France Reaps Decades of Socialism and Open Borders

Below is pictured the lone inhabitant of slobovia, the one socialist government that works. At least it works for Big foot…….  a lonely socialist Yeti,…… how tragic.

See the source image

 

Socialism in all it’s Glory

Venezuela riots, as Maduro tries to hold power. The socialist framers of their government could not crunch the numbers enough to keep basic economic tributaries open, and handing out goodies.  Venezuela  the Socialist Poster child of middle America, teeters on disintegrating into a “failed state”.

The grand Poobah of socialism,  Vladimir Putin, has visited with Maduro in reassurance that he will and a few other socialist governmants will be there as a lifeline for the declining country. Yeah and his other great ally is Syria, from which over a million have fled for their lives. Good luck with your trust issues boys!

French police are on fire as Paris burns  over what initialy was a 30% rise in gas taxes. Gas, over 7 dollars a gallon , was targeted for the rise in taxes. This triggard a long list of greivances addressed by the rioters for what is turning into a second week of fire and nightsticks in several cities across France. Near the end of the linked article Macron states a strong anarchist movement is afoot in France and that is one of his difficulties. Maybe a they finally took an economics course and figured it out.  Margaret Thatcher said,….”The problem with socialism is that you eventually run jout of other peoples money”.

See the source image

 

 

 

 

 

 

 

More police on fire in Greece as the government fights insolvency. Their Socialist government cannot subsidize any more migrant incursion. This author. in his last visit to Greece, saw a large number of beggars of the streets downtown, peppering the sidewalk in all forms of dramatic repose all the way the foot of the Acropolis.

Germans are taking a soaking during a little curbside discussion of the migration problems. Herr Merkal is on the brink of a no-confidence vote and still shakes her little fist and demands open borders for Germany as well as all EU members

Image result for Brithish Brexit protests

Briton, the great granddaddy of socialst sympathies, is showing rare good sense in fighting to extract itself from the Euro-cluster fuck of the mess going on in other European nations.

Egypts el-Sissi

When it became obvious tht the incoming Morsi government had failed to build a consensus behind rather draconian changes in laws governing personal dress and behavior, _el-Sissi, then commander-in -chief of the Egyptian military, stepped in and with  relatively bloodless coup to stop Egypt’s spiral into chaos under Morsi, a puppet of the terrorist organization, The Muslim Brotherhood.

Egypt  had been a major player on the world stage since around 3300 BCE, and they chaffed at the Brotherhood bit. Cosmopolitan Egypt did not want to be transmuted into a 6th century backwater. with Caliphate and Sharia to bend the backs of his beloved Egyptian people.

The pik below links to an article that includes a statement by el-Sissi that has been a long long time in coming. You must read the piece. It is worth the trouble.

Me Thinks He Does Protest Too Much!……..

 

 

 

I have a brother-in-law.. He used to run with a gang of criminals in Tulsa Okla. and beat up gays, (when they weren’t burglarizing a house or beating some innocent down for their cash), they frequented gay bars to bait gay men into ambushes.  The primary aim was not robbery but violence.  Then came a day I got a call from him.  He was quite exited, he had been competing in cross-dressing contests at the gay bars in Wichita Ks..

Freud asserted that the personality, when conflicted by desires that are disturbing to the ego-ideal, (like unwanted gay urges ). will often transmute into what is referred to as a reaction formation.  A defense against the anxiety of struggling to keep denying  the core homosexuality.  An exaggerated opposite stance is made to ward off the truth.

Such reaction formations take on a overly dramatic, fanatical level.  Instead of disapproving, there is hate, instead of caution there is terror.

The pik below snags an article about two Muslim friends who were baiting gays online with the evil intent of murder………

Two facts to mull.  1. The two friends had been close since childhood

2. They had both dedicated themlves to killing gays.

3: The faith to which they adhere  is fem-phobic and filled with conflict.

Is murder strong enough medicine to treat your ego-dystonic homosexuality?   It does seem like an over reaction.   Personally I think they should give up the fight and kiss. For in some cases homophobia can lead to murder.

 

                                                 HEY THERE SAILOR!

The Brotherhood

“Don’t be an alarmist. Listen Chicken Little, the sky is not really falling!”  Words of wisdom from the Lollipop Guild.

The mission statement of the Muslim Brotherhood, the wise old man and non-denominational umbrella organization that shades the Islamic Jihad  from the light of truth, outlines a plan to conquer from within.  The vid below exposes the strategy for  the conquest of America.

The brotherhood’s last high profile thrust into nation stealing, (the Egyptian “Arab spring”) that ended when the winner, backed by the Brotherhood,  attempted to impose Sharia law on Egyptians.  Egypt, a long term actor on the world stage wasn’t about to be devolved into a sixth century backwater Caliphate. The world said “Yeah baby”.  The Egyptian military, having a history of problems with the Brotherhood’s antics since the nineteen thirties, was not impressed and following a couple of bad moves (such as new dress codes for newscasters that included the hajib), the new regime was killed in the cradle when the army rolled in and the Brotherhood took to the hills.

Take a look at the vid below and see Muslim Brotherhoods members plan the roadmap of political conquest for the USA. Oh!  by the way. The sky is falling!

Below is a link to a sight that will shed light to the intent of the brotherhood. You may not have heard about the brotherhood and that’s the way they want it. Under a guise of  a benign  social organization, the brotherhood has been the background organization for every Jihadi,  since the late 1930’s regardless of their chosen moniker.

They Know You’re a condescending Dork!

A fun fact about condescension.  When white “libbies.” consent to speak with blacks, they dumb-down their speech. The glitch  is……They know it!  And it makes them angry and distrustful of the cracker who is rubbing their butt.  On the other hand the real people would consider it an insult to speak to a grownup like they are a child. To “dumb down” to speak to anybody is a direct assault…… “You’re just a mush mouthed, uneducated black, so I will talk low, slow and use small words, so you can understand me.

At this point the Libbie will pat him/her on the head and smile. “Don’t worry, I’ll take care of your ignorant incompetent ass. You obviously can’t make it on your own, so I will take care of you”

The French are Fried

I like France. I have travelled along the Mediteranian around Caan, but did not see any celebrities. I did sit at a café for a little coffee that surely could have been sat in by Brad Pit. Or not. Paris is Paris.  I enjoyed the rural areas between Paris and the Normandy coast the most. Green rolling hills and quaint farms. Beautiful!

There are a bunch of French farmers and other rural dwellers really pissed off at their fearless leader, E. Macron. Presently a Frenchman will pay over seven dollars a gallon for gas to get back home on the farm. Macron is asserting a 30% tax on the present gas prices. Your average Paris urbanites relying on subways, trains and cabs to get around the town. The common knowledge is that one doesn’t have to go to the trouble of owning a car in town.  So as it stands, the cultural rift is between the rural and urban populations of France.  Gee whiz! Just like here!

But if the cradle-to-grave financial subsidy of Frances population is to be paid for. SOMEbody is going to foot the bill. The rural folk feel they are getting soaked because urbanites don’t have to travel the distances or gas up fuel guzzling tractors and combines. Of course the in-town taxi fare will go up and there will be price shifts throughout the mercantile to compensate for the increased prices of everything that has to be shipped anywhere. Basically, everything will go up in price to maintain the equilibrium of the economy and keep shop doors open.

Macrons popularity now hovers around an embarrassing %20 percentile.  A Brief but informative article is linked to the pik below that offers more on the issues that are causing street riots in Paris.

When the average American gases up he can smile a little. He pays a little over 2.OO $ per gallon for gas. Paris is waiting to see if the Govt. follows through with hiking up gas prices.

 

See the source image

Next image result
  • Visual Search
  • Save
  • View image
  • Hide details

Hide
  • Pages including
    37 pages using this image
  • Similar images
    See more images
  • Related searches
    Macron Emmanuel
    Emmanuel Macron Body
    Emmanuel Macron Beach
    Emmanuel Macron Wedding
    See more related searches
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Image result for macron
Feedback

Invisible focusable element for fixing accessibility issue

:f,requestConfig:i});sj_evt&&sj_evt.fire(n.ImageDetailEvent.PageIncludingLoaded)}function k(t,i){t({type:n.PI_FETCH_FAILED,requestConfig:i})}function d(n){return n}function r(n){if(n&&n.tags)return d(n);var i={},r=null,u=null,f=[],e=[],o=[],s=””;return n.imageInsightsToken&&(s=n.imageInsightsToken),i.insightsToken=s,n.imageCaption&&(r=t.transformToImageCaption(n.imageCaption)),i.caption=r,n.bestRepresentativeQuery&&(u=t.transformToBrqV1(n.bestRepresentativeQuery)),i.brq=u,i.pagesIncluding=t.transformToPagesIncludings(n.pagesIncluding),i.shoppingSources=t.transformToShoppingSources(n.shoppingSources),i.recipes=t.transformToRecipes(n.recipes),n.imageTags&&n.imageTags.value&&n.imageTags.value.map(function(n){return o.push(t.transformToImageTags(n))}),i.imageTags=o,i.visuallySimilarImages=t.transformToVisualSimilarImages(n.visuallySimilarImages),i.visuallySimilarProducts=t.transformToVisualSimilarProducts(n.visuallySimilarProducts),i.feedImages=t.transformToFeedImages(n.feedImages),n.recognizedEntityGroups&&n.recognizedEntityGroups.value&&n.recognizedEntityGroups.value.map(function(n){return n.recognizedEntityRegions.map(function(n){return f.push(t.transformToRecognizedEntities(n))})}),i.recognizedEntities=f,n.detectedObjects&&n.detectedObjects.detectedResults&&n.detectedObjects.detectedResults.map(function(n){return e.push(t.transformToDetectedObjects(n))}),i.detectedObjects=e,i.imageBasedRelatedSearches=t.transformToRelatedSearches(n.imageBasedRelatedSearches),i.queryBasedRelatedSearches=t.transformToRelatedSearches(n.relatedSearches),n.image&&(i.image=t.createImageInfo(n.image,0)),i}var u=Multimedia.ImageDetailInsightsUtils,t=Multimedia.ImageDetailResponseTransformer,i=”InsightsRequestError”;n.createInsightsV2RequestConfig=o;n.createInsightRequestConfig=s;n.createMainImageModulesRequestConfig=h;n.createPageIncludingRequestConfig=c})(ImageDetailActions||(ImageDetailActions={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)},InstLink=function(n){function t(t){var i=n.call(this,t)||this;return i.state=i.getNewState(i.props),i}return __extends(t,n),t.prototype.componentWillMount=function(){var n=this.state.instItem,t;n&&!this.state.isInstrumented&&(this.state.isInstrumented.isStartLink=!0,n.CurrentUseCount++,t=n.UniqueId.K+””,n.CurrentUseCount&&n.CurrentUseCount>0&&(t=t+”.”+n.CurrentUseCount),ServerSideLayoutInstrumentation.startLink(n.UniqueId.Namespace,t,this.state.nodeName,this.state.parentNodeName),ServerSideLayoutInstrumentation.closeLink())},t.prototype.componentWillReceiveProps=function(n){this.setState(this.getNewState(n))},t.prototype.getNewState=function(n){var u=”InstNodeName”,y=n.hasOwnProperty(u)&&n[u]?n[u]:null,f=”InstParentNodeName”,p=n.hasOwnProperty(f)&&n[f]?n[f]:null,l=”InstItem”,r=n[l],a=”TestHooksEnabled”,w=n[a]===!0,s=”Content”,v=[“elementname”,”link”,”instrumenteditem”,”formcode”,”clicktrackingfunctionoverride”,”donotrendertag”,”counter”,”fdl:om”,”fdl:text”,”fdl:dispUrl”,”fdl:position”],i={},t,e,o,h,c;for(t in n)if(n.hasOwnProperty(t))if(t.toLowerCase()===”attributes”){e=n[t];for(o in e)h=o.toLowerCase(),e.hasOwnProperty(o)&&v.indexOf(h)<0&&(i[h]=e[o])}else{if(t===l||t===s||t===f||t===u||t===a)continue;if(t===”PartnerTestHook”){w&&(i[“data-partnertag”]=n[t]);continue}v.indexOf(t)<0&&(i[t]=n[t])}return r&&(c=”href”,i[c]||(i[c]=r.UrlWithFormCode),i.h=”ID=”+r.UniqueId.Namespace+”,”+r.UniqueId.K+”.”+(r.CurrentUseCount+1)),{content:this.props[s]?this.props[s]:this.props.children,isContentRaw:this.props[“IsContentRaw”],properties:i,isInstrumented:!1,instItem:r,nodeName:y,parentNodeName:p}},t.prototype.render=function(){return this.state.isContentRaw?React.createElement(“a”,__assign({},this.state.properties,{dangerouslySetInnerHTML:{__html:this.state.content}})):React.createElement(“a”,__assign({},this.state.properties),this.state.content)},t}(React.Component);var SharedComponent;(function(n){function t(n){return n!=null?n+”px”:null}function i(n,i,r){n&&(i!=null&&(n.style.width=t(i)),r!=null&&(n.style.height=t(r)))}function r(n,t,i){n&&(t?n.classList.contains(i)||n.classList.add(i):n.classList.contains(i)&&n.classList.remove(i))}n.isRTL=typeof _G!=”undefined”&&_G.RTL;n.sizeToStyleString=t;n.setElmentSize=i;n.addOrRemoveClassName=r;var u=function(){return typeof window==”object”&&window.TestHooksEnabled};n.isTestHookEnabled=u})(SharedComponent||(SharedComponent={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)},SharedComponent;(function(n){var t=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.isFocusedByTab=!1,t.handleKeyUp=function(n){switch(n.keyCode){case 9:t.isFocusedByTab=!0;t.setState(Object.assign({},t.state,{isFocusedByTab:!0}));break;case 13:if(t.props.onClick&&t.isFocusedByTab){var i=Object.assign({},n,{isAccessibleClick:!0});t.props.onClick(i)}break;default:n.stopPropagation()}},t.getFilteredProps=function(){var n=Object.assign({},t.props);return delete n.elementName,delete n.className,delete n.tabIndex,delete n.onKeyUp,delete n.ariaLabel,delete n.reference,delete n.role,n},t}return __extends(t,n),t.prototype.render=function(){var n=this.isFocusedByTab?this.props.className+” tabfocus”:this.props.className+” nofocus”,t=this.props.elementName?this.props.elementName:”div”,i=this.props.reference?this.props.reference:null,r=this.getFilteredProps();return React.createElement(t,__assign({},r,{ref:i,className:n,tabIndex:0,onKeyUp:this.handleKeyUp,”aria-label”:this.props.ariaLabel,role:this.props.role}),this.props.children)},t}(React.Component);n.AccessibleComponent=t})(SharedComponent||(SharedComponent={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)},SharedComponent;(function(n){var t=function(n){function t(i){var r=n.call(this,i)||this;return r.defaultFocusClassName=” focus”,r.defaultNofocusClassName=” nofocus”,r.defaultElementName=”div”,r.handleKeyUp=function(n){switch(n.keyCode){case 9:r.setFocusState(!0);r.props.hasNestedFocus?(r.setFocusState(!0),r.updateFocusState(n)):t.previousFocusedElement!=null&&r.resetFocusHistory();break;case 13:if(r.props.onClick)r.props.onClick(n);break;default:n.stopPropagation()}},r.setFocusState=function(n){r.setState(Object.assign({},r.state,{isFocused:n}))},r.updateFocusState=function(n){var i=sj_et(n);if(t.previousFocusedElement==null){t.previousFocusedElement=i;t.currentFocusedParent=i;return}if(r.isChildOfCurrentParent(i)){if(t.previousFocusedElement==t.currentFocusedParent){t.previousFocusedElement=i;return}r.setFocusClass(t.previousFocusedElement,!1);t.previousFocusedElement=i;return}r.setFocusClass(t.currentFocusedParent,!1);r.setFocusClass(t.previousFocusedElement,!1);t.previousFocusedElement=i;t.currentFocusedParent=i},r.resetFocusHistory=function(){r.setFocusClass(t.previousFocusedElement,!1);t.previousFocusedElement=null;r.setFocusClass(t.currentFocusedParent,!1);t.currentFocusedParent=null},r.setFocusClass=function(n,t){var i=n&&n.className;if(i){var u=r.getStatedClass(t),f=new RegExp(u,”g”),e=r.getStatedClass(!t),o=new RegExp(e,”g”);i=i.replace(o,””);i=i.replace(f,””);t&&(i=i+u);n.className=i}},r.isChildOfCurrentParent=function(n){if(n&&t.previousFocusedElement){while(n&&n.parentNode!=t.currentFocusedParent)n=n.parentNode;if(n)return!0}return!1},r.getStatedClass=function(n){return” “+(n?r.props.focusClassName||r.defaultFocusClassName:r.props.nofocusClassName||r.defaultNofocusClassName)},r.getFilteredProps=function(){var n=Object.assign({},r.props);return delete n.elementName,delete n.hasNestedFocus,delete n.needResetFocus,delete n.ariaLabel,delete n.reference,delete n.role,n},r.state={isFocused:!1},r}return __extends(t,n),t.prototype.componentWillReceiveProps=function(n){n&&n.needResetFocus&&this.props&&!this.props.needResetFocus&&this.setFocusState(!1)},t.prototype.render=function(){var n=this.props.className||””,t,i;return n=n+this.getStatedClass(this.state.isFocused),t=this.props.elementName||this.defaultElementName,i=this.getFilteredProps(),React.createElement(t,__assign({},i,{className:n,tabIndex:0,onKeyUp:this.handleKeyUp,”aria-label”:this.props.ariaLabel}),this.props.children)},t.previousFocusedElement=null,t.currentFocusedParent=null,t}(React.Component);n.NestedAccessibleComponent=t})(SharedComponent||(SharedComponent={}));var TextTruncator;(function(n){function t(n,i,r,u,f,e){if(n&&!(r>u)&&!(r<0)&&!(u>i.length)&&(f||!(u-r<=3))){var o=Math.floor(r+(u-r)/2);n.innerText=i.substr(0,o)+e;n.scrollHeight>n.offsetHeight?t(n,i,r,o-1,!0,e):t(n,i,o+1,u,!1,e)}}function i(n,i,r){if(n&&n.innerText&&i){var u=n.innerText,f=!1;n.scrollHeight>n.offsetHeight&&(t(n,u,0,u.length,!0,i),f=!0);!n.hasAttribute(r)&&f&&n.setAttribute(r,u)}}n.truncate=i})(TextTruncator||(TextTruncator={}));var SharedComponent;(function(n){function t(n){return n.link!=null?React.createElement(InstLink,{InstItem:n.link},n.children):n.children}n.LinkWrapper=t})(SharedComponent||(SharedComponent={}));var SharedComponent;(function(n){var t=function(t){return React.createElement(n.LinkWrapper,{link:t.link},React.createElement(“img”,{src:t.src,width:t.width,height:t.height,onClick:t.onClick,onContextMenu:t.onContextMenu,onMouseLeave:t.onMouseLeave,onMouseOver:t.onMouseEnter,onMouseOut:t.onMouseOut,title:t.title,alt:t.altText,className:t.className,style:t.style,role:t.role,onLoad:t.onLoad,ref:function(n){t.getRef&&t.getRef(n)}}))};n.ImageBase=t})(SharedComponent||(SharedComponent={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)},SharedComponent;(function(n){var i=typeof React.PureComponent!=”undefined”&&React.PureComponent?React.PureComponent:React.Component,r=n.isTestHookEnabled()?”multimedia.richimage.imgcontainer”:null,t=”error”,u=function(i){function u(){var n=i!==null&&i.apply(this,arguments)||this;return n.getImageElement=function(t){t&&(n.imageElement=t,n.getImageRef&&n.getImageRef(t))},n.suppressDefaultOnclick=function(n){return n.preventDefault(),n.stopPropagation(),!1},n.mouseEnter=function(){n.overlayContainer&&!n.overlayContainer.classList.contains(u.hoverClassName)&&n.overlayContainer.classList.add(u.hoverClassName)},n.mouseOut=function(){n.overlayContainer&&n.overlayContainer.classList.contains(u.hoverClassName)&&n.overlayContainer.classList.remove(u.hoverClassName)},n}return __extends(u,i),u.prototype.setMainContainerSize=function(t,i){n.setElmentSize(this.mainContainer,t,i)},u.prototype.setContainerSize=function(t,i){n.setElmentSize(this.container,t,i)},u.prototype.getCaptionHeight=function(){return this.captionContainer?this.captionContainer.clientHeight:null},u.prototype.componentDidMount=function(){this.imageElement&&typeof ThHnReplacer!=”undefined”&&!this.reloadFuncWrapper&&(this.reloadFuncWrapper=ThHnReplacer.reloadWrapper(this.imageElement),this.imageElement.addEventListener(t,this.reloadFuncWrapper))},u.prototype.componentWillUnmount=function(){this.reloadFuncWrapper&&(this.imageElement.removeEventListener(t,this.reloadFuncWrapper),this.reloadFuncWrapper=null)},u.prototype.render=function(){var u=this,t=this.props,h=t.isAccessible?t.hasNestedFocus?n.NestedAccessibleComponent:n.AccessibleComponent:”div”,e=”div”,o=null,f,i,s;return t.link&&(e=”a”,o=this.suppressDefaultOnclick),f=n.ImageBase,i=t.image,i&&t.lateLoadConfig&&t.lateLoadConfig.Enabled&&(f=n.LateLoadImageBase,i.lateLoadConfig=t.lateLoadConfig),i&&typeof ThHnReplacer!=”undefined”&&(this.getImageRef=i.getRef,i=Object.assign({},i,{getRef:this.getImageElement,onMouseEnter:this.mouseEnter,onMouseOut:this.mouseOut})),s=t.imageContainerStyle?t.imageContainerStyle:t.image?t.image.style:null,React.createElement(e,{className:”richImage “+(t.className?t.className:””),style:t.style,data:t.data,”data-tag”:t.dataTag,href:t.link,onClick:o,ref:function(n){u.container=n}},React.createElement(“div”,{className:”mainContainer”,style:t.mainContainerStyle,ref:function(n){return u.mainContainer=n}},React.createElement(h,__assign({“data-tag”:r,className:”imgContainer”,style:s},t.isAccessible?{ariaLabel:t.ariaLabel}:{},t.hasNestedFocus?{hasNestedFocus:t.hasNestedFocus,needResetFocus:t.needResetFocus}:{}),t.adjacentComponents&&t.adjacentComponents.length>0&&React.createElement(“span”,{className:”adjacentContainer”},t.adjacentComponents.map(function(n,t){return React.createElement(“span”,{key:t},n)})),i&&React.createElement(f,__assign({},i)),t.overlayComponents&&t.overlayComponents.length>0&&React.createElement(“div”,{className:”overlayContainer”,ref:function(n){u.overlayContainer=n},style:t.overlayStyle,onClick:t.overlayOnClick},React.createElement(“ul”,null,t.overlayComponents.map(function(n,t){return React.createElement(“li”,{key:t},n)}))),t.hoverComponents&&t.hoverComponents.length>0&&React.createElement(“div”,{className:”hoverContainer”},React.createElement(“ul”,null,t.hoverComponents.map(function(n,t){return React.createElement(“li”,{key:t},n)}))))),t.captionComponents&&t.captionComponents.length>0&&React.createElement(“div”,{className:”captionContainer”,ref:function(n){u.captionContainer=n},onClick:t.captionsOnClick},React.createElement(“a”,{target:”_blank”,href:t.captionLink},React.createElement(“ul”,null,t.captionComponents.map(function(n,t){return React.createElement(“li”,{key:t},n)})))))},u.hoverClassName=”hover”,u}(i);n.RichImageUnit=u;n.RichImageUnit.displayName=”RichImageUnit”})(SharedComponent||(SharedComponent={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)},SharedComponent;(function(n){var i={availability:”Tertiary-availability”,highlighted:”Tertiary-highlighted”,status:”Tertiary-status”,”default”:”Tertiary-default”},r,y,t,e,p,u,o,w,s,h,c,l,a,f,v;n.InfoCardTertiaryDatatype=i;r={domain:”Secondary-domain”,meta:”Secondary-meta”,rating:”Secondary-rating”,”default”:”Secondary-default”};n.InfoCardSecondaryDatatype=r;y={left:”Left”,leftandright:”LeftAndRight”,right:”Right”};n.NavigationArrowsPosition=y;t=function(n){if(n.condition){var i=n.elementName,t=Object.assign({},n);return delete t.condition,delete t.keepChildren,delete t.elementName,delete t.children,React.createElement(i,__assign({},t),n.children)}return n.keepChildren?React.createElement(“span”,null,n.children):null};e=function(n){return React.createElement(“div”,{className:n.className},React.createElement(t,{condition:n.ratings!=null,keepChildren:!1,elementName:”span”},n.ratings.map(function(n,t){return React.createElement(“span”,{className:n,key:t})})),React.createElement(“span”,{className:”text”},n.text))};n.Rating=e;p=function(n){function t(t){var i=n.call(this,t)||this;return i.updateDimension=function(){window.innerWidth!=i.state.browserWidth&&(i.element&&(i.element.innerText=i.props.text),i.setState(Object.assign({},i.state,{browserWidth:window.innerWidth})))},i.state={},i}return __extends(t,n),t.prototype.componentDidMount=function(){this.truncate();this.props.enableTruncateOnResize&&window&&window.addEventListener(“resize”,this.updateDimension)},t.prototype.componentWillUnmount=function(){window&&window.removeEventListener(“resize”,this.updateDimension)},t.prototype.componentDidUpdate=function(){this.truncate()},t.prototype.shouldComponentUpdate=function(n,t){return t.browserWidth!=this.state.browserWidth?!0:!v(n,this.props)},t.prototype.truncate=function(){this.element!=null&&typeof TextTruncator!=”undefined”&&TextTruncator.truncate(this.element,this.props.ellipsis||”…”,this.props.fullTextAttributeName||”title”)},t.prototype.render=function(){var n=this;return React.createElement(“div”,{className:this.props.className,ref:function(t){return n.element=t},style:this.props.containerMaxHeight?{maxHeight:this.props.containerMaxHeight}:null},this.props.text)},t}(React.Component);n.TruncatedText=p;u=function(i){var r=i.isAccessible?i.hasNestedFocus?n.NestedAccessibleComponent:n.AccessibleComponent:”div”;return React.createElement(r,__assign({className:i.className,”data-tag”:i.datatag,onClick:i.onClick},i.isAccessible?{reference:i.elRef}:{ref:i.elRef},{role:i.role},i.isAccessible?{ariaLabel:i.customTooltip}:{},i.hasNestedFocus?{hasNestedFocus:i.hasNestedFocus}:{}),React.createElement(t,{condition:i.customTooltip!=null,keepChildren:!0,elementName:”span”,”data-tooltip”:i.customTooltip},i.children))};n.TextItem=u;o=function(n){var t=n.format.split(/{(\d+)}/g);return t?React.createElement(“div”,{className:n.className},t.map(function(t,i){return n.args[t]!=null?React.createElement(“span”,{key:i},n.args[t]):t})):null};n.TextHighlighter=o;w=function(i){var r=”expItem “+i.className;return React.createElement(s,__assign({},i),React.createElement(t,{condition:i.title!=null,keepChildren:!1,elementName:”div”,className:”isctit”},i.title),React.createElement(“div”,{className:”iscbody”},i.image!=null&&React.createElement(n.ImageBase,__assign({className:”mainImg”},i.image)),React.createElement(“div”,{className:”horInfo”},React.createElement(“div”,{className:”iscpri”},React.createElement(u,{className:”pritext”},i.primaryText)),React.createElement(t,{condition:i.secondaryData!=null,elementName:”div”,keepChildren:!1,className:”iscscd”},React.createElement(h,{data:i.secondaryData}))),React.createElement(t,{condition:i.tertiaryData!=null,elementName:”div”,keepChildren:!1,className:”terInfo”},React.createElement(“div”,{className:”isctcd”},React.createElement(“div”,{className:”isctcd_data”},React.createElement(l,__assign({},i))))),React.createElement(t,{condition:i.dataUpdateFailureMessage!=null,keepChildren:!1,elementName:”div”,className:”isctcd_err”},i.dataUpdateFailureMessage)))};n.DetailInfoCard=w;s=function(n){var t=”expItem “+n.className;return React.createElement(“a”,{href:n.link,target:n.targetOption,className:t,onClick:n.onClick},n.children)};n.DetailInfoCardContainer=s;h=function(n){return n!=null?React.createElement(“div”,{className:”iscscd_data”},n.data.map(function(n,t){return React.createElement(c,__assign({},n,{key:t}))})):null};n.DetailInfoCardSecondaryInfo=h;c=function(n){var t=n.data,i,f;if(!t)return null;switch(n.dataType){case r.domain:return i=”domain”,t.format?React.createElement(o,{className:i,format:t.format,args:[t.text]}):React.createElement(u,{className:”domain”},React.createElement(“span”,null,t.text?t.text:t));case r.meta:return React.createElement(u,{className:”metainfo”},t);case r.rating:return f=Object.assign({},t,{className:”rating”}),React.createElement(e,__assign({},f))}return null};n.DetailInfoCardSecondaryDataUnit=c;l=function(n){return n!=null?React.createElement(“span”,null,n.tertiaryData.map(function(n,t){return React.createElement(a,__assign({},n,{key:t}))})):null};n.DetailInfoCardTertiaryInfo=l;a=function(n){var u=n.data,t,r,e;if(!u)return null;t={elementName:”div”,content:u};switch(n.dataType){case i.availability:return r=u,r!=null?(e=r.isAvailable?”iscInStk”:”iscOutStk”,React.createElement(“div”,{className:e},r.item)):null;case i.highlighted:return t.class_name=”iscHighldInf”,React.createElement(f,__assign({},t));case i.status:return t.class_name=”iscStatus”,React.createElement(f,__assign({},t));case i[“default”]:return t.elementName=”span”,React.createElement(f,__assign({},t))}return null};n.DetailInfoCardTertiaryDataUnit=a;f=function(n){var t=n.elementName;return React.createElement(t,{className:n.class_name},n.content)};n.RenderElement=f;v=function(n,t){for(var i in n)if(n.hasOwnProperty(i)&&(!t.hasOwnProperty(i)||n[i]!==t[i]))return!1;for(i in t)if(t.hasOwnProperty(i)&&(!n.hasOwnProperty(i)||n[i]!==t[i]))return!1;return!0};n.areEqualShallow=v})(SharedComponent||(SharedComponent={}));var Multimedia;(function(n){var t;(function(t){function e(n,t,i,r,e){if(t){var o=u[n],s=f.singularPluralFormat(t,i,r);if(o)return React.createElement(“div”,{className:”badge “+o,onClick:e},s&&React.createElement(“span”,null,s))}return null}var i,r,u,f;(function(n){n[n.ShoppingSources=0]=”ShoppingSources”;n[n.RecipeSources=1]=”RecipeSources”})(r=t.InsightsBadgeType||(t.InsightsBadgeType={}));u=(i={},i[r.ShoppingSources]=”shp”,i[r.RecipeSources]=”rep”,i);f=n.ImageDetailUtils;t.createBadge=e})(t=n.ImageDetailBadgeUtils||(n.ImageDetailBadgeUtils={}))})(Multimedia||(Multimedia={}));var ImageVisualSearchCropBox;(function(n){var t=function(){function n(n){this.top=n.t||0;this.left=n.l||0;this.right=n.r||0;this.bottom=n.b||0;this.minDelta=n.d||1;this.padding=n.p||0;this.margin=n.m||0;this.minWidth=n.mw||0;this.minHeight=n.mh||0;this.enableMouseRedraw=n.emr||!1;this.enableMultiTouchRedraw=n.etr||!1;this.eventTimeThreshold=n.ett||100;this.enableAnimations=n.ea||!1;this.animationDuration=n.ad||1e3}return n}();n.CropBoxClientConfig=t})(ImageVisualSearchCropBox||(ImageVisualSearchCropBox={}));var MmGeometry;(function(n){var t=function(){function n(n,t){var i=this;this.transformToRegion=function(){return{left:i.left(),top:i.top(),right:i.right(),bottom:i.bottom()}};this.firstPoint=n;this.secondPoint=t;this.normalize()}return n.prototype.left=function(){return this.firstPoint.x},n.prototype.right=function(){return this.secondPoint.x},n.prototype.top=function(){return this.firstPoint.y},n.prototype.bottom=function(){return this.secondPoint.y},n.prototype.width=function(){return this.secondPoint.x-this.firstPoint.x},n.prototype.height=function(){return this.secondPoint.y-this.firstPoint.y},n.prototype.contains=function(n){return n.x>=this.left()&&n.x<=this.right()&&n.y>=this.top()&&n.y<=this.bottom()},n.prototype.move=function(n,t){this.firstPoint.x+=n;this.firstPoint.y+=t;this.secondPoint.x+=n;this.secondPoint.y+=t},n.prototype.resize=function(n,t){this.secondPoint.x+=n;this.secondPoint.y+=t;this.normalize()},n.prototype.clone=function(){return new n({x:this.left(),y:this.top()},{x:this.right(),y:this.bottom()})},n.prototype.equals=function(n){return n===null?!1:this.left()===n.left()&&this.right()===n.right()&&this.top()===n.top()&&this.bottom()===n.bottom()},n.prototype.normalize=function(){var n;this.firstPoint.x>this.secondPoint.x&&(n=this.firstPoint.x,this.firstPoint.x=this.secondPoint.x,this.secondPoint.x=n);this.firstPoint.y>this.secondPoint.y&&(n=this.firstPoint.y,this.firstPoint.y=this.secondPoint.y,this.secondPoint.y=n)},n}();n.Rectangle=t})(MmGeometry||(MmGeometry={}));var VisualSearchCropBoxUtils;(function(n){function u(n,i,r,u){if(i!=null&&r!=null){var f=r.x-i.x,e=r.y-i.y;u===t.Left||u===t.LeftTop||u===t.LeftBottom?(n.move(f,0),n.resize(-f,0)):(u===t.Right||u===t.RightTop||u===t.RightBottom)&&n.resize(f,0);u===t.Top||u===t.LeftTop||u===t.RightTop?(n.move(0,e),n.resize(0,-e)):(u===t.Bottom||u===t.LeftBottom||u===t.RightBottom)&&n.resize(0,e)}return n}function f(n,t,i){if(t!=null&&i!=null){var r=i.x-t.x,u=i.y-t.y;n.move(r,u)}return n}function e(n,i,u){var f,e;if(n!=null){var o=Math.min(i.width()/3,u.padding),s=Math.min(i.height()/3,u.padding),l=[[t.LeftTop,t.Top,t.RightTop],[t.Left,t.Center,t.Right],[t.LeftBottom,t.Bottom,t.RightBottom]],h=[i.left()-u.margin,i.left()+o,i.right()-o,i.right()+u.margin],c=[i.top()-u.margin,i.top()+s,i.bottom()-s,i.bottom()+u.margin];for(f=0;f<3;++f)for(e=0;e<3;++e){var a={x:h[e],y:c[f]},v={x:h[e+1],y:c[f+1]},y=new r(a,v);if(y.contains(n))return l[f][e]}}return t.External}var r=MmGeometry.Rectangle,t,i;(function(n){n[n.Left=0]=”Left”;n[n.Right=1]=”Right”;n[n.Top=2]=”Top”;n[n.Bottom=3]=”Bottom”;n[n.LeftTop=4]=”LeftTop”;n[n.LeftBottom=5]=”LeftBottom”;n[n.RightTop=6]=”RightTop”;n[n.RightBottom=7]=”RightBottom”;n[n.Center=8]=”Center”;n[n.External=9]=”External”})(t=n.PointRegion||(n.PointRegion={}));i=function(){function n(n,i,r){this._currPoint={x:0,y:0};this._startPoint={x:0,y:0};this._pointPosition=t.External;this._viewRect=n;this._cropRect=i;this._clientConfig=r}return n.prototype.viewRect=function(){return this._viewRect},n.prototype.cropRect=function(){return this._cropRect},n.prototype.setViewRect=function(n){this._viewRect=n},n.prototype.setCropRect=function(n){this._cropRect=n},n.prototype.setStartPoint=function(n){this._startPoint=n;this._pointPosition=e(this._startPoint,this._cropRect,this._clientConfig)},n.prototype.setCurrPoint=function(n){this._currPoint=n},n.prototype.isTransforming=function(){return this._pointPosition!==t.External},n.prototype.update=function(){switch(this._pointPosition){case t.Left:case t.Right:case t.Top:case t.Bottom:case t.LeftTop:case t.RightTop:case t.LeftBottom:case t.RightBottom:this._cropRect=u(this._cropRect,this._startPoint,this._currPoint,this._pointPosition);break;case t.Center:this._cropRect=f(this._cropRect,this._startPoint,this._currPoint)}this.verifyBoundsAndUpdate(this._pointPosition);this.verifyMinimumSize()},n.prototype.verifyBoundsAndUpdate=function(n){var e=this._viewRect,i=this._cropRect,u=e.width(),f=e.height(),r=n!==t.Center;i.left()<0&&(r&&i.resize(i.left(),0),i.move(-i.left(),0));i.top()<0&&(r&&i.resize(0,i.top()),i.move(0,-i.top()));i.right()>u&&(r&&i.resize(u-i.right(),0),i.move(u-i.right(),0));i.bottom()>f&&(r&&i.resize(0,f-i.bottom()),i.move(0,f-i.bottom()))},n.prototype.verifyMinimumSize=function(){var t=this._clientConfig.minWidth,i=this._clientConfig.minHeight,r=this._viewRect,n=this._cropRect,u=r.width(),f=r.height();n.width()<t&&(n.resize(t-n.width(),0),n.right()>u&&n.move(u-n.right(),0));n.height()<i&&(n.resize(0,i-n.height()),n.bottom()>f&&n.move(0,f-n.bottom()))},n}();n.OverlayView=i})(VisualSearchCropBoxUtils||(VisualSearchCropBoxUtils={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var u=n.InstrumentationUtils.logActionClickEvent,f=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,i=”click”,r=”touchstart”,e=function(n){function t(t){var f=n.call(this,t)||this;return f.containerOnClick=function(n){n.stopPropagation()},f.clearNotification=function(n){f.state.visible&&(f.setState(Object.assign({},f.state,{visible:!1})),u(“CloseNotification”,f.props.ig,{Mid:f.props.id}),n.stopPropagation());f.props.closeOnPageClick&&(document.removeEventListener(i,f.clearNotification),document.removeEventListener(r,f.clearNotification))},f.state={visible:t.visible},f}return __extends(t,n),t.prototype.componentDidMount=function(){this.props.visible&&this.props.closeOnPageClick&&(document.addEventListener(i,this.clearNotification),document.addEventListener(r,this.clearNotification))},t.prototype.componentWillReceiveProps=function(n){n.visible!==this.props.visible&&this.setState(Object.assign({},this.state,{visible:n.visible}))},t.prototype.render=function(){return this.state.visible?React.createElement(“div”,{className:”noti_container”,”data-tag”:f?”multimedia.imageDetail.notification”:null,onClick:this.containerOnClick},React.createElement(“div”,{className:”noti_close”,onClick:this.clearNotification}),React.createElement(“div”,{className:”noti_content”},this.props.title&&React.createElement(“div”,{className:”noti_title”},this.props.title),this.props.content)):null},t}(React.Component);t.DetailNotification=e})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(n){var t=function(t){function i(n){var i=t.call(this,n)||this,r;return i.notificationTimeout=null,i.state={visible:!1},r=ImageDetailReducers.getNotificationConfig(),r&&typeof setTimeout!=”undefined”&&(i.notificationTimeout=setTimeout(function(){i.setState({visible:n.getCookie(“0”)?!1:!0})},r.DisplayDelay)),i}return __extends(i,t),i.prototype.componentWillUnmount=function(){this.notificationTimeout&&(clearTimeout(this.notificationTimeout),this.notificationTimeout=null)},i.prototype.componentWillReceiveProps=function(n){this.props.shouldChangeOnInsightsExpand&&this.state.visible&&n.isInsightsExpanded!==this.props.isInsightsExpanded&&this.setState(Object.assign({},this.state,{visible:!1}))},i.prototype.render=function(){return this.props.notificationText&&this.state.visible?(this.props.setCookie(1),React.createElement(n.DetailNotification,{title:this.props.notificationTitle,content:React.createElement(SharedComponent.TextHighlighter,{className:”noti_text “+(this.props.isInsightsExpanded?”twocol”:””),format:this.props.notificationText,args:[“”]}),visible:this.state.visible,ig:this.props.ig,closeOnPageClick:this.props.closeOnPageClick})):null},i}(React.Component),i=function(n){return{ig:ImageDetailReducers.getCurrentImpressionId(n),isInsightsExpanded:ImageDetailReducers.getIsInsightsExpanded(n)}};n.NotificationContainer=ReactRedux.connect(i)(t)})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var Multimedia;(function(n){var t;(function(t){function u(n){if(n&&n.entity&&n.entity.imageUrl){var t=function(t){t.stopPropagation();n.imageData&&n.imageData.instInfo&&r(n.imageData.instInfo.appNS,n.imageData.instInfo.kValue,”CI.Click”,”objectRecognitionEntity”,n.ig,{Mid:n.imageData.id})},u=i(n.entity.imageUrl,120,120);return React.createElement(“a”,{className:”entity_pane”,id:”objrec_entitypane”,target:”_blank”,href:n.entity.webSearchUrl,onClick:t,style:n.style},React.createElement(“img”,{src:u,className:”entity_thumb”}),React.createElement(“span”,{className:”entity_info”},React.createElement(SharedComponent.TextItem,{isAccessible:!0,className:”text0 title”},n.entity.name),React.createElement(SharedComponent.TextItem,{isAccessible:!0,className:”text1″},n.entity.jobTitle),React.createElement(SharedComponent.TextItem,{isAccessible:!0,className:”entity_desc”},n.entity.description),React.createElement(“div”,{className:”fadeout”})),React.createElement(“span”,{className:”entity_chevron”},React.createElement(“div”,{className:”chevron”})))}return null}var i=n.ImageDetailUtils.createThumbnailUrl,r=n.InstrumentationUtils.logEvent;t.ImageEntityPane=u})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={})); //]]></SCRIPT> https://www.bing.com/rb/3O/cj,nj/3dcd40f1/12dc3c0c.js?bu=BrwX6RW-F8AXhBbzGA //=80&&this.props.imageInfo.imgWidth>=80?!0:!1},c.prototype.render=function(){var l=this,n=this.props.imageInfo,f=[],nt,tt,o,it,h,a,rt,r,ut,v,ft,b,y,p,et,k,c,d,w,g,ot;if(n){h=this.props.imageState?this.props.imageState.externalImageState:null;a=this.getImageHeight();switch(h){case i.Success:o=n.imgUrl;it=n.isHomePage?function(n){l.stopPropagation(n)}:null;break;case i.Failed:o=n.thumbUrl;break;default:nt=n.imgWidth;tt=n.imgHeight;n.thumbUrl&&this.props.detailScenario!==ImageDetailActions.DetailScenario.SearchByImage&&this.props.detailScenario!==ImageDetailActions.DetailScenario.SearchByImageUpload?(rt=n.thumbUrl,r=parseQueryParamsFromQuery(rt,!1),r.w=nt,r.h=tt,r.rs=1,r.p=0,ut=queryParamsToString(r),o=ut):o=n.imgBin?n.imgBin:n.imgUrl}v=null;v=this.enableMobileView?this.handleMainImageClickMobile:!n.isHomePage&&this.props.viewType!=ImageDetailActions.IImageDetailViewType.VisualSearch?function(){l.handleMainImageClick(n.imgUrl,n.pageUrl)}:null;ft={src:o,onClick:v,onContextMenu:it,altText:this.ariaLabel,getRef:function(n){l.imageElement=n}};b=h===i.Pending?”loading”:h===i.Failed?”error”:””;b+=n.isHomePage?” homepage”:””;y=null;!this.props.isInsightsExpanded&&n.metadata&&(n.metadata.recipeSourcesCount>0?y=s(u.RecipeSources,n.metadata.recipeSourcesCount,this.recipeSourceFormat,this.recipeSourcePluralFormat,this.createBadgeClick(u.RecipeSources)):n.metadata.shoppingSourcesCount>0&&(y=s(u.ShoppingSources,n.metadata.shoppingSourcesCount,this.shoppingSourceFormat,this.shoppingSourcePluralFormat,this.createBadgeClick(u.ShoppingSources))));p=[];this.imageElementWidth&&this.componentElement&&(et=Math.max(this.componentElement.offsetWidth-this.imageElementWidth,0)/2,k={width:et+”px”},p.push(this.createNavigationElement(k,”navReg navRegL”,this.props.onLeftNavigationClick)),p.push(this.createNavigationElement(k,”navReg navRegR”,this.props.onRightNavigationClick)));c=[];d=void 0;this.imageElementWidth&&a&&this.props.isCurrentImage&&this.shouldShowOverlay()&&(e&&e.createMainImageDebugLogs(this.imageElementWidth,a,n.id,this.debugLogs),w=null,this.props.viewType===ImageDetailActions.IImageDetailViewType.VisualSearch&&(w=this.cropBox),w&&c.push(w),c.push(React.createElement(t.ObjectDetection,{enableVSNotification:this.mainImageConfig&&this.mainImageConfig.EnableVisualSearchNotification})),this.enableMobileView||this.props.viewType==ImageDetailActions.IImageDetailViewType.VisualSearch||c.push(React.createElement(t.ObjectRecognition,null)),d={width:this.imageElementWidth+”px”,height:a+”px”});f.push(React.createElement(SharedComponent.RichImageUnit,__assign({key:f.length+1,image:ft,className:b,overlayComponents:c,overlayOnClick:v,overlayStyle:d,adjacentComponents:p,hoverComponents:[y],isAccessible:this.props.isAccessible},this.props.isAccessible?{ariaLabel:this.ariaLabel}:{})));h===i.Failed&&f.push(React.createElement(“div”,{className:”mainImgErr”,key:f.length+1}))}return g=this.props.className?”mainImage “+this.props.className:”mainImage”,e&&(g+=” vptest”),ot={display:”none”},React.createElement(“div”,{className:g,ref:function(n){l.componentElement=n}},f,e&&React.createElement(“div”,{style:ot},this.debugLogs))},c.prototype.createNavigationElement=function(n,t,i){return React.createElement(“span”,{className:t,onClick:i,style:n})},c.cropBoxCreateDelay=500,c.debounceDelay=100,c}(React.Component);t.MainImage=c;c.displayName=”MainImage”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={})); //]]> https://www.bing.com/rs/3O/Ju/cj,nj/4c347eb9/0a1d4532.js <SCRIPT type=”text/javascript”>//<![CDATA[ var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)},__rest=this&&this.__rest||function(n,t){var u={},r;for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&t.indexOf(i)<0&&(u[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols==”function”)for(r=0,i=Object.getOwnPropertySymbols(n);r<i.length;r++)t.indexOf(i[r])<0&&(u[i[r]]=n[i[r]]);return u},Multimedia;(function(n){var t;(function(t){function i(n){var t=n.imageStates,i=n.imageId;return __rest(n,[“imageStates”,”imageId”])}function r(t){function o(n){return n.displayName||n.name||”Component”}var r=n.ImageDetailUtils.areEqualShallow,f=function(n){function u(t){var i=n.call(this,t)||this,r=null,u=t.imageId;return u&&(r=t.imageStates[u]),i.state={imageState:r},i}return __extends(u,n),u.prototype.componentWillReceiveProps=function(n){var t=n.imageId;t&&this.setState({imageState:n.imageStates[t]})},u.prototype.shouldComponentUpdate=function(n,t){var u=i(this.props),f=i(n);return!r(u,f)||!r(this.state.imageState,t.imageState)?!0:!1},u.prototype.render=function(){var n=this.props,r=n.imageStates,u=n.imageId,i=__rest(n,[“imageStates”,”imageId”]);return React.createElement(t,__assign({},i,{imageState:this.state.imageState}))},u}(React.Component),e=function(n){return{imageStates:ImageDetailReducers.getImageStates(n)}},u=ReactRedux.connect(e)(f);return u.displayName=”withImageState(“+o(t)+”)”,u}t.withImageState=r})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var u=ImageDetailSwipe.MmReactSwipe,f=n.InstrumentationUtils.logBatchEvent,e=n.InstrumentationUtils.logResultClickEvent,o=ImageDetailActions.IImageDetailViewType,i=n.ImageDetailUtils,r=t.withImageState(t.MainImage),s=function(n){function t(t){var r=n.call(this,t)||this;return r.MAXIMAGEDWELLTIME=12e4,r.MAXPAGEDWELLTIME=3e5,r.clickEventQueue=[],r.mainImageWindow=null,r.swipeHandler=null,r.swipeDirection=SwipeDirection.Undefined,r.touchStartElementLeft=-1,r.animationEnabled=!1,r.animationDuration=0,r.animationOnGoing=!1,r.animationClassName=””,r.animationAllowed=!0,r.animationRightSlideName=”slideright”,r.animationLeftSlideName=”slideleft”,r.enableSwipe=!0,r.enableCustomScroll=!1,r.enableMobileView=null,r.setEnableSwipe=function(n,t){r.enableSwipe=t===ImageDetailActions.IImageDetailViewType.VisualSearch||n===ImageDetailActions.DetailScenario.SearchByImage||n===ImageDetailActions.DetailScenario.SearchByImageUpload||n===ImageDetailActions.DetailScenario.SearchByImageUploadGet?!1:!0},r.sendQueuedLogs=function(){r.clickEventQueue.length>0&&(f(“ClientInst”,r.props.ig,r.clickEventQueue),r.clickEventQueue=[])},r.expandInsightsBySwipe=function(){r.changeInsightsStatus(“Swipe”)},r.changeInsightsStatus=function(n){r.props.changeInsightStatus&&r.props.changeInsightStatus(!0,n,r.props.ig)},r.touchMoveHandler=function(n,t){if(!r.enableSwipe)return!1;switch(r.swipeDirection){case SwipeDirection.Undefined:r.swipeDirection=i.getSwipeDirection(t.X,t.Y,10,2.5);break;case SwipeDirection.Horizontal:i.setRtlLeft(r.mainImageWindow,r.touchStartElementLeft+t.X+”px”);break;case SwipeDirection.Vertical:if(r.props.isInsightsExpanded)return!1;r.expandInsightsBySwipe()}return!0},r.touchEndHandler=function(n,t,u){var f,e,o;return r.enableSwipe?(f=!0,r.swipeDirection==SwipeDirection.Horizontal?(e=r.mainImageWindow.clientWidth,o=i.isSwipeValid(u,t,e),o?t.X>0?r.setLeftOffsetWithAnimationAndCleanup(!1):r.setLeftOffsetWithAnimationAndCleanup(!0):i.setRtlLeft(r.mainImageWindow,r.touchStartElementLeft+”px”)):r.swipeDirection==SwipeDirection.Vertical&&(r.enableCustomScroll&&i.smoothScroll(-t.Y),f=!1),r.swipeDirection=SwipeDirection.Undefined,f):!1},r.setLeftOffsetWithAnimationAndCleanup=function(n){if(i.setRtlLeft(r.mainImageWindow,”-100%”),r.animationAllowed=!1,n)r.props.onRightNavigationClick(“Swipe”);else r.props.onLeftNavigationClick(“Swipe”)},r.handleMainImageClick=function(n,t){if(r.swipeHandler&&r.swipeHandler.isMoved()){r.swipeHandler.resetMoved();return}n&&(e(t.instInfo,”mainimage”,r.props.ig,{Mid:t.id,Component:”mainimage”}),i.safeNavigate(n,”_blank”))},r.handleRightClick=function(){r.props.onRightNavigationClick(“Click”)},r.handleLeftClick=function(){r.props.onLeftNavigationClick(“Click”)},r.handleWindowUnload=function(){r.stopTime=Date.now();r.swipeHandler&&r.swipeHandler.cleanUp();var n=Math.min(r.stopTime-r.imageDwellStartTime,r.MAXIMAGEDWELLTIME),t=Math.min(r.stopTime-r.startTime,r.MAXPAGEDWELLTIME);r.clickEventQueue.push(r.createPayload(“unload”,””,n,t,r.props.detailScenario,!r.props.isInsightsExpanded,r.props.viewType));f(“ClientInst”,r.props.ig,r.clickEventQueue,!1)},r.createPayload=function(n,t,i,u,f,e,s){var h=null,c=null,l=null;return r.props.currentImage&&(r.props.currentImage.instInfo&&(h=r.props.currentImage.instInfo.appNS,c=r.props.currentImage.instInfo.kValue),l=r.props.currentImage.id),{AppNS:h,T:”CI.Click”,K:c,Name:”imageviewer”,InstCategory:”ImageSeen”,Mid:l,Component:n,Source:t,HasDwellTime:i&&i>0?”true”:”false”,DwellTime:i&&i>0?Math.floor(i):0,HasPageDwellTime:u&&u>0?”true”:”false”,PageDwellTime:u&&u>0?Math.floor(u):0,Scenario:f,ColumnMode:e?”OneCol”:”TwoCol”,ViewType:s==o.Default?”L1″:”L2″}},r.animationConfig=ImageDetailReducers.getAnimationConfig(),r.enableMobileView=ImageDetailReducers.isMobileViewEnabled(),r.enableCustomScroll=i.isIPad!=null,r}return __extends(t,n),t.prototype.componentWillMount=function(){this.imageDwellStartTime=this.startTime=Date.now();typeof window!=”undefined”&&(window.onbeforeunload=this.handleWindowUnload);this.animationEnabled=this.animationConfig.Enabled&&!this.enableMobileView;this.animationDuration=this.animationConfig.MainImageAnimationDuration},t.prototype.componentDidMount=function(){this.mainImageWindow&&typeof this.props.setUpSwipeControl==”function”&&this.props.setUpSwipeControl(this.mainImageWindow);!this.enableMobileView&&this.props.enableNavigation&&this.mainImageWindow&&typeof u!=”undefined”&&(this.swipeHandler=new u(this.mainImageWindow,null,null,this.touchMoveHandler,this.touchEndHandler),this.touchStartElementLeft=this.props.previousImage?-this.mainImageWindow.clientWidth:0)},t.prototype.componentWillUpdate=function(n){n.currentImage&&this.props.currentImage&&n.currentImage.imgUrl!=this.props.currentImage.imgUrl&&this.logImageSeen(n);(n.detailScenario!=this.props.detailScenario||n.viewType!=this.props.viewType)&&this.setEnableSwipe(n.detailScenario,n.viewType)},t.prototype.logImageSeen=function(n){var r=Date.now(),u=Math.min(r-this.imageDwellStartTime,this.MAXIMAGEDWELLTIME),t,i;this.imageDwellStartTime=r;t=””;i=””;this.props.detailScenario!=n.detailScenario?t=”scenarioChange”:n.navigationInfo!=null&&(t=n.navigationInfo.type,i=n.navigationInfo.source);this.props.addToLogQueue(this.createPayload(t,i,u,this.props.detailScenario,null,!this.props.isInsightsExpanded,this.props.viewType))},t.prototype.componentDidUpdate=function(n){var r=this,t,i;this.mainImageWindow.classList&&(this.mainImageWindow.classList.contains(this.animationRightSlideName)&&this.mainImageWindow.classList.remove(this.animationRightSlideName),this.mainImageWindow.classList.contains(this.animationLeftSlideName)&&this.mainImageWindow.classList.remove(this.animationLeftSlideName));this.touchStartElementLeft=this.props.previousImage?-this.mainImageWindow.clientWidth:0;this.animationEnabled&&this.animationAllowed&&!this.animationOnGoing&&this.props.detailScenario==n.detailScenario&&(clearTimeout(this.animationTimer),this.animationOnGoing=!1,this.animationClassName=n.selectedIndex<this.props.selectedIndex?this.animationLeftSlideName:this.props.selectedIndex!=0&&n.selectedIndex>this.props.selectedIndex?this.animationRightSlideName:””,this.animationClassName&&(this.mainImageWindow.className+=” “+this.animationClassName,this.animationOnGoing=!0,t=this.mainImageWindow,i=this.animationClassName,this.animationTimer=setTimeout(function(){t.classList&&t.classList.contains(i)&&t.classList.remove(i);r.animationOnGoing=!1},this.animationDuration)));this.animationAllowed=!0},t.prototype.render=function(){var t=this,u=i.isRTL?{right:!this.enableMobileView&&this.props.previousImage?”-100%”:”0″}:{left:!this.enableMobileView&&this.props.previousImage?”-100%”:”0″},n=this.animationEnabled?”anim”:””;return React.createElement(“div”,{id:”mainImageWindow”,style:u,ref:function(n){t.mainImageWindow=n}},!this.enableMobileView&&this.props.previousImage&&React.createElement(r,{imageInfo:this.props.previousImage,imageId:this.props.previousImage.id,onLeftNavigationClick:this.handleLeftClick,onRightNavigationClick:this.handleRightClick,ig:this.props.ig,detailScenario:this.props.detailScenario,viewType:this.props.viewType,className:n+” prev”,pageSize:this.props.pageSize}),React.createElement(r,{imageId:this.props.currentImage?this.props.currentImage.id:null,imageInfo:this.props.currentImage,detailScenario:this.props.detailScenario,ig:this.props.ig,isInsightsExpanded:this.props.isInsightsExpanded,changePageView:this.props.changePageView,onLeftNavigationClick:this.handleLeftClick,onRightNavigationClick:this.handleRightClick,handleMainImageClick:this.handleMainImageClick,className:n+” current”,isCurrentImage:!0,imageWindowSize:this.props.imageWindowSize,isAccessible:!0,canvasHeight:this.props.canvasHeight,isFullScaleView:this.props.isFullScaleView,pageSize:this.props.pageSize,viewType:this.props.viewType}),!this.enableMobileView&&this.props.nextImage&&React.createElement(r,{imageInfo:this.props.nextImage,imageId:this.props.nextImage.id,detailScenario:this.props.detailScenario,viewType:this.props.viewType,ig:this.props.ig,onLeftNavigationClick:this.handleLeftClick,onRightNavigationClick:this.handleRightClick,className:n+” next”,pageSize:this.props.pageSize}))},t}(React.Component),h=function(t,i){var u=ImageDetailReducers.getFilmStripConfig(t),r=ImageDetailReducers.getViewType(t),f=n.ImageDetailUtils.isNavigationEnabled(u,r,i.detailScenario);return{ig:ImageDetailReducers.getCurrentImpressionId(t),enableNavigation:f,navigationInfo:ImageDetailReducers.getNavigationInfo(t),isInsightsExpanded:ImageDetailReducers.getIsInsightsExpanded(t),selectedIndex:ImageDetailReducers.getSelectedIndex(t),imageWindowSize:ImageDetailReducers.getMainImageWindowSize(t),isFullScaleView:ImageDetailReducers.getIsFullScaleView(t),viewType:r}},c=function(n){return{changeInsightStatus:function(t,i,r){n(ImageDetailActions.changeInsightStatus(t,r,i))},addToLogQueue:function(t){n(ImageDetailActions.addToEventQueue(t))},changePageView:function(t,i){n(ImageDetailActions.changePageView(t));i&&n(ImageDetailActions.changeInsightsSelectedModule(i))}}};t.MainImageWindow=ReactRedux.connect(h,c)(s);t.MainImageWindow.displayName=”MainImageWindow”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=n.InstrumentationUtils.logResultClickEvent,r=n.InstrumentationUtils.logActionClickEvent,u=function(n){function t(t){var u=n.call(this,t)||this,f;return u.copyrightText=null,u.copyrightActionName=null,u.copyrightUrl=null,u.onCopyrightClick=function(){u.props.imageResult&&u.props.imageResult.instInfo?i(u.props.imageResult.instInfo,”ImageCopyright”,u.props.ig):r(“ImageCopyright”,u.props.ig)},f=ImageDetailReducers.getCopyrightConfig(),u.copyrightText=ImageDetailReducers.getResourceString(f.text),u.copyrightActionName=ImageDetailReducers.getResourceString(f.action),u.copyrightUrl=f.url,u}return __extends(t,n),t.prototype.render=function(){return this.copyrightText&&this.copyrightUrl&&this.copyrightActionName?this.props.wrappLearnMoreLink?React.createElement(“a”,{id:”copyright”,target:”_blank”,title:this.copyrightText,href:this.copyrightUrl,onClick:this.onCopyrightClick},React.createElement(“span”,{className:”cpyrtc”},this.copyrightText)):React.createElement(“span”,{className:”cpyrtc”},this.copyrightText,React.createElement(“a”,{id:”copyright”,target:”_blank”,href:this.copyrightUrl,onClick:this.onCopyrightClick},this.copyrightActionName)):null},t}(React.Component),f=function(n,t){return{ig:ImageDetailReducers.getCurrentImpressionId(n),imageResult:t.imageResult?t.imageResult:ImageDetailReducers.getCurrentResult(n)}};t.DetailCopyrightLink=ReactRedux.connect(f)(u)})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var r=n.InstrumentationUtils.logResultClickEvent,u=n.InstrumentationUtils.logActionClickEvent,i=n.ImageDetailUtils,f=function(n){function f(t){var i=n.call(this,t)||this,f;return i.sourceTooltip=null,i.enablePageTitle=!1,i.moreSizeLinkText=null,i.moreSizesTooltip=null,i.moresizesUrlFmt=null,i.moreSizesUrl=null,i.query=null,i.onViewSourceClick=function(){var n=i.props.currentImage;i.props.changePageVisiblityTracking(!0,”ViewPage”);r(n.instInfo,”ViewPage”,i.props.ig,{Mid:n.id,Url:n.pageUrl,Component:”MetaBar”,Dest:”HostPage”})},i.onMoreSizesClick=function(){u(“MoreSizes”,i.props.ig,{Mid:i.props.currentImage.id,Url:i.moreSizesUrl})},i.createPageTitle=function(){return i.props.pageTitleOverride?React.createElement(“div”,{className:”ptitle”},i.props.pageTitleOverride):i.enablePageTitle&&i.props.currentImage?React.createElement(“a”,{className:”ptitle”,title:i.sourceTooltip,target:”_blank”,href:i.props.currentImage.pageUrl,onClick:i.onViewSourceClick},i.props.currentImage.title):void 0},f=ImageDetailReducers.getPageConfig(),i.query=f.query,i.sourceTooltip=ImageDetailReducers.getResourceString(“VisitSite”),i.moreSizeLinkText=ImageDetailReducers.getResourceString(“MoreSizes”),i.moreSizesTooltip=ImageDetailReducers.getResourceString(“SeeMoreSizes”),i.moresizesUrlFmt=ImageDetailReducers.getMoreSizesConfig().urlFmt,i.enablePageTitle=f.enablePageTitleInMetabar,i}return __extends(f,n),f.prototype.render=function(){if(this.props&&this.props.currentImage&&this.props.currentImage.pageUrl){var n=this.props.currentImage.isHomePage?null:extractDomainFromUrl(this.props.currentImage.pageUrl,!1,!0);return this.moreSizesUrl=this.props.currentImage.id==null||this.props.currentImage.visualWords==null||this.props.pageTitleOverride?null:i.stringFormat(this.moresizesUrlFmt,i.getEncodedValue(this.query),i.getEncodedValue(this.props.currentImage.id),i.getEncodedValue(this.props.currentImage.visualWords)),React.createElement(“div”,{id:”detailMeta”},this.createPageTitle(),React.createElement(“div”,{id:”imagemeta”},n&&!this.props.pageTitleOverride&&[React.createElement(“a”,{id:”src”,key:”1″,title:this.sourceTooltip,target:”_blank”,href:this.props.currentImage.pageUrl,onClick:this.onViewSourceClick},n),React.createElement(“span”,{key:”2″,className:”meta_sp”},”|”)],React.createElement(“a”,{id:”msz”,key:”3″,className:this.moreSizesUrl?null:”noUrl”,target:”_blank”,href:this.moreSizesUrl,”data-tooltip”:this.moreSizesUrl?this.moreSizesTooltip:null,onClick:this.moreSizesUrl?this.onMoreSizesClick:null},this.props.currentImage.imgWidth+” × “+this.props.currentImage.imgHeight+” “+(this.props.currentImage.imgFormat||””)),React.createElement(“span”,{key:”4″,className:”meta_sp”},”|”),React.createElement(t.DetailCopyrightLink,{wrappLearnMoreLink:!0})))}return React.createElement(“div”,{id:”detailMeta”,className:”metabar_holder”})},f}(React.Component),e=function(n){return{currentImage:ImageDetailReducers.getCurrentResult(n),ig:ImageDetailReducers.getCurrentImpressionId(n)}},o=function(n){return{changePageVisiblityTracking:function(t,i){n(ImageDetailActions.changePageVisiblityTracking(t,i))}}};n.ImageDetail.DetailMetaBar=ReactRedux.connect(e,o)(f);n.ImageDetail.DetailMetaBar.displayName=”DetailMetaBarV2″})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var ActionButton=function(n){var i=”hiddenContainer “+(n.showHiddenComponent?””:”b_hide”),t=null;return n.hiddenComponent&&(t=React.createElement(“div”,{className:i},n.hiddenComponent),n.showRelativeHiddenComponent&&(t=React.createElement(“div”,{className:n.relativeClassOfHiddenComponent},React.createElement(“div”,{className:i},n.hiddenComponent)))),React.createElement(SharedComponent.TextItem,{elRef:n.buttonRef,isAccessible:!0,hasNestedFocus:n.hasNestedFocus,needResetFocus:n.needResetFocus,customTooltip:n.customTooltip,className:”action “+n.className,datatag:n.datatag,onClick:n.onClick,role:”button”},n.showMask&&React.createElement(“div”,{id:”actionmask”,onClick:n.onMaskClick,onTouchStart:n.onMaskClick,onTouchMove:null,onTouchEnd:null}),n.crownMessege,React.createElement(“span”,{className:”icon”}),n.text&&React.createElement(“span”,{className:”text”},n.text),React.createElement(“span”,null,n.children),t)};var Multimedia;(function(n){var t;(function(t){function r(n){var t=function(){var r=n.actionConfig.type,t=””;r==”ViewPage”?t=n.currentImage.pageUrl:r==”ImageSource”&&(t=n.currentImage.imgUrl);i(r,n.ig,{Mid:n.currentImage.id,url:t,Component:”ActionBar”});t&&window.open(t,”_blank”)};return React.createElement(ActionButton,{className:n.actionConfig.className,text:n.actionConfig.text,onClick:t})}var i=n.InstrumentationUtils.logActionClickEvent;t.ViewUrlButton=r})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=n.InstrumentationUtils.logActionClickEvent,r=function(n){function t(t){var r=n.call(this,t)||this;return r.isSlideShowPlaying=!1,r.clickEvt=”click”,r.handlePlayButtonClick=function(){r.isSlideShowPlaying?r.stopSlideShow():r.startSlideShow()},r.startSlideShow=function(){r.isSlideShowPlaying=!0;r.setState(Object.assign({},r.state,{isSlideShowPlaying:!0}));i(“StartSlideShow”,r.props.ig);r.props.isInsightsExpanded&&r.props.changeInsightStatus(!1,r.props.ig);document.addEventListener(r.clickEvt,r.stopSlideShow)},r.stopSlideShow=function(){r.isSlideShowPlaying=!1;r.setState(Object.assign({},r.state,{isSlideShowPlaying:!1}));clearTimeout(r.slideShowTimeout);i(“StopSlideShow”,r.props.ig);document.removeEventListener(r.clickEvt,r.stopSlideShow)},r.state={isSlideShowPlaying:!1},r}return __extends(t,n),t.prototype.componentDidUpdate=function(n,i){this.state.isSlideShowPlaying&&(i&&!i.isSlideShowPlaying?this.delayNavigate(t.firstSlideShowInterval):n&&n.currentImage&&this.props.currentImage&&n.currentImage.id!==this.props.currentImage.id&&this.delayNavigate(t.slideShowInterval))},t.prototype.componentWillUnmount=function(){document.removeEventListener(this.clickEvt,this.stopSlideShow)},t.prototype.delayNavigate=function(n){var t=this,i=function(){t.isSlideShowPlaying&&t.props.navigateNext()};this.slideShowTimeout=setTimeout(i,n)},t.prototype.render=function(){var n=this.state&&this.state.isSlideShowPlaying?”pause”:”play”;return React.createElement(ActionButton,{className:n,text:this.props.actionConfig.text,onClick:this.handlePlayButtonClick})},t.slideShowInterval=4e3,t.firstSlideShowInterval=1e3,t}(React.Component),u,f;t.SlideShowButtonImpl=r;u=function(n){return{isInsightsExpanded:ImageDetailReducers.getIsInsightsExpanded(n)}};f=function(n){return{navigateNext:function(){n(ImageDetailActions.navigateRight(“SlideShow”))},changeInsightStatus:function(t,i){n(ImageDetailActions.changeInsightStatus(t,i,”SlideShow”))}}};t.SlideShowButton=ReactRedux.connect(u,f)(r)})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var ImageDetailActions;(function(n){function h(t,i){var f=t.imageResult,e=u(t,i),s=a(f,e),h;return t.requestUrl&&s?(h={url:t.requestUrl,id:f.id,formData:s,testPostFix:”FavoritesAdd_”+f.id,persistedQueryStrings:t.persistedQueryStrings,collectionReference:e,requestErrorInstText:o},r(h,n.FAVORITES_ADD_REQUESTED,n.FAVORITES_ADD_FAILED,n.FAVORITES_ADD_COMPLETED,function(n){return n})):null}function c(t,i){var f=t.imageResult,e=u(t,i),o=v(f,e),h;return t.requestUrl&&o?(h={url:t.requestUrl,id:f.id,formData:o,testPostFix:”FavoritesRemove_”+f.id,persistedQueryStrings:t.persistedQueryStrings,collectionReference:e,requestErrorInstText:s},r(h,n.FAVORITES_REMOVE_REQUESTED,n.FAVORITES_REMOVE_FAILED,n.FAVORITES_REMOVE_COMPLETED,function(n){return n})):null}function l(t){if(t.requestUrl){var i={url:t.requestUrl,testPostFix:”Favorites”,persistedQueryStrings:t.persistedQueryStrings,requestErrorInstText:e};return r(i,n.FAVORITES_FETCH_REQUESTED,n.FAVORITES_FETCH_FAILED,n.FAVORITES_FETCH_COMPLETED,function(n){return y(n)})}return null}function a(n,t){if(n&&t){var i={targetCollection:t,items:[{mediaUrl:n.imgUrl,pageUrl:n.pageUrl,mediaId:n.id,type:”image”}]};return JSON.stringify(i)}return null}function v(n,t){if(n&&n.cid&&t){var i={itemReferences:[{collection:t,collectionItemId:”image:cid=”+n.cid}]};return JSON.stringify(i)}return null}function u(n,r){var f=n.imageResult.id,u;if(r[f])return r[f].collectionReference;if(n.query)return i(n.query,null);if(n.scenario){u=null;switch(n.scenario){case t.TopicFeed:case t.Recommendations:u=”ImageRecommendations”;break;case t.VisuallySimilarProducts:u=”ProductDefault”;break;default:u=”ImageDefault”}if(n.imageResult.isHomePage&&(u=”HomePage”),u!=null)return i(null,u)}else return null}function i(n,t){return n?{collectionTitle:n}:t?{predefinedCollection:t}:null}function r(n,t,i,r,u){return n.onRequestSent=function(n,i){return n({type:t,requestConfig:i})},n.onRequestFailure=function(n,t){return n({type:i,requestConfig:t})},n.onRequestSuccess=function(n,t,i){return n({type:r,requestConfig:t,response:u(i)})},n}function y(n){var i,r,t;if(n&&n.collections){for(i={},r=function(){var r=n.collections[t],u;r&&w(r.collectionPage)&&(u=r.collectionPage,u.items.map(function(n){if(n.content){var t=f.createImageInfo(n.content);i[t.id]=p(t,r.title,r.knownCollectionType)}}))},t=0;t<n.collections.length;t++)r();return i}return null}function p(n,t,r){return{status:n.id,collectionReference:i(t,r)}}function w(n){return n&&n.items&&n.items.length>0}var t=n.DetailScenario,f=Multimedia.ImageDetailResponseTransformer,e=”GetFavoritesError”,o=”AddFavoritesError”,s=”RemoveFavoritesError”;n.createAddFavoritesRequestConfig=h;n.createRemoveFavoritesRequestConfig=c;n.createGetFavoritesRequestConfig=l})(ImageDetailActions||(ImageDetailActions={}));var Multimedia;(function(n){var t;(function(t){function f(n,t,r,u){var f=ImageDetailActions.createAddFavoritesRequestConfig(n,t);f&&(r(ImageDetailActions.fetchData(f,f.formData)),i(n.imageResult,u,”InsightsAdd”))}function e(n,t,r,u){var f=ImageDetailActions.createRemoveFavoritesRequestConfig(n,t);f&&(r(ImageDetailActions.fetchData(f,f.formData)),i(n.imageResult,u,”InsightsRemove”))}function o(n,t){var i=ImageDetailActions.createGetFavoritesRequestConfig(n);i&&t(ImageDetailActions.fetchData(i))}function i(n,t,i){var r=n.instInfo;u(r,”Favorites”,t,{Component:i,mid:n.id})}function s(n,t){var i=r(n,t);return i?i==ImageDetailActions.FAVORITES_ADD_REQUESTED||i==ImageDetailActions.FAVORITES_ADD_FAILED||i==ImageDetailActions.FAVORITES_REMOVE_COMPLETED?!1:!0:!1}function r(n,t){return n&&t&&t[n]?t[n].status:null}var u=n.InstrumentationUtils.logResultClickEvent;t.addFavorites=f;t.removeFavorites=e;t.getFavorites=o;t.isFavorites=s;t.getFavoritesActionStatus=r})(t=n.ImageDetailFavoritesUtil||(n.ImageDetailFavoritesUtil={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var r=n.InstrumentationUtils.logActionClickEvent,i=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,u=function(t){function u(n){var i=t.call(this,n)||this;return i.visibleTooltipClass=”fav_tooltip visible”,i.invsibileTooltipClass=”fav_tooltip invis”,i.onTooltipMouseEnter=function(){i.setTooltipState(i.visibleTooltipClass)},i.onTooltipMouseLeave=function(){i.setTooltipState(i.invsibileTooltipClass)},i.getLayoutSpecificClass=function(n){if(i.props.useSimpleView)return””;switch(n){case ImageDetailActions.FAVORITES_ADD_COMPLETED:return”fav_added”;case ImageDetailActions.FAVORITES_REMOVE_COMPLETED:return”fav_rm”;case ImageDetailActions.FAVORITES_ADD_REQUESTED:return”fav_adding”;case ImageDetailActions.FAVORITES_ADD_FAILED:return”fav_addf”;case ImageDetailActions.FAVORITES_REMOVE_REQUESTED:return”fav_rming”;case ImageDetailActions.FAVORITES_REMOVE_FAILED:return”fav_rmf”}return””},i.createSeeAllLink=function(){var n=i.props.favoritesConfig,t=function(){return r(“SeeAll”,i.props.ig,{Mid:i.props.currentImageId})},u=window.parent!=window?”_parent”:”_self”;return React.createElement(“a”,{href:n.seeAllFavRequestUrl,className:”saf”,target:u,onClick:t},n.favSucceedSeeAll)},i.state={tooltipClass:i.visibleTooltipClass},i}return __extends(u,t),u.prototype.componentDidMount=function(){this.loadFavoritesTooltips()},u.prototype.componentWillReceiveProps=function(n){this.updateStateForPropsUpdate(n)},u.prototype.componentWillUnmount=function(){this.tooltipTimer&&clearTimeout(this.tooltipTimer)},u.prototype.render=function(){var r=n.ImageDetailFavoritesUtil.getFavoritesActionStatus(this.props.currentImageId,this.props.favoritesMap),u=r&&this.favoritesTooltips?this.favoritesTooltips[r]:null,t=this.state.tooltipClass,o=this.shouldShowFavoritesTooltipForHover()&&t!=this.visibleTooltipClass,f,e;return(o&&(t=this.visibleTooltipClass),f=!1,i&&i.isTestHookEnabled()&&(e=this.getTooltipForTestScenario(),e&&(u=e,t=this.visibleTooltipClass,f=!0)),t+=” “+this.getLayoutSpecificClass(r),u)?(o||f||this.setTooltipTimer(),React.createElement(“div”,{className:t},u)):null},u.prototype.updateStateForPropsUpdate=function(n){var u,f;if(n&&n.currentImageId&&this.props.currentImageId){var i=n.currentImageId,r=this.props.currentImageId,t=null;i!=r?t=this.invsibileTooltipClass:this.hasValidFavoritesMapEntry(n.favoritesMap,i)&&(u=n.favoritesMap[i].status,f=this.hasValidFavoritesMapEntry(this.props.favoritesMap,r)&&this.props.favoritesMap[r].status,t=f==u?this.invsibileTooltipClass:this.visibleTooltipClass);t!=null&&this.setTooltipState(t)}},u.prototype.loadFavoritesTooltips=function(){this.props.useSimpleView?this.loadSimpleStyleTooltips():this.loadConfirmationUIStyleTooltips()},u.prototype.shouldShowFavoritesTooltipForHover=function(){var t=this.props.currentImageId,n;return this.hasValidFavoritesMapEntry(this.props.favoritesMap,t)?(n=this.props.favoritesMap[t].status,(n==ImageDetailActions.FAVORITES_ADD_COMPLETED||n==ImageDetailActions.FAVORITES_REMOVE_FAILED)&&this.props.isFavoritesHovering):!1},u.prototype.getTooltipForTestScenario=function(){var i=null,t,n;return typeof parseQueryParams==”undefined”?null:(t=parseQueryParams(),n=t&&t.vpts,this.loadFavoritesTooltips(),n&&this.favoritesTooltips&&this.favoritesTooltips[n]&&(i=this.favoritesTooltips[n]),i)},u.prototype.hasValidFavoritesMapEntry=function(n,t){return n&&t&&n[t]!==null&&n[t]!==undefined},u.prototype.setTooltipTimer=function(){var n=this,t;clearTimeout(this.tooltipTimer);t=function(){n.setTooltipState(n.invsibileTooltipClass);clearTimeout(n.tooltipTimer)};this.tooltipTimer=setTimeout(t,this.props.favoritesConfig.tooltipDuration)},u.prototype.setTooltipState=function(n){this.setState(Object.assign({},this.state,{tooltipClass:n}))},u.prototype.loadConfirmationUIStyleTooltips=function(){var t=this.props.favoritesConfig,n={};n[ImageDetailActions.FAVORITES_ADD_REQUESTED]=this.createAdvanceTooltip(t.favPendingTooltip);n[ImageDetailActions.FAVORITES_ADD_COMPLETED]=this.createAdvanceTooltip(t.favSucceedTooltip,this.createSeeAllLink);n[ImageDetailActions.FAVORITES_ADD_FAILED]=this.createAdvanceTooltip(t.favFailedTooltip);n[ImageDetailActions.FAVORITES_REMOVE_REQUESTED]=this.createAdvanceTooltip(t.unfavPendingTooltip);n[ImageDetailActions.FAVORITES_REMOVE_COMPLETED]=this.createAdvanceTooltip(t.unfavSucceedTooltip);n[ImageDetailActions.FAVORITES_REMOVE_FAILED]=this.createAdvanceTooltip(t.unfavFailedTooltip);this.favoritesTooltips=n},u.prototype.loadSimpleStyleTooltips=function(){var t=this.props.favoritesConfig,n={};n[ImageDetailActions.FAVORITES_ADD_REQUESTED]=this.createTooltipMessage(t.favPendingTooltip);n[ImageDetailActions.FAVORITES_ADD_COMPLETED]=this.createSeeAllTooltip();n[ImageDetailActions.FAVORITES_ADD_FAILED]=this.createTooltipMessage(t.favFailedTooltip);n[ImageDetailActions.FAVORITES_REMOVE_REQUESTED]=this.createTooltipMessage(t.unfavPendingTooltip);n[ImageDetailActions.FAVORITES_REMOVE_COMPLETED]=this.createTooltipMessage(t.unfavSucceedTooltip);n[ImageDetailActions.FAVORITES_REMOVE_FAILED]=this.createTooltipMessage(t.unfavFailedTooltip);this.favoritesTooltips=n},u.prototype.createTooltipMessage=function(n){return React.createElement(“span”,{className:”famsgc”},n.statusText&&React.createElement(“div”,{className:”fadtxt”},n.statusText),n.descriptionText&&React.createElement(“span”,{className:”famsg”},n.descriptionText))},u.prototype.createSeeAllTooltip=function(){return React.createElement(“span”,{className:”famsga”},this.createSeeAllLink(),React.createElement(“div”,{className:”fadtxt”},this.props.favoritesConfig.favSucceedTooltip.statusText))},u.prototype.createAdvanceTooltip=function(n,t){var i=”fav_tooltipv”;return t&&(i=n.descriptionText?”fav_tooltipl”:”fav_tooltips”),React.createElement(“div”,{className:i},n.statusText&&React.createElement(“div”,{className:”fash”},React.createElement(“span”,null,t&&t(),React.createElement(“div”,{className:”fastxt”},n.statusText))),n.descriptionText&&React.createElement(“div”,{className:”fadtxt”},React.createElement(“span”,null,n.descriptionText)),React.createElement(“span”,{className:”fav_wa”}))},u}(React.Component);t.FavoritesActionTooltip=u})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)},Multimedia;(function(n){var t;(function(t){var i=function(i){function r(n){var t=i.call(this,n)||this,r;return t.query=null,t.persistedQueryStrings=null,t.favoritesConfig=null,t.onFavoritesButtonHover=function(){t.setHoverState(!0)},t.onFavoritesButtonLeave=function(){t.setHoverState(!1)},t.setHoverState=function(n){t.setState(Object.assign({},t.state,{isFavoritesHovering:n}))},r=ImageDetailReducers.getPageConfig(),t.query=r.query,t.favoritesConfig=r.favoritesConfig,t.persistedQueryStrings=r.persistedQueryStrings,t.state={isFavoritesHovering:!1},t}return __extends(r,i),r.prototype.componentDidMount=function(){var n=this.createFavoritesRequest(this.favoritesConfig.getFavRequestUrl);this.props.getFavorites(n)},r.prototype.render=function(){var t=this,i,r,u,f;return this.props.currentImage?n.ImageDetailFavoritesUtil.isFavorites(this.props.currentImage.id,this.props.favoritesMap)?(i=this.createFavoritesRequest(this.favoritesConfig.removeFavRequestUrl),r=function(){return t.props.removeFavorites(i,t.props.favoritesMap,t.props.ig)},this.createFavoritesButton(this.props.actionConfig.unfavClassName,this.favoritesConfig.unfavText,r)):(u=this.createFavoritesRequest(this.favoritesConfig.addFavRequestUrl),f=function(){return t.props.addFavorites(u,t.props.favoritesMap,t.props.ig)},this.createFavoritesButton(this.props.actionConfig.favClassName,this.favoritesConfig.favText,f)):null},r.prototype.createFavoritesRequest=function(n){return{imageResult:this.props.currentImage,query:this.query,requestUrl:n,persistedQueryStrings:this.persistedQueryStrings,scenario:this.props.scenario}},r.prototype.createFavoritesButton=function(n,i,r){return React.createElement(“div”,{className:”favrc cmitip”,onMouseOver:this.onFavoritesButtonHover,onMouseLeave:this.onFavoritesButtonLeave},React.createElement(t.FavoritesActionTooltip,__assign({},this.props,{favoritesConfig:this.favoritesConfig,currentImageId:this.props.currentImage.id,isFavoritesHovering:this.state.isFavoritesHovering})),React.createElement(ActionButton,{className:n,text:i,onClick:r}))},r}(React.Component),r,u;t.FavoritesActionPanelImpl=i;r=function(n){return{favoritesMap:ImageDetailReducers.getCurrentFavortesMap(n),scenario:ImageDetailReducers.getDetailScenario(n),ig:ImageDetailReducers.getCurrentImpressionId(n)}};u=function(t){return{addFavorites:function(i,r,u){n.ImageDetailFavoritesUtil.addFavorites(i,r,t,u)},removeFavorites:function(i,r,u){n.ImageDetailFavoritesUtil.removeFavorites(i,r,t,u)},getFavorites:function(i){n.ImageDetailFavoritesUtil.getFavorites(i,t)}}};t.FavoritesActionPanel=ReactRedux.connect(r,u)(i)})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=n.InstrumentationUtils.logActionClickEvent,r=ImageDetailActions.IImageDetailViewType,o=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,u=function(r){function u(){var n=r!==null&&r.apply(this,arguments)||this;return n.enableMobileView=ImageDetailReducers.isMobileViewEnabled(),n.notificationTitle=ImageDetailReducers.getResourceString(“VSNotificationTitle”),n.notificationText=ImageDetailReducers.getResourceString(“VSNotification”),n.createObjectDetectionNotification=function(n){return n>0?React.createElement(SharedComponent.TextItem,{className:”objdNoti”},n):null},n.handleClick=function(){i(n.props.actionConfig.type,n.props.ig,{Mid:n.props.currentImage.id,Component:”ActionBar”});n.props.visualSearchOnClick&&n.props.visualSearchOnClick(n.props.ig)},n}return __extends(u,r),u.prototype.render=function(){return React.createElement(“div”,null,!n.ImageDetailUtils.getVSNotificationCookie(“0″)&&this.props.enableVisualSearchNotification&&React.createElement(t.NotificationContainer,{notificationTitle:this.notificationTitle,notificationText:this.notificationText,getCookie:n.ImageDetailUtils.getVSNotificationCookie,setCookie:n.ImageDetailUtils.setVSNotificationCookie}),React.createElement(ActionButton,{className:this.props.actionConfig.className,text:this.props.actionConfig.text,onClick:this.handleClick,crownMessege:this.createObjectDetectionNotification(this.props.objectDetectionCount)}))},u}(React.Component),f=function(n,t){var u=ImageDetailReducers.getMainImageConfig(),r=0,f=ImageDetailReducers.getObjectDetectionConfig(n),i;return f.EnableActionbarNotification&&t.isCurrentFrame&&(i=ImageDetailReducers.getDetectedObjects(n),i&&i.length>0&&(r=i.length)),{viewType:ImageDetailReducers.getViewType(n),objectDetectionCount:r,enableVisualSearchNotification:u.EnableVisualSearchNotification}},e=function(n){return{visualSearchOnClick:function(){n(ImageDetailActions.addToDetailStateHistory());n(ImageDetailActions.changePageView(r.VisualSearch))}}};t.VisualSearchAction=ReactRedux.connect(f,e)(u);t.VisualSearchAction.displayName=”VisualSearchAction”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var Multimedia;(function(n){var t;(function(n){function t(n){function f(){n.changeInsightStatus&&n.changeInsightStatus(!n.isInsightsExpanded,n.ig)}if(n.insightsPosition!==ImageDetailActions.InsightsPosition.RightRail)return null;var t=n.actionConfig,r=t.className+(n.isInsightsExpanded?” col”:” exp”),u=n.isInsightsExpanded?t.collapseTextKey:t.expandTextKey,i=ImageDetailReducers.getResourceString(u,null);return React.createElement(ActionButton,{className:r,text:i,onClick:f,customTooltip:i})}var i=function(n){return{isInsightsExpanded:ImageDetailReducers.getIsInsightsExpanded(n),ig:ImageDetailReducers.getCurrentImpressionId(n),insightsPosition:ImageDetailReducers.getInsightsPosition(n)}},r=function(n){return{changeInsightStatus:function(t,i){n(ImageDetailActions.changeInsightStatus(t,i,”ActionBar”))}}};n.InsightsSwitchButton=ReactRedux.connect(i,r)(t)})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var r=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,i=”click”,u=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.showHiddenComponent=!1,t.handleMoreButtonClick=function(){t.showHiddenComponent=!t.showHiddenComponent;t.setHiddenComponentStatus(t.showHiddenComponent);t.props.toggleMenuCallback&&t.props.toggleMenuCallback(t.showHiddenComponent)},t.closeHiddenAction=function(){t.setHiddenComponentStatus(!1);t.props.toggleMenuCallback&&t.props.toggleMenuCallback(!1)},t.setHiddenComponentStatus=function(n){t.showHiddenComponent=n;t.setState(Object.assign({},t.state,{showHiddenComponent:t.showHiddenComponent}));t.showHiddenComponent?document.addEventListener(i,t.closeHiddenAction):document.removeEventListener(i,t.closeHiddenAction)},t}return __extends(t,n),t.prototype.componentWillUnmount=function(){typeof document!=”undefined”&&document.removeEventListener(i,this.closeHiddenAction)},t.prototype.render=function(){var n=” menuBtn “,t,i;return n=this.props.className?this.props.className+n:n,t=this.state&&this.state.showHiddenComponent,i=this.state&&this.state.showHiddenComponent&&this.props.showMask,React.createElement(ActionButton,{showMask:i,onMaskClick:this.closeHiddenAction,className:n,text:this.props.text,customTooltip:this.props.customTooltip&&!t?this.props.customTooltip:null,onClick:this.handleMoreButtonClick,showHiddenComponent:t,datatag:r?this.props.dataTag:null,hiddenComponent:this.props.hiddenComponent,showRelativeHiddenComponent:this.props.showRelativeHiddenComponent,relativeClassOfHiddenComponent:this.props.relativeClassOfHiddenComponent})},t}(React.Component);t.MenuButton=u})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(n){var t=function(n){function t(t){var i=n.call(this,t)||this,r;return i.isEnabled=function(n){return!i.isImageLoadFailed(n)},i.isImageLoadFailed=function(n){return n.imageState&&n.imageState.externalImageState==ImageDetailActions.RequestState.Failed},i.activatePage=function(){i.props.changePageActivity&&i.props.changePageActivity(!0)},i.deactivatePage=function(){i.props.changePageActivity&&i.props.changePageActivity(!1)},i.getShareUrl=function(){var t=ImageDetailReducers.getAdultSetting();if(typeof _d!=”undefined”&&t){var n=_d.location,r=n.search,i=parseQueryParamsFromQuery(r,!1);return i.adlt=t,(n.origin||””)+n.pathname+”?”+queryParamsToString(i)}return null},i.createShareElement=function(n,t){t===void 0&&(t=null);return{eType:1,html:t==null?”

“:”

“+t+””,style:{width:”100%”,height:”100%”,”background-color”:n}}},i.onShareButtonClick=function(){if(!i.props.currentImage||!i.state.enabled&&i.shareConfig.enableCustomShareError)return null;if(i.isImageLoadFailed(i.props)){i.showStandardShareError();return}if(!i.props.currentImage.shareHash)return null;i.showShareDialog()},i.showStandardShareError=function(){i.shareConfig.enableCustomShareError||ShareDialog.showError(i.dlgOption,i.errorOption)},i.showShareDialog=function(){var n=[],t,r;i.shareConfig&&i.shareConfig.imageCanvasBgColor&&n.push(i.createShareElement(i.shareConfig.imageCanvasBgColor));t={eType:0,url:i.props.currentImage.imgUrl,width:i.props.currentImage.imgWidth,height:i.props.currentImage.imgHeight};n.push(t);r={customShareUrl:i.getShareUrl(),shareElements:n,title:i.props.currentImage.title,description:i.props.currentImage.text?i.props.currentImage.text:””,shareHashKey:i.props.currentImage.shareHash,pinterest:{image:i.props.currentImage.imgUrl},twitter:{text:i.props.currentImage.title}};ShareDialog.show(i.dlgOption,r)},i.canShare=function(){return i.props.currentImage&&i.props.currentImage.imgUrl},i.getExternalImageState=function(n){return n.imageState?n.imageState.externalImageState:null},i.shareConfig=ImageDetailReducers.getShareControlConfig(),i.dlgOption={service:i.shareConfig?i.shareConfig.service:null,scenario:i.shareConfig?i.shareConfig.scenario:null,onclosed:i.activatePage,onshown:i.deactivatePage,sharemethods:i.shareConfig.shareMethods,rearrangeShareMethods:i.shareConfig.shareMethods!=null},r=i.createShareElement(“rgb(0, 199, 199)”,i.shareConfig.shareErrorMessage),i.errorOption={errorElements:[r]},i.state={enabled:i.isEnabled(t)},i}return __extends(t,n),t.prototype.componentWillReceiveProps=function(n){(this.getExternalImageState(this.props)!==this.getExternalImageState(n)||this.props.currentImage.id!==n.currentImage.id)&&this.setState({enabled:this.isEnabled(n)})},t.prototype.render=function(){var n=this.props,t=n.actionConfig.className,i=null;return(this.state.enabled||(t+=” inactive”,i=this.shareConfig.enableCustomShareError?this.shareConfig.shareErrorMessage:null),this.canShare())?React.createElement(ActionButton,{className:t,customTooltip:i,text:n.actionConfig.text,onClick:this.onShareButtonClick}):null},t}(React.Component),i=function(n){return{changePageActivity:function(t){n(ImageDetailActions.changePageActivity(t))}}};n.ShareControlButton=ReactRedux.connect(null,i)(t)})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=n.InstrumentationUtils.logActionClickEvent,r=n.ImageDetailUtils,u=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,f=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.defaultContainerComponent=”ActionBar”,t.screenMask=null,t.feedbackCloseEvent=”flagfeedback_close”,t.componentDidMount=function(){t.setFeedbackCloseEvent(!1)},t.componentWillUnmount=function(){t.setFeedbackCloseEvent(!0)},t.setFeedbackCloseEvent=function(n){if(t.props.enableMobileView){var i=n?sj_evt.unbind:sj_evt.bind;i(t.feedbackCloseEvent,t.closeBackground)}},t.onFlagAsAdultButtonClick=function(n){var u=t.props.currentImage,f={turl:r.createThumbnailUrl(u.thumbUrl,u.thWidth,u.thHeight),maw:u.thWidth,mah:u.thHeight,mid:u.id,surl:u.pageUrl,imgurl:u.imgUrl},e;typeof EditorialToolTabs!=”undefined”&&EditorialToolTabs?(EditorialToolTabs.setupInternalMetaData(“”,!0,!0,f),EditorialToolTabs.imageClick()):typeof FlagFeedback!=”undefined”&&FlagFeedback&&(FlagFeedback.metadata=f,FlagFeedback.c());e=t.props.actionConfig.type;i(e,t.props.ig,{Component:t.props.containerComponent||t.defaultContainerComponent});n.nativeEvent.stopImmediatePropagation();t.props.enableMobileView&&t.setUpFlagAdultBackground()},t.setUpFlagAdultBackground=function(){t.screenMask&&t.screenMask.parentNode!=document.body&&document.body.appendChild(t.screenMask)},t.closeBackground=function(n){t.screenMask&&t.screenMask.parentNode==document.body&&(document.body.removeChild(t.screenMask),n.stopPropagation&&n.stopPropagation())},t.createMaskElement=function(){return React.createElement(“div”,{className:”scnmsk”,onClick:t.closeBackground,ref:function(n){t.screenMask=n}})},t}return __extends(t,n),t.prototype.render=function(){return this.props.actionConfig&&this.props.actionConfig.text?React.createElement(“div”,{id:”flagac”},React.createElement(ActionButton,{className:this.props.actionConfig.className,text:this.props.actionConfig.text,onClick:this.onFlagAsAdultButtonClick,hasNestedFocus:this.props.hasNestedFocus,needResetFocus:this.props.needResetFocus,”data-tag”:u?”multimedia.imageDetail.flagAdultButton”:null}),this.props.enableMobileView&&this.createMaskElement()):null},t}(React.Component);t.FlagAsAdultButton=f})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(n){var t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.render=function(){var n=ImageDetailReducers.getFeedbackConfig(),t;return n&&n.enabled?(typeof _w!=”undefined”&&(_w.fbsrc=”idp”),t=function(t){var i=n.feedbackClickEventId;if(i)return sj_evt.fire(i,{feedbackContainerId:_ge(“b_content”)}),t.preventDefault(),t.stopPropagation(),!1},React.createElement(ActionButton,{className:n.className,text:n.text,onClick:t})):null},t}(React.Component);n.DetailFeedback=t})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=n.InstrumentationUtils.logActionClickEvent,r=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.handleClick=function(){i(t.props.actionConfig.type,t.props.ig,{Mid:t.props.imageId,Component:”ActionBar”});t.props.detailStatesCount&&t.props.detailStatesCount>1?t.props.historyBack():(t.props.changeScenario(),t.props.changePageView())},t}return __extends(t,n),t.prototype.render=function(){return React.createElement(ActionButton,{className:this.props.actionConfig.className,text:this.props.actionConfig.text,onClick:this.handleClick})},t}(React.Component),u=function(n){return{detailStatesCount:ImageDetailReducers.getImageDetailStatesCount(n)}},f=function(n){return{historyBack:function(){typeof window!=”undefined”&&window.history&&window.history.length>=2&&window.history.back()},changeScenario:function(){n(ImageDetailActions.switchDetailScenario(ImageDetailActions.DetailScenario.Default))},changePageView:function(){n(ImageDetailActions.changePageView(ImageDetailActions.IImageDetailViewType.DetailL2View))}}};t.RemoveCropAction=ReactRedux.connect(u,f)(r);t.RemoveCropAction.displayName=”RemoveCropAction”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var r=n.InstrumentationUtils.logActionClickEvent,i=ImageDetailActions.IImageDetailViewType,u=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,f=t.withImageState(t.ShareControlButton),e=function(n){function e(u){var e=n.call(this,u)||this;return e.isHiddenActionsShown=!1,e.isDetailV2=!1,e.allComponents={ViewUrlButton:t.ViewUrlButton,FavoritesActionPanel:t.FavoritesActionPanel,SlideShowButton:t.SlideShowButton,ShareButton:t.ShareButton,VisualSearchAction:t.VisualSearchAction,InsightsSwitchButton:t.InsightsSwitchButton,ShareControlButton:f,FlagAsAdultButton:t.FlagAsAdultButton,DetailFeedback:t.DetailFeedback,RemoveCropAction:t.RemoveCropAction},e.moreButtonClickCallback=function(n){var t=n?”ShowActions”:”HideActions”;r(t,e.props.ig,{Mid:e.props.currentImage.id})},e.createAction=function(n,t){var i=t.componentName?e.allComponents[t.componentName]:null;return i?React.createElement(“li”,{key:n},React.createElement(i,{actionConfig:t,currentImage:e.props.currentImage,ig:e.props.ig,imageId:e.props.currentImage?e.props.currentImage.id:null,isCurrentFrame:!0})):null},e.setActions=function(n){n.viewType==i.Default?e.currentVisibleActionsCount>0?(e.visibleActions=n.actionsConfig.actions.slice(0,e.currentVisibleActionsCount),e.hiddenActions=n.actionsConfig.actions.slice(e.currentVisibleActionsCount,n.actionsConfig.actions.length)):e.hiddenActions=n.actionsConfig.actions.slice(0,n.actionsConfig.actions.length):e.currentVisibleActionsCount>0?(e.visibleActions=n.actionsConfig.actionsInL2View.slice(0,e.currentVisibleActionsCount),e.hiddenActions=e.currentVisibleActionsCount0},e.isDetailV2=ImageDetailReducers.isDetailV2Enabled(),e.currentVisibleActionsCount=e.props.viewType!=i.Default?e.props.actionsConfig.visibleActionsCountInL2View:e.props.actionsConfig.visibleActionsCount,e}return __extends(e,n),e.prototype.componentWillMount=function(){this.setActions(this.props)},e.prototype.componentWillReceiveProps=function(n){var t=n.viewType!=i.Default?n.actionsConfig.visibleActionsCountInL2View:n.actionsConfig.visibleActionsCount;this.props.viewType!=n.viewType||this.props.scenario!=n.scenario||n.insightsPosition==ImageDetailActions.InsightsPosition.Bottom?(this.currentVisibleActionsCount=t,this.setActions(n)):this.actionBarElement&&n.parentWidth&&this.actionBarElement.offsetWidth>n.parentWidth&&this.currentVisibleActionsCount>=t?(this.currentVisibleActionsCount=t-1,this.setActions(n)):this.actionBarElement&&n.parentWidth&&this.actionBarElement.offsetWidth+n.actionsConfig.actionItemMargin0&&React.createElement(“li”,null,React.createElement(t.MenuButton,{className:this.moreActionButton.className,text:this.moreActionButton.text,customTooltip:this.moreActionButton.text,hiddenComponent:React.createElement(“ul”,{className:”hiddenActions”,”data-tag”:u?”multimedia.imageDetail.hiddenActions”:null},this.hiddenActions.map(function(t,i){return n.createAction(i,t)})),toggleMenuCallback:this.moreButtonClickCallback,dataTag:”multimedia.imageDetail.moreActionButton”,showRelativeHiddenComponent:this.isDetailV2,relativeClassOfHiddenComponent:this.isDetailV2?”hdcm”:null})))):null},e}(React.Component),o=function(n){return{currentImage:ImageDetailReducers.getCurrentResult(n),actionsConfig:ImageDetailReducers.getActionsConfig(n),ig:ImageDetailReducers.getCurrentImpressionId(n),viewType:ImageDetailReducers.getViewType(n),scenario:ImageDetailReducers.getDetailScenario(n),insightsPosition:ImageDetailReducers.getInsightsPosition(n)}};t.DetailActionBar=ReactRedux.connect(o)(e);t.DetailActionBar.displayName=”DetailActionBar”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=function(i){function r(n){var t=i.call(this,n)||this;return t.updateDimensions=function(){t.setState({width:t.element.offsetWidth})},t}return __extends(r,i),r.prototype.componentDidMount=function(){this.updateDimensions()},r.prototype.componentWillReceiveProps=function(n){n.pageSize!=this.props.pageSize&&this.updateDimensions()},r.prototype.render=function(){var i=this;return React.createElement(“div”,{id:”detailInfo”,style:this.props.showMetaBar?null:this.props.style,className:this.props.pageTitleOverride?”sbiPageTitle”:null,ref:function(n){i.element=n}},this.props.showMetaBar&&React.createElement(n.ImageDetail.DetailMetaBar,{pageTitleOverride:this.props.pageTitleOverride}),React.createElement(t.DetailActionBar,{parentWidth:this.state?this.state.width:null}))},r}(React.Component),r=function(n){return{pageSize:ImageDetailReducers.getPageSize(n)}};n.ImageDetail.ImageInfoPanel=ReactRedux.connect(r)(i);n.ImageDetail.ImageInfoPanel.displayName=”ImageInfoPanelV2″})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i0&&React.createElement(t.ImageInfoPanel,{style:v,showMetaBar:this.props.shouldRenderMetaBarAtBottom,pageTitleOverride:this.props.pageTitleOverride}),i&&React.createElement(“div”,{style:h},this.debugLogs))},o}(React.Component),s=function(n){return{onLeftNavigationClick:function(t){n(ImageDetailActions.navigateLeft(t))},onRightNavigationClick:function(t){n(ImageDetailActions.navigateRight(t))}}},h=function(t,i){var r=ImageDetailReducers.getSelectedIndex(t),f=ImageDetailReducers.getResultAtIndex(t,r-1),o=ImageDetailReducers.getResultAtIndex(t,r+1),a=ImageDetailReducers.getMainImageConfig(),s=ImageDetailReducers.getDetailScenario(t),v=ImageDetailReducers.getLayoutConfig(t),y=ImageDetailReducers.getPageConfig(),p=ImageDetailReducers.getMetabarConfig(t),d=ImageDetailReducers.getViewType(t),h=y.enableMobileView,u=ImageDetailReducers.getInsightsPosition(t)==ImageDetailActions.InsightsPosition.Bottom,w=h?i.currentImage:ImageDetailReducers.getResultAtIndex(t,r),c=s==ImageDetailActions.DetailScenario.SearchByImage?n.ImageDetailUtils.fetchParamValue(e):null,l=p.enabled||c,b=l&&!u,k=l&&u;return{previousImage:f,nextImage:o,currentImage:w,enableLeftNav:f&&i.enableNavigation,enableRightNav:o&&i.enableNavigation,mainImageConfig:a,detailScenario:s,layout:v,shouldRenderMetaBarOnTop:b,shouldRenderMetaBarAtBottom:k,enableMobileView:h,isInsightsAtBottom:u,pageTitleOverride:c}};t.MainImagePanelContainer=ReactRedux.connect(h,s)(o);t.MainImagePanelContainer.displayName=”MainImagePanelContainer”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=n.ImageDetailBadgeUtils.InsightsBadgeType,u=typeof React.PureComponent!=”undefined”&&React.PureComponent?React.PureComponent:React.Component,r=function(t){function r(){var r=t!==null&&t.apply(this,arguments)||this;return r.createImageThumbnailAndBadge=function(t){r.image={src:n.ImageDetailUtils.createThumbnailUrl(t.thumbUrl,r.props.config.thSize,r.props.config.thSize,r.props.config.thCropping),width:r.props.config.thSize,height:r.props.config.thSize,onClick:r.props.onClick,altText:r.props.imageAltText};r.style={marginRight:r.props.config.thPadding};var u=null;t.metadata&&(t.metadata.recipeSourcesCount>0?u=n.ImageDetailBadgeUtils.createBadge(i.RecipeSources,t.metadata.recipeSourcesCount):t.metadata.shoppingSourcesCount>0&&(u=n.ImageDetailBadgeUtils.createBadge(i.ShoppingSources,t.metadata.shoppingSourcesCount)));r.overlayComponents=u!=null?[u]:null},r}return __extends(r,t),r.prototype.componentWillMount=function(){this.props&&this.createImageThumbnailAndBadge(this.props.image)},r.prototype.componentWillReceiveProps=function(n){n.image!=this.props.image&&this.createImageThumbnailAndBadge(n.image)},r.prototype.render=function(){return React.createElement(SharedComponent.RichImageUnit,{image:this.image,link:this.props.link,style:this.style,overlayComponents:this.overlayComponents})},r}(u);t.FilmStripImage=r;r.displayName=”FilmStripImage”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var Multimedia;(function(n){var t;(function(t){var u,f,r=ImageDetailActions.DetailScenario,b=n.ImageDetailUtils,s=[“cal”,”cab”,”cat”,”car”,”hotspot”],c=function(n,t,r){n.selectedindex=t.index;n.id=i(t.id);n.ccid=i(t.cid);n.simid=i(t.docId);n.thid=i(t.thumbId);n.mediaurl=i(t.imgUrl);n.exph=t.imgHeight;n.expw=t.imgWidth;n.pivotparams=i(r.pivotParams);var u=r;u&&l(n,r);n.ipm=””},l=function(t,i){var r=ImageDetailReducers.getPageConfig().enableInsightsV2;r&&i.insightsViewState&&n.InsightsViewStateUtils.addViewStateToRequestParams(t,i.insightsViewState)},a=function(n,t){var i=t.cropcoordinates;i&&(n.cal=i.left+””,n.cab=i.bottom+””,n.cat=i.top+””,n.car=i.right+””,n.iss=ImageDetailActions.DetailScenarioKey[t.scenario]);n.hotspot=t.isHotspotClick?”1″:””},v=function(n,t,r,u){c(n,t,r);var f=u?u.concat(s):s;return h(n,f),r.viewType==ImageDetailActions.IImageDetailViewType.VisualSearch&&a(n,r),n.site=i(r.siteFilter),”?”+queryParamsToString(n)},e=function(n,t,i,r){var u=t.result,f=i.result;return u&&f&&u.id&&(u.id!==f.id||!b.areEqualShallow(t.insightsViewState,i.insightsViewState)||t.siteFilter!=i.siteFilter||t.cropcoordinates!=i.cropcoordinates)?v(n,u,t,r):null},o=function(n,t){var r;return t?(r=t.result,r&&r.id?(c(n,r,t),n.site=i(t.siteFilter),”?”+queryParamsToString(n)):void 0):null},y=function(n,t,r){var f=!1,u,e;return(t.result&&t.result!=r.result&&(u=t.result,n.pagetoken=i(u.batchPageToken),n.first=u.batchOffset,n.selectedindex=u.index,n.id=i(u.id),n.ccid=i(u.cid),n.thid=i(u.thumbId),n.mediaurl=i(u.imgUrl),e=[“ft”,”lft”,”fvid”,”recfirst”,”reccount”].concat(s),h(n,e),f=!0),t.siteFilter!=r.siteFilter&&(n.site=i(t.siteFilter),f=!0),t.insightsViewState!=r.insightsViewState&&(l(n,t),f=!0),t.viewType==ImageDetailActions.IImageDetailViewType.VisualSearch&&(t.cropcoordinates!=r.cropcoordinates||t.isHotspotClick!=r.isHotspotClick)&&(a(n,t),f=!0),f)?”?”+queryParamsToString(n):null},p=function(n,t){var r;return t?(t.result&&(r=t.result,n.pagetoken=i(r.batchPageToken),n.first=r.batchOffset,n.selectedindex=r.index,n.id=i(r.id),n.ccid=i(r.cid),n.thid=i(r.thumbId),n.mediaurl=i(r.imgUrl)),t.siteFilter&&(n.site=i(t.siteFilter)),”?”+queryParamsToString(n)):null},w=function(n,t,i){return e(n,t,i,[“eim”])},i,h;t.getLocationUrlFunction=(u={},u[r.Default]=e,u[r.VisuallySimilarImages]=e,u[r.VisuallySimilarProducts]=e,u[r.Recommendations]=y,u[r.TopicFeed]=y,u[r.FeedImages]=e,u[r.SearchByImage]=w,u[r.SearchByImageUpload]=w,u);t.getFilmstripItemUrlFunction=(f={},f[r.Default]=o,f[r.VisuallySimilarImages]=o,f[r.VisuallySimilarProducts]=o,f[r.Recommendations]=p,f[r.TopicFeed]=p,f[r.FeedImages]=o,f);t.getVisuallySimilarItemUrl=function(n){var r=t.getCurrentLocation(),u=parseQueryParamsFromQuery(r.search,!1),i=n.result;return i&&i.id?v(u,i,n):null};t.getCurrentLocation=function(){return window.parent!=window?window.parent.location:window.location};i=function(n){return n?encodeURIComponent(n):null};h=function(n,t){t.forEach(function(t){n[t]=””})}})(t=n.ImageDetailLocationUtils||(n.ImageDetailLocationUtils={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=n.ImageDetailLocationUtils.getFilmstripItemUrlFunction,r=typeof React.PureComponent!=”undefined”&&React.PureComponent?React.PureComponent:React.Component,u=function(r){function u(u){var f=r.call(this,u)||this,e;return f.transformImageToLink=function(n){var i={result:n.image,scenario:f.props.scenario,pivotParams:f.props.pivotParams,siteFilter:f.props.siteFilter},r=f.getFilmstripItemUrlFunction?f.getFilmstripItemUrlFunction(f.queryStringParams,i):null;return React.createElement(t.FilmStripImage,{key:n.key,image:n.image,link:r,imageAltText:f.props.filmStripImageAltText,config:f.props.config,onClick:function(){return f.props.onFilmStripImageClick(n.key)}})},typeof window!=”undefined”&&(e=n.ImageDetailLocationUtils.getCurrentLocation(),f.queryStringParams=parseQueryParamsFromQuery(e.search,!1),f.getFilmstripItemUrlFunction=i[f.props.scenario]),f}return __extends(u,r),u.prototype.componentWillReceiveProps=function(t){if(t&&this.props&&t.items!=this.props.items){var i=n.ImageDetailLocationUtils.getCurrentLocation();this.queryStringParams=parseQueryParamsFromQuery(i.search,!1);this.getFilmstripItemUrlFunction=n.ImageDetailLocationUtils.getFilmstripItemUrlFunction[t.scenario]}},u.prototype.render=function(){var t=this,n=this.props;return React.createElement(“div”,{id:”filmStrip”,ref:n.filmstripRef},n.items.map(function(n){return t.transformImageToLink(n)}))},u}(r),f=function(n){return{scenario:ImageDetailReducers.getDetailScenario(n),pivotParams:ImageDetailReducers.getDetailScenarioPivotParams(n),siteFilter:ImageDetailReducers.getSiteFilter(n)}};n.ImageDetail.ImageFilmStrip=ReactRedux.connect(f)(u);n.ImageDetail.ImageFilmStrip.displayName=”ImageFilmStripV2″})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var Multimedia;(function(n){var t;(function(n){n.createImageList=function(n){var t=[];return n.map(function(n,i){return t.push({key:i,image:n})}),t}})(t=n.ImageDetailFilmStripUtils||(n.ImageDetailFilmStripUtils={}))})(Multimedia||(Multimedia={}));var ImageDetailActions;(function(n){function o(n){return s(n)?(n.onRequestSent=h,n.onRequestSuccess=c,n.onRequestFailure=l,n.testPostFix=”Filmstrip_”+f.getHashCode(n.url,!0,!1),n.requestErrorInstText=e,n.retryCount=0,n):null}function s(t){if(t&&t.direction!=null)switch(t.scenario){case n.DetailScenario.Default:return t.offset!=null;default:return!0}return!1}function h(t,i){t({type:n.FILMSTRIP_FETCH_REQUESTED,requestConfig:i})}function c(t,i,r){var f=u(r,i);t({type:n.FILMSTRIP_FETCH_COMPLETED,payload:f,requestConfig:i});sj_evt&&sj_evt.fire(n.ImageDetailEvent.FilmstripLoaded)}function l(t,i){if(i.enableRetry&&i.retryCount==0){var r=Object.assign({},i,{retryCount:i.retryCount+1,sfx:i.sfx+1});t(n.fetchData(r))}else t({type:n.FILMSTRIP_FETCH_FAILED,requestConfig:i})}function u(t,u){var f={},s,o,e,h,l,c;f.nextOffset=t.nextOffset;s={};o=[];switch(u.scenario){case n.DetailScenario.Recommendations:case n.DetailScenario.TopicFeed:if(e=t.feedPage?t.feedPage:t.groups?t.groups[0].feedPage:null,!e){if(t.value){e=t;h=u.pageToken;l=t.value.length;i.test(h)&&t.nextOffset&&l&&(f.nextPageToken=h.replace(i,r+t.nextOffset),c=t.nextOffset-l*2,c>=0&&c!=t.nextOffset&&(f.previousPageToken=h.replace(i,r+c)));break}return f}f.nextPageToken=e.nextPageToken;f.previousPageToken=e.prevPageToken;break;case n.DetailScenario.VisuallySimilarImages:e=t.visuallySimilarImages;break;case n.DetailScenario.VisuallySimilarProducts:e=t.visuallySimilarProducts;break;case n.DetailScenario.FeedImages:e=t.feedImages;break;default:e=t}return s=a(u.scenario)(e,u),o=s.imageList,u&&u.previousCount?(f.previousResults=o.slice(0,u.previousCount),f.nextResults=o.slice(u.previousCount,o.length)):u.direction===n.FilmstripRequestDirection.Previous?f.previousResults=o:f.nextResults=o,s.imagegroups&&s.imagegroups.length>0&&(f.imageGroups=s.imagegroups),f.totalEstimatedMatches=t.totalEstimatedMatches,f}function a(t){switch(t){case n.DetailScenario.Recommendations:case n.DetailScenario.TopicFeed:return y;case n.DetailScenario.Favorites:return p}return v}function v(n,i){var r=i.offset!=null?i.offset:null,u=[];return n.value&&n.value.map(function(n,i){return u.push(t.createImageInfo(n,r!=null?r+i:null))}),{imageList:u}}function y(i,r){var u=i.items,o=!1,f,e;return!i.items&&i.value&&(u=i.value,o=!0),f=r.offset!=null?r.offset:0,r.direction===n.FilmstripRequestDirection.Previous&&(f=r.offset-u.length),e=[],u&&u.map(function(n,i){var s=o?n:n.content,u;s&&(u=t.createImageInfo(s,f+i),u.batchOffset=f,u.batchPageToken=r.pageToken,e.push(u))}),{imageList:e}}function p(n){var u={imageList:[],imagegroups:[]},f=[],e,i,o,r;if(n.collections)for(e=function(){if(i=n.collections[r],i.collectionPage&&i.collectionPage.items&&i.collectionPage.items.length>0){var e={collectionType:i.knownCollectionType,groupTitle:i.knownCollectionType?””:w(i.title),imageList:[]};o=i.collectionPage.items;o.map(function(n){if(n.content){var i=t.createImageInfo(n.content);f.push(i);e.imageList.push(i.id)}});u.imagegroups.push(e)}},r=0;r0?Math.round(t.X/f.filmStripImageWidth):t.X>0?1:-1,i=f.props.selectedIndex-u;if(i>=f.props.imageList.length?i=f.props.imageList.length-1:ir.totalEstimatedMatches))return null;e.push(“count=”+s);e.push(“offset=”+o)}return e&&e.length>0?ImageDetailActions.setFilmstripRequestConfig({url:e.join(“&”),direction:n,offset:o,previousCount:t,persistedQueryStrings:f.pageConfig.persistedQueryStrings,ig:r.ig,iid:f.pageConfig.instData.fsiid,sfx:c[r.ig].nextFilmstripSfx,enableRetry:l.enableRetry,hostOverride:f.pageConfig.apiUrlHost}):null},f.getFavoritesFilmstripRequestConfig=function(n,t){n===void 0&&(n=i.Next);t===void 0&&(t=0);var e=f.props.detailState,o=f.props.instSfxData,s=f.props.config,r=[];return f.pageConfig.filmStripUrlTemplate&&u&&r.push(f.pageConfig.filmStripUrlTemplate),r&&r.length>0?ImageDetailActions.setFilmstripRequestConfig({url:r.join(“&”),direction:n,previousCount:t,persistedQueryStrings:f.pageConfig.persistedQueryStrings,ig:e.ig,iid:f.pageConfig.instData.fsiid,sfx:o[e.ig].nextFilmstripSfx,enableRetry:s.enableRetry,hostOverride:f.pageConfig.apiUrlHost}):null},f.getVisuallySimilarRequestConfig=function(n,t){var r,o,e;return(n===void 0&&(n=i.Next),t===void 0&&(t=0),r=f.props.detailState,o=f.props.instSfxData,f.pageConfig.filmStripUrlTemplate&&u&&f.props.pivotParams)?(e=u.sf(f.pageConfig.filmStripUrlTemplate,f.props.pivotParams),e?ImageDetailActions.setFilmstripRequestConfig({url:e,direction:n,offset:0,previousCount:t,persistedQueryStrings:f.pageConfig.persistedQueryStrings,ig:r.ig,iid:f.pageConfig.instData.fsiid,sfx:o[r.ig].nextFilmstripSfx,hostOverride:f.pageConfig.apiUrlHost}):null):null},f.getRequestConfigFunc=(e={},e[ImageDetailActions.DetailScenario.Default]=f.getDefaultFilmstripRequestConfig,e[ImageDetailActions.DetailScenario.Recommendations]=f.getFeedFilmstripRequestConfig,e[ImageDetailActions.DetailScenario.TopicFeed]=f.getFeedFilmstripRequestConfig,e[ImageDetailActions.DetailScenario.Favorites]=f.getFavoritesFilmstripRequestConfig,e[ImageDetailActions.DetailScenario.VisuallySimilarImages]=f.getVisuallySimilarRequestConfig,e[ImageDetailActions.DetailScenario.VisuallySimilarProducts]=f.getVisuallySimilarRequestConfig,e[ImageDetailActions.DetailScenario.FeedImages]=f.getVisuallySimilarRequestConfig,e),f.calculateFilmstripOffset=function(n){var t=f.props.config,i=t.thSize,r=t.thPadding;return(0-n)*(i+r)-i/2},f.pageConfig=ImageDetailReducers.getPageConfig(),f.accessibleConfig=ImageDetailReducers.getAccessibleResourceConfig(),f.filmStripImageAltText=f.accessibleConfig.FilmstripImageAccText,f.pageConfig.query&&(f.filmStripImageAltText=r.stringFormat(f.filmStripImageAltText,f.pageConfig.query)),f.bufferSize=n.config&&n.config.bufferSize&&n.config.bufferSize>0?n.config.bufferSize:1,f.updateItems(f.props.imageList,f.props.imageResultsMap,f.props.imageGroups),f.enableCustomScroll=r.isIPad!=null,f.variableWidthEnabled=f.props.config&&f.props.config.enableVariableWidth,f.enableNavInL2=ImageDetailReducers.isNavigationInL2(),f.minimumItemsRequiredToShowFilmStrip=f.enableNavInL2?2:1,f}return __extends(f,t),f.prototype.componentWillMount=function(){typeof window!=”undefined”&&this.variableWidthEnabled&&this.updateDimensions(this.props.config)},f.prototype.componentDidMount=function(){this.filmstripRequested=!0;this.currentRequestedFilmStripTime=(new Date).getTime();this.props.loadFilmStrip(this.getFilmstripRequestConfig(i.Next,Math.max(0,this.props.detailState.firstImageOffset-this.props.detailState.filmstripMinOffset)))},f.prototype.updateItems=function(t,i,r){var u=null;r&&r.length>0?i&&(u=r.map(function(n){return{imageList:n.imageList.map(function(n){return i[n]})}})):i&&(u=t.map(function(n){return i[n]}));this.filmStripItems=n.ImageDetailFilmStripUtils.createImageList(u);this.filmStripUpdated=!0},f.prototype.componentWillReceiveProps=function(n){if((n.imageGroups!=this.props.imageGroups||n.imageList!=this.props.imageList||n.pageSize!=this.props.pageSize||n.config.enableVariableWidth!=this.props.config.enableVariableWidth)&&(this.variableWidthEnabled=n.config.enableVariableWidth,this.variableWidthEnabled&&this.updateDimensions(n.config),this.updateItems(n.imageList,n.imageResultsMap,n.imageGroups),this.filmStripItems&&this.filmStripItems.length>0)){var t={items:this.filmStripItems,config:this.props.config,filmStripImageAltText:this.filmStripImageAltText,onFilmStripImageClick:this.filmstripItemClicked};this.visualSearchFilmStripClickSwitchToScenario=n.detailScenario;this.filmStrip=this.createFilmStrip(t)}},f.prototype.componentWillUpdate=function(n,t){this.state&&t&&this.state.width!=t.width&&this.filmstripContainer&&(this.filmstripContainer.style.width=t.width+”px”)},f.prototype.componentDidUpdate=function(n){var t=this.props,f=t.selectedIndex,s=t.detailState,h=t.loadFilmStrip,r=t.detailScenario,c=t.imageList,y=t.imageResultsMap,v;if((this.filmStripUpdated||n.detailScenario!==r)&&this.filmStripElement&&(this.filmStripImages=this.filmStripElement.getElementsByClassName(“richImage”),this.filmStripUpdated=!1),this.filmStripElement&&this.setSelectedImageStyles(),this.swipeHandler==null&&this.filmStripImages&&this.filmStripImages.length>0&&typeof e!=”undefined”&&(this.swipeHandler=new e(this.filmstripContainer,this.filmStripElement,null,this.touchMoveHandler,this.touchEndHandler),this.filmStripImageWidth=this.filmStripImages[0].clientWidth),r!==ImageDetailActions.DetailScenario.Favorites&&r!==ImageDetailActions.DetailScenario.VisuallySimilarImages&&r!==ImageDetailActions.DetailScenario.VisuallySimilarProducts&&r!==ImageDetailActions.DetailScenario.FeedImages){if(this.filmstripRequested&&s.filmstripRequestState==ImageDetailActions.RequestState.Success){var p=(new Date).getTime()-this.currentRequestedFilmStripTime,u=y[c[f]],l=null,a=null;u&&u.instInfo&&(l=u.instInfo.appNS,a=u.instInfo.kValue);o(l,a,”FilmStripLoad”,null,s.ig,{Mid:u.id,TTFL:p});this.filmstripRequested=!1}(n.selectedIndex!=f||n.detailState.filmstripRequestState==ImageDetailActions.RequestState.Pending&&s.filmstripRequestState==ImageDetailActions.RequestState.Success)&&(f=c.length-this.bufferSize&&h(this.getFilmstripRequestConfig()))}},f.prototype.getFilmstripRequestConfig=function(n,t){if(n===void 0&&(n=i.Next),t===void 0&&(t=0),this.getRequestConfigFunc[this.props.detailScenario]){var r=this.getRequestConfigFunc[this.props.detailScenario](n,t);return r&&(r.scenario=this.props.detailScenario),r}return null},f.prototype.createFilmStrip=function(t){var i=this,r,u;return r=this.filmstripContainerWidth?{width:this.filmstripContainerWidth+”px”}:{width:”100%”},u=this.variableWidthEnabled?”middle”:””,React.createElement(SharedComponent.AccessibleComponent,{id:”filmStripContainer”,className:u,style:r,ariaLabel:this.accessibleConfig.ariaLabel,”data-tag”:s?”multimedia.imageDetail.filmstripContainer”:null,reference:function(n){i.filmstripContainer=n}},this.variableWidthEnabled&&React.createElement(“div”,{id:”gradl”,className:”gradient”}),this.variableWidthEnabled&&React.createElement(“div”,{id:”gradr”,className:”gradient”}),React.createElement(n.ImageDetail.ImageFilmStrip,__assign({},t,{filmstripRef:function(n){return i.filmStripElement=n}})))},f.prototype.setSelectedImageStyles=function(){var n,t,i;this.filmStripImages&&this.filmStripImages.length>this.props.selectedIndex&&(n=this.filmStripImages[this.props.selectedIndex],n&&!n.classList.contains(“selected”)&&(n.className+=” selected”),this.currentSelectedIndex!=this.props.selectedIndex&&(t=this.filmStripImages[this.currentSelectedIndex],t&&t.classList.contains(“selected”)&&t.classList.remove(“selected”),this.currentSelectedIndex=this.props.selectedIndex),i=this.calculateFilmstripOffset(this.props.selectedIndex)+”px”,r.isRTL?this.filmStripElement.style.marginRight=i:this.filmStripElement.style.marginLeft=i)},f.prototype.render=function(){if(this.filmStrip==null&&this.filmStripItems&&this.filmStripItems.length>=this.minimumItemsRequiredToShowFilmStrip){var n={items:this.filmStripItems,config:this.props.config,onFilmStripImageClick:this.filmstripItemClicked,filmStripImageAltText:this.filmStripImageAltText};this.visualSearchFilmStripClickSwitchToScenario=this.props.detailScenario;this.filmStrip=this.createFilmStrip(n)}return this.props.showFilmstrip&&this.filmStripItems.length>=this.minimumItemsRequiredToShowFilmStrip?this.filmStrip:null},f}(React.Component),c=function(n){return{changeInsightStatus:function(t,i,r){n(ImageDetailActions.changeInsightStatus(t,r,i))},onFilmStripImageClick:function(t,i,r,u){i&&r==f.VisualSearch&&(n(ImageDetailActions.switchDetailScenario(u)),n(ImageDetailActions.changePageView(f.DetailL2View)));n(ImageDetailActions.navigateTo(t))},loadFilmStrip:function(t){t&&n(ImageDetailActions.fetchData(t))}}},l=function(n){return{ig:ImageDetailReducers.getCurrentImpressionId(n),selectedIndex:ImageDetailReducers.getSelectedIndex(n),imageList:ImageDetailReducers.getResultsIds(n),imageResultsMap:ImageDetailReducers.getResultsMap(n),imageGroups:ImageDetailReducers.getImageGroups(n),config:ImageDetailReducers.getFilmStripConfig(n),detailState:ImageDetailReducers.getCurrentImageDetailState(n),detailScenario:ImageDetailReducers.getDetailScenario(n),viewType:ImageDetailReducers.getViewType(n),pivotParams:ImageDetailReducers.getDetailScenarioPivotParams(n),instSfxData:ImageDetailReducers.getInstSfxData(n),curImage:ImageDetailReducers.getCurrentResult(n),isInsightsExpanded:ImageDetailReducers.getIsInsightsExpanded(n),pageSize:ImageDetailReducers.getPageSize(n)}};t.ImageFilmStripContainer=ReactRedux.connect(l,c)(h);t.ImageFilmStripContainer.displayName=”ImageFilmStripContainer”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var r=n.ImageDetailInsightsUtils.getInsightsRequestConfig,u=n.ImageDetailInsightsUtils.getFormData,f=ImageDetailActions.RequestState,s=ImageDetailActions.IImageDetailScriptRequestType,e=ImageDetailActions.ScriptRequestState,o=n.ImageDetailUtils,i=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,h=function(n){function s(t){var r=n.call(this,t)||this;return r.canvasHeight=0,r.enableMobileView=!1,r.enableDetailV2=!1,r.enableInsightsV2=!1,r.enableInsights=!1,r.mainImageRegionElement=null,r.animationClassName=”slideup”,r.animationDuration=800,r.enableScriptLoadingWithAjax=!1,r.shouldLoadScripts=function(n){return r.enableScriptLoadingWithAjax&&n.insightsScriptLoadingState!==e.Loaded},r.setImageHeight=function(){r.props.currentImage&&!r.props.currentImage.heightInCanvas&&r.props.heightInCanvas(r.props.currentImage.id,r.canvasHeight)},r.setStyle=function(){var o,s,h,a;if(r.enableMobileView){var u=r.props,n=u.currentImage,c=u.minMainImageHeight,l=u.maxMainImageHeight;if(n){var f=0,e=0,t=0,i=0;return typeof window!=”undefined”&&(f=window.innerWidth,e=window.innerHeight,t=e*c,i=e*l),f?n.imgWidth&&n.imgHeight&&(o=f/n.imgWidth,s=Math.min(1,o),r.canvasHeight=n.imgHeight*s):r.canvasHeight=n.thHeight,i&&r.canvasHeight>i?r.canvasHeight=i:t&&r.canvasHeight0)return i.requestedModules=t,i}return n},s.prototype.render=function(){var r=this,n=this.setStyle();i&&i.createMainImageRegionDebugLogs(n,this.props,this.mainImageRegionElement,this.debugLogs);var u=this.enableMobileView?”mob”:this.props.className,f=this.enableMobileView&&this.props.isCurrentFrame&&o.shouldShowSwipeNotification(this.maxNotiCount,this.props.viewType),e=(!this.enableDetailV2||this.enableDetailV2&&this.props.isInsightsAtBottom)&&!this.enableMobileView;return React.createElement(“div”,{id:”mainImageRegion”,ref:function(n){r.mainImageRegionElement=n},className:u,”data-tag”:i?”multimedia.imageDetail.mainImageRegion”:null,style:n},React.createElement(t.MainImagePanelContainer,{currentImage:this.props.currentImage,filmstripHeight:this.props.filmstripHeight,canvasHeight:this.canvasHeight,viewType:this.props.viewType,setUpSwipeControl:this.props.setUpSwipeControl,isInsightsAtBottom:this.props.isInsightsAtBottom,pageSize:this.props.pageSize,enableNavigation:this.props.enableNavigation}),f&&this.props.enableNavigation&&React.createElement(t.SwipeNotification,{ig:this.props.ig,currentImage:this.props.currentImage}),e&&React.createElement(t.ImageFilmStripContainer,{showFilmstrip:this.props.enableFilmStrip&&this.props.filmstripHeight>0&&(!this.enableDetailV2||!this.props.isInsightsAtBottom)}),i&&React.createElement(“div”,{style:{display:”none”}},this.debugLogs))},s}(React.Component),c=function(n){return{loadInsights:function(t,i,r){t&&(i&&n(ImageDetailActions.requestScripts(s.Insights)),n(ImageDetailActions.fetchData(t,r)))},switchInsights:function(t){t&&n(ImageDetailActions.switchInsights(t))},heightInCanvas:function(t,i){n(ImageDetailActions.heightInCanvas(t,i))}}},l=function(t){var u=ImageDetailReducers.getDetailScenario(t),i=ImageDetailReducers.getLayoutConfig(t),s=i?i.fsheight:0,h=i?i.unpinInsWidth:0,f=ImageDetailReducers.getInsightsId(t),r=ImageDetailReducers.getFilmStripConfig(t),c=ImageDetailReducers.getViewType(t),l=n.ImageDetailUtils.isNavigationEnabled(r,c,u),o=ImageDetailReducers.getscriptLoadingState(t);return{enableFilmStrip:r?r.enabled:!1,filmstripHeight:s,insightsId:f,insightsRequestParams:ImageDetailReducers.getInsightsRequestParams(t),fullInsightsRequestParams:ImageDetailReducers.getFullInsightsRequestParams(t),imageModuleState:ImageDetailReducers.getImageModulesState(t,f),detailScenario:u,ig:ImageDetailReducers.getCurrentImpressionId(t),instSfxData:ImageDetailReducers.getInstSfxData(t),isInsightsExpanded:ImageDetailReducers.getIsInsightsExpanded(t),imageWindowSize:ImageDetailReducers.getMainImageWindowSize(t),minMainImageHeight:ImageDetailReducers.getMainImageMinHeight(t),maxMainImageHeight:ImageDetailReducers.getMainImageMaxHeight(t),detailStateCount:ImageDetailReducers.getImageDetailStatesCount(t),isInsightsAtBottom:ImageDetailReducers.getInsightsPosition(t)==ImageDetailActions.InsightsPosition.Bottom,viewType:ImageDetailReducers.getViewType(t),insightsScriptLoadingState:o?o.insights:e.None,pageSize:ImageDetailReducers.getPageSize(t),enableNavigation:l,unpinInsWidth:h}};t.MainImageRegion=ReactRedux.connect(l,c)(h);t.MainImageRegion.displayName=”MainImageRegion”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(n){var t=ImageDetailActions.ScriptRequestState,i=function(n){function i(){var t=n!==null&&n.apply(this,arguments)||this;return t.isDetailV2=!1,t.handleInsightsLayout=function(n){n===ImageDetailActions.InsightsPosition.Bottom?t.createInsightsFooter():t.removeInsightsFooter()},t.createInsightsFooter=function(){if(t.componentElement&&t.footerElement&&t.footerElement.firstChild){while(t.footerElement.firstChild)t.componentElement.appendChild(t.footerElement.firstChild);t.footerElement.style.display=”none”;t.componentElement.style.display=”block”}},t.removeInsightsFooter=function(){if(t.componentElement&&t.componentElement.firstChild&&t.footerElement){while(t.componentElement.firstChild)t.footerElement.appendChild(t.componentElement.firstChild);t.footerElement.style.display=””;t.componentElement.style.display=””}},t}return __extends(i,n),i.prototype.componentDidMount=function(){this.isDetailV2=ImageDetailReducers.isDetailV2Enabled();this.footerElement=_ge(“b_footer”);this.handleInsightsLayout(this.props.insightsPosition)},i.prototype.componentWillUnmount=function(){this.removeInsightsFooter()},i.prototype.componentWillReceiveProps=function(n){this.props.insightsScriptLoadingState==t.Required&&n.insightsScriptLoadingState==t.Loaded&&this.handleInsightsLayout(this.props.insightsPosition)},i.prototype.componentDidUpdate=function(n){n.insightsPosition!==this.props.insightsPosition&&this.handleInsightsLayout(this.props.insightsPosition)},i.prototype.render=function(){var n=this;return React.createElement(“div”,{id:”insights_footer”,ref:function(t){n.componentElement=t}})},i}(React.Component),r=function(n){var i=ImageDetailReducers.getscriptLoadingState(n);return{insightsPosition:ImageDetailReducers.getInsightsPosition(n),insightsScriptLoadingState:i?i.insights:t.None}};n.InsightsFooter=ReactRedux.connect(r)(i)})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=ImageDetailActions.IImageDetailViewType,r=ImageDetailActions.RequestState,u=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,f=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.defaultClassName=” insbt “,t.enableMobileView=ImageDetailReducers.isMobileViewEnabled(),t.onClick=function(){if((t.props.viewType==i.Default||t.props.viewType==i.VisualSearch)&&t.props.moduleName&&(t.props.addToDetailStateHistory(),t.enableMobileView||t.props.changePageView(i.DetailL2View),t.props.changeSelectedModule(t.props.moduleName)),t.props.onClick)t.props.onClick(t.props.moduleName)},t}return __extends(t,n),t.prototype.render=function(){var n=this.props;return n&&n.insightsState&&(n.insightsState.requestState==r.Success||n.insightsState.requestState==r.Failed)?React.createElement(ActionButton,{className:this.defaultClassName+this.props.className,text:this.props.buttonText,datatag:u?”imageDetail.”+this.props.moduleName+”.expandButton”:null,onClick:this.onClick}):null},t}(React.Component),e=function(n,t){return{currentImage:ImageDetailReducers.getCurrentResult(n),insightsState:ImageDetailReducers.getInsightsState(n,t.insightsId),viewType:ImageDetailReducers.getViewType(n)}},o=function(n){return{changePageView:function(t){n(ImageDetailActions.changePageView(t))},addToDetailStateHistory:function(){n(ImageDetailActions.addToDetailStateHistory())},changeSelectedModule:function(t){n(ImageDetailActions.changeInsightsSelectedModule(t))}}};t.InsightsModuleExpansionButton=ReactRedux.connect(e,o)(f);t.InsightsModuleExpansionButton.displayName=”InsightsModuleExpansionButton”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var u=ImageDetailActions.ScriptRequestState,r=ImageDetailActions.IImageDetailModuleExpansionMode,i=n.ImageDetailUtils,f=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,e=function(e){function o(n){var t=e.call(this,n)||this,r;return t.isExpanded=!1,t.enableScriptLoadingWithAjax=!1,t.onPreviewClick=function(){var n=t.props.onClickCallback;n&&n(t.props.moduleName);(t.props.isPreviewPinned||!t.isExpanded)&&t.toggleExpander();t.addInstrumentationLog(“CI.Click”,”PreviewClick”)},t.onExpansionButtonClick=function(){t.addInstrumentationLog(“CI.Click”,”SeeAll”)},t.toggleExpander=function(){t.isExpanded=!t.isExpanded;t.setState({isExpanded:t.isExpanded});t.persistModuleExpandState()},t.isScriptLoaded=function(n){return t.enableScriptLoadingWithAjax?n.insightsScriptLoadingState===u.Loaded:!0},t.addInstrumentationLog=function(n,i){var r=t.createInstrumentationLog(n,i);t.props.addInstrumentationLog&&r&&t.props.addInstrumentationLog(r)},t.createInstrumentationLog=function(n,i){var r=t.props.imageInfo&&t.props.imageInfo.instInfo;if(r)return{AppNS:r.appNS,T:n,K:r.kValue,Component:t.props.moduleName,Mid:t.props.imageInfo.id,Name:i,State:t.state&&t.state.isExpanded?”Expanded”:”Collapsed”}},t.isInsightsModuleExpanded=function(n){return n.scenario==ImageDetailActions.DetailScenario.SearchByImage||n.scenario==ImageDetailActions.DetailScenario.SearchByImageUpload||n.viewType==ImageDetailActions.IImageDetailViewType.VisualSearch||i&&i.isInsightsModuleExpanded(n.moduleName)},t.persistModuleExpandState=function(){i&&(i.setInsightsModuleExpansionCookie(t.props.moduleName,t.isExpanded),t.props.changeInsightsExpandedModules(i.getExpandedInsightsModules()))},r=ImageDetailReducers.getPageConfig(),t.enableScriptLoadingWithAjax=r.enableAjaxScript,t.isExpanded=n.autoExpand||t.isInsightsModuleExpanded(n),t.state={isExpanded:t.isExpanded},t}return __extends(o,e),o.prototype.componentDidMount=function(){this.isInsightsModuleExpanded(this.props)&&(this.setState({isExpanded:!0}),this.isExpanded=!0)},o.prototype.componentWillReceiveProps=function(n){var t=this.isInsightsModuleExpanded(n);this.setState({isExpanded:t});this.isExpanded=t},o.prototype.render=function(){var u=this.props,e=u.moduleName,o=u.insightsId,s=u.imageInfo,a=u.insightsRequestConfig,h=u.isPreviewPinned,c=u.imageAssociatedData,i;if(!this.isScriptLoaded(this.props)||(i=typeof n.ImageDetail.getInsightsComponentEntry!=”undefined”?n.ImageDetail.getInsightsComponentEntry(e):null,!i||!i.isEnabled||!i.isEnabled(this.props)))return null;var v=!i.showExpansionButton||i.showExpansionButton(this.props),y=”ins_exp”+(i.className?” “+i.className:””),p=i.preview,l=i.expandedPreview;return React.createElement(“div”,{className:y,”data-tag”:f?”imageDetail.”+e+”.container”:null},React.createElement(“div”,{onClick:this.onPreviewClick},React.createElement(p,{insightsId:o,imageInfo:s,imageAssociatedData:c,autoExpand:this.isInsightsModuleExpanded(this.props),isExpanded:this.state.isExpanded,title:i.getTitle(this.props,this.state.isExpanded?r.SemiExpanded:r.Preview)})),this.state.isExpanded&&h&&l&&React.createElement(l,{insightsId:o,imageInfo:s,imageAssociatedData:c,insightsRequestConfigProps:a}),this.state.isExpanded&&h&&v&&React.createElement(t.InsightsModuleExpansionButton,{moduleName:e,insightsId:o,className:i.className,onClick:this.onExpansionButtonClick,buttonText:i.expansionButtonText}))},o}(React.Component);t.InsightsModuleExpander=e})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var Multimedia;(function(n){var t;(function(t){function r(r){var u=ImageDetailReducers.getNotificationConfig(),e=r.result,f,o;return u&&u.Enabled&&(f=null,e&&e.metadata&&e.metadata.recipeSourcesCount&&u.RecipeNotificationKey?f=i(u.RecipeNotificationKey):e&&e.metadata&&e.metadata.shoppingSourcesCount&&u.ShoppingNotificationKey&&(f=i(u.ShoppingNotificationKey)),f||(o=r.isInsightsExpanded?u.TwoColDefaultNotificationKey:u.DefaultNotificationKey,f=o?i(o):null),f)?React.createElement(t.NotificationContainer,{notificationTitle:i(u.NotificationTitleKey,null),notificationText:f,shouldChangeOnInsightsExpand:!0,getCookie:n.ImageDetailUtils.getExpandNotificationCookie,setCookie:n.ImageDetailUtils.setExpandNotificationCookie}):null}var i=ImageDetailReducers.getResourceString,u=function(n){return{result:ImageDetailReducers.getCurrentResult(n),ig:ImageDetailReducers.getCurrentImpressionId(n),isInsightsExpanded:ImageDetailReducers.getIsInsightsExpanded(n)}};t.InsightsNotificationContainer=ReactRedux.connect(u)(r)})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var u=n.ImageDetailUtils,r=ImageDetailReducers.getResourceString,i=ImageDetailActions.IImageDetailViewType,f=function(n){function f(t){var r=n.call(this,t)||this;return r.logInsightsButtonClickEvent=function(){if(r.props.addInstrumentationLog){var n={T:”CI.Click”,Mid:r.props.id,Name:”InsightsButton”};switch(r.props.viewType){case i.DetailL2View:case i.VisualSearch:n.ViewType=”L2″;break;default:n.ViewType=”L1″}r.props.addInstrumentationLog(n)}},r.handleClick=function(n){if(r.props.changeInsightStatus){var t=n&&n.isAccessibleClick?!0:!1;switch(r.props.viewType){case i.DetailL2View:case i.VisualSearch:r.logInsightsButtonClickEvent();r.props.changePageView(i.Default);break;default:r.props.changeInsightStatus(!r.props.isInsightsExpanded,t,r.props.ig)}}},r.isInsightsV2=ImageDetailReducers.getPageConfig().enableInsightsV2,r}return __extends(f,n),f.prototype.shouldComponentUpdate=function(n){return!u.areEqualShallow(n,this.props)},f.prototype.componentDidMount=function(){typeof this.props.isInsightsButtonFocused!=”undefined”&&this.button&&(this.props.isInsightsButtonFocused===!0&&this.button.classList.remove(“nofocus”),this.button.focus())},f.prototype.render=function(){var n=this,i=this.props.isInsightsExpanded?” col”:” exp”,u=this.props.isInsightsExpanded?r(“Hide”,null):null,f=this.props.isInsightsExpanded?r(“HideImageDetail”,null):r(“ShowImageDetail”,null);return React.createElement(ActionButton,{className:i,text:u,onClick:this.handleClick,customTooltip:f,datatag:this.props.dataTag,buttonRef:function(t){n.button=t}},!this.isInsightsV2&&React.createElement(t.InsightsNotificationContainer,null))},f}(React.Component),e=function(n){return{isInsightsExpanded:ImageDetailReducers.getIsInsightsExpanded(n),isInsightsButtonFocused:ImageDetailReducers.getIsInsightsButtonFocused(n),ig:ImageDetailReducers.getCurrentImpressionId(n),viewType:ImageDetailReducers.getViewType(n)}},o=function(n){return{changePageView:function(t){n(ImageDetailActions.changePageView(t))},changeInsightStatus:function(t,i,r){t||u.clearInsightsModulesStateCookie();n(ImageDetailActions.changeInsightStatus(t,r,”HeaderButtonClick”,i))},addInstrumentationLog:function(t){n(ImageDetailActions.addToEventQueue(t))}}};n.ImageDetail.InsightsButton=ReactRedux.connect(e,o)(f)})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=function(t){function i(i){var r=t.call(this,i)||this;return r.scrollbarYWidth=0,r.externalRender=!0,r.contentHeight=0,r.visibleHeight=0,r.scrollRatio=0,r.hasScroll=!1,r.scrollHandleHeight=0,r.startDragHandlePos=0,r.startDragMousePos=0,r.scrollbar=null,r.scrollHandle=null,r.innerContainer=null,r.contentWrapper=null,r.isRtl=n.ImageDetailUtils.isRTL,r.scrollPos=0,r.customScrollConfig=null,r.hideScrollThumb=function(){r.runDelayedCallback(function(){r.setState({onDrag:!1})},500)},r.handleDynamicLayoutChange=function(){r.delayedUpdateScrollBar(100)},r.delayedUpdateScrollBar=function(n){r.timer&&sb_ct(r.timer);r.timer=sb_st(function(){r.updateScrollBar()},n)},r.calculateLayoutSizes=function(){if(r.innerContainer){r.contentHeight=r.getContentHeight();var n=r.innerContainer;r.scrollbarYWidth=n.offsetWidth-n.clientWidth;r.visibleHeight=n.clientHeight;r.scrollRatio=r.contentHeight?r.visibleHeight/r.contentHeight:1}},r.getContentHeight=function(){if(r.contentWrapper&&r.contentWrapper.firstElementChild){var t=r.contentWrapper.firstElementChild.clientHeight,n=window.getComputedStyle(r.contentWrapper.firstElementChild);return n&&(t+=(parseInt(n.marginTop)||0)+(parseInt(n.marginBottom)||0)),t}return 0},r.adjustFreezePosition=function(n){r.props.freezePosition&&(r.contentWrapper.scrollTop=r.scrollPos);n.freezePosition&&(r.innerContainer.scrollTop=r.scrollPos)},r.toggleScrollIfNeeded=function(){var n=r.contentHeight-r.visibleHeight>1;r.hasScroll!==n&&(r.hasScroll=n,r.forceUpdate())},r.updateScrollBar=function(){r.calculateLayoutSizes();r.scrollbar&&(r.scrollbar.style.height=r.visibleHeight+”px”);r.toggleScrollIfNeeded()},r.getScrollTop=function(){return r.innerContainer.scrollTop},r.updateScrollPosition=function(n){var t=r.getBoundValue(n,0,r.contentHeight-r.visibleHeight);r.innerContainer.scrollTop=t;r.scrollPos=t;r.setScrollBarPosition()},r.onClick=function(n){if(r.hasScroll&&r.isMouseEventOnCustomScrollbar(n)&&!r.isMouseEventOnScrollHandle(n)){var t=r.calculateNewScrollHandleTop(n),i=r.getScrollValueFromHandlePosition(t);r.updateScrollPosition(i)}},r.isMouseEventOnCustomScrollbar=function(n){if(!r.scrollbar)return!1;var u=ReactDOM.findDOMNode(r),t=u.getBoundingClientRect(),i=r.scrollbar.getBoundingClientRect(),f=r.isRtl?{left:t.left,right:i.right}:{left:i.left,width:t.right},e=Object.assign({},{left:t.left,right:t.right,top:t.top,height:t.height},f);return r.isEventOnRect(n,e)},r.isMouseEventOnScrollHandle=function(n){if(!r.scrollHandle)return!1;var t=ReactDOM.findDOMNode(r.scrollHandle);return r.isEventOnElement(n,t)},r.calculateNewScrollHandleTop=function(n){var i=ReactDOM.findDOMNode(r),u=i.getBoundingClientRect(),f=u.top+window.pageYOffset,e=n.pageY-f,t=r.getScrollHandleStyle().top,o=e>t+r.scrollHandleHeight;return o?t+Math.min(r.scrollHandleHeight,r.visibleHeight-r.scrollHandleHeight):t-Math.max(r.scrollHandleHeight,0)},r.getScrollValueFromHandlePosition=function(n){return n/r.scrollRatio},r.getScrollHandleStyle=function(){var n=r.scrollPos*r.scrollRatio;return r.scrollHandleHeight=r.visibleHeight*r.scrollRatio,{height:r.scrollHandleHeight,top:n}},r.onMouseDown=function(n){r.hasScroll&&r.isMouseEventOnScrollHandle(n)&&(r.startDragHandlePos=r.getScrollHandleStyle().top,r.startDragMousePos=n.pageY,r.setState({onDrag:!0}),document.addEventListener(“mousemove”,r.onHandleDrag),document.addEventListener(“mouseup”,r.onHandleDragEnd))},r.onTouchStart=function(){r.setState({onDrag:!0})},r.onHandleDrag=function(n){n.preventDefault();var t=n.pageY-r.startDragMousePos,i=r.getBoundValue(r.startDragHandlePos+t,0,r.visibleHeight-r.scrollHandleHeight),u=r.getScrollValueFromHandlePosition(i);r.updateScrollPosition(u)},r.onHandleDragEnd=function(n){r.setState({onDrag:!1});n.preventDefault();document.removeEventListener(“mousemove”,r.onHandleDrag);document.removeEventListener(“mouseup”,r.onHandleDragEnd)},r.onScroll=function(n){if(!r.props.freezePosition&&(r.hasScroll||r.updateScrollBar(),r.hasScroll&&(r.scrollPos=n.currentTarget.scrollTop,r.setScrollBarPosition(),r.props.onScroll)))r.props.onScroll(n)},r.onWheel=function(n){r.hasScroll||(r.calculateLayoutSizes(),r.toggleScrollIfNeeded());r.hasScroll||(r.scrollPos=0,r.innerContainer.scrollTop=0,n.preventDefault(),n.stopPropagation())},r.getInnerContainerClasses=function(){var n=”inner-container”;return r.scrollPos&&r.props.addScrolledClass&&(n+=” content-scrolled”),n},r.getScrollStyles=function(){var u=r.scrollbarYWidth?r.scrollbarYWidth+1:r.customScrollConfig.DefaultScrollBarWidthOffset,t=r.isRtl?”marginLeft”:”marginRight”,i={height:r.props.takeFullParentHeight?”100%”:””},n;return i[t]=-1*u,n={height:r.props.takeFullParentHeight?”100%”:””,overflowY:r.props.freezePosition?”hidden”:”visible”},n[t]=0,{innerContainer:i,contentWrapper:n}},r.getOuterContainerStyle=function(){return{height:r.props.takeFullParentHeight?”100%”:””}},r.enforceMinHandleHeight=function(n){var t=r.props.minScrollHandleHeight||r.customScrollConfig.DefaultScrollHandleHeight;if(n.height>=t)return n;var i=t-n.height,u=r.contentHeight-r.visibleHeight>0?r.scrollPos/(r.contentHeight-r.visibleHeight):0,f=i*u,e=n.top-f;return{height:t,top:e}},r.setScrollBarPosition=function(){if(r.scrollHandle){var n=r.enforceMinHandleHeight(r.getScrollHandleStyle());r.scrollHandle.style.top=r.ensureValidScrollHandleTop(n.top)+”px”}},r.ensureValidScrollHandleTop=function(n){if(nt?t:n},r.runDelayedCallback=function(n,t){var i;return function(){clearTimeout(i);i=setTimeout(function(){n()},t)}},r.getBoundValue=function(n,t,i){return(t=!t&&t!==0?n:t,i=!i&&i!==0?n:i,t>i)?n:ni?i:n},r.scrollbarYWidth=0,r.customScrollConfig=ImageDetailReducers.getCustomScrollConfig(),r.state={onDrag:!1},r}return __extends(i,t),i.prototype.componentDidMount=function(){typeof this.props.scrollTo!=”undefined”?this.updateScrollPosition(this.props.scrollTo):this.updateScrollBar();sj_be&&sj_be(_w,”resize”,this.handleDynamicLayoutChange);this.props.needDelayedUpdate&&this.delayedUpdateScrollBar(1e3)},i.prototype.componentWillReceiveProps=function(){this.externalRender=!0},i.prototype.componentDidUpdate=function(n,t){var i=t.scrollPos>=this.contentHeight-this.visibleHeight;this.props.needDelayedUpdate?this.delayedUpdateScrollBar(1e3):this.updateScrollBar();(this.props.freezePosition||n.freezePosition)&&this.adjustFreezePosition(n);typeof this.props.scrollTo!=”undefined”&&this.props.scrollTo!==n.scrollTo?this.updateScrollPosition(this.props.scrollTo):this.props.keepAtBottom&&this.externalRender&&i&&this.updateScrollPosition(this.contentHeight-this.visibleHeight);this.externalRender=!1;this.hasScroll||(this.innerContainer.scrollTop=0)},i.prototype.componentWillUnmount=function(){document.removeEventListener(“mousemove”,this.onHandleDrag);document.removeEventListener(“mouseup”,this.onHandleDragEnd);sj_ue&&sj_ue(_w,”resize”,this.handleDynamicLayoutChange)},i.prototype.isEventOnElement=function(n,t){var i=t.getBoundingClientRect();return this.isEventOnRect(n,i)},i.prototype.isEventOnRect=function(n,t){return n.clientX>t.left&&n.clientXt.top&&n.clientY0&&(i=s.getInsightsModulesBySkills(n.skills),t.requestedModules=i),f(t,!1)},i.shouldLoadScripts=function(n){return i.enableScriptLoadingWithAjax&&n.insightsScriptLoadingState!==r.Loaded},i.enableScriptLoadingWithAjax=ImageDetailReducers.getPageConfig().enableAjaxScript,i}return __extends(t,n),t.prototype.componentDidMount=function(){this.switchOrLoadInsights(this.props)},t.prototype.componentWillReceiveProps=function(n){n.insightsId!=this.props.insightsId&&this.switchOrLoadInsights(n)},t.prototype.componentDidUpdate=function(n){if(this.props.insightsState&&this.insightsRequested&&(this.props.insightsState.requestState==i.Success||this.props.insightsState.requestState==i.Failed)){var f=(new Date).getTime()-this.currentRequestedInsightsTime,t=null,r=null,u=null;n.imageInfo&&n.imageInfo.instInfo&&(t=n.imageInfo.instInfo.appNS,r=n.imageInfo.instInfo.kValue);n.imageInfo&&(u=n.imageInfo.id);this.props.addToLogQueue(o(t,r,”InsightsLoad”,null,n.ig,{Mid:u,TTFL:f}));this.insightsRequested=!1}},t.prototype.switchOrLoadInsights=function(n){n.insightsState?(n.insightsState.requestState==i.Success||n.insightsState.requestState==i.Failed)&&n.switchInsights(n.insightsId):this.getConfigAndLoadInsights(n)},t.prototype.getConfigAndLoadInsights=function(n){var t=this.getInsightsRequestConfigWithModules(n);t?(this.insightsRequested=!0,this.currentRequestedInsightsTime=(new Date).getTime(),n.loadInsights(t,this.shouldLoadScripts(n),e(n.insightsRequestConfigProps,n.skills)),n.viewType===ImageDetailActions.IImageDetailViewType.VisualSearch&&(n.addToInsightsIdsQueue(n.insightsId),n.insightsIdsQueue&&n.insightsIdsQueue.length>=2&&n.deleteFromInsightsIdsQueue([n.insightsIdsQueue[0]]))):n.switchInsights(n.insightsId)},t.prototype.render=function(){return null},t}(React.Component),l=function(t,i){var o=ImageDetailReducers.getscriptLoadingState(t),f=ImageDetailReducers.getInsightsViewState(t),l=ImageDetailReducers.getDetailScenario(t),e=ImageDetailReducers.getDefaultSkillsOverride(t),u=e&&e.length>0?e:ImageDetailReducers.getPageConfig().insightKnowledgeDefaultSkills,s,h;return f&&f.expandedModules&&f.expandedModules.length>0&&(s=n.ImageDetailUtils.getSkillsByInsightsModules(f.expandedModules),u=u.concat(s),f.selectedModule&&(h=n.ImageDetailUtils.getSkillsByInsightsModules([f.selectedModule]),u=u.concat(h))),u=u.filter(c),{insightsData:ImageDetailReducers.getInsightsData(t),insightsState:ImageDetailReducers.getInsightsState(t,i.insightsId),cropCoordinates:ImageDetailReducers.getCropCoordinates(t),detailScenario:l,viewType:ImageDetailReducers.getViewType(t),insightsIdsQueue:ImageDetailReducers.getInsightsIdsQueue(t),skills:u,insightsScriptLoadingState:o?o.insights:r.None}},a=function(n){return{loadInsights:function(t,i,r){t&&(i&&n(ImageDetailActions.requestScripts(u.Insights)),n(ImageDetailActions.fetchData(t,r)))},switchInsights:function(t){t&&n(ImageDetailActions.switchInsights(t))},deleteFromInsightsIdsQueue:function(t){n(ImageDetailActions.deleteFromInsightsIdsQueue(t))},addToInsightsIdsQueue:function(t){n(ImageDetailActions.addToInsightsIdsQueue(t))},addToLogQueue:function(t){n(ImageDetailActions.addToEventQueue(t))}}};t.InsightsRequestController=ReactRedux.connect(l,a)(h)})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var r=ImageDetailActions.InsightsPosition,u=ImageDetailActions.IImageDetailViewType,f=ImageDetailActions.ScriptRequestState,i=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,e=function(u){function f(f){var e=u.call(this,f)||this;return e.isPinned=!1,e.customScrollConfig=null,e.clickedPreviewModuleName=null,e.enableSiteFilter=!1,e.modules=null,e.enableMobileView=!1,e.setCreateInsightsModulesContentFunction=function(n){e.createInsightsModulesContent=e.customScrollConfig&&e.customScrollConfig.Enabled&&!(i&&i.hasVPTestFlag(“inspin”))&&!n?e.createInsightsModulesWithCustomScroll:e.createInsightsModules},e.setPinStatus=function(n,t){n?e.pin(t):e.unpin()},e.handlePreviewIconClick=function(n){e.enableMobileView||(e.clickedPreviewModuleName=n,e.pin())},e.pin=function(n){!e.isPinned&&e.props.expandInsights&&e.props.expandInsights(e.props.ig,n);e.isPinned=!0;e.customScrollConfig.Enabled&&e.setState({isLayoutChanged:!0})},e.unpin=function(){e.isPinned=!1},e.setInsightsContainer=function(n){e.insightsContainer=n},e.getInsightsRequestConfigProps=function(n){return{detailScenario:n.scenario,fullInsightsRequestParams:n.fullInsightsRequestParams,insightsRequestParams:n.fullInsightsRequestParams,imageInfo:n.imageInfo,insightsId:n.insightsId,instSfxData:n.instSfxData,ig:n.ig,viewType:n.viewType}},e.getInsightsContainerStyle=function(){var n=e.props.imageWindowSize,t=e.shouldPin(e.props);if(t&&n&&e.props.insightsPosition===r.RightRail)return{width:Math.max(0,100-n.WidthPercentage)+”%”};if(t||e.props.insightsPosition!==r.RightRail){if(e.props.insightsPosition===r.Bottom)return{minHeight:”calc(100vh – “+e.props.oneColFixedElementHeights+”px)”}}else return{width:e.props.unpinInsWidth+”px”};return null},e.getClassName=function(n){var u=i&&i.hasVPTestFlag(“inspin”),t=”insights”+(n||u?” pin”:””)+(e.props.insightsPosition===r.RightRail?” rr”:””);return i&&i.isHoverRequestedByVPTest(“1”)&&(t=i.appendVPTestHoverClass(t)),t},e.createInsightsModules=function(n){var r=e.props,u=r.insightsId,f=r.imageInfo,o=r.imageData,s=r.insightsScriptLoadingState,h=r.scenario;return React.createElement(“ul”,{className:”insml”,”data-tag”:i?”multimedia.imageDetail.insightsContainer”:null},e.modules.map(function(i,r){return React.createElement(“li”,{key:r},React.createElement(t.InsightsModuleExpander,{insightsId:u,moduleName:i,onClickCallback:e.handlePreviewIconClick,imageInfo:f,imageAssociatedData:o,insightsRequestConfig:e.insightsRequestConfig,isPreviewPinned:n,insightsScriptLoadingState:s,addInstrumentationLog:e.props.addInstrumentationLog,autoExpand:!e.enableMobileView&&i==e.clickedPreviewModuleName,changeInsightsExpandedModules:e.props.changeInsightsExpandedModules,scenario:h,insightsState:e.props.insightsState,isHotspotClick:e.props.isHotspotClick,viewType:e.props.viewType}))}))},e.createInsightsModulesWithCustomScroll=function(n){return n?React.createElement(t.CustomScroll,{takeFullParentHeight:!0,minScrollHandleHeight:100},e.createInsightsModules(n)):e.createInsightsModules(n)},e.desktopRender=function(){var u=e.shouldPin(e.props),f=e.getClassName(u);return e.modules&&e.modules.length?React.createElement(“div”,{className:f,ref:e.setInsightsContainer,style:e.getInsightsContainerStyle(),”data-tag”:i?”imageDetail.insightsPreviewPanel”:null},e.enableSiteFilter&&React.createElement(t.InsightsSiteQueryNotification,null),u&&React.createElement(t.InsightsRequestController,{insightsId:e.props.insightsId,insightsRequestConfigProps:e.insightsRequestConfig}),e.props.isInsightsExpanded&&e.props.insightsPosition===r.RightRail&&React.createElement(n.ImageDetail.InsightsButton,null),e.createInsightsModulesContent(u)):null},e.mobileRender=function(){return e.modules&&e.modules.length?React.createElement(“div”,null,e.createInsightsModules(!0)):null},e.enableMobileView=ImageDetailReducers.isMobileViewEnabled(),e.modules=ImageDetailReducers.getInsightsMopRank(f.scenario,e.props.viewType),e.insightsRequestConfig=e.getInsightsRequestConfigProps(f),e.enableMobileView||(e.customScrollConfig=ImageDetailReducers.getCustomScrollConfig(),e.enableSiteFilter=ImageDetailReducers.getPageConfig().enableSiteFilter,e.state={isLayoutChanged:!1}),e.setCreateInsightsModulesContentFunction(f.isInsightsAtBottom),e.renderOverride=e.enableMobileView?e.mobileRender:e.desktopRender,e}return __extends(f,u),f.prototype.componentWillReceiveProps=function(n){(n.scenario!=this.props.scenario||n.viewType!=this.props.viewType)&&(this.modules=ImageDetailReducers.getInsightsMopRank(n.scenario,n.viewType));n.fullInsightsRequestParams!=this.props.fullInsightsRequestParams&&(this.insightsRequestConfig=this.getInsightsRequestConfigProps(n));n.isInsightsAtBottom!=this.props.isInsightsAtBottom&&this.setCreateInsightsModulesContentFunction(n.isInsightsAtBottom);this.enableMobileView||this.setPinStatus(this.shouldPin(n),!0)},f.prototype.shouldPin=function(n){return n.isInsightsExpanded||n.insightsPosition!==r.RightRail},f.prototype.render=function(){return this.renderOverride()},f}(React.Component),o=function(n,t){var o=ImageDetailReducers.getInsightsRequestParams(n,t.imageInfo),s=ImageDetailReducers.getFullInsightsRequestParams(n,o),r=ImageDetailReducers.getscriptLoadingState(n),e=ImageDetailReducers.getDisplayInsightsId(n),i=ImageDetailReducers.getLayoutConfig(n),h=i.unpinInsWidth,c=i.oneColImageHeight+i.detailInfoHeight[u[u.Default]]+i.detailHeaderHeight,l=c+i.footerHeight;return{insightsPosition:ImageDetailReducers.getInsightsPosition(n),isInsightsExpanded:ImageDetailReducers.getIsInsightsExpanded(n),ig:ImageDetailReducers.getCurrentImpressionId(n),imageWindowSize:ImageDetailReducers.getMainImageWindowSize(n),imageData:e?ImageDetailReducers.getImageModulesData(n,e):ImageDetailReducers.getImageModulesData(n,t.insightsId),instSfxData:ImageDetailReducers.getInstSfxData(n),fullInsightsRequestParams:s,insightsScriptLoadingState:r?r.insights:f.None,isInsightsAtBottom:ImageDetailReducers.getInsightsPosition(n)==ImageDetailActions.InsightsPosition.Bottom,pageSize:ImageDetailReducers.getPageSize(n),unpinInsWidth:h,oneColFixedElementHeights:l,scenario:ImageDetailReducers.getDetailScenario(n),viewType:ImageDetailReducers.getViewType(n),insightsState:ImageDetailReducers.getInsightsState(n),isHotspotClick:ImageDetailReducers.getIsHotspotClick(n)}},s=function(n){return{expandInsights:function(t,i){n(ImageDetailActions.changeInsightStatus(!0,t,”InsightsIconClick”,!1,i))},addInstrumentationLog:function(t){n(ImageDetailActions.addToEventQueue(t))},changeInsightsExpandedModules:function(t){n(ImageDetailActions.changeInsightsExpandedModules(t))}}};t.ImageDetailInsightsPreviewPanel=ReactRedux.connect(o,s)(e);t.ImageDetailInsightsPreviewPanel.displayName=”ImageDetailInsightsPreviewPanel”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),SharedComponent;(function(n){var t=n.addOrRemoveClassName,i=function(i){function r(u){var f=i.call(this,u)||this;return f.defaultClassName=”tab-container “,f.cachedTabElements={},f.tabHeadContainer=null,f.tabHeadElement=null,f.tabHeadScrollElement=null,f.tabContentElement=null,f.leftNavButton=null,f.rightNavButton=null,f.selectedTabIndex=0,f.displayElementMargin=8,f.tabHeadNavStep=120,f.onScroll=function(){var n=f.tabHeadScrollElement.parentElement.getBoundingClientRect();if(n.top0&&(t(f.tabHeadScrollElement,!1,r.stickyHeaderClass),t(f.tabContentElement,!1,r.stickyHeaderClass))},f.getSelectedTabKey=function(n){return n.selectedTabKey||n.tabs&&n.tabs[0].key},f.getClassName=function(){var n=f.defaultClassName+f.props.className||””;return n+(f.props.enableNavigationButton&&f.state.isNavButtonVisible?” hnav”:””)},f.setNavButtonRenderState=function(){var n,t;if(f.props.enableNavigationButton&&f.tabHeadElement){var u=f.tabHeadElement.parentElement.clientWidth,i=0,r=f.tabHeadElement.children;for(n=0;nu;f.state.isNavButtonVisible!=t&&(t||(f.tabHeadContainer=null),f.setState({isNavButtonVisible:t}))}},f.onLeftNavButtonClicked=function(){f.scrollLeft(f.tabHeadNavStep)},f.scrollLeft=function(n){f.tabHeadElement&&f.tabHeadElement.scroll&&f.tabHeadElement.scroll({left:f.tabHeadElement.scrollLeft-n,behavior:”smooth”})},f.onRightNavButtonClicked=function(){f.scrollRight(f.tabHeadNavStep)},f.scrollRight=function(n){f.tabHeadElement&&f.tabHeadElement.scroll&&f.tabHeadElement.scroll({left:f.tabHeadElement.scrollLeft+n,behavior:”smooth”})},f.createLeftNavigationButton=function(){return React.createElement(“a”,null,React.createElement(“div”,{ref:function(n){f.leftNavButton=n},className:”left”,onClick:n.isRTL?f.onRightNavButtonClicked:f.onLeftNavButtonClicked}))},f.createRightNavigationButton=function(){return React.createElement(“a”,null,React.createElement(“div”,{ref:function(n){f.rightNavButton=n},className:”right”,onClick:n.isRTL?f.onLeftNavButtonClicked:f.onRightNavButtonClicked}))},f.createTabHead=function(t,i){if(t.content!=null||f.props.enableLazyLoad){f.state.selectedTabKey==t.key&&(f.selectedTabIndex=i);var r=t.titleElement||React.createElement(“span”,null,t.title);return React.createElement(n.AccessibleComponent,{elementName:”li”,key:i,className:f.state.selectedTabKey==t.key?”tab-active”:null,onClick:function(){return f.onTabSelected(t.key)}},r)}return null},f.createTabHeadContainer=function(){var n=f.props.tabs,t=f.state.selectedTabKey;return React.createElement(“ul”,{ref:function(n){f.tabHeadElement=n}},n.map(function(n,t){return f.createTabHead(n,t)}))},f.getTabHeadContainer=function(){return f.tabHeadContainer==null&&(f.tabHeadContainer=f.createTabHeadContainer()),f.tabHeadContainer},f.state={selectedTabKey:f.getSelectedTabKey(u),isNavButtonVisible:!1},f}return __extends(r,i),r.prototype.componentWillReceiveProps=function(n){n!=this.props&&(this.cachedTabElements={},this.tabHeadContainer=null,this.setState(Object.assign({},this.state,{selectedTabKey:this.getSelectedTabKey(n)})))},r.prototype.componentDidMount=function(){if(this.setNavButtonRenderState(),sj_be&&_w&&(this.props.enableNavigationButton&&sj_be(_w,”resize”,this.setNavButtonRenderState),this.props.isStickyHeader&&sj_be(_w,”scroll”,this.onScroll,!0)),this.tabHeadElement&&this.tabHeadElement.parentElement&&this.selectedTabIndex>=0&&this.props.onSetupSwipe)this.props.onSetupSwipe(this.tabHeadElement.parentElement,this.tabHeadElement)},r.prototype.componentDidUpdate=function(){if(this.setNavButtonRenderState(),this.tabHeadElement&&this.tabHeadElement.children&&this.tabHeadElement.scroll){var n=this.tabHeadElement.children.item(this.selectedTabIndex);n&&this.tabHeadElement.scroll({left:n.offsetLeft-.5*(this.tabHeadElement.clientWidth-n.clientWidth)})}},r.prototype.componentWillUnmount=function(){sj_ue&&_w&&(this.props.enableNavigationButton&&sj_ue(_w,”resize”,this.setNavButtonRenderState),this.props.isStickyHeader&&sj_ue(_w,”scroll”,this.onScroll,!0))},r.prototype.render=function(){var t=this,i=this.getClassName();return React.createElement(“div”,{className:i},React.createElement(“div”,{className:”tab-head”},this.props.enableNavigationButton&&this.state.isNavButtonVisible&&(n.isRTL?this.createRightNavigationButton():this.createLeftNavigationButton()),this.props.enableNavigationButton&&this.state.isNavButtonVisible&&this.props.navigationArrowsPosition==n.NavigationArrowsPosition.left&&(n.isRTL?this.createLeftNavigationButton():this.createRightNavigationButton()),React.createElement(“div”,{ref:function(n){t.tabHeadScrollElement=n}},this.getTabHeadContainer()),this.props.enableNavigationButton&&this.state.isNavButtonVisible&&this.props.navigationArrowsPosition==n.NavigationArrowsPosition.leftandright&&(n.isRTL?this.createLeftNavigationButton():this.createRightNavigationButton())),React.createElement(“div”,{className:”tab-content”,ref:function(n){t.tabContentElement=n}},this.getTabContent()))},r.prototype.onTabSelected=function(n){if(n!=this.state.selectedTabKey&&(this.setState(Object.assign({},this.state,{selectedTabKey:n})),this.tabHeadContainer=null,this.props.onTabSelectionChanged))this.props.onTabSelectionChanged(n)},r.prototype.getTabContent=function(){var n=this.props.tabs[this.state.selectedTabKey],t;return!n||!n.title?null:(t=this.cachedTabElements[n.key],t)?t:n.content?this.createTabContentElement(n):null},r.prototype.createTabContentElement=function(n){var t=React.createElement(“ul”,null,React.createElement(“li”,null,n.content));return this.cachedTabElements[n.key]=t,t},r.stickyHeaderClass=”sticky”,r}(React.Component);n.TabContainer=i})(SharedComponent||(SharedComponent={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=ImageDetailActions.InsightsPosition,r=ImageDetailActions.IImageDetailViewType,u=ImageDetailActions.ScriptRequestState,e=ImageDetailActions.IImageDetailModuleExpansionMode,f=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,o=n.ImageDetailUtils,s=function(s){function h(h){var c=s.call(this,h)||this,l,a;return c.enableScriptLoadingWithAjax=!1,c.customScrollConfig=null,c.enableSiteFilter=!1,c.modules=null,c.enableMobileView=!1,c.isResponseReady=function(n){return o.isResponseReady(n.insightsState,c.modules)},c.hasRenderingPropsChanged=function(n){return n.imageInfo!=c.props.imageInfo&&n.imageInfo!=null||n.insightsId!=c.props.insightsId||n.insightsState!=c.props.insightsState||n.isInsightsAtBottom!=c.props.isInsightsAtBottom||n.insightsScriptLoadingState!=c.props.insightsScriptLoadingState||c.shouldHandleSelectedModuleChanged(n)},c.shouldHandleSelectedModuleChanged=function(n){return c.enableMobileView&&n.selectedModule!=c.props.selectedModule?!0:!1},c.isScriptLoadingRequired=function(n){return c.enableScriptLoadingWithAjax&&n.insightsScriptLoadingState===u.None},c.isScriptLoaded=function(n){return!c.enableScriptLoadingWithAjax||n.insightsScriptLoadingState===u.Loaded},c.setCreateTabContentViewOverride=function(n){c.createTabContentViewOverride=c.customScrollConfig&&c.customScrollConfig.Enabled&&!(f&&f.hasVPTestFlag(“inspin”))&&!n?c.createTabContentViewWithCustomScroll:c.createTabContentView},c.logTabSelectionChange=function(n){if(c.props.addInstrumentationLog&&c.props.imageInfo&&c.props.imageInfo.instInfo){var t=c.props.imageInfo.instInfo,i={AppNS:t.appNS,T:”CI.Click”,K:t.kValue,Component:n,Mid:c.props.imageInfo.id,Name:”InsightsTab”};c.props.addInstrumentationLog(i)}},c.getSelectedTabKey=function(n,t){if(n.selectedModule)if(c.isResponseReady(n)){if(c.isSelectedTabActive(n.selectedModule,t))return n.selectedModule}else return n.selectedModule;var i=t&&t.length>0&&t[0].key;return i&&c.props.changeSelectedModule(i),i},c.isSelectedTabActive=function(n,t){for(var i=0;i0){var e=”insights”;return e+=r.insightsPosition===i.RightRail?” rr”:””,e+=c.enableMobileView?” pin”:””,React.createElement(“div”,{className:e,ref:c.setInsightsContainer,style:c.getInsightsContainerStyle(r),”data-tag”:f?”imageDetail.insightsTabPanel”:null},c.enableSiteFilter&&React.createElement(t.InsightsSiteQueryNotification,null),React.createElement(t.InsightsRequestController,{insightsId:r.insightsId,insightsRequestConfigProps:c.insightsRequestConfig}),React.createElement(SharedComponent.TabContainer,{tabs:u,onTabSelectionChanged:c.onTabSelectionChanged,className:”insttab”,enableLazyLoad:!0,enableNavigationButton:!c.enableMobileView,isStickyHeader:c.enableMobileView,selectedTabKey:c.selectedTabKey,onSetupSwipe:c.enableMobileView?n.ImageDetailCarouselUtils.setupCarouselSwipe:null,navigationArrowsPosition:c.props.isInsightsAtBottom?SharedComponent.NavigationArrowsPosition.left:SharedComponent.NavigationArrowsPosition.leftandright}),c.enableInsightsButtonInL2(r)&&React.createElement(n.ImageDetail.InsightsButton,null))}return null},c.createScriptLoaderElement=function(n){return React.createElement(t.InsightsRequestController,{insightsId:n.insightsId,insightsRequestConfigProps:c.insightsRequestConfig})},c.enableMobileView=ImageDetailReducers.isMobileViewEnabled(),l=ImageDetailReducers.getPageConfig(),a=ImageDetailReducers.getInsightsMopRankForTabHeader(h.scenario,h.viewType),c.modules=a||ImageDetailReducers.getInsightsMopRank(h.scenario,h.viewType),c.insightsRequestConfig=c.getInsightsRequestConfigProps(h),c.enableScriptLoadingWithAjax=l.enableAjaxScript,c.enableMobileView||(c.enableSiteFilter=l.enableSiteFilter,c.customScrollConfig=ImageDetailReducers.getCustomScrollConfig()),c.setCreateTabContentViewOverride(h.isInsightsAtBottom),c}return __extends(h,s),h.prototype.componentWillMount=function(){if(this.isScriptLoadingRequired(this.props))this.state={renderElement:this.createScriptLoaderElement(this.props)};else{var n=this.createTabContents(this.props);this.selectedTabKey=this.getSelectedTabKey(this.props,n);this.state={renderElement:this.createContentElement(this.props,n)}}typeof window!=”undefined”&&this.props.insightsPosition==i.Bottom&&this.props.viewType!=ImageDetailActions.IImageDetailViewType.VisualSearch&&window.scrollTo(0,this.props.oneColInsightsTop)},h.prototype.componentWillReceiveProps=function(n){var i,t,r;(n.scenario!=this.props.scenario||n.viewType!=this.props.viewType)&&(i=ImageDetailReducers.getInsightsMopRankForTabHeader(n.scenario,n.viewType),this.modules=i||ImageDetailReducers.getInsightsMopRank(n.scenario,n.viewType));(n.fullInsightsRequestParams!=this.props.fullInsightsRequestParams||n.insightsId!=this.props.insightsId)&&(this.insightsRequestConfig=this.getInsightsRequestConfigProps(n));n.isInsightsAtBottom!=this.props.isInsightsAtBottom&&this.setCreateTabContentViewOverride(n.isInsightsAtBottom);this.isScriptLoaded(n)&&this.hasRenderingPropsChanged(n)?(t=this.createTabContents(n),this.selectedTabKey=this.getSelectedTabKey(n,t),this.setState({renderElement:this.createContentElement(n,t)}),this.insightsContainer&&this.shouldHandleSelectedModuleChanged(n)&&(r=this.insightsContainer.getBoundingClientRect(),r.top0||n.isIntersecting)&&(r.setState({isImageVisible:!0}),r.intersectionObserver.unobserve(r.imageElement))})},r.cleanupIntersectionObserver=function(){r.intersectionObserver&&(r.intersectionObserver.disconnect(),r.intersectionObserver=null)},r.state={isImageVisible:!1},r.isLazyLoadEnabled=n&&n.lateLoadConfig&&n.lateLoadConfig.Enabled||!1,r}return __extends(r,t),r.prototype.render=function(){var n=this.props.lateLoadConfig.LoadIconSrc;return!this.isLazyLoadEnabled||this.state.isImageVisible?this.createActualImage():this.createImageLoadIcon()},r.prototype.componentDidMount=function(){var i=this,t;this.isLazyLoadEnabled&&(this.setupIntersectionObserver(),n.isTestHookEnabled&&n.isTestHookEnabled()&&(t=function(){i.setState({isImageVisible:!0})},sj_evt&&sj_evt.bind(“LateLoadImage.VPTest”,t)))},r.prototype.componentWillUnmount=function(){this.isLazyLoadEnabled&&this.cleanupIntersectionObserver()},r.prototype.createImageLoadIcon=function(){return this.createImageElement(this.props.lateLoadConfig.LoadIconSrc,!1)},r.prototype.createActualImage=function(){return this.createImageElement(this.props.src,!0)},r.prototype.createImageElement=function(n,t){var i=this;return React.createElement(“img”,__assign({src:n,width:this.props.width,height:this.props.height,onClick:this.props.onClick,onContextMenu:this.props.onContextMenu,onMouseLeave:this.props.onMouseLeave,title:this.props.title,alt:this.props.altText,className:this.props.className,style:this.props.style,role:this.props.role},t?{onLoad:this.props.onLoad}:{},{ref:function(n){i.imageElement=n;i.props.getRef&&i.props.getRef(n)}}))},r.prototype.componentWillReceiveProps=function(n){this.props&&n&&this.isLazyLoadEnabled&&this.props.src!==n.src&&(this.setState({isImageVisible:!1}),this.intersectionObserver.observe(this.imageElement))},r}(React.Component);n.LateLoadImage=t})(SharedComponent||(SharedComponent={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,r=function(n){function t(t){var r=n.call(this,t)||this;return r.getClassName=function(){var n=r.props.className||””;return r.state.isImageLoaded||(n+=” “+r.props.imagePlaceHolderClass||””),n},r.getImageStyle=function(){var n=r.props.imageStyle?Object.assign({},r.props.imageStyle):{};return n.display=r.state.isImageLoaded?”block”:”none”,n},r.getImageContainerStyle=function(){var n=r.props.style?Object.assign({},r.props.style):{};return n.backgroundColor=r.state.isImageLoaded?””:”#”+r.props.accentColor,n},r.onImageLoad=function(){i&&i.requireAccentColorByVPTest()||r.setState({isImageLoaded:!0})},r.suppressDefaultOnclick=function(n){return r.props.onClick&&r.props.onClick(),n.preventDefault(),!1},r.state={isImageLoaded:!1},r}return __extends(t,n),t.prototype.render=function(){var n=”div”,t=this.props.onClick;return(this.props.link&&(n=”a”,t=this.suppressDefaultOnclick),this.props&&this.props.imageSrc)?React.createElement(n,{className:this.getClassName(),style:this.getImageContainerStyle(),onClick:t||null,href:this.props.link},React.createElement(“img”,{className:this.props.imageClassName,style:this.getImageStyle(),src:this.props.imageSrc,onLoad:this.onImageLoad,alt:this.props.altText})):null},t}(React.Component);t.AccentColoredImage=r;r.displayName=”AccentColoredImage”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var Multimedia;(function(n){var t;(function(t){function o(n){return n.EnableRelatedSearches||n.EnableImageBasedRelatedSearch}function s(n,t){if(t&&!h(n,t)){var r={text:t.text,displayText:t.displayText,searchUrl:t.webSearchUrl,instInfo:t.instInfo,thumbnailUrl:null},i=n.slice();return i.unshift(r),i}return n}function h(n,t){if(n&&n.length>0&&t)for(var i=0;i0}function c(n,t){if(n==t)return!0;if(n==null||t==null||n.length!=t.length)return!1;for(var i=0;i0&&(i=s(i,t.brqData),i=i.slice(0,u)),i}function a(n){return n.insightsRequestState==u.Success||n.insightsRequestState==u.Failed}function v(n,t,i){e(n.instInfo,”RelatedSearches”,t,{ViewName:i})}function y(n,t,i,r,u,f,e){var o=p(n,i,r,u),s=function(){e&&e(n)};return React.createElement(“div”,{className:”rsi”,key:t,onClick:s},React.createElement(“a”,{className:”rsic”,href:n.searchUrl,target:”_parent”,title:n.text},w(o,n.text,f),React.createElement(“div”,{className:”rsiac”},React.createElement(“span”,{className:”rsa”},n.text))))}function p(n,t,r,u){if(i&&i.isMockImageEnabled())return i.getMockImageUrl();var e=f.stringFormat(t,n.text,r,u);return f.createThumbnailUrlWithoutCropping(e)}function w(t,i,r){var u=”rsimg”,f=r.ImageLateLoadConfig;return f&&f.Enabled?React.createElement(SharedComponent.LateLoadImage,{className:u,src:t,altText:i,lateLoadConfig:r.ImageLateLoadConfig}):r.EnableImagePlaceHolder?React.createElement(n.ImageDetail.AccentColoredImage,{imageClassName:u,imageSrc:t,accentColor:r.PlaceHolderBgColor,imagePlaceHolderClass:”rsih”}):React.createElement(“img”,{className:u,src:t,alt:i})}var e=n.InstrumentationUtils.logResultClickEvent,u=ImageDetailActions.RequestState,f=n.ImageDetailUtils,i=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null;t.isRelatedSearchesEnabled=o;t.hasRelatedSearches=r;t.hasSameRelatedSearches=c;t.getRelatedSearchItems=l;t.isInsightsReady=a;t.handleRelatedSearchClick=v;t.createImageAndTextCard=y})(t=n.RelatedSearchesUtil||(n.RelatedSearchesUtil={}))})(Multimedia||(Multimedia={}));var Multimedia;(function(n){var t;(function(t){var i=n.ImageDetailUtils,u=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,r=function(){function n(n,t){this.relatedSearchConfig=null;this.relatedSearchConfig=n;this.clickCallback=t}return n.prototype.createRelatedSearches=function(n,t){if(n==null||n.length1?u.props.removeFromDetailStateHistory():u.props.detailStatesCount&&u.props.detailStatesCount==1&&u.props.viewType!=i.Default?u.props.changePageView(i.Default):u.props.fallbackBackClickFunction!=null&&u.props.fallbackBackClickFunction()},u.changeBackButtonStatus=function(n){u.props.changeBackButtonStatusCallback&&u.props.changeBackButtonStatusCallback(n)},u.buttonText=ImageDetailReducers.getResourceString(“BackButton”),u.buttonTooltip=u.props.showTooltip?ImageDetailReducers.getResourceString(“SeeImageDetail”):null,u.state={isActive:u.isButtonActive(t)},u}return __extends(t,n),t.prototype.componentWillReceiveProps=function(n){this.setState({isActive:this.isButtonActive(n)})},t.prototype.shouldComponentUpdate=function(n,t){return this.state.isActive!=t.isActive},t.prototype.componentDidUpdate=function(n,t){t.isActive!=this.state.isActive&&this.changeBackButtonStatus(this.props.isEnabled)},t.prototype.isButtonActive=function(n){switch(n.viewType){case i.DetailL2View:case i.VisualSearch:return n.isEnabled;default:n.isEnabled&&(n.detailStatesCount&&n.detailStatesCount>1||n.fallbackBackClickFunction!=null)}},t.prototype.render=function(){var n=this.props;return this.state.isActive?React.createElement(“div”,__assign({className:”back_nav”,id:n.id,onClick:this.onBackButtonClick},this.buttonTooltip?{“data-tooltip”:this.buttonTooltip}:{}),React.createElement(“span”,{className:”icon”}),!n.showIconOnly&&React.createElement(“span”,{className:”text”},this.buttonText)):null},t}(React.Component),f=function(n){return{detailStatesCount:ImageDetailReducers.getImageDetailStatesCount(n),ig:ImageDetailReducers.getCurrentImpressionId(n),scenario:ImageDetailReducers.getDetailScenario(n)}},e=function(n){return{removeFromDetailStateHistory:function(){n(ImageDetailActions.removeFromDetailStateHistory())},changePageView:function(t){n(ImageDetailActions.changePageView(t))},changeBackScenario:function(){n(ImageDetailActions.switchDetailScenario(ImageDetailActions.DetailScenario.Default))}}};t.BackButton=ReactRedux.connect(f,e)(u);t.BackButton.displayName=”BackButton”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var r=ImageDetailActions.DetailScenario,i=ImageDetailActions.IImageDetailViewType,u=”back_btn”,f=function(f){function e(n){var t=f.call(this,n)||this,e;return t.detailHeaderContainerId=”detailheader”,t.enableMobileView=!1,t.enableBingLogo=!1,t.enableNavInL2=!1,t.changeBackButtonStatusCallback=function(n){t.detailHeaderElement&&(n?t.detailHeaderElement.classList.add(u):t.detailHeaderElement.classList.remove(u))},t.getHeaderContainer=function(){return t.detailHeaderContainerElement==null&&_ge&&(t.detailHeaderContainerElement=_ge(t.detailHeaderContainerId)),t.detailHeaderContainerElement},t.isRelatedSearchesEnabled=function(){return!t.enableMobileView&&t.props.viewType!=i.VisualSearch&&(t.enableNavInL2||t.props.viewType==i.Default)},t.isBackButtonEnabled=function(){var n=t.props.detailScenario;switch(t.props.viewType){case i.DetailL2View:case i.VisualSearch:return!0;default:return n===r.VisuallySimilarImages||n===r.VisuallySimilarProducts||n===r.FeedImages||n===r.LiveMaps}},t.enableMobileView=ImageDetailReducers.isMobileViewEnabled(),e=ImageDetailReducers.getBingLogoConfig(),t.enableBingLogo=e.enabled,t.enableNavInL2=ImageDetailReducers.isNavigationInL2(),t}return __extends(e,f),e.prototype.render=function(){var u=this,r=this.props;return React.createElement(“div”,{id:this.detailHeaderContainerId,ref:function(n){u.detailHeaderContainerElement=n}},React.createElement(“div”,{id:”detailheader_container”,ref:function(n){u.detailHeaderElement=n}},this.props.viewType==i.Default&&this.enableBingLogo&&React.createElement(t.BingLogoButton,null),!this.enableMobileView&&React.createElement(t.SearchFormWrapper,{getContainerElement:this.getHeaderContainer}),this.isRelatedSearchesEnabled()&&React.createElement(n.ImageDetail.RelatedSearchesTextListView,null),React.createElement(t.DetailHeaderButtons,{close:r.close,enableExpandInsights:r.enableExpandInsights,enableCloseInsights:r.enableCloseInsights,enableClose:r.enableClose})),this.props.renderBackButton&&React.createElement(t.BackButton,{id:”backButtonInHeader”,isEnabled:this.isBackButtonEnabled(),showIconOnly:this.props.viewType==i.Default,showTooltip:!this.enableMobileView,changeBackButtonStatusCallback:this.changeBackButtonStatusCallback,viewType:this.props.viewType}))},e}(React.Component);t.DetailHeader=f;f.displayName=”DetailHeader”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var Multimedia;(function(n){var t;(function(n){function t(){return React.createElement(“div”,{id:”detailfooter”},React.createElement(n.DetailFeedback,null))}n.DetailFooter=t})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var MMMessenger;(function(n){function t(){var n=window.location;return n.origin||n.protocol+”//”+n.hostname}function i(n){return n===t()}n.Post=function(n,i,r,u){u===void 0&&(u=t());var f={command:i,data:r,originalEvent:null};n.postMessage(f,u)};n.GetMessageData=function(n,t){if(t===void 0&&(t=i),t(n.origin)){var r=n.data;if(r&&r.command&&typeof r.command==”string”)return r.originalEvent=n,r}return null}})(MMMessenger||(MMMessenger={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=function(t){function i(){var n=t!==null&&t.apply(this,arguments)||this;return n.currentUrl=null,n.locationMethods=”sj_locmet”,n.getUrlMethod=”GetCurrentUrl”,n.enableOverrideBrowserback=!1,n.hasPopStateEventListenerSet=!1,n.getCurrentUrl=function(){return n.currentUrl},n.handlePageLocationChange=function(){n.hasTestHooksInRequest()||(/[?&]view=detailv2/i.test(location.search)||/image\/detail\/search/i.test(location.search)?n.props.goBack(“BackButton”):location.reload())},n}return __extends(i,t),i.prototype.componentDidMount=function(){if(this.enableOverrideBrowserback=ImageDetailReducers.getPageConfig().enableOverrideBrowserback,typeof window!=”undefined”&&(window[this.locationMethods]={},window[this.locationMethods][this.getUrlMethod]=this.getCurrentUrl,window.parent!=window&&this.props.scenario===ImageDetailActions.DetailScenario.SearchByImageUploadGet)){var n=window.location.href.replace(/[\?&]mode=overlay/,””);MMMessenger.Post(window.parent,”mm.replaceLocation”,n)}},i.prototype.componentWillReceiveProps=function(t){var e=!1,u=n.ImageDetailLocationUtils.getCurrentLocation(),f=parseQueryParamsFromQuery(u.search,!1),r=n.ImageDetailLocationUtils.getLocationUrlFunction[t.scenario]?n.ImageDetailLocationUtils.getLocationUrlFunction[t.scenario](f,t,this.props):null;t.scenario!==this.props.scenario&&(f.iss=ImageDetailActions.DetailScenarioKey[t.scenario],r=”?”+queryParamsToString(f));t.detailStateCount>this.props.detailStateCount&&(e=!0);r&&r.indexOf(“?”)===0&&(r=(u.origin||””)+u.pathname+r);e&&this.enableOverrideBrowserback?window.parent!=window?MMMessenger.Post(window.parent,”mm.pushLocation”,r):typeof history!=”undefined”&&history.pushState&&r&&(history.pushState(“”,””,r),this.hasPopStateEventListenerSet||(window.addEventListener(i.popStateEventName,this.handlePageLocationChange,!1),this.hasPopStateEventListenerSet=!0)):window.parent!=window?MMMessenger.Post(window.parent,”mm.replaceLocation”,r):typeof history!=”undefined”&&history.replaceState&&history.replaceState(“”,””,r);r&&(this.currentUrl=r)},i.prototype.hasTestHooksInRequest=function(){return location&&location.search&&location.search.indexOf(“testhooks=~1″)>0},i.prototype.componentWillUnmount=function(){window&&this.hasPopStateEventListenerSet&&window.removeEventListener(i.popStateEventName,this.handlePageLocationChange,!1)},i.prototype.render=function(){return null},i.popStateEventName=”popstate”,i}(React.Component),r=function(n){return{result:ImageDetailReducers.getCurrentResult(n),scenario:ImageDetailReducers.getDetailScenario(n),cropcoordinates:ImageDetailReducers.getCropCoordinates(n),pivotParams:ImageDetailReducers.getDetailScenarioPivotParams(n),insightsViewState:ImageDetailReducers.getInsightsViewState(n),detailStateCount:ImageDetailReducers.getImageDetailStatesCount(n),siteFilter:ImageDetailReducers.getSiteFilter(n),isHotspotClick:ImageDetailReducers.getIsHotspotClick(n),viewType:ImageDetailReducers.getViewType(n)}};t.LocationBar=ReactRedux.connect(r)(i);t.LocationBar.displayName=”LocationBar”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=n.InstrumentationUtils.logBatchEvent,r=n.InstrumentationUtils.logError,u=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.clickEventQueue=[],t.enableClientErrorMonitoring=!1,t.sendQueuedLogs=function(){t.props.logQueue&&t.props.logQueue.events&&t.props.logQueue.events.length>0&&t.props.requestRemoveFromEventQueue(!0)},t.handleWindowUnload=function(){clearInterval(t.queueIntervalTimer);t.props.logQueue&&t.props.logQueue.events&&t.props.logQueue.events.length>0&&i(“ClientInst”,t.props.ig,t.props.logQueue.events,!1);window.removeEventListener(“beforeunload”,t.handleWindowUnload);window.onerror=null},t}return __extends(t,n),t.prototype.componentWillMount=function(){var n=ImageDetailReducers.getMainImageConfig(),t;this.MAXQUEUETIME=n.LogQueueTime||1e4;this.maxCount=n.LogQueueLength;this.enableClientErrorMonitoring=ImageDetailReducers.getPageConfig().enableClientErrorMonitoring;typeof window!=”undefined”&&(window.addEventListener(“beforeunload”,this.handleWindowUnload),this.enableClientErrorMonitoring&&(t=this.props.ig,window.onerror=function(n,i,u){var f=””;f=typeof n==”object”&&n.srcElement&&n.srcElement.src?”\”ScriptSrc = ‘”+escape(n.srcElement.src.replace(/’/g,””))+”‘\””:'”‘+escape(n.replace(/”/g,””))+'”,”Meta”:”‘+escape(i)+'”,”Line”:’+u;r(f,t)}));typeof setInterval!=”undefined”&&(this.queueIntervalTimer=setInterval(this.sendQueuedLogs,this.MAXQUEUETIME))},t.prototype.componentDidUpdate=function(){this.props.logQueue&&this.props.logQueue.events&&this.props.logQueue.events.length>=this.maxCount&&this.props.requestRemoveFromEventQueue(!0)},t.prototype.componentWillReceiveProps=function(n){n.logQueue&&n.logQueue.shouldReset&&(i(“ClientInst”,this.props.ig,n.logQueue.events),n.resetEventQueue(),n.requestRemoveFromEventQueue(!1))},t.prototype.render=function(){return null},t}(React.Component),f=function(n){return{ig:ImageDetailReducers.getCurrentImpressionId(n),logQueue:ImageDetailReducers.getLogQueue(n)}},e=function(n){return{resetEventQueue:function(){n(ImageDetailActions.resetEventQueue())},requestRemoveFromEventQueue:function(t){n(ImageDetailActions.requestRemoveFromEventQueue(t))}}};t.ImageDetailBatchLogger=ReactRedux.connect(f,e)(u);t.ImageDetailBatchLogger.displayName=”ImageDetailBatchLogger”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(n){var t=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.MAXQUICKBACKTIME=3e5,t.onchange=function(){var n=document.visibilityState==”visible”,i=Math.min((new Date).getTime()-t.startTime,t.MAXQUICKBACKTIME);n&&t.props.visibilityTracker.isOn&&(t.startTime=0,t.props.addToLogQueue({T:”CI.Click”,Name:”QuickBack”,Source:t.props.visibilityTracker.visibilityChangeSource,QuickBackTime:i}),”hidden”in document&&document.removeEventListener(“visibilitychange”,t.onchange),t.props.changePageVisiblityTracking(!1))},t}return __extends(t,n),t.prototype.componentWillReceiveProps=function(n){n.visibilityTracker&&!n.visibilityTracker.isOn&&this.props.visibilityTracker&&n.visibilityTracker.isOn==this.props.visibilityTracker.isOn||(this.startTime=(new Date).getTime(),”hidden”in document&&document.addEventListener(“visibilitychange”,this.onchange))},t.prototype.render=function(){return null},t}(React.Component),i=function(n){return{changePageVisiblityTracking:function(t){n(ImageDetailActions.changePageVisiblityTracking(t))},addToLogQueue:function(t){n(ImageDetailActions.addToEventQueue(t))}}},r=function(n){return{visibilityTracker:ImageDetailReducers.getVisibilityTracker(n)}};n.PageVisibilityTracker=ReactRedux.connect(r,i)(t);n.PageVisibilityTracker.displayName=”PageVisibilityTracker”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=ImageDetailActions.SizeMismatchErrorCode,f=n.InstrumentationUtils.logResultActionEvent,u=typeof n.ImageDetailUtils!=”undefined”?n.ImageDetailUtils:null,r=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,e=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.mainImageConfig=ImageDetailReducers.getMainImageConfig(),t.preloadExternalImage=function(){for(var i=t.props,r=i.selectedIndex,u=i.resultsIds,f=t.mainImageConfig?t.mainImageConfig.PrefetchPreviousImageCount:0,e=Math.max(r-f,0),o=t.mainImageConfig?t.mainImageConfig.PrefetchNextImageCount:0,s=Math.min(r+o,u.length),n=e;n=0?(e(n),f=!0):u.imgWidth&&u.imgHeight?t.width===u.imgWidth&&t.height===u.imgHeight?(e(n),f=!0):t.width*t.height>u.imgWidth*u.imgHeight?w(u.imgUrl)?(e(n),o(u,i.SizeExceedAllowed),f=!0):o(u,i.SizeExceed):o(u,i.SizeDeceed):o(u,i.SizeNotDefined);f||h(n)},s.onerror=function(){h(n);b(u)}))},t.isFromWhitelistedDomain=function(n){var i=t.mainImageConfig.SizeMismatchBypassWhiteList;return i?u?u.matchUrlToWhiteList(n,i):!1:!0},t.logImageSizeMismatch=function(n,i){t.logImageLoadError(n,i)},t.logImageLoadError=function(n,i){var r={Component:”currentimg”,url:n.imgUrl,page:”ImageDetailMainImage”};t.setSizeMismatchInfo(r,i);f(n.instInfo,”CI.Info”,”ImageViewer”,t.props.ig,r)},t.setSizeMismatchInfo=function(n,t){if(n&&t){n.type=”SizeMismatch”;var r=i[t];n.errorcode=r}},t}return __extends(t,n),t.prototype.componentDidMount=function(){this.preloadExternalImage()},t.prototype.componentDidUpdate=function(n){(n.selectedIndex!=this.props.selectedIndex||n.resultsIds!=this.props.resultsIds)&&this.preloadExternalImage()},t.prototype.render=function(){return null},t}(React.Component),o=function(n){return{selectedIndex:ImageDetailReducers.getSelectedIndex(n),resultsIds:ImageDetailReducers.getResultsIds(n),resultsMap:ImageDetailReducers.getResultsMap(n),imageStates:ImageDetailReducers.getImageStates(n),detailScenario:ImageDetailReducers.getDetailScenario(n),ig:ImageDetailReducers.getCurrentImpressionId(n)}},s=function(n){return{onExternalImageLoadBegan:function(t){n(ImageDetailActions.imageLoadBegan(t))},onExternalImageLoadSuccess:function(t){n(ImageDetailActions.imageLoadSuccess(t))},onExternalImageLoadError:function(t){n(ImageDetailActions.imageLoadFailed(t))}}};t.ExternalImageLoader=ReactRedux.connect(o,s)(e);t.ExternalImageLoader.displayName=”ExternalImageLoader”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var Multimedia;(function(n){var t;(function(n){function t(n){return React.createElement(SharedComponent.AccessibleComponent,{id:n.id,className:”nav”,onClick:n.onClick,role:”button”},React.createElement(“span”,{className:”icon”,title:n.datatooltip}))}n.ImageDetailNavigation=t})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=ImageDetailActions.IImageDetailViewType,f=typeof n.ImageDetailUtils!=”undefined”?n.ImageDetailUtils:null,r=function(n){function r(t){var i=n.call(this,t)||this;return i.enableNavInL2=!1,i.enableNavInL2=ImageDetailReducers.isNavigationInL2(),i}return __extends(r,n),r.prototype.render=function(){var n=!this.props.isInsightsAtBottom&&(this.enableNavInL2||this.props.viewType==i.Default);return React.createElement(“div”,{id:this.props.containerId,onClick:this.props.onClick,className:this.props.className,ref:this.props.detailRef},this.props.locationBar,this.props.imageDetailBatchLogger,this.props.externalImageLoader,this.props.pageVisibilityTracker,this.props.scriptLoader,this.props.detailHeader,this.props.canvas,n&&React.createElement(t.ImageFilmStripContainer,{showFilmstrip:this.props.enableFilmStrip&&this.props.filmstripHeight>0}),!this.props.isInsightsAtBottom&&this.props.detailFooter)},r}(React.Component),u=function(n){var t=ImageDetailReducers.getFilmStripConfig(n),i=ImageDetailReducers.getLayoutConfig(n),r=i?i.fsheight:0,u=ImageDetailReducers.getInsightsPosition(n)==ImageDetailActions.InsightsPosition.Bottom;return{enableFilmStrip:t?t.enabled:!1,filmstripHeight:r,isInsightsAtBottom:u}};n.ImageDetail.ImageDetailPageComponents=ReactRedux.connect(u)(r)})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=ImageDetailActions.ScriptRequestState,r=ImageDetailActions.IImageDetailScriptRequestType,u=n.ImageDetailUtils,f=function(n){function t(t){var i=n.call(this,t)||this,r=ImageDetailReducers.getScriptUrl();return i.scriptUrl=u.stringFormat(r,t.ig),i}return __extends(t,n),t.prototype.componentWillReceiveProps=function(n){this.props.insightsScriptLoadingState!==i.Required&&n.insightsScriptLoadingState==i.Required&&this.props.fireScriptLoadingRequest(this.scriptUrl)},t.prototype.render=function(){return null},t}(React.Component),e=function(n,t,i){sj_appHTML(document.body,i);n(ImageDetailActions.loadScriptsSuccess(r.Insights))},o=function(n){return{fireScriptLoadingRequest:function(t){var i={url:t,onRequestSuccess:e};n(ImageDetailActions.fetchHtml(i))}}},s=function(n){var t=ImageDetailReducers.getscriptLoadingState(n);return{insightsScriptLoadingState:t?t.insights:i.None,ig:ImageDetailReducers.getCurrentImpressionId(n)}};t.ScriptLoader=ReactRedux.connect(s,o)(f);t.ScriptLoader.displayName=”ScriptLoader”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={})); //]]> https://www.bing.com/rs/3P/5p/cj,nj/885b1409/6940def3.js //=u.windowResizeThreshold&&(u.currentWindowWidth=window.innerWidth);u.props.changePageSize&&u.props.changePageSize();u.saveWindowSize()},u.saveWindowSize=function(){typeof mmSetCW==”undefined”||u.isOverlayMode||mmSetCW()},u.adjustInsightsPosition=function(){if(u.oneColumnLayoutThreshold&&u.props.changeInsightsPosition&&typeof _d!=”undefined”){var n=_d.body.clientWidth1?u.props.removeFromDetailStateHistory():u.closePage(n)},u.closePage=function(n){if(u.logExitEvent(n),u.isOverlayMode)u.enableOverrideBrowserback?MMMessenger.Post(window.parent,”mm.closeIFrame”,u.props.detailStateCount):u.callBrowserGoBack();else{var t=u.closeButtonConfig;t.UseBrowserBackBehavior?u.callBrowserGoBack():window.location.href=t.BackPageUrl}},u.onCloseClick=function(n){var t=n?n:”CloseButton”;u.enableNavInL2||u.props.viewType!=ImageDetailActions.IImageDetailViewType.VisualSearch?u.closePage(t):u.goBack(t)},u.handleInsideClick=function(){u.isInsideClick=!0},u.handleScroll=function(n){n.deltaY>0&&u.handleScrollOrDownKeyPress(“Scroll”)},u.handleScrollOrDownKeyPress=function(n){u.props.isPageActive&&u.enableInsights&&u.props.expandImage&&u.expand(n)},u.expand=function(n){u.props.changeInsightStatus(u.props.expandImage,u.props.ig,n)},u.handleKeyDown=function(n){!n.repeat&&u.isSpecialKey(n)&&(u.keysPressed[n.keyCode]=!0)},u.isSpecialKey=function(n){return n.keyCode==91||n.keyCode==92||n.keyCode==17||n.keyCode==18},u.isSpecialKeyHold=function(){return u.keysPressed[91]!=null||u.keysPressed[92]!=null||u.keysPressed[17]!=null||u.keysPressed[18]!=null},u.handleRightNavigationClick=function(){u.props.enableNavigation&&(f?u.props.onLeftNavigationClick(“LeftKey”):u.props.onRightNavigationClick(“RightKey”))},u.handleLeftNavigationClick=function(){u.props.enableNavigation&&(f?u.props.onRightNavigationClick(“RightKey”):u.props.onLeftNavigationClick(“LeftKey”))},u.handleKeyUp=function(n){if(u.isSpecialKey(n)){u.keysPressed[n.keyCode]=null;return}if(u.props.isPageActive&&!u.isSpecialKeyHold())switch(n.keyCode){case 27:u.goBack(“Escape”);break;case 37:u.handleLeftNavigationClick();break;case 39:u.handleRightNavigationClick();break;case 40:u.handleScrollOrDownKeyPress(“DownKey”)}},u.handleFocus=function(){for(var n in u.keysPressed)delete u.keysPressed[n]},u.createCanvas=function(){var i,n;return u.enableMobileView?(i=u.props.layout&&u.props.layout.metaBarHeight>0,React.createElement(t.MobileCanvasCarousel,{close:u.onCloseClick,closeButtonConfig:u.closeButtonConfig,enableInfoPanel:i,onLeftNavigationClick:u.props.onLeftNavigationClick,onRightNavigationClick:u.props.onRightNavigationClick,isFullScaleView:u.props.isFullScaleView,viewType:u.props.viewType,detailScenario:u.props.detailScenario})):(n=u.isInsightsInRightRail(u.insightsPosition),React.createElement(t.CanvasCarousel,{isMainImageExpanded:!u.enableInsights||u.props.expandImage,isOverlayMode:u.isOverlayMode,isInsightsInRightRail:n,enableInsights:u.enableInsights,enableInsightsButton:u.enableInsights&&!u.enableInsightsExpandButtonInHeader&&n&&u.props.expandImage}))},u.getClassName=function(){var n=u.props.expandImage?”expanded”:””;return n+=u.isOverlayMode?” ovrly”:””,n+=u.enableMobileView?” mob”:””,n+=u.isInsightsInRightRail(u.insightsPosition)?” “+s:” “+o,n+=u.props.viewType?” “+t.ImageDetailViewTypeClassMap[u.props.viewType]:””,n+(f?” rtl”:” ltr”)},u.isInsightsInRightRail=function(n){return n===e.RightRail},u.insightsPosition=n.insightsPosition,h=ImageDetailReducers.getPageConfig(),u.closeButtonConfig=h.closeButtonConfig,u.enableInsights=h.enableInsights,u.enableOverlay=h.enableOverlay,u.isOverlayMode=h.isOverlayMode,u.enableMobileView=h.enableMobileView,u.enableScriptLoadingWithAjax=h.enableAjaxScript,u.enableDetailV2=ImageDetailReducers.isDetailV2Enabled(),u.enableInsightsV2=ImageDetailReducers.isDetailV2Enabled(),u.enableInsightsExpandButtonInHeader=h.enableInsExpInHead,u.enableInsightsCloseButtonInHeader=h.enableInsCloInHead,u.enablePageVisibilityTracker=h.enablePageVisibilityTracker,u.enableOverrideBrowserback=h.enableOverrideBrowserback,u.oneColumnLayoutThreshold=h?h.oneColumnLayoutThreshold:0,u.enableNavInL2=ImageDetailReducers.isNavigationInL2(),u}return __extends(u,i),u.prototype.componentDidMount=function(){typeof document!=”undefined”&&(document.addEventListener(u.keyDownEventName,this.handleKeyDown),document.addEventListener(u.keyUpEventName,this.handleKeyUp),h||document.addEventListener(u.wheelEventName,this.handleScroll),document.addEventListener(u.scrollEventName,this.handleScroll),document.addEventListener(u.rightClickEventName,this.handleRightClick));window&&(this.currentWindowWidth=window.innerWidth,window.addEventListener(u.resizeEventName,this.handleResize),window.addEventListener(u.focusEventName,this.handleFocus),sj_be(window,”message”,this.onMessage,!0),this.iFrameElement=window.frameElement,this.isOverlayMode&&this.props.bgcolor&&this.setOverlayBackgroundColor(this.props.bgcolor));this.isInsideClick=!1;this.insightsPosition=this.props.insightsPosition;this.adjustInsightsPosition();this.saveWindowSize()},u.prototype.componentWillUnmount=function(){typeof document!=”undefined”&&(document.removeEventListener(u.keyDownEventName,this.handleKeyDown),document.removeEventListener(u.keyUpEventName,this.handleKeyUp),h||document.removeEventListener(u.wheelEventName,this.handleScroll),document.removeEventListener(u.scrollEventName,this.handleScroll),document.removeEventListener(u.rightClickEventName,this.handleRightClick));window&&(window.removeEventListener(u.resizeEventName,this.handleResize),window.removeEventListener(u.focusEventName,this.handleFocus),sj_ue(window,”message”,this.onMessage,!0))},u.prototype.componentDidCatch=function(n,t){l(this.props.ig,n,t)},u.prototype.componentWillReceiveProps=function(n){this.isOverlayMode&&n.bgcolor&&n.bgcolor!=this.props.bgcolor&&this.setOverlayBackgroundColor(n.bgcolor)},u.prototype.setOverlayBackgroundColor=function(n){this.iFrameElement?this.iFrameElement.style.backgroundColor=n:sj_b&&(sj_b.style.backgroundColor=n)},u.prototype.callBrowserGoBack=function(){window.history&&window.history.length>=2&&window.history.back()},u.prototype.isChildClicked=function(n){return c(n,”DIV”,null,this.detailPageContainerId)!==null},u.prototype.logExitEvent=function(n){r(“CI.Unload”,”DetailPage”,this.props.ig,{Component:n})},u.prototype.render=function(){var r=this,u=this.getClassName(),f=this.isInsightsInRightRail(this.props.insightsPosition),i=this.enableInsights&&this.props.expandImageOverwriteEnabled&&f,e={containerId:this.detailPageContainerId,onClick:this.handleInsideClick,className:u,externalImageLoader:React.createElement(t.ExternalImageLoader,null),enableMobileView:this.enableMobileView,isOverlayMode:this.isOverlayMode,detailHeader:!this.enableMobileView&&React.createElement(t.DetailHeader,{close:this.onCloseClick,enableExpandInsights:i&&this.enableInsightsExpandButtonInHeader,enableCloseInsights:i&&this.enableInsightsCloseButtonInHeader,enableClose:this.closeButtonConfig.Enabled,renderBackButton:!this.enableOverrideBrowserback,detailScenario:this.props.detailScenario,viewType:this.props.viewType}),canvas:this.createCanvas(),detailFooter:!this.enableMobileView&&this.isOverlayMode&&React.createElement(t.DetailFooter,null),locationBar:React.createElement(t.LocationBar,{goBack:this.goBack}),imageDetailBatchLogger:React.createElement(t.ImageDetailBatchLogger,null),pageVisibilityTracker:this.enablePageVisibilityTracker&&React.createElement(t.PageVisibilityTracker,null),scriptLoader:this.enableScriptLoadingWithAjax&&React.createElement(t.ScriptLoader,null),onLeftNavigationClick:this.props.onLeftNavigationClick,onRightNavigationClick:this.props.onRightNavigationClick};return React.createElement(n.ImageDetail.ImageDetailPageComponents,__assign({},e,{viewType:this.props.viewType,detailRef:function(n){r.detailContainer=n}}))},u.keyUpEventName=”keyup”,u.keyDownEventName=”keydown”,u.scrollEventName=”scroll”,u.wheelEventName=”wheel”,u.rightClickEventName=”contextmenu”,u.resizeEventName=”resize”,u.postMessegeEventName=”message”,u.focusEventName=”focus”,u}(React.Component),v=function(t){var i=ImageDetailReducers.getLayoutConfig(t),f=!ImageDetailReducers.getIsInsightsExpanded(t),e=ImageDetailReducers.getMainImageExpandModeCookieOvereWrite(t),o=ImageDetailReducers.getFilmStripConfig(t),r=ImageDetailReducers.getViewType(t),u=ImageDetailReducers.getDetailScenario(t),s=n.ImageDetailUtils.isNavigationEnabled(o,r,u);return{expandImage:f,layout:i,bgcolor:i?i.bgcolor:””,expandImageOverwriteEnabled:e,ig:ImageDetailReducers.getCurrentImpressionId(t),enableNavigation:s,detailScenario:u,detailStateCount:ImageDetailReducers.getImageDetailStatesCount(t),insightsPosition:ImageDetailReducers.getInsightsPosition(t),imageInfo:ImageDetailReducers.getCurrentResult(t),isFullScaleView:ImageDetailReducers.getIsFullScaleView(t),viewType:r,isPageActive:ImageDetailReducers.getIsPageActive(t)}},y=function(n){return{onLeftNavigationClick:function(t){n(ImageDetailActions.navigateLeft(t))},onRightNavigationClick:function(t){n(ImageDetailActions.navigateRight(t))},changeInsightStatus:function(t,i,r){n(ImageDetailActions.changeInsightStatus(t,i,r))},removeFromDetailStateHistory:function(){n(ImageDetailActions.removeFromDetailStateHistory())},changeInsightsPosition:function(t){n(ImageDetailActions.changeInsightsPosition(t))},changePageSize:function(){n(ImageDetailActions.changePageSize())}}};t.ImageDetailPage=ReactRedux.connect(v,y)(a)})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));ReactDOM.render(React.createElement(ReactRedux.Provider,{store:ImageDetailStore.store},React.createElement(Multimedia.ImageDetail.ImageDetailPage,null)),document.getElementById(“b_content”));_w.rms.js({‘A:rms:answers:Shared:BingCore.RMSBundle’:’\/rb\/5k\/cj,nj\/e26a2640\/55571cec.js?bu=Avkc_hw’},{‘A:0’:0},{‘A:rms:answers:MultimediaComponents:ReportResult’:’\/rs\/3P\/eI\/cj,nj\/b7d4206d\/b8379406.js’},{‘A:rms:answers:MultimediaComponents:FlagFeedbackContent’:’\/rs\/3P\/eW\/cj,nj\/992a3e40\/69ec0415.js’},{‘A:1’:1});; //]]>

//0&&(o=c(function(){s();u(r,!1)},e))};Feedback.Bootstrap.InitializeFeedback({page:true},”sb_feedback”,false,false,true,true,false);; //]]> //

// <STYLE type=”text/css”>.richImage{display:inline-block}.richImage ul{list-style-type:none;padding:0;margin:0}.richImage .imgContainer{display:inline-block;position:relative}.richImage .hoverContainer{display:block;position:absolute;bottom:0;width:100%;box-sizing:border-box}.richImage .hoverContainer{display:none}.richImage .imgContainer:hover .hoverContainer,.richImage .imgContainer.focus .hoverContainer{display:block}.richImage img{vertical-align:top}#insights a.expItem{cursor:pointer;box-sizing:border-box;text-decoration:none;display:block;padding-top:12px;color:#444}#insights #piCombiner li a.expItem{padding-top:0;padding-bottom:12px}#insights #piCombiner li:first-child a.expItem{padding-top:12px}#insights #piCombiner li:last-child a.expItem{padding-bottom:0}#insights li:first-child a.expItem{padding-top:0}#insights .insights_module>#piCombiner{border-top:none;padding-top:0}#insights #piCombiner .expander_content>ul>li:first-child:not(.b_hide){border-top:1px solid #ddd}#insights #piCombiner .expander_btn{padding:0;margin-top:0}li:first-child .expItem{border-top:none}.expItem .pritext{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.expItem .iscscd_data>*{margin-top:4px;display:block}.expItem .pritext:before{width:16px;height:16px;vertical-align:middle;display:inline-block;margin-right:8px}.expItem .pritext span{vertical-align:middle;line-height:28px}.expItem .pritext,.expItem .domain,.expItem .domain>span{color:#eee}.expItem.rep .pritext span{font-weight:bold}.pagesIncl .status{line-height:22px;font-size:13px;font-weight:normal}.pagesIncl .status .date:before{content:”·”;padding:0 4px}.pagesIncl li .price{color:#fff;font-weight:bold;margin-right:8px}.pagesIncl li .seller_icon{display:none}.pagesIncl .iscscd .metainfo,#pagesIncl .iscscd .metainfo,#pagesIncl .iscscd .domain{display:inline-block}.pagesIncl .iscscd_data>div:before,#pagesIncl .iscscd_data>div:before{content:”|”;margin:0 3px}.pagesIncl .iscscd_data>div.domain:before,.pagesIncl .iscscd_data>div:first-child:before,#pagesIncl .iscscd_data>div:first-child:before{content:””;margin:0}#piCombiner .expItem.pi .pritext:before{content:url(/rs/3O/1nQ/ic/98fb46d5/0db6070f.svg)}#piCombiner .expItem.rep .pritext:before{content:url(/rs/3O/1nT/ic/ae315d10/1b6f34ee.svg)}#insights #piCombiner.collapsed .expander_btn,#insights #piCombiner .collapse_btn{padding:0;margin-top:0}.mob #insights #piCombiner.collapsed .expander_btn,.mob #insights #piCombiner .collapse_btn{color:#666;line-height:18px;font-size:14px;text-transform:uppercase}#insights #piCombiner .collapse_btn{padding-bottom:12px}#insights #piCombiner.collapsed .expander_btn:after,#insights #piCombiner .collapse_btn:after{line-height:18px;float:right}.mob #insights #piCombiner .expander_btn{line-height:32px}.mob #insights #piCombiner .expander_btn:after{line-height:32px;padding-bottom:3px}.mob #insights #piCombiner.collapsed .expander_btn{line-height:18px}#insights #piCombiner .expander_content>ul>li:first-child:not(.b_hide){border-top:none}#piCombiner .ll_lcn:before{width:40px;height:40px;left:calc(50% – 20px);top:calc(50% – 20px);display:block;position:relative}#piCombiner .ll_lcn{height:150px}#insights #piCombiner.collapsed .expander_btn:after,#insights #piCombiner .collapse_btn:after{content:url(/rs/3O/1ow/ic/94b7caff/2aa680b8.svg)}#piCombiner .ll_lcn:before{content:url(/rs/3O/1uN/ic/e24d948d/9f3b41de.gif)}#insights .insights_module>#piCombiner{padding:12px 0 16px 0}#insights .insights_module>#piCombiner.collapsed{padding-top:4px}#insights .insights_module>#piCombiner.expanded{border-top:1px solid #ddd}#insights #piCombiner.collapsed .expander_btn,#insights #piCombiner .collapse_btn{color:#001ba0;font-size:13px;line-height:16px}#insights #piCombiner .expander_btn:after{padding-bottom:2px}#insights #piCombiner.collapsed .expander_btn:after,#insights #piCombiner .collapse_btn:after{float:none}#insights #piCombiner .collapse_btn:after{transform:rotate(180deg);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg)}#insights #piCombiner.collapsed .expander_btn:after,#insights #piCombiner .collapse_btn:after{content:url(/rs/3O/1ot/ic/b3ab0879/04df93d0.svg)}.vs_preview,.insights.rr .ins_exp>div.vs_preview{white-space:normal;margin:12px 12px 8px 12px}.insights.rr .ins_exp>.vs_preview.vsp{margin-right:4px}.insights.rr .ins_exp>.vs_preview.vsi{margin-right:8px}.vs_preview .vs_grid{display:inline-block;padding:0 10px 6px 0;box-sizing:border-box;vertical-align:top}.vsi .vs_grid_holder:before,.vsp .vs_grid_holder:before{content:””;margin-top:100%;display:block}.vsp .vs_grid_holder{display:inline-block;width:100%}.vs_preview.vsp .vs_grid{padding:0 8px 8px 0}.vs_card{background-color:#fff;color:#444;overflow:hidden;border-radius:4px}.vs_grid .imgCont{width:100%;display:block}.vs_preview.vsi .vs_grid .imgCont{padding:2px}.vs_preview.vsi .vs_grid .imgCont:hover{padding:1px;border:1px solid #919191}.vs_grid .tit{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.vs_grid .captions{height:56px;padding:8px;position:relative}.vs_grid .captions .price{font-weight:bold}.vs_grid .captions .attr{display:block;bottom:8px;position:absolute}#vs_products .expander_container>ul>li:not(.b_hide){border:1px solid #eee}#vs_products .expander_container>ul>li:not(.b_hide):hover{border:1px solid #919191}#insights .vs_container .expander_btn{margin-top:12px;padding-top:0}.richImage.relProd{width:100%;height:100%;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 3px 0 rgba(0,0,0,.1);color:#444;line-height:17px;background-color:transparent}.richImage.relProd:hover{box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px 1px rgba(0,0,0,.14)}.relProd .captionContainer li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.relProd .captionContainer{width:100%;padding:8px;box-sizing:border-box}.relProd .captionContainer .attr{color:#767676}.richImage.relProd .price>span{font-weight:bold}.relProd .captionContainer li:hover .tit{white-space:normal}.relProd .captionContainer li{font-size:13px}.vs_container .richImage .imgContainer{-ms-transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vs_container{position:relative}.vs_container .expander_content>ul>li{position:absolute}#vs_products .richImage .mainContainer{max-width:100%}#vs_products .expander_content>ul>li{padding:1px;box-sizing:border-box}#vs_products .richImage .imgContainer,#vs_products .richImage .imgContainer>img{max-width:100%;max-height:100%}.vs_container .richImage .imgContainer>img{background-color:#fff;display:block}.vs_container .richImage .imgContainer{left:50%;top:50%;position:relative;z-index:0;cursor:pointer}.vs_container .richImage .captionContainer{cursor:default}.vs_container .richImage .imgContainer:hover{z-index:1}.vs_container .expander_container{height:100%}.vs_container .expander_container .expander_content{overflow:hidden;padding:1px 0;height:100%}#detailPage:not(.l2) .vs_container .expander_container .expander_content{padding-left:100px;margin-left:-100px}.wf_container .fadeout{height:100px;position:relative;width:100%;margin-top:-95px;background:linear-gradient(transparent,#fff);cursor:pointer;width:calc}*[data-tooltip]{position:relative}[vptest]::after,*[data-tooltip]:not(.disableTooltip):hover::after{position:absolute;left:50%;background-color:#222;content:attr(data-tooltip);font:13px Arial;white-space:nowrap;color:#fff;padding:10px 15px;top:-40px;-ms-transform:translateX(-50%);-webkit-transform:translateX(-50%);transform:translateX(-50%);z-index:4}[vptest]::before,*[data-tooltip]:not(.disableTooltip):hover::before{position:absolute;left:50%;background-color:#222;width:19px;height:19px;content:””;-ms-transform:translateX(-50%) rotate(45deg);-webkit-transform:translateX(-50%) rotate(45deg);transform:translateX(-50%) rotate(45deg);bottom:19px;z-index:4}.disableTooltip *[data-tooltip]:hover::before,.disableTooltip *[data-tooltip]:hover::after{display:none}.richImage.relImg .hoverContainer{padding:30px 12px 0 12px;background:linear-gradient(transparent,rgba(17,17,17,.6));color:#fff;font-size:11px;font-family:ArialMT,Arial,Helvetica;text-shadow:0 1px 1px rgba(0,0,0,.24)}.richImage.relImg ul li{padding-bottom:6px}.richImage.relImg .meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.richImage.relImg ul li:first-child{padding-bottom:0}.richImage.relImg .hoverContainer .background{position:absolute;width:100%;height:100%;bottom:0;left:0}#insights .expander_container .vpth .hoverContainer{display:block}#insights .vpth .expander_content>ul>li:nth-child(2){z-index:100}.richImage.relImg,.richImage.relImg .mainContainer{width:100%;height:100%}.actions>div{display:inline-block;padding-right:10px}.actions span{display:inline-block}.actions .icon:before{height:20px;width:20px;display:inline-block;vertical-align:middle}.richImage .actions .hiddenContainer{position:absolute;background-color:#fff;border:1px solid #d6d6d6;border-radius:2px;padding:15px 15px 0;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,.25);color:#001ba0;text-shadow:none;font-size:13px}.richImage .actions .hiddenContainer.b_hide{display:none}.richImage.relImg .actions .hiddenContainer>div{padding-bottom:15px}.actions .save .icon:before{content:url(/rs/3O/1vM/ic/ededb4ea/6fd60cde.svg)}.actions .unsave .icon:before{content:url(/rs/3O/1xN/ic/f2bcf308/7eba3bd0.svg)}.actions .sbi .icon:before{content:url(/rs/3O/1qz/ic/72b3c505/446ae310.svg)}.actions .more_actions .icon:before{content:url(/rs/3O/1Em/ic/eef68417/4d31d103.svg)}.actions .flag_adult .icon:before{content:url(/rs/3O/1qw/ic/dfe8c5be/8e47b7e2.svg)}#detailPage .insights .rsi{display:block;margin-bottom:8px}#detailPage .insights .rsa{text-decoration:none;margin:0;display:block}#detailPage .insights .rstcimg .rsi{display:inline-block;width:calc(50% – 5px);max-width:250px;vertical-align:top;margin-bottom:8px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 3px 0 rgba(0,0,0,.1);overflow:hidden;text-overflow:ellipsis;background-color:transparent;border-radius:4px}#detailPage .insights .insttab .rstcimg .rsi{text-align:left;width:calc(25% – 6px);max-width:300px}#detailPage .insights .insttab .rstcimg .rsi:nth-child(4n){margin-right:0}#detailPage.oneCol .insights .insml .rstcimg .rsi{text-align:left;width:calc(25% – 6px);max-width:250px}#detailPage.oneCol .insights .insml .rstcimg .rsi{margin-right:8px}#detailPage.oneCol .insights .insml .rstcimg .rsi:nth-child(4n){margin-right:0}#detailPage .insights .rstcimg .rsi:hover{box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px 1px rgba(0,0,0,.14)}.insights .rsic{display:block;background-color:#fff}#detailPage .insights .rsiac{display:inline-block;height:34px;margin:8px 8px 12px 8px}#detailPage .insights .rstcimg .rsimg{width:100%}#detailPage .insights .rstcimg .rsa{color:#333;line-height:17px;height:34px;overflow:hidden;text-overflow:ellipsis}#detailPage .insights #rsc_BottomOfInsights{padding:12px;white-space:normal}#detailPage.l2 .insights #rsc_BottomOfInsights{padding:0}.rsi .bd{display:none}#detailPage .insights .rstcimg .rsi:nth-child(odd){margin-right:8px}#detailPage .insights .insttab .rstcimg .rsi{margin-right:8px}.vs_container .richImage{border-radius:4px;overflow:hidden;background-color:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 3px 0 rgba(0,0,0,.1)}.vs_container .expander_content>ul>li>div:hover{z-index:6;height:auto !important}.vs_container .expander_content>ul>li>div:hover .captionContainer .tit{white-space:normal}.vs_container .richImage .captionContainer{color:#444;width:100%;padding:12px;box-sizing:border-box}.vs_container .richImage .captionContainer .domain{color:#666}.vs_container .richImage .captionContainer .domain,.vs_container .richImage .captionContainer .attr,.vs_container .richImage .captionContainer .tit{cursor:pointer}.vs_container .richImage ul li,.vs_container .richImage.relImg ul li{padding-bottom:0;overflow:hidden;text-overflow:ellipsis;font-size:13px}.vs_container .richImage .action.more_actions{position:absolute;right:8px;bottom:8px;display:inline-block}.vs_container .richImage .action .icon:before{height:16px;width:16px;display:inline-block;vertical-align:middle}.vs_container .richImage .action.more_actions .hiddenContainer{position:absolute;background-color:#fff;border:1px solid #d6d6d6;border-radius:2px;padding:15px 15px 0;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,.25);color:#001ba0;text-shadow:none;font-size:13px;right:-8px;bottom:24px;z-index:6}.vs_container .richImage .action.more_actions .hiddenContainer .action{display:block;height:40px}.vs_container .richImage .action.more_actions .hiddenContainer .action .text{padding-left:12px;color:#666}.vs_container .richImage .menuBtn:hover{cursor:pointer}.vs_container .richImage .menuBtn .hiddenContainer:after{margin-left:24px}.vs_container .richImage .action.more_actions>span>.icon:before{content:url(/rs/3O/1nK/ic/425271f2/5f17be37.svg)}.vs_container .richImage .action.save .icon:before{content:url(/rs/3O/1×5/ic/e122eb22/734656eb.svg)}.vs_container .richImage .action.unsave .icon:before{content:url(/rs/3O/1qg/ic/88fd7b57/25f6d9d0.svg)}.vs_container .richImage .action.sbi .icon:before{content:url(/rs/3O/1w2/ic/efcee550/d1e89933.svg)}</STYLE> // https://www.bing.com/rb/5g/cj,nj/41110285/60ec7a47.js?bu=BgwhOjE-QQ //=0&&!t&&(r=r.substr(u+3),u=-1),u=u>=0?u+3:0,f=r.indexOf(“:”,u),f>=0&&(r=r.substr(0,f)),f=r.indexOf(“/”,u),f>=0&&(r=r.substr(0,f)),e=i?r.indexOf(“www.”):-1,e>=0&&(r=r.substr(u+4)),r}function addCommonPersistedParams(n){var i=parseQueryParams(),t=queryParamsToString(i,”atlahostname”,”cdghostname”,”thhostname”,”testhooks”,”adlt”,”akamaithumb”,”safesearch”,”perf”,”mockimages”,”mobile”,”anid”,”isuserauth”,”uncrunched”,”currentdate”,”iss”),r=n.indexOf(“?”)===-1?”?”:”&”;return t=t.length>0?r+t:””,n+t}var currentQuery=null; //]]> //1&&i?i:t;return a(r,n)}}function ri(n){return n.replace(/\\u[\dA-F]{4}/gi,function(n){return String.fromCharCode(parseInt(n.replace(/\\u/g,””),16))})}function ui(n,t,i){var e,o,u,f,r,s;if(n==null)return null;if(e=””,n.ratingCount&&t&&i&&(o=n.ratingCount>1?i:t,e=a(o,n.ratingCount)),u=[],n.ratingValue&&(f=n.maxRating?n.ratingValue/n.maxRating*5:n.ratingValue0?Math.floor(t/1024):0}function hi(n,t,i){var r=ci(n.currentTarget||n.target),u=n.clientX-r.x-t,f=n.clientY-r.y+i;return[u,f]}function ci(n){var t=0,i=0;return n=n?n.offsetParent:null,n&&(t=n.offsetLeft-n.scrollLeft+n.clientLeft,i=n.offsetTop-n.scrollTop+n.clientTop),{x:t,y:i}}function li(){return i(g,null)}function ai(n){u(g,n)}function vi(){var n=i(l,null);return n&&n!=”0″?n:null}function yi(){s(l,”0″)}function pi(n){s(l,n)}function wi(n){return i(nt,n)}function bi(n){u(nt,n)}function ki(n){return i(tt,n)}function di(n){u(tt,n)}function gi(n){return i(rt,n)}function nr(n){u(rt,n)}function tr(n){return i(it,n)}function ir(n){u(it,n)}function v(n){return n==ImageDetailActions.IImageDetailViewType.ImageFullView?pt:yt}function y(n){var t=v(n);return i(t,null)}function rr(n,t){var i=v(t);u(i,n)}function ur(n){var t=y(n),i=parseInt(t)||0,r=v(n);u(r,i+1)}function fr(n,t){if(r){if(r.hasVPTestFlag(“noswipenoti”))return!1;if(r.isVPTest())return!0}var i=y(t),u=parseInt(i)||0;return n?u=0){if(o=t?”1″:”0″,r=i(f,”0″)||””,r&&r.length>u)r=r.substr(0,u)+o+r.substr(u+1);else{for(c=r&&r.length||0,h=c;h=0&&(t=i(f,”0″),t)?t.charAt(r)==”1″:!1}function ht(){s(f,”0″)}function lr(n){n&&n.length>0&&(ht(),n.map(function(n){return st(n,!0)}))}function i(n,t){return typeof sj_cook!=”undefined”?sj_cook.get(d,n):t}function u(n,t){s(n,t.toString())}function s(n,t){typeof sj_cook!=”undefined”&&sj_cook.set(d,n,t,!0,vt)}function ar(n,t,i,r){var u=document.getElementById(“anim_style_objd”),f;u&&u.parentNode.removeChild(u);u=document.createElement(“style”);u.setAttribute(“id”,”anim_style_objd”);u.setAttribute(“type”,”text/css”);f=c(“@-webkit-keyframes expandCropBox”,n,t,i,r);u.appendChild(f);f=c(“@-moz-keyframes expandCropBox”,n,t,i,r);u.appendChild(f);f=c(“@-ms-keyframes expandCropBox “,n,t,i,r);u.appendChild(f);f=c(“@-o-keyframes expandCropBox”,n,t,i,r);u.appendChild(f);f=c(“@keyframes expandCropBox”,n,t,i,r);u.appendChild(f);document.getElementsByTagName(“head”)[0].appendChild(u)}function vr(n){return tu(n)?encodeURIComponent(n):””}function yr(n){return typeof b!=”undefined”&&typeof window!=”undefined”?b.qsv(n):null}function pr(n){if(n){var t=n.split(“,”);if(t&&t.length>=2)return{appNS:t[0],kValue:t[1]}}return null}function wr(n,t,i,r){var u=SwipeDirection.Undefined,f;return(Math.abs(n)>i||Math.abs(t)>i)&&(f=n==0?r+1:Math.abs(t/n),u=f>r?SwipeDirection.Vertical:SwipeDirection.Horizontal),u}function br(n,i){n&&(t.isRTL?n.style.right=i:n.style.left=i)}function kr(n,i){n&&(t.isRTL?n.style.marginRight=i:n.style.marginLeft=i)}function dr(n,t,i){n&&(n.style.transform=”translateX(“+t+”%) translateX(“+i+”px)”)}function gr(n,t){if(n){var i=”translateX(“+t+”)”;nu(n,i)}}function nu(n,t){h(n,”-ms-transform”,t);h(n,”-webkit-transform”,t);h(n,”-moz-transform”,t);h(n,”-o-transform”,t);h(n,”transform”,t)}function h(n,t,i){var r=n.style;r[t]!==i&&(r[t]=i)}function tu(n){return n!==null&&typeof n!=”undefined”}function c(n,t,i,r,u){return document.createTextNode(n+” {from { width: 30%; height: 30%; left: 35%; top: 35%; }to { width:”+t+”px; height:”+i+”px; left:”+r+”px; top:”+u+”px; }}”)}function iu(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}function ru(){for(var n=[],t=0;t20||Math.abs(t.X)>i/5}function eu(n){var t,i,r,u;if(n&&n.length>0){for(t=[],i=0;i0)for(i=0;i”,””:””,””:”
“},bt={pagesincluding:”PagesIncluding”,similarimage:”SimilarImages”,similarproduct:”SimilarProducts”,shoppingsources:”ShoppingSources”,recipes:”Recipes”,relatedSearches:”RelatedSearches”},kt={PagesIncluding:”pagesincluding”,SimilarImages:”similarimage”,SimilarProducts:”similarproduct”,ShoppingSources:”shoppingsources”,Recipes:”recipes”,RelatedSearches:”relatedSearches”},o=typeof navigator!=”undefined”?navigator.userAgent:””,dt=o.match(/iPhone/i);t.isIPad=o.match(/iPad/i);ut=o.match(/iPod/i);ft=dt||t.isIPad||ut;t.isIphoneOrFirerFox=o.match(/iPhone|Firefox/i);t.isFireFox=o.match(/Firefox/i);t.isRTL=typeof _G!=”undefined”&&_G.RTL;var et=”swp_skp”,gt=/^javascript:/i,ot=null;t.setDefaultThumbnailDpr=ni;t.stringFormat=a;t.smoothScroll=ti;t.singularPluralFormat=ii;t.unicodeToChar=ri;t.createThumbnailData=function(n,t,i,r,u){return{src:n,width:t,height:i,croppingType:r,dpr:u||ot}};t.createThumbnailUrl=function(n,i,r,u){var f=t.createThumbnailData(n,i,r,u);return t.createThumbnailUrlWithThData(f)};t.createThumbnailUrlWithoutCropping=function(n,i,r){var u=t.createThumbnailData(n,i,r,k.None);return t.createThumbnailUrlWithThData(u)};t.createThumbnailUrlWithThData=function(n){if(r&&r.isMockImageEnabled())return r.getMockImageUrl();if(n&&n.src){var t=[n.src];return n.width>0&&t.push(“w=”+n.width),n.height>0&&t.push(“h=”+n.height),n.croppingType&&t.push(“c=”+n.croppingType),n.dpr!=null&&n.dpr!=””&&t.push(“dpr=”+n.dpr),t.join(“&”)}return null};t.getRating=ui;t.getParentContainer=fi;t.getHashCode=ei;t.b64toBlob=oi;t.getSizeInKb=si;t.getMouseClickPosition=hi;t.getMainImageExpandCookie=li;t.setMainImageExpandCookie=ai;t.getSiteFilterCookie=vi;t.clearSiteFilterCookie=yi;t.setSiteFilterCookie=pi;t.getExpandNotificationCookie=wi;t.setExpandNotificationCookie=bi;t.getVSNotificationCookie=ki;t.setVSNotificationCookie=di;t.getNavigationNotificationCookie=gi;t.setNavigationNotificationCookie=nr;t.getHSNotificationCookie=tr;t.setHSNotificationCookie=ir;t.getSwipeNotificationCookie=y;t.setSwipeNotificationCookie=rr;t.incSwipeNotificationCookie=ur;t.shouldShowSwipeNotification=fr;t.getInsightsModuleExpansionCookie=er;t.setInsightsModuleExpansionCookie=st;t.getExpandedInsightsModules=or;t.getSkillsByInsightsModules=sr;t.getInsightsModulesBySkills=hr;t.mapNames=p;t.isInsightsModuleExpanded=cr;t.clearInsightsModulesStateCookie=ht;t.updateExpandedInsightsModulesCookie=lr;t.setCropBoxAnimationProperty=ar;t.getEncodedValue=vr;t.fetchParamValue=yr;t.getInstInfo=pr;t.getSwipeDirection=wr;t.setRtlLeft=br;t.setRtlMarginLeft=kr;t.setTransformXX=dr;t.setTransformX=gr;t.generateGuid=ru;t.matchUrlToWhiteList=uu;t.isSwipeValid=fu;t.entityCompare=function(n,t){var i=n.matchConfidence||n.entity?n.entity.matchConfidence:null,r=t.matchConfidence||t.entity?t.entity.matchConfidence:null;if(i&&r){if(i>r)return-1;if(iEvent.”+n+””+t+””,”]]]\]>”)+”]]\]>”+r+””}})(t=n.InstrumentationUtils||(n.InstrumentationUtils={}))})(Multimedia||(Multimedia={}));var ImageDetailActions;(function(n){var t=Multimedia.ImageDetailUtils,i=Multimedia.InstrumentationUtils.logActionClickEvent,r,u,f,e,o,s,h;(function(n){n[n.Ready=0]=”Ready”;n[n.Pending=1]=”Pending”;n[n.Success=2]=”Success”;n[n.Failed=3]=”Failed”})(r=n.RequestState||(n.RequestState={})),function(n){n[n.None=0]=”None”;n[n.Required=1]=”Required”;n[n.Loaded=2]=”Loaded”;n[n.Failed=3]=”Failed”}(u=n.ScriptRequestState||(n.ScriptRequestState={})),function(n){n[n.Next=0]=”Next”;n[n.Previous=1]=”Previous”}(f=n.FilmstripRequestDirection||(n.FilmstripRequestDirection={})),function(n){n[n.SizeNotDefined=0]=”SizeNotDefined”;n[n.SizeExceed=1]=”SizeExceed”;n[n.SizeExceedAllowed=2]=”SizeExceedAllowed”;n[n.SizeDeceed=3]=”SizeDeceed”}(e=n.SizeMismatchErrorCode||(n.SizeMismatchErrorCode={})),function(n){n[n.Default=0]=”Default”;n[n.ImageFullView=1]=”ImageFullView”;n[n.DetailL2View=2]=”DetailL2View”;n[n.VisualSearch=3]=”VisualSearch”}(o=n.IImageDetailViewType||(n.IImageDetailViewType={})),function(n){n[n.Preview=0]=”Preview”;n[n.SemiExpanded=1]=”SemiExpanded”;n[n.Expanded=2]=”Expanded”}(s=n.IImageDetailModuleExpansionMode||(n.IImageDetailModuleExpansionMode={})),function(n){n[n.Insights=0]=”Insights”}(h=n.IImageDetailScriptRequestType||(n.IImageDetailScriptRequestType={}));n.RIGHT_NAVIGATION=”RIGHT_NAVIGATION”;n.LEFT_NAVIGATION=”LEFT_NAVIGATION”;n.NAVIGATE_TO=”NAVIGATE_TO”;n.INSIGHTS_FETCH_REQUESTED=”INSIGHTS_FETCH_REQUESTED”;n.INSIGHTS_FETCH_COMPLETED=”INSIGHTS_FETCH_COMPLETED”;n.INSIGHTS_FETCH_FAILED=”INSIGHTS_FETCH_FAILED”;n.INSIGHTS_MODULE_FETCH_COMPLETED=”INSIGHTS_MODULE_FETCH_COMPLETED”;n.INSIGHTS_MODULE_FETCH_REQUESTED=”INSIGHTS_MODULE_FETCH_REQUESTED”;n.INSIGHTS_MODULE_FETCH_FAILED=”INSIGHTS_MODULE_FETCH_FAILED”;n.INSIGHTS_ID_ADD=”INSIGHTS_ID_ADD”;n.INSIGHTS_ID_DELETE=”INSIGHTS_ID_DELETE”;n.PI_FETCH_REQUESTED=”PI_FETCH_REQUESTED”;n.PI_FETCH_COMPLETED=”PI_FETCH_COMPLETED”;n.PI_FETCH_FAILED=”PI_FETCH_FAILED”;n.MAINIMAGE_MODULES_FETCH_REQUESTED=”MAINIMAGE_MODULES_FETCH_REQUESTED”;n.MAINIMAGE_MODULES_FETCH_COMPLETED=”MAINIMAGE_MODULES_FETCH_COMPLETED”;n.MAINIMAGE_MODULES_FETCH_FAILED=”MAINIMAGE_MODULES_FETCH_FAILED”;n.FILMSTRIP_FETCH_REQUESTED=”FILMSTRIP_FETCH_REQUESTED”;n.FILMSTRIP_FETCH_COMPLETED=”FILMSTRIP_FETCH_COMPLETED”;n.FILMSTRIP_FETCH_FAILED=”FILMSTRIP_FETCH_FAILED”;n.IMAGELOAD_REQUESTED=”IMAGELOAD_REQUESTED”;n.IMAGELOAD_COMPLETED=”IMAGELOAD_COMPLETED”;n.IMAGELOAD_FAILED=”IMAGELOAD_FAILED”;n.SWITCH_SCENARIO=”SWITCH_SCENARIO”;n.SWITCH_INSIGHTS=”SWITCH_INSIGHTS”;n.REQUEST_SCRIPTS=”REQUEST_SCRIPTS”;n.LOAD_SCRIPTS_SUCCESS=”LOAD_SCRIPTS_SUCCESS”;n.LOAD_SCRIPTS_FAILED=”LOAD_SCRIPTS_FAILED”;n.CHANGE_INSIGHTS_STATUS=”CHANGE_INSIGHTS_STATUS”;n.CHANGE_INSIGHTS_POSITION=”CHANGE_INSIGHTS_POSITION”;n.CHANGE_INSIGHTS_EXPANDED_MODULES=”CHANGE_INSIGHTS_EXPANDED_MODULES”;n.CHANGE_INSIGHTS_SELECTED_MODULE=”CHANGE_INSIGHTS_SELECTED_MODULE”;n.CHANGE_CROP_COORDINATES=”CHANGE_CROP_COORDINATES”;n.CLEAR_SITEFILTER=”CLEAR_SITEFILTER”;n.CHANGE_SITEFILTER=”CHANGE_SITEFILTER”;n.CHANGE_SELECTED_ANNOTATIONS=”CHANGE_SELECTED_ANNOTATIONS”;n.ADD_TO_DETAILSTATE_HISTORY=”ADD_TO_DETAILSTATE_HISTORY”;n.REMOVE_FROM_DETAILSTATE_HISTORY=”REMOVE_FROM_DETAILSTATE_HISTORY”;n.EXPAND_PAGESINCLUDING=”EXPAND_PAGESINCLUDING”;n.SCROLL_PAGESINCLUDING=”SCROLL_PAGESINCLUDING”;n.HEIGHT_IN_CANVAS=”HEIGHT_IN_CANVAS”;n.ADD_TO_EVENT_QUEUE=”ADD_TO_EVENT_QUEUE”;n.SHOULD_RESET_FROM_EVENT_QUEUE=”SHOULD_RESET_FROM_EVENT_QUEUE”;n.RESET_EVENT_QUEUE=”RESET_EVENT_QUEUE”;n.CHANGE_PAGE_VIEW=”CHANGE_PAGE_VIEW”;n.CHANGE_PAGE_ACTIVITY=”CHANGE_PAGE_ACTIVITY”;n.CHANGE_PAGE_VISIBILITY=”CHANGE_PAGE_VISIBILITY”;n.CHANGE_PAGE_SIZE=”CHANGE_PAGE_SIZE”;n.FAVORITES_ADD_REQUESTED=”FAVORITES_ADD_REQUESTED”;n.FAVORITES_ADD_COMPLETED=”FAVORITES_ADD_COMPLETED”;n.FAVORITES_ADD_FAILED=”FAVORITES_ADD_FAILED”;n.FAVORITES_REMOVE_REQUESTED=”FAVORITES_REMOVE_REQUESTED”;n.FAVORITES_REMOVE_COMPLETED=”FAVORITES_REMOVE_COMPLETED”;n.FAVORITES_REMOVE_FAILED=”FAVORITES_REMOVE_FAILED”;n.FAVORITES_FETCH_REQUESTED=”FAVORITES_FETCH_REQUESTED”;n.FAVORITES_FETCH_COMPLETED=”FAVORITES_FETCH_COMPLETED”;n.FAVORITES_FETCH_FAILED=”FAVORITES_FETCH_FAILED”;n.DetailScenario={Default:”Default”,VisuallySimilarImages:”VisuallySimilarImages”,VisuallySimilarProducts:”VisuallySimilarProducts”,VisualSearch:”VisualSearch”,Recommendations:”Recommendations”,TopicFeed:”TopicFeed”,SearchByImage:”SearchByImage”,SearchByImageUpload:”SearchByImageUpload”,SearchByImageUploadGet:”SearchByImageUploadGet”,Favorites:”Favorites”,LiveMaps:”LiveMaps”,FeedImages:”FeedImages”};n.InsightsPosition={RightRail:”RightRail”,Bottom:”Bottom”};n.DetailScenarioKey={Default:””,VisuallySimilarImages:”VSI”,VisuallySimilarProducts:”VSP”,VisualSearch:”VS”,Recommendations:”REC”,TopicFeed:”TF”,SearchByImage:”SBI”,SearchByImageUpload:”SBIUPLOAD”,SearchByImageUploadGet:”SBIUPLOADGET”,Favorites:”FAV”,LiveMaps:””,FeedImages:”FIMG”};n.ImageDetailEvent={FilmstripLoaded:”FilmstripLoaded”,InsightsLoaded:”InsightsLoaded”,PageIncludingLoaded:”PageIncludingLoaded”,MainImageModulesLoaded:”MainImageModulesLoaded”};n.navigateRight=function(t){return{type:n.RIGHT_NAVIGATION,source:t}};n.navigateLeft=function(t){return{type:n.LEFT_NAVIGATION,source:t}};n.navigateTo=function(t){return{type:n.NAVIGATE_TO,selectedIndex:t}};n.imageLoadBegan=function(t){return{type:n.IMAGELOAD_REQUESTED,id:t}};n.imageLoadSuccess=function(t){return{type:n.IMAGELOAD_COMPLETED,id:t}};n.imageLoadFailed=function(t){return{type:n.IMAGELOAD_FAILED,id:t}};n.switchDetailScenario=function(i,r,u,f,e){if(r){var o=t.generateGuid();_G&&(_G.IG=o);n.makeRequest(t.stringFormat(r,o),null)}return{type:n.SWITCH_SCENARIO,scenario:i,pivotParams:u,results:f,ig:o,passThruData:e}};n.addToInsightsIdsQueue=function(t){return{type:n.INSIGHTS_ID_ADD,id:t}};n.deleteFromInsightsIdsQueue=function(t){return{type:n.INSIGHTS_ID_DELETE,ids:t}};n.switchInsights=function(t){return{type:n.SWITCH_INSIGHTS,id:t}};n.requestScripts=function(t){return{type:n.REQUEST_SCRIPTS,script:t}};n.loadScriptsSuccess=function(t){return{type:n.LOAD_SCRIPTS_SUCCESS,script:t}};n.loadScriptsFail=function(t){return{type:n.LOAD_SCRIPTS_FAILED,script:t}};n.changeCropCoordinates=function(t,i){return{type:n.CHANGE_CROP_COORDINATES,cropCoordinates:t,isFromHotspot:i}};n.changeSelectedAnnotations=function(t){return{type:n.CHANGE_SELECTED_ANNOTATIONS,selectedAnnotations:t}};n.changeSiteFilter=function(i){return t.setSiteFilterCookie(i),{type:n.CHANGE_SITEFILTER,siteFilter:i}};n.clearSiteFilter=function(){return t.clearSiteFilterCookie(),{type:n.CLEAR_SITEFILTER}};n.addToDetailStateHistory=function(){return{type:n.ADD_TO_DETAILSTATE_HISTORY}};n.removeFromDetailStateHistory=function(){return{type:n.REMOVE_FROM_DETAILSTATE_HISTORY}};n.changeInsightStatus=function(r,u,f,e,o){var s=r?”TwoCol”:”SingleCol”;return o||i(“SwitchColumn”,u,{expansionAction:f,ColumnMode:s}),t.setMainImageExpandCookie(r?0:1),{type:n.CHANGE_INSIGHTS_STATUS,isInsightsExpanded:r,needFocus:e}};n.changeInsightsPosition=function(t){return{type:n.CHANGE_INSIGHTS_POSITION,position:t}};n.changeInsightsExpandedModules=function(t){return{type:n.CHANGE_INSIGHTS_EXPANDED_MODULES,expandedModules:t}};n.changeInsightsSelectedModule=function(t){return{type:n.CHANGE_INSIGHTS_SELECTED_MODULE,selectedModule:t}};n.expandPagesIncluding=function(t){return{type:n.EXPAND_PAGESINCLUDING,id:t}};n.scrollPagesIncluding=function(t,i){return{type:n.SCROLL_PAGESINCLUDING,id:t,isReset:i||!1}};n.heightInCanvas=function(t,i){return{type:n.HEIGHT_IN_CANVAS,id:t,height:i}};n.addToEventQueue=function(t){return{type:n.ADD_TO_EVENT_QUEUE,log:t}};n.resetEventQueue=function(){return{type:n.RESET_EVENT_QUEUE}};n.requestRemoveFromEventQueue=function(t){return{type:n.SHOULD_RESET_FROM_EVENT_QUEUE,reset:t}};n.insightsModuleDataLoaded=function(t,i){return{type:n.INSIGHTS_MODULE_FETCH_COMPLETED,payload:t,insightsId:i}};n.changePageActivity=function(t){return{type:n.CHANGE_PAGE_ACTIVITY,isActive:t}};n.changePageVisiblityTracking=function(t,i){return{type:n.CHANGE_PAGE_VISIBILITY,enable:t,source:i?i:””}};n.changePageView=function(t){return{type:n.CHANGE_PAGE_VIEW,viewType:t}};n.changePageSize=function(){return{type:n.CHANGE_PAGE_SIZE}}})(ImageDetailActions||(ImageDetailActions={}));var Multimedia;(function(n){var t;(function(t){function h(n,t){n&&t&&(t.viewType!=null&&(n[e]=t.viewType),t.expandedModules&&(n[o]=l(t.expandedModules)),t.selectedModule&&(n[f]=i[t.selectedModule]!=null?i[t.selectedModule]:””))}function c(n,t){var r=u.fetchParamValue(e),s=r?a(r,t):n,i=v(u.fetchParamValue(o)),h=y(u.fetchParamValue(f));return s!=null||i!=null&&i.length>0||h!=null?{viewType:s,expandedModules:i,selectedModule:h}:null}function l(n){if(n&&n.length>0){var t=[];return n.map(function(n){i[n]!=null&&t.push(i[n])}),t.join(s)}return null}function a(n,t){var i=r.Default,u=parseInt(n);if(n&&u in r)i=u;else if(n&&n.length>0)switch(n){case”DetailL2View”:t&&(i=r.DetailL2View);break;case”ImageFullView”:i=r.ImageFullView;break;case”VisualSearch”:i=r.VisualSearch}return i}function v(n){if(n&&n.length>0){var t=n.split(s).map(function(n){return parseInt(n)});return t.filter(function(n){return!isNaN(n)}).map(function(n){return i[n]})}}function y(n){var t=parseInt(n);return isNaN(t)?null:i[t]}var u=n.ImageDetailUtils,i=n.ImageDetailUtils.InsightsModuleType,r=ImageDetailActions.IImageDetailViewType,e=”vt”,o=”eim”,f=”sim”,s=”,”;t.addViewStateToRequestParams=h;t.getInsightsViewStateFromUrl=c})(t=n.InsightsViewStateUtils||(n.InsightsViewStateUtils={}))})(Multimedia||(Multimedia={}));var ImageDetailReducers;(function(n){function f(n,i){n===void 0&&(n=t.Ready);var r=i.type,u=i.requestConfig;if(!u||!r)return n;switch(r){case ImageDetailActions.FILMSTRIP_FETCH_REQUESTED:n=t.Pending;break;case ImageDetailActions.FILMSTRIP_FETCH_COMPLETED:n=t.Success;break;case ImageDetailActions.FILMSTRIP_FETCH_FAILED:n=t.Failed}return n}function i(n,i){n===void 0&&(n=t.Ready);var r=i.type,u=i.requestConfig;if(!u||!r)return n;switch(r){case ImageDetailActions.INSIGHTS_FETCH_REQUESTED:n=t.Pending;break;case ImageDetailActions.INSIGHTS_FETCH_COMPLETED:n=t.Success;break;case ImageDetailActions.INSIGHTS_FETCH_FAILED:n=t.Failed}return n}function e(n,i){n===void 0&&(n=t.Ready);var r=i.type,u=i.requestConfig;if(!u||!r)return n;switch(r){case ImageDetailActions.MAINIMAGE_MODULES_FETCH_REQUESTED:n=t.Pending;break;case ImageDetailActions.MAINIMAGE_MODULES_FETCH_COMPLETED:n=t.Success;break;case ImageDetailActions.MAINIMAGE_MODULES_FETCH_FAILED:n=t.Failed}return n}function o(n,t){var i,r,u;return(n===void 0&&(n={}),i=t.payload,!i)?n:(r=n.isPagesIncludingLazyLoaded?n:i,u=t.requestConfig,Object.assign({},n,{requestParams:u?u.requestParams:null,pagesIncluding:r.pagesIncluding,shoppingSources:r.shoppingSources,recipes:r.recipes,visuallySimilarImages:i.visuallySimilarImages,visuallySimilarProducts:i.visuallySimilarProducts,imageTags:i.imageTags,insightsToken:i.insightsToken,knowledgeTags:i.knowledgeTags,objectKnowledgeTags:i.objectKnowledgeTags,feedImages:i.feedImages}))}function s(n,t){var u=t.payload,e=t.insightsId,f,r,o;return!u&&e==null?n:(f=Object.assign({},n),r=f[e],r&&r.data||(r={requestState:i(r.requestState,t),moduleRequestState:{},data:{}}),r.data=Object.assign({},r.data),r.moduleRequestState=Object.assign({},r.moduleRequestState),t.requestConfig&&(r.data.requestParams=t.requestConfig.requestParams,r.moduleRequestState[t.requestConfig.moduleNames[0]]=i(r.requestState,t)),r.data.insightsToken=u.insightsToken,o=u?Object.keys(u):null,o&&o.map(function(n){return r.data[n]=u[n]}),f[e]=r,f)}function h(n,t){var i,r;return(n===void 0&&(n={}),i=t.payload,!i)?n:(r=t.requestConfig,Object.assign({},n,{isPagesIncludingLazyLoaded:!0,pagesIncluding:i.pagesIncluding,shoppingSources:i.shoppingSources,recipes:i.recipes}))}function c(n,t){n===void 0&&(n={});var i=t.payload;return i?Object.assign({},n,{recognizedEntities:i.recognizedEntities,detectedObjects:i.detectedObjects,imageBasedRelatedSearches:i.imageBasedRelatedSearches,queryBasedRelatedSearches:i.queryBasedRelatedSearches,brq:i.brq,caption:i.caption,image:i.image,livemap:i.livemap,trivia:i.trivia}):n}function l(n,t){var i,r,u;return(n===void 0&&(n={}),i=t.payload,!i)?n:(r=function(n){return n&&n.length?n.length:0},u=Object.assign({},n.image,{pagesIncludingCount:r(i.pagesIncluding),recipeSourcesCount:r(i.recipes),shoppingSourcesCount:r(i.shoppingSources)}),Object.assign({},n,{image:u}))}function a(n,i){var r=i.payload,u=i.requestConfig,f=r.previousResults?n.selectedIndex+r.previousResults.filter(function(t){return t.id&&!n.results[t.id]}).length:n.selectedIndex,e=r.nextOffset?Math.max(r.nextOffset,n.filmstripNextOffset):null,o=Math.min(u.offset,n.filmstripMinOffset),s=v(n.imageList,n.results,r),h=r.imageGroups,c=y(n.results,r);return Object.assign({},n,{selectedIndex:f,filmstripNextOffset:e,filmstripMinOffset:o,filmstripRequestState:t.Success,imageList:s,imageGroups:h,results:c,nextPageToken:p(n.nextPageToken,r,u),previousPageToken:w(n.previousPageToken,r,u),totalEstimatedMatches:r.totalEstimatedMatches})}function v(n,t,i){return i.nextResults&&(n=n.concat(i.nextResults.map(function(n){return n.id}).filter(function(n){return n&&!t[n]}))),i.previousResults&&(n=i.previousResults.map(function(n){return n.id}).filter(function(n){return n&&!t[n]}).concat(n)),n}function y(n,t){return u(u(n,t.previousResults),t.nextResults)}function u(n,t){return t&&(n=Object.assign({},n),t.map(function(t){t.id&&(n[t.id]&&n[t.id].imgUrl&&(t.imgUrl=n[t.id].imgUrl,t.shareHash=n[t.id].shareHash,t.visualWords=n[t.id].visualWords),n[t.id]=Object.assign({},n[t.id],t))})),n}function p(n,t,i){return i.direction===r.Next?t.nextPageToken:n}function w(n,t,i){return!n||i.direction===r.Previous?t.previousPageToken:n}var r=ImageDetailActions.FilmstripRequestDirection,t=ImageDetailActions.RequestState;n.updateFilmStripRequestState=f;n.updateInsightsRequestState=i;n.updateMainImageModulesRequestState=e;n.processInsights=o;n.processInsightsModule=s;n.processPageIncluding=h;n.processMainImageModulesData=c;n.processMainImageModulesDataForPagesIncluding=l;n.processFilmstrip=a})(ImageDetailReducers||(ImageDetailReducers={}));var ImageDetailReducers;(function(n){function i(n,i){var u,e,f,r;switch(i.type){case ImageDetailActions.INSIGHTS_FETCH_COMPLETED:case ImageDetailActions.MAINIMAGE_MODULES_FETCH_COMPLETED:u=i.requestConfig&&i.requestConfig.requestImageInfo?i.requestConfig.requestImageInfo.id:null;i.payload.image&&u&&n[u]&&(r=n[u],i.payload.image.id=u,r.instInfo&&(i.payload.image.instInfo=r.instInfo),r.imgUrl&&(i.payload.image.imgUrl=r.imgUrl,r.imgHeight&&r.imgWidth&&(i.payload.image.imgHeight=r.imgHeight,i.payload.image.imgWidth=r.imgWidth)),r.thumbUrl&&(i.payload.image.thumbUrl=r.thumbUrl),r.thumbId&&(i.payload.image.thumbId=r.thumbId),r.heightInCanvas&&(i.payload.image.heightInCanvas=r.heightInCanvas),r.isHomePage&&(i.payload.image.isHomePage=r.isHomePage,i.payload.image.metadata=r.metadata,i.payload.image.pageUrl=r.pageUrl),i.payload.image.title||(i.payload.image.title=r.title),i.payload.image.index=r.index,r.insightsToken&&t.fillImageWithInsightsToken(i.payload.image,r.insightsToken),n=Object.assign({},n),n[u]=Object.assign({},r,i.payload.image));break;case ImageDetailActions.EXPAND_PAGESINCLUDING:u=i.id;u&&n[u]&&(r=n[u],n=Object.assign({},n),n[u]=Object.assign({},r,{expandPagesIncluding:!0}));break;case ImageDetailActions.SCROLL_PAGESINCLUDING:e=i;u=e.id;u&&n[u]&&(r=n[u],n=Object.assign({},n),n[u]=Object.assign({},r,{scrollPagesIncluding:!e.isReset}));break;case ImageDetailActions.HEIGHT_IN_CANVAS:u=i.id;u&&n[u]&&(r=n[u],n=Object.assign({},n),n[u]=Object.assign({},r,{heightInCanvas:i.height}));break;case ImageDetailActions.PI_FETCH_COMPLETED:case ImageDetailActions.PI_FETCH_FAILED:u=i.requestConfig&&i.requestConfig.requestImageInfo?i.requestConfig.requestImageInfo.id:null;u&&n[u]&&i.payload&&(f=function(n){return n&&n.length?n.length:0},r=n[u],n=Object.assign({},n),n[u]=Object.assign({},r,{pagesIncludingCount:f(i.payload.pagesIncluding),recipeSourcesCount:f(i.payload.recipes),shoppingSourcesCount:f(i.payload.shoppingSources)}))}return n}function r(n,t){var i,r;n===void 0&&(n={});switch(t.type){case ImageDetailActions.IMAGELOAD_REQUESTED:case ImageDetailActions.IMAGELOAD_FAILED:case ImageDetailActions.IMAGELOAD_COMPLETED:i=t.id;i&&(r=n[i]?n[i]:{},n=Object.assign({},n),n[i]=Object.assign({},r,{externalImageState:e(r.externalImageState,t)}))}return n}function u(n,t){var u,o,f,a,s,e,h,c;if(t.type===ImageDetailActions.SWITCH_SCENARIO){var i=null,l=n.imageGroups,r=null;if(t.results&&(t.scenario==ImageDetailActions.DetailScenario.VisuallySimilarImages||t.scenario==ImageDetailActions.DetailScenario.VisuallySimilarProducts||t.scenario==ImageDetailActions.DetailScenario.FeedImages)){for(i=[],r={},u=0,o=t.results;u0?n-1:n;case ImageDetailActions.RIGHT_NAVIGATION:return Math.min(i-1,n+1);case ImageDetailActions.NAVIGATE_TO:if(t.selectedIndex!=null&&t.selectedIndex!=n)return t.selectedIndex}return n}function i(n,t){n===void 0&&(n=null);switch(t.type){case ImageDetailActions.LEFT_NAVIGATION:return{type:”prev”,source:t.source};case ImageDetailActions.RIGHT_NAVIGATION:return{type:”next”,source:t.source};case ImageDetailActions.NAVIGATE_TO:return{type:”imageclick”}}return n}n.handleNavigation=t;n.handleNavigationInfo=i})(ImageDetailReducers||(ImageDetailReducers={}));var ImageDetailReducers;(function(n){function t(){if(n.g_PageConfig==null){var t=ServerSideRenderingDataManager.get(“PageConfig”);try{n.g_PageConfig=JSON.parse(t)}catch(i){n.g_PageConfig=null}}return n.g_PageConfig}function r(){var n=t();return n?n.resourcekeys:null}function f(n,t){t===void 0&&(t=””);var i=r();return i&&n?i[n]:t}function e(n){var r=t(),u=r.expandImage[i.Default];return typeof r.expandImage[n]!=”undefined”&&(u=r.expandImage[n]),u}function o(n){var r=t(),u=r.forceExpandInsights[i.Default];return typeof r.forceExpandInsights[n]!=”undefined”&&(u=r.forceExpandInsights[n]),u}function s(r,u){u===void 0&&(u=n.getDetailScenario(r));var f=t(),e=f.expandImageOverwrite[i.Default];return typeof f.expandImageOverwrite[u]!=”undefined”&&(e=f.expandImageOverwrite[u]),e}function h(){var n=t();return n&&n.copyrightconfig?n.copyrightconfig:null}function c(){var n=t();return n&&n.moresizesconfig?n.moresizesconfig:null}function l(){var n=t();return n&&n.shoppingsourcesConfig?n.shoppingsourcesConfig:null}function a(){var n=t();return n&&n.recipesourcesConfig?n.recipesourcesConfig:null}function v(){var n=t();return n&&n.piConfig?n.piConfig:null}function y(){var n=t();return n?n.picConfig:null}function p(){var n=t();return n&&n.livemapsConfig?n.livemapsConfig:null}function w(){var n=t();return n&&n.mainImageConfig?n.mainImageConfig:null}function b(){var n=t();return n&&n.favoritesConfig?n.favoritesConfig:null}function k(){var n=t();return n&&n.relatedSearchesConfig?n.relatedSearchesConfig:null}function d(){var n=t();return n&&n.cropConfig?n.cropConfig:null}function g(){var n=t();return n&&n.objrConfig?n.objrConfig:null}function nt(){var n=t();return n&&n.animConfig?n.animConfig:null}function tt(){var n=t();return n?n.thumbnailProcessorConfigs:null}function it(){var n=t();return n&&n.feedbackConfig?n.feedbackConfig:null}function rt(){var n=t();return n?n.notificationConfig:null}function u(){var n=t();return n?n.ajaxUrls:null}function ut(){var n=t();return n?n.scriptUrl:null}function ft(n){var t=u();return t&&n?t[n]:null}function et(){var n=t();return n&&n.closeButtonConfig?n.closeButtonConfig:null}function ot(){var n=t();return n&&n.searchFormConfig?n.searchFormConfig:null}function st(){var n=t();return n&&n.accessibleResourceConfig?n.accessibleResourceConfig:null}function ht(){var n=t();return n?n.insightsModuleConfigs:null}function ct(){var n=t();return n?n.shareConfig:null}function lt(){var n=t();return n?n.swipeNotificationConfig:null}function at(){var n=t();return n?n.enableMobileView:!1}function vt(){var n=t();return n?n.adultSetting:null}function yt(){var n=t();return n?n.enableDetailV2:!1}function pt(){var n=t();return n?n.enableL2ToL1Nav:!1}function wt(){var n=t();return n?n.enableNavInL2:!1}function bt(){var n=t();return n?n.bingLogoConfig:null}function kt(){var n=t();return n?n.customScrollConfig:null}var i=ImageDetailActions.DetailScenario;n.g_PageConfig=null;n.getPageConfig=t;n.getResourceMap=r;n.getResourceString=f;n.getMainImageExpandMode=e;n.getForceInsightsExpandMode=o;n.getMainImageExpandModeCookieOvereWrite=s;n.getCopyrightConfig=h;n.getMoreSizesConfig=c;n.getShoppingSourcesConfig=l;n.getRecipeSourcesConfig=a;n.getPagesIncludingConfig=v;n.getPagesIncludingCombinerConfig=y;n.getLiveMapsConfig=p;n.getMainImageConfig=w;n.getFavoritesConfig=b;n.getRelatedSearchesConfig=k;n.getCropConfig=d;n.getObjectRecognitionConfig=g;n.getAnimationConfig=nt;n.getThumbnailProcessorConfigs=tt;n.getFeedbackConfig=it;n.getNotificationConfig=rt;n.getAjaxUrls=u;n.getScriptUrl=ut;n.getAjaxUrl=ft;n.getCloseButtonConfig=et;n.getSearchFormConfig=ot;n.getAccessibleResourceConfig=st;n.getInsightsModuleConfigs=ht;n.getShareControlConfig=ct;n.getSwipeNotificationConfig=lt;n.isMobileViewEnabled=at;n.getAdultSetting=vt;n.isDetailV2Enabled=yt;n.isL2ToL1NavigationEnabled=pt;n.isNavigationInL2=wt;n.getBingLogoConfig=bt;n.getCustomScrollConfig=kt})(ImageDetailReducers||(ImageDetailReducers={}));var Multimedia;(function(n){var t;(function(t){function a(n){var t=[];return n.relatedSearches&&n.relatedSearches.map(function(n){return t.push(st(n))}),{caption:n.caption,dataSourceUrl:n.dataSourceUrl,relatedSearches:n.relatedSearches?t:null}}function v(n,t){if(t&&f[t]){var i=f[t];return i(n)}return n}function e(n){var t=[];return n&&n.value&&n.value.map(function(n){return t.push(ht(n))}),t}function y(n){var i=[];return n&&n.value&&n.value.map(function(n,r){return i.push(t.createImageInfo(n,r))}),i}function p(n){var i=[];return n&&n.value&&n.value.map(function(n,r){var u=t.createImageInfo(n,r);u.metadata&&u.metadata.aggregateOffer&&i.push(u)}),i}function w(n){var i=[];return n&&n.value&&n.value.map(function(n,r){return i.push(t.createImageInfo(n,r))}),i}function b(n){var t=[];return n&&n.offers&&n.offers.map(function(n){var i=o(n);i.title&&i.hostUrl&&t.push(i)}),t}function o(t){return{title:t.name,hostUrl:t.url,description:t.description,availability:t.availability,lastUpdated:t.lastUpdated,sellerInfo:h(t.seller),priceInfo:vt(t),aggregateRating:c(t.aggregateRating),instInfo:n.ImageDetailUtils.getInstInfo(t.urlPingSuffix)}}function k(n){var t=[];return n&&n.value&&n.value.map(function(n){return t.push(ct(n))}),t}function d(n){var t=[];return at(n)&&n.value.map(function(n){return t.push(lt(n))}),t}function g(t){return{text:t.text,displayText:t.displayText,webSearchUrl:u(t.webSearchUrl),instInfo:n.ImageDetailUtils.getInstInfo(t.webSearchUrlPingSuffix)}}function nt(t){return{text:t.displayName,displayText:t.displayName,webSearchUrl:u(t.webSearchUrl),instInfo:n.ImageDetailUtils.getInstInfo(t.webSearchUrlPingSuffix)}}function tt(n){return n.name}function it(n){return{region:r(n.region),entity:ot(n.matchingEntities)}}function rt(n,t){return n==null||t==null||t.displayRectangle==null||t.displayRectangle.topLeft.x==0&&t.displayRectangle.topLeft.y==0&&t.displayRectangle.bottomRight.x==1&&t.displayRectangle.bottomRight.y==1?null:{region:r(t.displayRectangle),entity:s(n)}}function ut(n){return{hotspot:r(n.hotSpot),boundingBox:r(n.boundingBox)}}function ft(n){if(n==null||n.displayRectangle==null||n.displayRectangle.topLeft.x==0&&n.displayRectangle.topLeft.y==0&&n.displayRectangle.bottomRight.x==1&&n.displayRectangle.bottomRight.y==1)return null;return{hotspot:r(n.displayRectangle),boundingBox:r(n.queryRectangle)}}function et(n){if(n){var t=n.match(/th\?id=(.*)&/);if(t&&t.length>1)return t[1]}return null}function r(n){return{left:n.bottomLeft?n.bottomLeft.x:n.left,right:n.topRight?n.topRight.x:n.right,top:n.topRight?n.topRight.y:n.top,bottom:n.bottomLeft?n.bottomLeft.y:n.bottom}}function ot(t){if(t&&t.length>0){var r=t.sort(n.ImageDetailUtils.entityCompare),i=r[0];if(i.entity)return s(i.entity)}return null}function st(n){return{text:n.text,displayText:n.displayText,webSearchUrl:u(n.webSearchUrl)}}function ht(t){return{title:t.name,text:t.text,hostUrl:t.hostPageUrl,width:t.width,height:t.height,contentSize:t.contentSize,encodingFormat:t.encodingFormat,instInfo:n.ImageDetailUtils.getInstInfo(t.hostPageUrlPingSuffix?t.hostPageUrlPingSuffix:t.urlPingSuffix)}}function ct(t){return{title:t.name,hostUrl:t.url,description:t.description,creatorInfo:h(t.creator),aggregateRating:c(t.aggregateRating),totalTime:t.totalTime,cookTime:t.cookTime,prepTime:t.prepTime,instInfo:n.ImageDetailUtils.getInstInfo(t.urlPingSuffix)}}function lt(t){return{text:t.text,displayText:t.displayText,searchUrl:u(t.webSearchUrl),thumbnailUrl:t.thumbnail.url,instInfo:n.ImageDetailUtils.getInstInfo(t.webSearchUrlPingSuffix)}}function at(n){return n&&n.value&&n.value.length>0}function s(n){return{name:n.name,jobTitle:n.jobTitle?n.jobTitle:n.entityPresentationInfo?n.entityPresentationInfo.entityTypeDisplayHint:””,description:n.description,webSearchUrl:u(n.webSearchUrl),imageUrl:n.image&&n.image.url?n.image.url:n.image&&n.image.thumbnailUrl?n.image.thumbnailUrl:””,matchConfidence:n.matchConfidence}}function h(n){return n&&n.name?{name:n.name,iconUrl:n.image?n.image.url:null}:null}function vt(n){return n&&n.price?{price:n.price,priceCurrency:n.priceCurrency}:null}function c(n){return n&&n.ratingValue?{ratingValue:n.ratingValue,ratingCount:n.reviewCount||n.ratingCount,maxRating:n.bestRating}:null}function u(n){var t=n;return t&&(t=t.replace(/^.*\/\/[^\/]+/,””)),t}var l=n.ImageDetailUtils,i=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,f;t.transformToImageCaption=a;f={Trivia:e};t.transform=v;t.transformToPagesIncludings=e;t.transformToVisualSimilarImages=y;t.transformToVisualSimilarProducts=p;t.transformToFeedImages=w;t.transformToShoppingSources=b;t.transformToShoppingSourceItem=o;t.transformToRecipes=k;t.transformToRelatedSearches=d;t.transformToBrqV1=g;t.transformToBrqV2=nt;t.transformToImageTags=tt;t.transformToRecognizedEntities=it;t.transformToRecognizedEntity=rt;t.transformToDetectedObjects=ut;t.transformToDetectedObject=ft;t.createImageInfo=function(t,r){if(t){var s=n.ImageDetailUtils.getInstInfo(t.contentUrlPingSuffix),f=t.thumbnail?t.thumbnail.width:0,e=t.thumbnail?t.thumbnail.height:0,u=i?i.setMockImageHeightAndWidth(t.width,t.height):null,o={id:t.imageId?t.imageId:t.id,thumbUrl:i&&i.isMockImageEnabled()?i.getMockImageUrl(f,e):t.thumbnailUrl,imgUrl:i&&u?i.getMockImageUrl(u.simulatedWidth,u.simulatedHeight):t.contentUrl,imgWidth:i&&u?u.simulatedWidth:t.width,imgHeight:i&&u?u.simulatedHeight:t.height,imgFormat:t.encodingFormat,pageName:t.hostPageDisplayUrl,pageUrl:t.hostPageUrl,thWidth:f,thHeight:e,metadata:t.insightsMetadata||t.homepageMetadata,title:t.name,index:r,thumbId:et(t.thumbnailUrl),visualWords:t.visualWords,brq:t.insightsMetadata&&t.insightsMetadata.bestRepresentativeQuery?t.insightsMetadata.bestRepresentativeQuery.text:null,instInfo:s,accentColor:t.accentColor,isHomePage:t.homepageMetadata?!0:!1,pagesIncludingCount:t.insightsMetadata&&t.insightsMetadata.pagesIncludingCount||0,recipeSourcesCount:t.insightsMetadata&&t.insightsMetadata.recipeSourcesCount||0,shoppingSourcesCount:t.insightsMetadata&&t.insightsMetadata.shoppingSourcesCount||0,description:t.description,shareHash:t.bingShareHash,text:t.text};return l.fillImageWithInsightsToken(o,t.imageInsightsToken),o}}})(t=n.ImageDetailResponseTransformer||(n.ImageDetailResponseTransformer={}))})(Multimedia||(Multimedia={}));var Multimedia;(function(n){var t;(function(){function c(n){var t,i,r;if(!n.actions)return!0;for(t=0,i=n.actions;t0&&f?f(t.join(“&”),n.insightsId,n.detailScenario,r.persistedQueryStrings,u,o,r.instData.insiid,h[o].nextInsightsSfx,r.apiUrlHost,n.imageInfo,n.requestedModules):null)};n.ImageDetailInsightsUtils.getFormData=function(n,t){var r=new FormData,i,u;return r.append(“knowledgeRequest”,JSON.stringify(e(n.imageInfo,n.fullInsightsRequestParams,t))),!n.insightsRequestParams&&n.imageInfo&&n.imageInfo.imgBin&&(i=n.imageInfo.imgBin,i=i.replace(“data:image/”,””),u=i.indexOf(“,”),u>0&&(i=i.substr(u+1)),r.append(“imageBase64″,i)),r};e=function(n,t,r){var f={},u=null,s,e,o,h;return t&&(u=parseQueryParamsFromQuery(t,!1)),n&&(n.insightsToken?f.imageInsightsToken=n.insightsToken:u&&u.insightstoken&&(f.imageInsightsToken=u.insightstoken),n.imgUrl&&(f.url=n.imgUrl)),u&&u.cal&&u.cat&&u.car&&u.cab&&(s={top:u.cat,left:u.cal,right:u.car,bottom:u.cab},f.cropArea=s),e={},r&&(e.invokedSkills=r),o=i.getSiteFilterCookie(),o&&(h={site:o},e.filters=h),{imageInfo:f,knowledgeRequest:e}};n.ImageDetailInsightsUtils.processInsightsResponse=function(n){var i,o,v,u,s,h,y,p,w,e,f,a,b,r;if(n&&n.tags&&n.tags.length>0){for(i={},n.image&&(i.insightsToken=n.image.imageInsightsToken),o=0,v=n.tags;o0&&f.bottom-f.top0&&f.right-f.leftr.maxInsWidth?(v=Math.ceil(100-r.maxInsWidth/e*100),u={WidthPercentage:v,HeightPercentage:u.HeightPercentage}):u={WidthPercentage:100-r.prefInsPercentage,HeightPercentage:u.HeightPercentage}),u?u:f}var e=ImageDetailActions.DetailScenario,c=ImageDetailActions.InsightsPosition,i=ImageDetailActions.IImageDetailViewType,l=”filmStripConfig”,o=”metabarConfig”,a=”layoutConfig”,v=”insightsMopRank”,y=”insMopTabs”,p=”initialExpandedModules”,w=”insightsRequestUrlTemplate”,b=”defaultSkillsOverride”,k=”visuallySimilarPeekHeight”,d=”actionMenuConfig”,g=”objdConfig”,u,f;n.getFilmStripConfig=nt;n.getMetabarConfig=tt;n.getMainImageHeightConfig=it;n.getMainImageMaxHeight=rt;n.getMainImageMinHeight=ut;n.getLayoutConfig=s;n.getInsightsMopRank=ft;n.getInsightsMopRankForTabHeader=et;n.getInitialExpandedModules=ot;n.getInsightsRequestUrlTemplate=st;n.getDefaultSkillsOverride=ht;n.getVisuallySimilarPeekHeight=ct;n.getActionsConfig=h;n.getObjectDetectionConfig=lt;n.getActionButtonConfig=at;u=function(n,t,r,u){if(t&&n!=null){var f=i[n];return t[f]&&(!u||t[f][u])?t[f]:r&&t[i[i.Default]][u]?t[i[i.Default]]:null}return null};f={WidthPercentage:100,HeightPercentage:100};n.getMainImageWindowSize=vt})(ImageDetailReducers||(ImageDetailReducers={}));var ImageDetailReducers;(function(n){function gt(){var s,i=ni(),p=[i],f={imageDetailsState:p,insightsIdsQueue:[],imageInsightsState:null,mainImageModulesState:null,favoritesMap:null,pageSize:null},w=ServerSideRenderingDataManager.get(“ResponseData”),a,o,y,e;try{f=JSON.parse(w)}catch(k){}var r=n.getPageConfig(),h=c(f),b=r.enableMobileView;return t&&(t.setDefaultThumbnailDpr(r&&r.dpr),a=t.fetchParamValue(“site”),o=t.getSiteFilterCookie(),a?f.siteFilter=a:o&&o!=”0″&&(f.siteFilter=o)),i.ig=r&&r.instData.ig,y=bt.getInsightsViewStateFromUrl(r.initialViewType,r.enableDetailV2),i.insightsViewState=y?y:{viewType:u.Default},e=n.getInitialExpandedModules(h,i.insightsViewState.viewType),h==l.SearchByImage||h==l.SearchByImageUpload?i.insightsViewState.expandedModules=e:i.insightsViewState.expandedModules!=null?(t.updateExpandedInsightsModulesCookie(i.insightsViewState.expandedModules),t.setMainImageExpandCookie(0),i.isInsightsExpanded=!0):t.getInsightsModuleExpansionCookie()!=null?i.insightsViewState.expandedModules=t.getExpandedInsightsModules():(t.getMainImageExpandCookie()==”0″||b)&&e&&!v&&(i.insightsViewState.expandedModules=e,t.updateExpandedInsightsModulesCookie(e)),Object.assign({},f,{imageDetailsState:[Object.assign({},i,f.imageDetailsState[0])],instSfxData:Object.assign({},(s={},s[i.ig]={nextFilmstripSfx:1,nextInsightsSfx:1},s)),logQueue:{events:[],shouldReset:!1}})}function ni(){var t={results:{},imageStates:{},imageList:[],selectedIndex:0,navigationInfo:null,filmstripNextOffset:0,filmstripMinOffset:0,firstImageOffset:0},n=ServerSideRenderingDataManager.get(“FirstImageData”);return n&&n.id&&(t.results[n.id]=n,t.imageList.push(n.id)),t}function ti(n,t){n===void 0&&(n=kt);return Object.assign({},n,{imageDetailsState:si(n,t),instSfxData:oi(n.instSfxData,yt(n),t),insightsIdsQueue:ai(n.insightsIdsQueue,t),imageInsightsState:li(n.imageInsightsState,t),mainImageModulesState:vi(n.mainImageModulesState,t),displayInsightsId:pi(n,t),annotations:ki(n.annotations,t),siteFilter:di(n.siteFilter,t),favoritesMap:b(n,t),insightsPosition:it(n.insightsPosition,t),logQueue:ui(n.logQueue,t),visibilityTracker:fi(n.visibilityTracker,t),scriptLoadingState:ei(n.scriptLoadingState,t),pageSize:d(n,t)})}function b(n,t){var i=n.favoritesMap,r,u;switch(t.type){case ImageDetailActions.FAVORITES_ADD_REQUESTED:case ImageDetailActions.FAVORITES_ADD_FAILED:case ImageDetailActions.FAVORITES_REMOVE_REQUESTED:case ImageDetailActions.FAVORITES_REMOVE_FAILED:i=o(i,t,t.type);break;case ImageDetailActions.FAVORITES_ADD_COMPLETED:r=k(t.response);i=r?o(i,t,ImageDetailActions.FAVORITES_ADD_COMPLETED):o(i,t,ImageDetailActions.FAVORITES_ADD_FAILED);break;case ImageDetailActions.FAVORITES_REMOVE_COMPLETED:u=k(t.response);i=u?o(i,t,ImageDetailActions.FAVORITES_REMOVE_COMPLETED):o(i,t,ImageDetailActions.FAVORITES_REMOVE_FAILED);break;case ImageDetailActions.FAVORITES_FETCH_COMPLETED:t.response&&(i=t.response)}return i}function o(n,t,i){var u=Object.assign({},n),f=t.requestConfig,r=u[f.id];return r=r?{status:i,collectionReference:r.collectionReference}:{status:i,collectionReference:f.collectionReference},u[f.id]=r,u}function ii(n){return n.favoritesMap?n.favoritesMap:dt}function k(n){return n&&n.isSuccess}function d(n,i){switch(i.type){case ImageDetailActions.CHANGE_PAGE_SIZE:return t.getWindowSize()}return n.pageSize==null?t.getWindowSize():n.pageSize}function ri(n){return n.pageSize}function ui(n,t){var r,i;switch(t.type){case ImageDetailActions.ADD_TO_EVENT_QUEUE:return r=t.log,i=Object.assign({},n),i.events||(i.events=[]),i.events.push(r),i;case ImageDetailActions.RESET_EVENT_QUEUE:return i=Object.assign({},n),i.events=[],i;case ImageDetailActions.SHOULD_RESET_FROM_EVENT_QUEUE:return i=Object.assign({},n),i.shouldReset=t.reset,i}return n}function fi(n,t){var r=t,i;switch(r.type){case ImageDetailActions.CHANGE_PAGE_VISIBILITY:return i=Object.assign({},n),i.isOn=r.enable,i.visibilityChangeSource=r.source,i}return n}function ei(n,t){var r=t,i;switch(r.type){case ImageDetailActions.REQUEST_SCRIPTS:i=Object.assign({},n);switch(r.script){case a.Insights:i.insights=ImageDetailActions.ScriptRequestState.Required}return i;case ImageDetailActions.LOAD_SCRIPTS_SUCCESS:i=Object.assign({},n);switch(r.script){case a.Insights:i.insights=ImageDetailActions.ScriptRequestState.Loaded}return i;case ImageDetailActions.LOAD_SCRIPTS_FAILED:i=Object.assign({},n);switch(r.script){case a.Insights:i.insights=ImageDetailActions.ScriptRequestState.Failed}return i}return n}function oi(n,t,i){var u,r;if(i.type===ImageDetailActions.SWITCH_SCENARIO&&i.ig)return Object.assign({},n,(u={},u[i.ig]={nextFilmstripSfx:1,nextInsightsSfx:1},u));if(t)switch(i.type){case ImageDetailActions.INSIGHTS_FETCH_REQUESTED:case ImageDetailActions.MAINIMAGE_MODULES_FETCH_REQUESTED:return r=Object.assign({},n),r[t].nextInsightsSfx++,r;case ImageDetailActions.FILMSTRIP_FETCH_REQUESTED:return r=Object.assign({},n),r[t].nextFilmstripSfx++,r}return n}function si(t,i){var r=t.imageDetailsState,f,u;switch(i.type){case ImageDetailActions.FILMSTRIP_FETCH_COMPLETED:return u=r.slice(),f=n.processFilmstrip(u[0],i),u[0]=f,u;case ImageDetailActions.ADD_TO_DETAILSTATE_HISTORY:return f=r[0],[f].concat(r);case ImageDetailActions.REMOVE_FROM_DETAILSTATE_HISTORY:return r.slice(1);case ImageDetailActions.SWITCH_SCENARIO:return u=r.slice(),u[0]=n.handleSwitchScenario(u[0],i),f=Object.assign({},u[0],{isInsightsExpanded:w(t,i.scenario),isInsightsButtonFocused:!1,insightsViewState:g(u[0].insightsViewState,i)}),u[0]=f,u;default:return u=r.slice(),f=Object.assign({},u[0],{selectedIndex:n.handleNavigation(r[0].selectedIndex,i,ot(t).length),cropCoordinates:wi(r[0].cropCoordinates,i),isHotspotClick:bi(r[0].isHotspotClick,r[0].cropCoordinates,i),navigationInfo:n.handleNavigationInfo(r[0].navigationInfo,i),filmstripRequestState:n.updateFilmStripRequestState(r[0].filmstripRequestState,i),results:n.updateImageDetail(r[0].results,i),imageStates:n.updateImageStates(r[0].imageStates,i),isInsightsExpanded:pt(t,i),isInsightsButtonFocused:wt(t,i),insightsViewState:g(r[0].insightsViewState,i),isPageActive:hi(r[0].isPageActive,i)}),u[0]=f,u}}function hi(n,t){return(n===void 0&&(n=!0),t.type==ImageDetailActions.CHANGE_PAGE_ACTIVITY)?t.isActive:n}function ci(n){var t=i(n);return t?t.isPageActive:!0}function g(n,t){var i=t;switch(t.type){case ImageDetailActions.CHANGE_INSIGHTS_SELECTED_MODULE:return Object.assign({},n,{selectedModule:i.selectedModule});case ImageDetailActions.CHANGE_INSIGHTS_EXPANDED_MODULES:return Object.assign({},n,{expandedModules:i.expandedModules});case ImageDetailActions.CHANGE_PAGE_VIEW:return Object.assign({},n,{viewType:i.viewType})}return n}function li(t,i){var e,u,c,r,s,o;t===void 0&&(t={});switch(i.type){case ImageDetailActions.INSIGHTS_FETCH_REQUESTED:if(e=i,u=e.requestConfig,u&&u.id){var f=u.id,r=Object.assign({},t),h={requestState:ImageDetailActions.RequestState.Pending,moduleRequestState:tt(ImageDetailActions.RequestState.Pending,e,{}),data:{}};return r[f]=h,r}case ImageDetailActions.INSIGHTS_MODULE_FETCH_REQUESTED:if(e=i,u=e.requestConfig,u&&u.id){var f=u.id,r=Object.assign({},t),h={requestState:r[f]?r[f].requestState:ImageDetailActions.RequestState.Pending,moduleRequestState:r[f]?r[f].moduleRequestState||{}:{},data:r[f]?r[f].data:{}};return h.moduleRequestState[u.moduleNames[0]]=ImageDetailActions.RequestState.Pending,r[f]=h,r}break;case ImageDetailActions.INSIGHTS_FETCH_COMPLETED:case ImageDetailActions.INSIGHTS_FETCH_FAILED:return nt(t,i,ImageDetailActions.INSIGHTS_FETCH_COMPLETED,n.processInsights);case ImageDetailActions.INSIGHTS_MODULE_FETCH_COMPLETED:return n.processInsightsModule(t,i);case ImageDetailActions.PI_FETCH_COMPLETED:case ImageDetailActions.PI_FETCH_FAILED:return nt(t,i,ImageDetailActions.PI_FETCH_COMPLETED,n.processPageIncluding);case ImageDetailActions.INSIGHTS_ID_DELETE:if(c=i,c.ids){for(r=Object.assign([],t),s=c.ids,o=0;o0){for(o=Object.assign({},r),s=n.updateInsightsRequestState(t,i),u=0;u0?n.imageDetailsState[0]:null}function rr(n){return n.imageDetailsState.length}function ur(n){var t=i(n);return t&&t.imageGroups?t.imageGroups:null}function fr(n){var t=i(n);return t?t.results:null}function er(n){var t=i(n);return t?t.imageStates:null}function or(n,t){var r=i(n),u=r?r.imageStates:null;return t&&u[t]?u[t]:null}function ot(n){var t=i(n);return t?t.imageList:null}function sr(t){if(v&&v.hasVPTestFlag(“inspin”))return!0;var u=i(t),r=n.getPageConfig();return r.enableMobileView&&r.enableInsights||u.isInsightsExpanded}function hr(n){var t=i(n);return t.isInsightsButtonFocused}function st(n,t){if(t>=0&&t0?e.concat(h):[h],f=n.getPageConfig(),a===u.VisualSearch){if(o&&r&&f&&f.visualSearchParams)r+=”&”+t.stringFormat(f.visualSearchParams,o.left,o.top,o.right,o.bottom,e?e.toString():””,v?”1″:””);else if(!f.enableDetailV2)return””}else f.enableSiteFilter&&(r+=”&”+t.stringFormat(f.visualSearchParams,0,0,1,1,h));return r}function y(i,f){var a,o;f===void 0&&(f=ct(i));var v=n.getPageConfig(),w=c(i),y=s(i),e=f&&f.imgUrl?t.stringFormat(v.insightsImageUrlParam,encodeURIComponent(f.imgUrl)):null;return e&&p(i,h(i,e))?e:w==l.SearchByImageUpload&&y!=u.VisualSearch?””:f&&f.insightsToken?(o=t.stringFormat(v.insightsTokenParams,encodeURIComponent(f.insightsToken)),y==u.VisualSearch&&e&&(o+=”&”+e),o):(a=r(i),a&&a.insightsToken)?(o=t.stringFormat(v.insightsTokenParams,encodeURIComponent(a.insightsToken)),y==u.VisualSearch&&e&&(o+=”&”+e),o):e}function lr(n){return n.insightsIdsQueue}function p(n,t){return(t===void 0&&(t=e(n)),t!=null&&n.imageInsightsState!=null&&n.imageInsightsState[t]!=null)?n.imageInsightsState[t]:null}function vt(n,t){return(t===void 0&&(t=e(n)),t&&n.mainImageModulesState!=null&&n.mainImageModulesState[t]!=null)?n.mainImageModulesState[t]:null}function r(n,t){t===void 0&&(t=e(n));var i=p(n,t);return i?i.data:null}function f(n,t){t===void 0&&(t=h(n));var i=vt(n,t);return i?i.data:null}function ar(n,t){t===void 0&&(t=h(n));var i=f(n,t);return i?i.image:null}function vr(n,t){var i=f(n,t);return i?i.detectedObjects:null}function yr(n,t){var i=f(n,t);return i?i.trivia:null}function pr(n,i){var u=f(n,i),r=u?u.recognizedEntities:null,e;return r&&r.length>0&&r[0]?(e=r.sort(t.entityCompare),e.filter(function(n,t,i){return i.map(function(n){return n.region.left.toString().concat(n.region.bottom.toString(),n.region.right.toString(),n.region.top.toString())}).indexOf(n.region.left.toString().concat(n.region.bottom.toString(),n.region.right.toString(),n.region.top.toString()))===t})):null}function wr(n,t){var i=f(n,t);return i?i.imageBasedRelatedSearches:null}function br(n,t){var i=f(n,t);return i?i.queryBasedRelatedSearches:null}function kr(n,t){var i=f(n,t);return i?i.brq:null}function dr(n,t){var i=r(n,t);return i&&i.isPagesIncludingLazyLoaded}function gr(n,t){var i=r(n,t);return i?i.pagesIncluding:null}function nu(n,t){var i=r(n,t);return i?i.imageTags:null}function tu(n,t){var i=r(n,t);return i?i.shoppingSources:null}function iu(n,t){var i=r(n,t);return i?i.recipes:null}function ru(n,t){t===void 0&&(t=e(n));var i=r(n,t);return i?i.visuallySimilarImages:null}function uu(n,t){t===void 0&&(t=e(n));var i=r(n,t);return i?i.visuallySimilarProducts:null}function fu(n,t){t===void 0&&(t=e(n));var i=r(n,t);return i?i.feedImages:null}function eu(n,t){t===void 0&&(t=e(n));var i=f(n,t);return i?i.caption:null}function ou(n,t){var i=r(n,t);return i?i.knowledgeTags:null}function su(n,t){var i=r(n,t);return i?i.objectKnowledgeTags:null}function hu(n){return n.curDate}function cu(n,t){var i=r(n,t);return i?i.requestParams:null}function lu(n){return n.instSfxData}function au(n){return n.logQueue}function yt(n){var t=i(n);return t?t.ig:null}function pt(n,t){var f=s(n),e,r;if(f==u.DetailL2View||f==u.VisualSearch)return!0;if(e=c(n),r=i(n),r&&r.isInsightsExpanded==null)return w(n,e);switch(t.type){case ImageDetailActions.CHANGE_INSIGHTS_STATUS:return t.isInsightsExpanded;default:return r.isInsightsExpanded}}function wt(n,t){var r=i(n);switch(t.type){case ImageDetailActions.CHANGE_INSIGHTS_STATUS:return t.needFocus;default:return r.isInsightsButtonFocused}}function w(i,r){var e=n.getForceInsightsExpandMode(r),u,f;if(e)return!0;if(u=n.getMainImageExpandModeCookieOvereWrite(i,r),u){f=t.getMainImageExpandCookie();switch(f){case”1″:return!1;case”0″:return!0}}return!n.getMainImageExpandMode(r)}function c(n){var t=i?i(n):null;return t?t.detailScenario:ImageDetailActions.DetailScenario.Default}function vu(n){var t=i?i(n):null;return t?t.isClickboosted:!1}var t=Multimedia.ImageDetailUtils,l=ImageDetailActions.DetailScenario,u=ImageDetailActions.IImageDetailViewType,a=ImageDetailActions.IImageDetailScriptRequestType,bt=Multimedia.InsightsViewStateUtils,v=typeof Multimedia.ImageDetailTestUtils!=”undefined”?Multimedia.ImageDetailTestUtils:null,kt=gt(),dt={};n.imageDetail=ti;n.favortesMap=b;n.getCurrentFavortesMap=ii;n.pageSize=d;n.getPageSize=ri;n.getIsPageActive=ci;n.insightsPosition=it;n.getInsightsPosition=gi;n.getCropCoordinates=rt;n.getIsHotspotClick=ut;n.getViewType=s;n.getVisibilityTracker=nr;n.getscriptLoadingState=tr;n.getIsFullScaleView=ir;n.getSelectedAnnotations=ft;n.getSiteFilter=et;n.getCurrentImageDetailState=i;n.getImageDetailStatesCount=rr;n.getImageGroups=ur;n.getResultsMap=fr;n.getImageStates=er;n.getImageStateById=or;n.getResultsIds=ot;n.getIsInsightsExpanded=sr;n.getIsInsightsButtonFocused=hr;n.getResultAtIndex=st;n.getNavigationInfo=cr;n.getSelectedIndex=ht;n.getCurrentResult=ct;n.getDisplayInsightsId=e;n.getInsightsViewState=lt;n.getInsightsId=h;n.getFullInsightsRequestParams=at;n.getInsightsRequestParams=y;n.getInsightsIdsQueue=lr;n.getInsightsState=p;n.getImageModulesState=vt;n.getInsightsData=r;n.getImageModulesData=f;n.getImageData=ar;n.getDetectedObjects=vr;n.getTriviaItems=yr;n.getRecognizedEntities=pr;n.getImageBasedRelatedSearches=wr;n.getQueryBasedRelatedSearches=br;n.getImageBrq=kr;n.getPagesIncludingLazyLoadedStatus=dr;n.getInsightsPagesIncludingItems=gr;n.getInsightsImageTags=nu;n.getInsightsShoppingSourcesItems=tu;n.getInsightsRecipesItems=iu;n.getVisuallySimilarImages=ru;n.getVisuallySimilarProducts=uu;n.getFeedImages=fu;n.getInsightsImageCaption=eu;n.getKnowledgeTags=ou;n.getObjectKnowledgeTags=su;n.getCurrentDate=hu;n.getInsightsRequestParamsById=cu;n.getInstSfxData=lu;n.getLogQueue=au;n.getCurrentImpressionId=yt;n.isInsightsExpanded=pt;n.isInsightsButtonFocused=wt;n.shouldExpandInsights=w;n.getDetailScenario=c;n.IsClickBoosted=vu})(ImageDetailReducers||(ImageDetailReducers={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i0&&(t=t+”.”+n.CurrentUseCount),ServerSideLayoutInstrumentation.startLink(n.UniqueId.Namespace,t,this.state.nodeName,this.state.parentNodeName),ServerSideLayoutInstrumentation.closeLink())},t.prototype.componentWillReceiveProps=function(n){this.setState(this.getNewState(n))},t.prototype.getNewState=function(n){var u=”InstNodeName”,y=n.hasOwnProperty(u)&&n[u]?n[u]:null,f=”InstParentNodeName”,p=n.hasOwnProperty(f)&&n[f]?n[f]:null,l=”InstItem”,r=n[l],a=”TestHooksEnabled”,w=n[a]===!0,s=”Content”,v=[“elementname”,”link”,”instrumenteditem”,”formcode”,”clicktrackingfunctionoverride”,”donotrendertag”,”counter”,”fdl:om”,”fdl:text”,”fdl:dispUrl”,”fdl:position”],i={},t,e,o,h,c;for(t in n)if(n.hasOwnProperty(t))if(t.toLowerCase()===”attributes”){e=n[t];for(o in e)h=o.toLowerCase(),e.hasOwnProperty(o)&&v.indexOf(h)u)&&!(ri.length)&&(f||!(u-rn.offsetHeight?t(n,i,r,o-1,!0,e):t(n,i,o+1,u,!1,e)}}function i(n,i,r){if(n&&n.innerText&&i){var u=n.innerText,f=!1;n.scrollHeight>n.offsetHeight&&(t(n,u,0,u.length,!0,i),f=!0);!n.hasAttribute(r)&&f&&n.setAttribute(r,u)}}n.truncate=i})(TextTruncator||(TextTruncator={}));var SharedComponent;(function(n){function t(n){return n.link!=null?React.createElement(InstLink,{InstItem:n.link},n.children):n.children}n.LinkWrapper=t})(SharedComponent||(SharedComponent={}));var SharedComponent;(function(n){var t=function(t){return React.createElement(n.LinkWrapper,{link:t.link},React.createElement(“img”,{src:t.src,width:t.width,height:t.height,onClick:t.onClick,onContextMenu:t.onContextMenu,onMouseLeave:t.onMouseLeave,onMouseOver:t.onMouseEnter,onMouseOut:t.onMouseOut,title:t.title,alt:t.altText,className:t.className,style:t.style,role:t.role,onLoad:t.onLoad,ref:function(n){t.getRef&&t.getRef(n)}}))};n.ImageBase=t})(SharedComponent||(SharedComponent={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i0&&React.createElement(“span”,{className:”adjacentContainer”},t.adjacentComponents.map(function(n,t){return React.createElement(“span”,{key:t},n)})),i&&React.createElement(f,__assign({},i)),t.overlayComponents&&t.overlayComponents.length>0&&React.createElement(“div”,{className:”overlayContainer”,ref:function(n){u.overlayContainer=n},style:t.overlayStyle,onClick:t.overlayOnClick},React.createElement(“ul”,null,t.overlayComponents.map(function(n,t){return React.createElement(“li”,{key:t},n)}))),t.hoverComponents&&t.hoverComponents.length>0&&React.createElement(“div”,{className:”hoverContainer”},React.createElement(“ul”,null,t.hoverComponents.map(function(n,t){return React.createElement(“li”,{key:t},n)}))))),t.captionComponents&&t.captionComponents.length>0&&React.createElement(“div”,{className:”captionContainer”,ref:function(n){u.captionContainer=n},onClick:t.captionsOnClick},React.createElement(“a”,{target:”_blank”,href:t.captionLink},React.createElement(“ul”,null,t.captionComponents.map(function(n,t){return React.createElement(“li”,{key:t},n)})))))},u.hoverClassName=”hover”,u}(i);n.RichImageUnit=u;n.RichImageUnit.displayName=”RichImageUnit”})(SharedComponent||(SharedComponent={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i1?n.ImageDetailUtils.stringFormat(f,””+i.shoppingSourceCount):o:null))))},o}(React.Component);t.VisuallySimilarProductUnit=o})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var r=n.InstrumentationUtils.logResultClickEvent,u=ImageDetailActions.IImageDetailViewType,i=n.ImageDetailUtils,f=2,e=2,o=function(u){function o(n){var t=u.call(this,n)||this,o,r,s;return t.thumbnailSize=0,t.config=ImageDetailReducers.getPageConfig().vsProductsConfig,t.gridConfig=n?t.config.PositionToGridConfig[n.insightsPosition]:null,o=t.gridConfig?t.gridConfig.GridRowCount:f,r=t.gridConfig?t.gridConfig.GridColumnCount:e,t.maxCount=o*r,t.thumbnailSize=i.getVisuallySimilarGridThumbnailSize(t.config,n&&n.isInsightsAtBottom,r),s=Math.floor(100/r),t.style=t.props.isGridView?{width:s+”%”}:null,t.units=t.createProductUnits(n),t}return __extends(o,u),o.prototype.componentWillReceiveProps=function(n){if(n.data!=this.props.data&&(this.units=this.createProductUnits(n)),n.isInsightsAtBottom!=this.props.isInsightsAtBottom){this.gridConfig=this.config.PositionToGridConfig[this.props.insightsPosition];var t=this.gridConfig?this.gridConfig.GridColumnCount:0;this.thumbnailSize=i.getVisuallySimilarGridThumbnailSize(this.config,n.isInsightsAtBottom,t)}},o.prototype.createProductUnits=function(n){var i=this,u=[];return n.data&&n.data.slice(0,this.maxCount).map(function(n,f){var e=function(){i.props.similarItemOnClick(f,i.props.insightsPivotParams,!i.props.isGridView);r(n.instInfo,”RelatedProduct”,i.props.ig,null)};u.push(React.createElement(t.VisuallySimilarProductUnit,{imageSize:i.props.isGridView?i.thumbnailSize:i.config.GridThumbnailSize,key:f,containerStyle:i.style,data:n,onClick:e,isGridUnit:i.props.isGridView}))}),u},o.prototype.render=function(){return this.props&&this.props.data?React.createElement(“div”,{id:”vsp_preview”,className:”vs_preview vsp”,ref:this.props.elementRef},this.props.isGridView?this.units.map(function(n){return n}):React.createElement(SharedComponent.CarouselComponent,{enableLeftNav:!1,enableRightNav:!1,carouselItems:this.units,onSetupSwipe:n.ImageDetailCarouselUtils.setupCarouselSwipe})):null},o}(React.Component),s=function(n,t){var i=ImageDetailReducers.getInsightsPosition(n),r=ImageDetailReducers.getPageConfig().enableMobileView;return{insightsPivotParams:ImageDetailReducers.getInsightsRequestParamsById(n,t.insightsId),isInsightsAtBottom:i==ImageDetailActions.InsightsPosition.Bottom,ig:ImageDetailReducers.getCurrentImpressionId(n),insightsPosition:i,isGridView:!r}},h=function(n,t){return{similarItemOnClick:function(i,r,f){n(ImageDetailActions.addToDetailStateHistory());n(ImageDetailActions.switchDetailScenario(ImageDetailActions.DetailScenario.VisuallySimilarProducts,null,r,t.data));f&&n(ImageDetailActions.changePageView(u.Default));n(ImageDetailActions.navigateTo(i))}}};n.ImageDetail.VisuallySimilarProductView=ReactRedux.connect(s,h)(o);n.ImageDetail.VisuallySimilarProductView.displayName=”VisuallySimilarProductView”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i1?n.ImageDetailUtils.stringFormat(i.storePlural,””+t.shoppingSourceCount):e:null),u&&u.data&&React.createElement(SharedComponent.Rating,__assign({},u.data))]})},u}(React.Component);t.RelatedProductUnit=u})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var RowItemsPlannerModule;(function(n){var t=function(){function n(n,t,i,r){this.containerWidth=0;this.remainingWidth=0;var u=this;u.containerWidth=n.width;u.container=n;u.layoutOptions=t;u.init(i,r,n.width)}return n.prototype.init=function(n,t,i){var r=this;r.remainingWidth=i;r.rowHeight=r.layoutOptions.defaultRowHeight;r.maxIdealRowHeight=r.layoutOptions.maxRowHeight;r.aspectRatioSum=0;r.nextItemXValue=0;r.horizontalOffset=n;r.verticalOffset=t;r.plannedItems=[];r.isFullRow=!1;r.minRowHeightForPotraitItems=0},n.prototype.isLargeLayoutPreference=function(){var n=this.layoutOptions.maxWhitespaceRate;return n&&n>0},n.prototype.getIdealRowHeight=function(n,t){var i=this;return n>=t?t:nu.layoutOptions.minItemWidth,s,f,o;i>0&&h&&(e=(1-i/100)*e);s=Math.min(t.height,r);f=Math.round(s*e);s0&&h&&(e=(1-i/100)*u.getNormalizedAspectRatio(t),f=Math.round(r*e));o=u.getNormalizedItemWidth(f);fn.layoutOptions.minItemWidth&&(i=Math.min(i,e.itemWidth-n.layoutOptions.minItemWidth));s=(n.plannedItems.length-n.smallplannedItemsCount)*i;t=Math.min(s,t);f=n.plannedItems.length-n.smallplannedItemsCount}u=Math.ceil(t/f);t=this.remainingWidth0);n.remainingWidth-=t}n.remainingWidth!=0&&(t=Math.abs(this.remainingWidth),u=Math.ceil(t/n.plannedItems.length),this.adjustPlannedItems2(u,n.remainingWidth,!0),this.remainingWidth-=t)}},n.prototype.adjustPlannedItems2=function(n,t,i){for(var r,o,u,f=this,e=f.plannedItems.length-1;e>=0;e–){if(t==0)break;if(r=f.plannedItems[e],r.itemWidth0?(n.containerWidth+n.layoutOptions.hGap-n.horizontalOffset)/(n.layoutOptions.minItemWidth+n.layoutOptions.hGap):Number.MAX_VALUE},n.prototype.getWhitespacePercentage=function(){for(var u,t=this,i=0,r=0,f=t.plannedItems.length,n=0;nn.layoutOptions.minRowHeight&&n.getMaxAllowedPlannedItemsCount()>n.plannedItems.length&&n.getWhitespacePercentage()>n.layoutOptions.maxWhitespaceRate&&(n.isFullRow=!1)},n.prototype.updateMinRowHeightForPotraitItems=function(n){var t=this,r,i;t.layoutOptions.minItemWidth!=0&&n.height>=n.width&&(r=n.width/n.height,i=Math.round(t.layoutOptions.minItemWidth/r),i=Math.min(i,t.maxIdealRowHeight),t.minRowHeightForPotraitItems=Math.max(t.minRowHeightForPotraitItems,i))},n.prototype.getRowHeightWithAllItems=function(n){var t=this,h=t.aspectRatioSum,c,f,r,i,s;if(this.updateMinRowHeightForPotraitItems(n),c=t.getNormalizedAspectRatio(n),h+=c,f=t.plannedItems.length+1,r=Math.round((t.containerWidth-(f-1)*t.layoutOptions.hGap)/h),rt.layoutOptions.minItemWidth?e+=s:l++;e!=0&&(r=Math.round((t.containerWidth-l*t.layoutOptions.minItemWidth-(f-1)*t.layoutOptions.hGap)/e))}return r},n.prototype.getCropPercentToFitAllPlannedItems=function(){for(var t,f,e,n=this,u=n.containerWidth-(n.plannedItems.length-1)*n.layoutOptions.hGap,i=0,o=n.plannedItems.length,r=0;r0||!t.isFullRow)if(f=t.getIdealRowHeight(n.height,t.rowHeight),i=t.getRowHeightWithAllItems(n),t.maxIdealRowHeight=t.isLargeLayoutPreference()?Math.min(Math.max(n.height,t.maxIdealRowHeight),t.layoutOptions.maxRowHeight):Math.min(n.height,t.maxIdealRowHeight),f=t.layoutOptions.minRowHeight)t.updatePlannedItems(i,0),t.addPlannedItem(n,0),t.rowHeightToFitAllPlannedItems=i,r=!0,t.adjustPlannedItems(),t.isFullRow=!0;else{if(s=!1,h=t.plannedItems.length,h>0){for(u=Number.MAX_VALUE,e=0;e=a)}s?(y=Math.min(o,this.rowHeightToFitAllPlannedItems),t.updatePlannedItems(y,0),r=!1,t.adjustPlannedItems(),t.isFullRow=!0):(t.rowHeight=t.layoutOptions.minRowHeight,t.addPlannedItem(n,0),p=t.getCropPercentToFitAllPlannedItems(),t.updatePlannedItems(t.rowHeight,p),r=!0,t.adjustPlannedItems(),t.isFullRow=!0)}return r},n}();n.RowItemsPlanner=t})(RowItemsPlannerModule||(RowItemsPlannerModule={}));var RowMajorPlannerModule;(function(n){var i=RowItemsPlannerModule.RowItemsPlanner,r=function(){function n(n,t){this.containerWidth=0;this.rowNumber=0;this.vOffset=0;this.isInited=!1;var r=this;n&&t&&!r.isInited&&(r.containerWidth=n.width,r.container=n,r.layoutOptions=t,r.isInited=!0,r.rowNumber=1,r.rowItemsPlanner=new i(n,t,0,0))}return n.prototype.renderPlannedItems=function(){for(var n,t=this,r=t.rowItemsPlanner.plannedItems.length,i=0;i0){for(r=n.length,i=0;i https://www.bing.com/rs/3P/5p/cj,nj/885b1409/6940def3.js //0&&(o=Math.max(u,f),o>e&&(i=Math.min(i,e/o)));s=n.MaxScale;s>0&&(i=Math.min(i,s));var h=n.MaxAreaRoot,l=n.MinAreaRoot,c=Math.sqrt(f*u);return h>0&&c>h&&(r=h/c,i=Math.min(i,r)),l>0&&(r=l/c,ri?i=r:r>=1&&(i=1)),{width:Math.round(u*i),height:Math.round(f*i)}},n}();n.ThumbnailConstraintProcessor=t})(MultimediaComponent||(MultimediaComponent={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i0&&u.imgWidth/u.imgHeight=i.WaterfallThreshold?t.ColumnBased:t.RowBased},n}();n.VisuallySimilarPlanner=i})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),SharedComponent;(function(n){var t=function(n){function t(t){var i=n.call(this,t)||this;return i.isContainerCollapsed=!1,i.position=null,i.hasContainerCollapseChanged=function(n){return i.isContainerCollapsed!=n.isContainerCollapsed?(i.isContainerCollapsed=n.isContainerCollapsed,!0):!1},i.state={visible:!0,element:null},i}return __extends(t,n),t.prototype.isVisible=function(n,t,i){var r=!n||!t||n.top+n.height0?{left:n.offsetLeft,top:n.offsetTop,width:n.offsetWidth,height:n.offsetHeight}:null},t.prototype.componentDidMount=function(){var n=this.props.item.position?this.props.item.position:this.getPosition(this.element);this.setState({element:this.element,visible:this.isVisible(n,this.props.containerHeight,this.props.visibleCallback)});this.position=n},t.prototype.componentWillReceiveProps=function(n){if(this.props.containerHeight&&n.containerHeight!==this.props.containerHeight||this.hasContainerCollapseChanged(n)){var t={visible:this.isVisible(this.position,n.containerHeight,n.visibleCallback)};this.setState(t)}n.item!==this.props.item&&(n.item.position?(this.setState({visible:this.isVisible(n.item.position,n.containerHeight,n.visibleCallback)}),this.position=n.item.position):this.setState({visible:!0}))},t.prototype.componentDidUpdate=function(n){if(this.props.item!==n.item&&!this.props.item.position){var t=this.getPosition(this.state.element);this.setState(Object.assign({},this.state,{visible:this.isVisible(t,this.props.containerHeight,this.props.visibleCallback)}));this.position=t}},t.prototype.render=function(){var n=this;return React.createElement(“li”,{ref:function(t){return n.element=t},style:this.props.item.style,className:this.state.visible?null:”b_hide”},this.state.visible&&this.props.item.content)},t}(React.Component),i=function(i){function r(t){var r=i.call(this,t)||this;return r.expansionButton=null,r.collapseButton=null,r.isLazyLoadDataReady=!1,r.isAutoExpandSet=!1,r.isAutoExpandRequired=function(n){return!n.enableLazyLoadData||!n.expandOnLoad||r.isLazyLoadDataReady?!1:!0},r.getLazyLoadDataReadyStatus=function(n){return r.props.enableLazyLoadData&&n.isLazyLoadDataReady&&!r.props.isLazyLoadDataReady?!0:!1},r.onExpand=function(){var n,t;r.props.fadeOutOverflowItem?(n=0,r.renderHeight=r.props.expandStepHeight?r.renderHeight+r.props.expandStepHeight:r.renderHeight,t=!1):(n=r.props.expandStepHeight?r.state.containerHeight+r.props.expandStepHeight:0,t=n>0);r.setState({containerHeight:n,renderHeight:r.renderHeight,enableExpandButton:t,isCollapsed:!1});r.props.onExpandCallBack&&r.props.onExpandCallBack()},r.onCollapse=function(){r.renderHeight=r.props.initialHeight;r.setState(r.getDefaultState(r.props,!0));r.props.onCollapseCallBack&&r.props.onCollapseCallBack()},r.setAllVisible=function(n){r.setState({enableExpandButton:!1},function(){return r.setRenderHeight(n)})},r.setRenderHeight=function(n){n&&n.top+n.height>r.renderHeight&&(r.renderHeight=n.top+n.height);r.setState({renderHeight:r.renderHeight,isCollapsed:!1})},r.getExpansionCallback=function(){return r.props.enableLazyLoadData&&!r.props.isLazyLoadDataReady?r.onLateLoadExpandClick:r.onExpand},r.onLateLoadExpandClick=function(){r.props.enableLazyLoadData&&!r.props.isLazyLoadDataReady&&(r.props.onLazyLoadData&&r.props.onLazyLoadData(),r.props.enableLazyLoadIndicator&&r.setState({enableExpandButton:!1,isCollapsed:!1}))},r.getExpansionButton=function(){if(r.expansionButton==null){var n=r.props,t=n.expansionText,i=n.expansionItem,u=r.getExpansionCallback();r.expansionButton=r.createButton(t,i,”expander_btn”,”multimedia.sharedComponent.expandButton”,u)}return r.expansionButton},r.getCollapseButton=function(){if(r.collapseButton==null){var n=r.props,t=n.collapseText,i=n.collapseItem;r.collapseButton=r.createButton(t,i,”collapse_btn”,”multimedia.sharedComponent.collapseButton”,r.onCollapse)}return r.collapseButton},r.createButton=function(t,i,r,u,f){return i?React.createElement(n.AccessibleComponent,{onClick:f},i):t&&React.createElement(n.AccessibleComponent,{className:r,onClick:f,”data-tag”:n.isTestHookEnabled()?u:null},t)},r.getRenderStyle=function(){var n={position:”relative”};return r.state.renderHeight&&(n=Object.assign({},n,{height:r.state.renderHeight})),n},r.getVisibleCallback=function(n,t){return r.props.fadeOutOverflowItem?null:t==n.length-1?r.setAllVisible:r.setRenderHeight},r.shouldShowCollapseButton=function(){return r.state.isCollapsed||!r.props.enableCollapse?!1:r.isLazyLoadDataReady||r.props.collapseText!=r.props.expansionText?!0:r.props.enableLazyLoadIndicator?!0:!1},r.shouldShowLazyLoadIndicator=function(){return r.props.enableLazyLoadIndicator&&!r.props.isLazyLoadDataReady&&!r.state.isCollapsed},r.renderHeight=t.fadeOutOverflowItem?r.props.initialHeight:0,r.state=r.getDefaultState(t,!0),r}return __extends(r,i),r.prototype.componentWillReceiveProps=function(n){this.isLazyLoadDataReady=this.getLazyLoadDataReadyStatus(n);this.isAutoExpandSet=this.isAutoExpandRequired(n);(this.props.items!==n.items||this.props.initialHeight!=n.initialHeight)&&(this.renderHeight=n.fadeOutOverflowItem?n.initialHeight:0,this.setState(this.getDefaultState(n,!0)));this.isUpdateExpandButtonRequired(n)&&(this.expansionButton=null);n.enableCollapse&&(this.props.collapseText!=n.collapseText||this.props.collapseItem!=n.collapseItem)&&(this.collapseButton=null)},r.prototype.isUpdateExpandButtonRequired=function(n){return this.props.expansionText!=n.expansionText||this.props.expansionItem!=n.expansionItem?!0:n.enableLazyLoadData&&this.isLazyLoadDataReady?!0:this.props.items!==n.items?!0:!1},r.prototype.getDefaultState=function(n,t){return{containerHeight:n.fadeOutOverflowItem?0:n.initialHeight,renderHeight:n.initialHeight,enableExpandButton:!0,isCollapsed:t&&n.enableCollapse||!1}},r.prototype.render=function(){var i=this,r=this.getRenderStyle(),f=this.getExpansionButton(),u=this.props,n=u.items,e=u.itemVisibleCallback;return React.createElement(“div”,{className:”expander_container”},this.shouldShowCollapseButton()&&this.getCollapseButton(),React.createElement(“div”,{className:”expander_content”,style:r},React.createElement(“ul”,{style:r},n&&n.length>0&&n.map(function(r,u){return React.createElement(t,{key:u,item:r,isContainerCollapsed:i.state.isCollapsed,containerHeight:i.state.containerHeight,visibleCallback:i.getVisibleCallback(n,u)})}))),this.state.enableExpandButton&&f,this.shouldShowLazyLoadIndicator()&&React.createElement(“div”,{className:”ll_lcn”}))},r.prototype.componentDidMount=function(){this.props.expandOnLoad&&this.props.enableLazyLoadData&&(this.props.isLazyLoadDataReady?this.onExpand():(this.onLateLoadExpandClick(),this.isAutoExpandSet=!1))},r.prototype.componentDidUpdate=function(){this.props.expandOnLoad&&this.props.enableLazyLoadData&&!this.isLazyLoadDataReady&&this.isAutoExpandSet&&(this.onLateLoadExpandClick(),this.isAutoExpandSet=!1);this.isLazyLoadDataReady&&(this.onExpand(),this.isLazyLoadDataReady=!1)},r}(React.Component);n.ExpanderContainer=i;n.ExpanderContainer.displayName=”ExpanderContainer”})(SharedComponent||(SharedComponent={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){function r(r,u,f){return function(e){function o(i){var u=e.call(this,i)||this,o;return u.plannerContainerHeight=0,u.getState=function(n){var f=[],o=u.planner.createPlannerInputItems(n,function(n,t,i){return u.renderItem(n,t,i,f)}),e=u.getLayoutType(),i,r;return u.planner.plan(e,o),r=0,e==t.LayoutType.ColumnBased?!u.props.config||!u.props.config.InitialHeight||u.plannerContainerHeightu.plannerContainerHeight&&(u.plannerContainerHeight=n)},o={id:r,width:i.containerWidth,setHeight:u.setPlannerContainerHeight},u.planner=new t.VisuallySimilarPlanner(o,i.config,i.thumbnailProcessor),u.plannerItems=[],u.state=u.getState(i.items),u}return __extends(o,e),o.prototype.componentWillReceiveProps=function(n){(n.items!=this.props.items||n.containerWidth!=this.props.containerWidth)&&(n.containerWidth!=this.props.containerWidth&&(this.planner.container.width=n.containerWidth),this.plannerContainerHeight=0,this.setState(this.getState(n.items)))},o.prototype.transformToRichImageUnit=function(t,i,r){var f={src:n.ImageDetailUtils.createThumbnailUrl(i.thumbUrl,t.itemWidth,t.itemHeight),width:t.itemWidth,height:t.itemHeight,altText:this.props.ariaLabel},e={width:t.conWidth,height:t.conHeight};return u(i,r,f,SharedComponent.RichImageUnit,e,null)},o.prototype.render=function(){var n=”vs_container”,f,u;return i&&i.isHoverRequestedByVPTest()&&(n=i.appendVPTestHoverClass(n)),f=this.getLayoutType(),u=React.createElement(“div”,{className:”expander_btn”},this.props.expansionText),f==t.LayoutType.ColumnBased&&(n+=” wf_container”,u=this.state.expanderStepHeight>0?React.createElement(“div”,null,React.createElement(“div”,{className:”fadeout”}),u):null),this.state.items&&React.createElement(“div”,{id:r,className:n},React.createElement(SharedComponent.ExpanderContainer,{items:this.state.items,initialHeight:this.state.expanderInitialHeight,expandStepHeight:this.state.expanderStepHeight,expansionItem:u,fadeOutOverflowItem:f===t.LayoutType.ColumnBased,onExpandCallBack:this.props.onExpandCallBack}))},o}(React.Component)}var i=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null;t.createStaticHeightRichImagesComponent=r})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){function i(i,r){return function(u){function f(f){var e=u.call(this,f)||this,o;return e.plannerItems=[],e.plannerContainerHeight=0,e.addPlannerInput=function(n){e.plannerItems.push(n)},e.setPlannerContainerHeight=function(n){n>e.plannerContainerHeight&&(e.plannerContainerHeight=n)},e.planItems=function(){e.plannerItems.length>0&&e.props.containerWidth>0&&(e.planner.plan(t.LayoutType.ColumnBased,e.plannerItems),e.setState({expanderInitialHeight:e.plannerContainerHeight>e.props.config.InitialHeight&&!e.props.showAll?e.props.config.InitialHeight:e.plannerContainerHeight,expanderStepHeight:e.plannerContainerHeight>e.props.config.InitialHeight&&!e.props.showAll?e.plannerContainerHeight-e.props.config.InitialHeight:0}))},e.createRichImageUnits=function(t){var i=[];return t&&t.map(function(t,u){var f=e.props.thumbnailProcessor.process(e.props.thumbnailProcessor.ThumbnailConstraintType.Inline,{width:t.imgWidth,height:t.imgHeight}),o={itemWidth:f.width,itemHeight:f.height,enableDynamicContainerHeight:!0,imageUrlProcessor:function(i,r){return n.ImageDetailUtils.createThumbnailUrl(t.thumbUrl,i,r)}},s={src:t.thumbUrl,altText:e.props.ariaLabel},h={content:r(t,u,s,e.richImageComponent,null,o)};i.push(h)}),i},o={id:i,width:f.containerWidth,setHeight:e.setPlannerContainerHeight},e.richImageComponent=SharedComponent.createRichImagePlannerComponent(e.addPlannerInput),e.enableMobileView=ImageDetailReducers.isMobileViewEnabled(),e.planner=new t.VisuallySimilarPlanner(o,f.config,f.thumbnailProcessor),e.state={items:e.createRichImageUnits(e.props.items),expanderInitialHeight:0,expanderStepHeight:0},e}return __extends(f,u),f.prototype.componentWillReceiveProps=function(n){n.containerWidth!=this.props.containerWidth&&(this.planner.container.width=n.containerWidth);n.items!=this.props.items&&(this.plannerItems=[],this.plannerContainerHeight=0,this.setState({items:this.createRichImageUnits(n.items)}))},f.prototype.componentDidMount=function(){this.planItems()},f.prototype.componentDidUpdate=function(n,t){(this.state.items!=t.items||this.props.containerWidth!=n.containerWidth)&&this.planItems()},f.prototype.render=function(){var n=React.createElement(“div”,{className:”expander_btn”},this.props.expansionText),t=this.state.expanderStepHeight>0&&this.props.showFadeout?React.createElement(“div”,null,React.createElement(“div”,{className:”fadeout”}),this.props.expandButtonEnabled&&n):null;return this.state.items&&React.createElement(“div”,{id:i,className:”vs_container wf_container”},React.createElement(SharedComponent.ExpanderContainer,{items:this.state.items,initialHeight:this.state.expanderInitialHeight,expandStepHeight:this.state.expanderStepHeight,onExpandCallBack:this.props.onExpandCallBack,fadeOutOverflowItem:!0,expansionItem:t}))},f}(React.Component)}t.createDynamicHeightRichImagesComponent=i})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i0&&(s=s.substr(0,h)));u=JSON.parse(s)}catch(c){t(e,n,”ParseError “+c,r)}if(u&&n.onRequestSuccess)n.onRequestSuccess(f,n,u);else if(u==null&&n.onRequestFailure)n.onRequestFailure(f,n,”empty data”)},r,!0,n.hostOverride,o)}}function e(n){if(n!=null&&n.url!=null)return function(r){if(n.onRequestSent)n.onRequestSent(r,n);var f=u(n);return i(f,function(i,u){if(i){if(t(f,n,i),n.onRequestFailure)n.onRequestFailure(r,n,i);return}if(n.onRequestSuccess)n.onRequestSuccess(r,n,u)},null,!1,n.hostOverride,!0)}}function i(n,t,i,r,u,f){var o,e;f||r&&!extractDomainFromUrl(n,!1)&&(o=u?u:_w.location.host,n=”https://”+o+n);e=new XMLHttpRequest;e.open(i?”POST”:”GET”,n);t&&(e.onload=function(){e.status==200?t(null,e.response):t(e.response)},e.onerror=function(){t(e.response)});e.send(i)}function u(t){var i=t.url,u,f;return(t.persistedQueryStrings&&(i=i+(i.indexOf(“?”)>0?”&”:”?”)+t.persistedQueryStrings),t.iid&&(i=i+”&IG=”+t.ig+”&IID=”+t.iid+”&SFX=”+t.sfx),t.retryCount&&t.retryCount!=0&&(i=i+”&RETRY=”+t.retryCount),r)?(u=t.testPostFix,t.scenario===n.DetailScenario.SearchByImageUpload&&(u+=”_sbi_upload”),f=i+r.getBagNameParameter(u),console.log(“testUrl:”+f),f):i}var t=Multimedia.InstrumentationUtils.logRequestError,r=typeof Multimedia.ImageDetailTestUtils!=”undefined”?Multimedia.ImageDetailTestUtils:null;n.fetchData=f;n.fetchHtml=e;n.makeRequest=i})(ImageDetailActions||(ImageDetailActions={}));var ImageDetailActions;(function(n){function h(t,i){var f=t.imageResult,e=u(t,i),s=a(f,e),h;return t.requestUrl&&s?(h={url:t.requestUrl,id:f.id,formData:s,testPostFix:”FavoritesAdd_”+f.id,persistedQueryStrings:t.persistedQueryStrings,collectionReference:e,requestErrorInstText:o},r(h,n.FAVORITES_ADD_REQUESTED,n.FAVORITES_ADD_FAILED,n.FAVORITES_ADD_COMPLETED,function(n){return n})):null}function c(t,i){var f=t.imageResult,e=u(t,i),o=v(f,e),h;return t.requestUrl&&o?(h={url:t.requestUrl,id:f.id,formData:o,testPostFix:”FavoritesRemove_”+f.id,persistedQueryStrings:t.persistedQueryStrings,collectionReference:e,requestErrorInstText:s},r(h,n.FAVORITES_REMOVE_REQUESTED,n.FAVORITES_REMOVE_FAILED,n.FAVORITES_REMOVE_COMPLETED,function(n){return n})):null}function l(t){if(t.requestUrl){var i={url:t.requestUrl,testPostFix:”Favorites”,persistedQueryStrings:t.persistedQueryStrings,requestErrorInstText:e};return r(i,n.FAVORITES_FETCH_REQUESTED,n.FAVORITES_FETCH_FAILED,n.FAVORITES_FETCH_COMPLETED,function(n){return y(n)})}return null}function a(n,t){if(n&&t){var i={targetCollection:t,items:[{mediaUrl:n.imgUrl,pageUrl:n.pageUrl,mediaId:n.id,type:”image”}]};return JSON.stringify(i)}return null}function v(n,t){if(n&&n.cid&&t){var i={itemReferences:[{collection:t,collectionItemId:”image:cid=”+n.cid}]};return JSON.stringify(i)}return null}function u(n,r){var f=n.imageResult.id,u;if(r[f])return r[f].collectionReference;if(n.query)return i(n.query,null);if(n.scenario){u=null;switch(n.scenario){case t.TopicFeed:case t.Recommendations:u=”ImageRecommendations”;break;case t.VisuallySimilarProducts:u=”ProductDefault”;break;default:u=”ImageDefault”}if(n.imageResult.isHomePage&&(u=”HomePage”),u!=null)return i(null,u)}else return null}function i(n,t){return n?{collectionTitle:n}:t?{predefinedCollection:t}:null}function r(n,t,i,r,u){return n.onRequestSent=function(n,i){return n({type:t,requestConfig:i})},n.onRequestFailure=function(n,t){return n({type:i,requestConfig:t})},n.onRequestSuccess=function(n,t,i){return n({type:r,requestConfig:t,response:u(i)})},n}function y(n){var i,r,t;if(n&&n.collections){for(i={},r=function(){var r=n.collections[t],u;r&&w(r.collectionPage)&&(u=r.collectionPage,u.items.map(function(n){if(n.content){var t=f.createImageInfo(n.content);i[t.id]=p(t,r.title,r.knownCollectionType)}}))},t=0;t0}var t=n.DetailScenario,f=Multimedia.ImageDetailResponseTransformer,e=”GetFavoritesError”,o=”AddFavoritesError”,s=”RemoveFavoritesError”;n.createAddFavoritesRequestConfig=h;n.createRemoveFavoritesRequestConfig=c;n.createGetFavoritesRequestConfig=l})(ImageDetailActions||(ImageDetailActions={}));var Multimedia;(function(n){var t;(function(t){function f(n,t,r,u){var f=ImageDetailActions.createAddFavoritesRequestConfig(n,t);f&&(r(ImageDetailActions.fetchData(f,f.formData)),i(n.imageResult,u,”InsightsAdd”))}function e(n,t,r,u){var f=ImageDetailActions.createRemoveFavoritesRequestConfig(n,t);f&&(r(ImageDetailActions.fetchData(f,f.formData)),i(n.imageResult,u,”InsightsRemove”))}function o(n,t){var i=ImageDetailActions.createGetFavoritesRequestConfig(n);i&&t(ImageDetailActions.fetchData(i))}function i(n,t,i){var r=n.instInfo;u(r,”Favorites”,t,{Component:i,mid:n.id})}function s(n,t){var i=r(n,t);return i?i==ImageDetailActions.FAVORITES_ADD_REQUESTED||i==ImageDetailActions.FAVORITES_ADD_FAILED||i==ImageDetailActions.FAVORITES_REMOVE_COMPLETED?!1:!0:!1}function r(n,t){return n&&t&&t[n]?t[n].status:null}var u=n.InstrumentationUtils.logResultClickEvent;t.addFavorites=f;t.removeFavorites=e;t.getFavorites=o;t.isFavorites=s;t.getFavoritesActionStatus=r})(t=n.ImageDetailFavoritesUtil||(n.ImageDetailFavoritesUtil={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var r=n.InstrumentationUtils.logActionClickEvent,i=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,u=function(t){function u(n){var i=t.call(this,n)||this;return i.visibleTooltipClass=”fav_tooltip visible”,i.invsibileTooltipClass=”fav_tooltip invis”,i.onTooltipMouseEnter=function(){i.setTooltipState(i.visibleTooltipClass)},i.onTooltipMouseLeave=function(){i.setTooltipState(i.invsibileTooltipClass)},i.getLayoutSpecificClass=function(n){if(i.props.useSimpleView)return””;switch(n){case ImageDetailActions.FAVORITES_ADD_COMPLETED:return”fav_added”;case ImageDetailActions.FAVORITES_REMOVE_COMPLETED:return”fav_rm”;case ImageDetailActions.FAVORITES_ADD_REQUESTED:return”fav_adding”;case ImageDetailActions.FAVORITES_ADD_FAILED:return”fav_addf”;case ImageDetailActions.FAVORITES_REMOVE_REQUESTED:return”fav_rming”;case ImageDetailActions.FAVORITES_REMOVE_FAILED:return”fav_rmf”}return””},i.createSeeAllLink=function(){var n=i.props.favoritesConfig,t=function(){return r(“SeeAll”,i.props.ig,{Mid:i.props.currentImageId})},u=window.parent!=window?”_parent”:”_self”;return React.createElement(“a”,{href:n.seeAllFavRequestUrl,className:”saf”,target:u,onClick:t},n.favSucceedSeeAll)},i.state={tooltipClass:i.visibleTooltipClass},i}return __extends(u,t),u.prototype.componentDidMount=function(){this.loadFavoritesTooltips()},u.prototype.componentWillReceiveProps=function(n){this.updateStateForPropsUpdate(n)},u.prototype.componentWillUnmount=function(){this.tooltipTimer&&clearTimeout(this.tooltipTimer)},u.prototype.render=function(){var r=n.ImageDetailFavoritesUtil.getFavoritesActionStatus(this.props.currentImageId,this.props.favoritesMap),u=r&&this.favoritesTooltips?this.favoritesTooltips[r]:null,t=this.state.tooltipClass,o=this.shouldShowFavoritesTooltipForHover()&&t!=this.visibleTooltipClass,f,e;return(o&&(t=this.visibleTooltipClass),f=!1,i&&i.isTestHookEnabled()&&(e=this.getTooltipForTestScenario(),e&&(u=e,t=this.visibleTooltipClass,f=!0)),t+=” “+this.getLayoutSpecificClass(r),u)?(o||f||this.setTooltipTimer(),React.createElement(“div”,{className:t},u)):null},u.prototype.updateStateForPropsUpdate=function(n){var u,f;if(n&&n.currentImageId&&this.props.currentImageId){var i=n.currentImageId,r=this.props.currentImageId,t=null;i!=r?t=this.invsibileTooltipClass:this.hasValidFavoritesMapEntry(n.favoritesMap,i)&&(u=n.favoritesMap[i].status,f=this.hasValidFavoritesMapEntry(this.props.favoritesMap,r)&&this.props.favoritesMap[r].status,t=f==u?this.invsibileTooltipClass:this.visibleTooltipClass);t!=null&&this.setTooltipState(t)}},u.prototype.loadFavoritesTooltips=function(){this.props.useSimpleView?this.loadSimpleStyleTooltips():this.loadConfirmationUIStyleTooltips()},u.prototype.shouldShowFavoritesTooltipForHover=function(){var t=this.props.currentImageId,n;return this.hasValidFavoritesMapEntry(this.props.favoritesMap,t)?(n=this.props.favoritesMap[t].status,(n==ImageDetailActions.FAVORITES_ADD_COMPLETED||n==ImageDetailActions.FAVORITES_REMOVE_FAILED)&&this.props.isFavoritesHovering):!1},u.prototype.getTooltipForTestScenario=function(){var i=null,t,n;return typeof parseQueryParams==”undefined”?null:(t=parseQueryParams(),n=t&&t.vpts,this.loadFavoritesTooltips(),n&&this.favoritesTooltips&&this.favoritesTooltips[n]&&(i=this.favoritesTooltips[n]),i)},u.prototype.hasValidFavoritesMapEntry=function(n,t){return n&&t&&n[t]!==null&&n[t]!==undefined},u.prototype.setTooltipTimer=function(){var n=this,t;clearTimeout(this.tooltipTimer);t=function(){n.setTooltipState(n.invsibileTooltipClass);clearTimeout(n.tooltipTimer)};this.tooltipTimer=setTimeout(t,this.props.favoritesConfig.tooltipDuration)},u.prototype.setTooltipState=function(n){this.setState(Object.assign({},this.state,{tooltipClass:n}))},u.prototype.loadConfirmationUIStyleTooltips=function(){var t=this.props.favoritesConfig,n={};n[ImageDetailActions.FAVORITES_ADD_REQUESTED]=this.createAdvanceTooltip(t.favPendingTooltip);n[ImageDetailActions.FAVORITES_ADD_COMPLETED]=this.createAdvanceTooltip(t.favSucceedTooltip,this.createSeeAllLink);n[ImageDetailActions.FAVORITES_ADD_FAILED]=this.createAdvanceTooltip(t.favFailedTooltip);n[ImageDetailActions.FAVORITES_REMOVE_REQUESTED]=this.createAdvanceTooltip(t.unfavPendingTooltip);n[ImageDetailActions.FAVORITES_REMOVE_COMPLETED]=this.createAdvanceTooltip(t.unfavSucceedTooltip);n[ImageDetailActions.FAVORITES_REMOVE_FAILED]=this.createAdvanceTooltip(t.unfavFailedTooltip);this.favoritesTooltips=n},u.prototype.loadSimpleStyleTooltips=function(){var t=this.props.favoritesConfig,n={};n[ImageDetailActions.FAVORITES_ADD_REQUESTED]=this.createTooltipMessage(t.favPendingTooltip);n[ImageDetailActions.FAVORITES_ADD_COMPLETED]=this.createSeeAllTooltip();n[ImageDetailActions.FAVORITES_ADD_FAILED]=this.createTooltipMessage(t.favFailedTooltip);n[ImageDetailActions.FAVORITES_REMOVE_REQUESTED]=this.createTooltipMessage(t.unfavPendingTooltip);n[ImageDetailActions.FAVORITES_REMOVE_COMPLETED]=this.createTooltipMessage(t.unfavSucceedTooltip);n[ImageDetailActions.FAVORITES_REMOVE_FAILED]=this.createTooltipMessage(t.unfavFailedTooltip);this.favoritesTooltips=n},u.prototype.createTooltipMessage=function(n){return React.createElement(“span”,{className:”famsgc”},n.statusText&&React.createElement(“div”,{className:”fadtxt”},n.statusText),n.descriptionText&&React.createElement(“span”,{className:”famsg”},n.descriptionText))},u.prototype.createSeeAllTooltip=function(){return React.createElement(“span”,{className:”famsga”},this.createSeeAllLink(),React.createElement(“div”,{className:”fadtxt”},this.props.favoritesConfig.favSucceedTooltip.statusText))},u.prototype.createAdvanceTooltip=function(n,t){var i=”fav_tooltipv”;return t&&(i=n.descriptionText?”fav_tooltipl”:”fav_tooltips”),React.createElement(“div”,{className:i},n.statusText&&React.createElement(“div”,{className:”fash”},React.createElement(“span”,null,t&&t(),React.createElement(“div”,{className:”fastxt”},n.statusText))),n.descriptionText&&React.createElement(“div”,{className:”fadtxt”},React.createElement(“span”,null,n.descriptionText)),React.createElement(“span”,{className:”fav_wa”}))},u}(React.Component);t.FavoritesActionTooltip=u})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,r=function(r){function u(t){var u=r.call(this,t)||this,f;return u.favoritesConfig=null,u.isHovering=!1,u.query=null,u.persistedQueryStrings=null,u.isFavorited=function(t){return t.imageResult?n.ImageDetailFavoritesUtil.isFavorites(t.imageResult.id,t.favoritesMap):!1},u.onFavoritesButtonHover=function(){u.setHoverState(!0)},u.onFavoritesButtonLeave=function(){u.setHoverState(!1)},u.setHoverState=function(n){u.isHovering=n;u.setState({isHovering:n})},u.handleSaveClick=function(){var n=u.createFavoritesRequest(u.favoritesConfig.addFavRequestUrl);u.props.addFavorites(n,u.props.favoritesMap,u.props.ig)},u.handleUnSaveClick=function(){var n=u.createFavoritesRequest(u.favoritesConfig.removeFavRequestUrl);u.props.removeFavorites(n,u.props.favoritesMap,u.props.ig)},u.createFavoritesRequest=function(n){return{imageResult:u.props.imageResult,query:u.query,requestUrl:n,persistedQueryStrings:u.persistedQueryStrings,scenario:u.props.scenario}},f=ImageDetailReducers.getPageConfig(),u.favoritesConfig=f.favoritesConfig,u.query=f.query,u.persistedQueryStrings=f.persistedQueryStrings,u.state={isHovering:i?i.isHoverRequestedByVPTest(t.index.toString()):!1,isFavorited:u.isFavorited(t)},u}return __extends(u,r),u.prototype.componentWillReceiveProps=function(n){(n.favoritesMap!=this.props.favoritesMap||n.imageResult!=this.props.imageResult)&&this.setState({isFavorited:this.isFavorited(n)})},u.prototype.render=function(){var n=”save”,i=this.handleSaveClick,r=this.props.saveTooltip,u=this.props.saveText;return this.state.isFavorited&&(n=”unsave”,i=this.handleUnSaveClick,r=this.props.unsaveTooltip,u=this.props.unsaveText),React.createElement(“div”,{className:”favrc simtip”,onMouseOver:this.onFavoritesButtonHover,onMouseLeave:this.onFavoritesButtonLeave},React.createElement(ActionButton,{className:n,onClick:i,customTooltip:r,hasNestedFocus:!0,needResetFocus:this.props.needResetFocus,text:u}),React.createElement(t.FavoritesActionTooltip,{currentImageId:this.props.imageResult?this.props.imageResult.id:null,favoritesConfig:this.favoritesConfig,favoritesMap:this.props.favoritesMap,ig:this.props.ig,isFavoritesHovering:this.state.isHovering,useSimpleView:!0}))},u}(React.Component),u=function(n){return{favoritesMap:ImageDetailReducers.getCurrentFavortesMap(n),scenario:ImageDetailReducers.getDetailScenario(n),ig:ImageDetailReducers.getCurrentImpressionId(n)}},f=function(t){return{addFavorites:function(i,r,u){n.ImageDetailFavoritesUtil.addFavorites(i,r,t,u)},removeFavorites:function(i,r,u){n.ImageDetailFavoritesUtil.removeFavorites(i,r,t,u)},getFavorites:function(i){n.ImageDetailFavoritesUtil.getFavorites(i,t)}}};t.RichImageFavoritesAction=ReactRedux.connect(u,f)(r)})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=n.InstrumentationUtils.logActionClickEvent,r=n.ImageDetailUtils,u=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,f=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.defaultContainerComponent=”ActionBar”,t.screenMask=null,t.feedbackCloseEvent=”flagfeedback_close”,t.componentDidMount=function(){t.setFeedbackCloseEvent(!1)},t.componentWillUnmount=function(){t.setFeedbackCloseEvent(!0)},t.setFeedbackCloseEvent=function(n){if(t.props.enableMobileView){var i=n?sj_evt.unbind:sj_evt.bind;i(t.feedbackCloseEvent,t.closeBackground)}},t.onFlagAsAdultButtonClick=function(n){var u=t.props.currentImage,f={turl:r.createThumbnailUrl(u.thumbUrl,u.thWidth,u.thHeight),maw:u.thWidth,mah:u.thHeight,mid:u.id,surl:u.pageUrl,imgurl:u.imgUrl},e;typeof EditorialToolTabs!=”undefined”&&EditorialToolTabs?(EditorialToolTabs.setupInternalMetaData(“”,!0,!0,f),EditorialToolTabs.imageClick()):typeof FlagFeedback!=”undefined”&&FlagFeedback&&(FlagFeedback.metadata=f,FlagFeedback.c());e=t.props.actionConfig.type;i(e,t.props.ig,{Component:t.props.containerComponent||t.defaultContainerComponent});n.nativeEvent.stopImmediatePropagation();t.props.enableMobileView&&t.setUpFlagAdultBackground()},t.setUpFlagAdultBackground=function(){t.screenMask&&t.screenMask.parentNode!=document.body&&document.body.appendChild(t.screenMask)},t.closeBackground=function(n){t.screenMask&&t.screenMask.parentNode==document.body&&(document.body.removeChild(t.screenMask),n.stopPropagation&&n.stopPropagation())},t.createMaskElement=function(){return React.createElement(“div”,{className:”scnmsk”,onClick:t.closeBackground,ref:function(n){t.screenMask=n}})},t}return __extends(t,n),t.prototype.render=function(){return this.props.actionConfig&&this.props.actionConfig.text?React.createElement(“div”,{id:”flagac”},React.createElement(ActionButton,{className:this.props.actionConfig.className,text:this.props.actionConfig.text,onClick:this.onFlagAsAdultButtonClick,hasNestedFocus:this.props.hasNestedFocus,needResetFocus:this.props.needResetFocus,”data-tag”:u?”multimedia.imageDetail.flagAdultButton”:null}),this.props.enableMobileView&&this.createMaskElement()):null},t}(React.Component);t.FlagAsAdultButton=f})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var r=n.InstrumentationUtils.logResultClickEvent,i=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null,u=function(u){function f(i){var f=u.call(this,i)||this,e;return f.showMoreAction=!1,f.imageChanged=!1,f.flagAsAdultButtonConfig=null,f.captions=null,f.searchByImageButton=null,f.link=null,f.enableMobileView=ImageDetailReducers.isMobileViewEnabled(),f.getCaptions=function(n){return n.enableCaptions?[React.createElement(“span”,{className:”tit”,title:n.data.title,onClick:f.props.enableCaptionsOnClick?f.onCaptionsClick:f.onRelatedImageClick},n.data.title),React.createElement(“span”,{className:”domain”,title:n.data.displayUrl,onClick:f.props.enableCaptionsOnClick?f.onCaptionsClick:f.onRelatedImageClick},n.data.displayUrl),React.createElement(t.MenuButton,{className:”more_actions”,hiddenComponent:React.createElement(“div”,{className:”actions”},f.createFavoritesButton(n),f.searchByImageButton,f.createFlagAsAdultButton())})]:null},f.setShowMoreAction=function(n){f.showMoreAction=n;f.setState({showMoreAction:f.showMoreAction})},f.getProcessedImage=function(){var n=f.props.data.image;return n.onClick=f.onRelatedImageClick,n.onMouseLeave=f.showMoreAction&&!f.props.enableCaptions?f.dismissMoreActions:null,n.onLoad=f.imageOnload,n.getRef=f.getImageElement,n},f.handleMoreActionClick=function(){f.setShowMoreAction(!f.showMoreAction);f.logRelatedImageUnitAction(“MoreAction”)},f.dismissMoreActions=function(){f.setShowMoreAction(!1)},f.logRelatedImageUnitAction=function(n,t){var i=f.props.imageResult;r(i.instInfo,n,f.props.ig,t)},f.onRelatedImageClick=function(n){f.props.onClick(n);f.logRelatedImageUnitAction(“RelatedImage”,null)},f.onCaptionsClick=function(){window.open(f.props.imageResult.pageUrl);f.logRelatedImageUnitAction(“RelatedImage”,{Dest:”HostPage”})},f.getImageElement=function(n){n&&(f.imageElement=n)},f.imageOnload=function(){f.setImageVisibility(!0)},f.setImageVisibility=function(n){f.imageElement&&(f.imageElement.style.visibility=n?”visible”:”hidden”)},f.createFlagAsAdultButton=function(){return React.createElement(t.FlagAsAdultButton,{actionConfig:f.flagAsAdultButtonConfig,currentImage:f.props.imageResult,ig:f.props.ig,containerComponent:”RelatedImage”,hasNestedFocus:!0,needResetFocus:f.imageChanged})},f.state={showMoreAction:!1},f.searchByImageButton=React.createElement(ActionButton,{className:”sbi”,onClick:f.onRelatedImageClick,customTooltip:i.enableCaptions?null:i.sbiTooltip,text:i.enableCaptions?i.sbiTooltip:null,hasNestedFocus:!0,needResetFocus:f.imageChanged}),f.flagAsAdultButtonConfig={className:”flag_adult”,text:i&&i.flagAsAdultText},f.captions=f.getCaptions(i),e={result:f.props.imageResult,insightsViewState:{viewType:ImageDetailActions.IImageDetailViewType.DetailL2View}},f.link=n.ImageDetailLocationUtils.getVisuallySimilarItemUrl(e),f}return __extends(f,u),f.prototype.componentDidMount=function(){this.setImageVisibility(!1)},f.prototype.componentWillReceiveProps=function(n){n.imageResult&&this.props.imageResult&&n.imageResult.thumbUrl!=this.props.imageResult.thumbUrl?(this.setImageVisibility(!1),this.imageChanged=!0,this.setShowMoreAction(!1),this.captions=this.getCaptions(n)):this.imageChanged=!1},f.prototype.createFavoritesButton=function(n){return React.createElement(t.RichImageFavoritesAction,{imageResult:n.imageResult,saveTooltip:n.enableCaptions?null:n.saveTooltip,unsaveTooltip:n.enableCaptions?null:n.unsaveTooltip,saveText:n.enableCaptions?n.saveTooltip:null,unsaveText:n.enableCaptions?n.unsaveTooltip:null,index:n.index,needResetFocus:this.imageChanged})},f.prototype.getHoverContents=function(){if(!this.props.enableHoverContents||this.props.enableCaptions)return null;var n=this.props.data,t=this.createFavoritesButton(this.props);return[React.createElement(“div”,{className:”background”,onClick:this.onRelatedImageClick}),React.createElement(“div”,{className:”actions”},t,this.searchByImageButton,React.createElement(ActionButton,{className:”more_actions”,onClick:this.handleMoreActionClick,showHiddenComponent:this.showMoreAction,customTooltip:this.props.moreTooltip,hasNestedFocus:!0,needResetFocus:this.imageChanged,hiddenComponent:this.createFlagAsAdultButton()})),React.createElement(“div”,{className:”meta”},n.fileInfo,” “,n.displayUrl)]},f.prototype.getOverlayComponents=function(){return!this.props.data||!this.props.data.fileInfo||this.enableMobileView?null:[this.props.data.fileInfo]},f.prototype.render=function(){var n=”relImg”,t,r;return i&&i.isHoverRequestedByVPTest(this.props.index.toString())&&(n=i.appendVPTestHoverClass(n)),t=this.props.imageResult&&this.props.imageResult.accentColor?”#”+this.props.imageResult.accentColor:null,r=this.props.wrappedComponent,React.createElement(r,{isAccessible:!0,hasNestedFocus:!0,needResetFocus:this.imageChanged,image:this.getProcessedImage(),link:ImageDetailReducers.isDetailV2Enabled()?this.link:null,captionLink:this.props.enableCaptionsOnClick?this.props.imageResult.pageUrl:null,mainContainerStyle:this.props.mainContainerStyle,className:n,onClick:this.props.enableCaptionsOnClick?null:this.onRelatedImageClick,captionsOnClick:this.props.enableCaptionsOnClick?this.onCaptionsClick:null,ariaLabel:this.props.ariaLabel,imageContainerStyle:{backgroundColor:t},dataTag:i?”multimedia.imageDetail.relatedImageUnit”:null,lateLoadConfig:this.props.imageLateLoadConfig,hoverComponents:this.getHoverContents(),overlayComponents:this.getOverlayComponents(),plannerInput:this.props.plannerInput,captionComponents:this.captions})},f}(React.Component);t.RelatedImageUnit=u})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i=1&&(i=r.stringFormat(this.offerStatusFormat,u))}return i?i:null},n.prototype.getSeller=function(n){return n.sellerInfo!=null&&this.offerSellerFormat?{dataType:SharedComponent.InfoCardSecondaryDatatype.domain,data:{format:this.offerSellerFormat,text:n.sellerInfo.name}}:null},n.prototype.getRating=function(n){return r.getRating(n.aggregateRating,this.ratingFormat,this.ratingPluralFormat)},n}();t.ShoppingDataFactory=u})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var Multimedia;(function(n){var t;(function(t){function r(n){var t=n.shoppingData,i,r;return t?(i=[],!n.enableInsightsV2&&t.rating&&i.push(t.rating),t.seller&&i.push(t.seller),r=function(){if(n.onClick)n.onClick(t.instInfo,”ShoppingSource”,null)},React.createElement(SharedComponent.DetailInfoCardContainer,{link:n.link,targetOption:”_blank”,className:n.className,onClick:r},t.priceNotAvailableText==null&&React.createElement(“div”,{className:”status”},t.iconUrl?React.createElement(“img”,{className:”seller_icon”,src:t.iconUrl}):React.createElement(“span”,{className:”store_icon”}),t.price&&React.createElement(“span”,{className:”price”},t.price),t.offerStatusText&&React.createElement(“span”,{className:t.isAvailable?”InStk”:”OutStk”},t.offerStatusText),t.offerDate&&React.createElement(“span”,{className:”date”},t.offerDate)),React.createElement(“div”,{className:”pritext”},t.title),React.createElement(SharedComponent.DetailInfoCardSecondaryInfo,{data:i}))):null}var f=n.ImageDetailUtils,i=ImageDetailReducers.getResourceString,u=function(){function u(){this.enableInsightsV2=!1;var n=ImageDetailReducers.getShoppingSourcesConfig();this.enableInsightsV2=ImageDetailReducers.getPageConfig().enableInsightsV2;this.titleFormat=i(n.TitleResourceKey);this.titlePluralFormat=i(n.TitlePluralResourceKey);this.dataFactory=new t.ShoppingDataFactory(n)}return u.prototype.createItems=function(n,t,i){var u=this;return n.map(function(n){return React.createElement(r,{shoppingData:u.dataFactory.createShoppingData(n,t),link:n.hostUrl,onClick:i,className:”shp”,enableInsightsV2:u.enableInsightsV2})})},u.prototype.createTitle=function(t,i){if(i===void 0&&(i=null),i&&i.length>0)return n.ImageDetailUtils.stringFormat(i,t);var r=t>1?this.titlePluralFormat:this.titleFormat;return n.ImageDetailUtils.stringFormat(r,t)},u}();t.ShoppingSourcesFactory=u})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=n.InstrumentationUtils.logResultClickEvent;t.toPagesIncluding=function(t){return function(r){function u(n){var t=r.call(this,n)||this,u;return t.itemOnClick=function(n,r,u){i(n,r,t.props.ig,u)},u=t.createRenderItems(n),t.state={renderItems:u},t}return __extends(u,r),u.prototype.componentWillReceiveProps=function(n){if(this.props.items!=n.items){var t=this.createRenderItems(n);this.setState({renderItems:t})}},u.prototype.createRenderItems=function(i){var r;return n.ImageDetailTestUtils&&n.ImageDetailTestUtils.isTestHookEnabled()&&this.props.currentDate&&(r=this.props.currentDate),t.createItems(i.items,r,this.itemOnClick)},u.prototype.render=function(){var n=this.state.renderItems;return n!=null&&n.length>0?React.createElement(“ul”,{className:”pagesIncl”,ref:this.props.elementRef},n.map(function(n,t){return React.createElement(“li”,{key:t},n)})):null},u}(React.Component)}})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i0?React.createElement(t,__assign({},n,{elementRef:this.props.elementRef})):null},i}(React.Component),u=function(n,t){var u=ImageDetailReducers.getPageConfig().enableInsightsV2,f=ImageDetailReducers.getShoppingSourcesConfig().PreviewItemCount,r=ImageDetailReducers.getInsightsShoppingSourcesItems(n,t.insightsId);return u&&r&&r.length>0&&t.moduleExpansionMode==i.SemiExpanded&&(r=r.slice(0,f)),{items:r,insightsState:ImageDetailReducers.getInsightsState(n,t.insightsId),ig:ImageDetailReducers.getCurrentImpressionId(n),currentDate:ImageDetailReducers.getCurrentDate(n)}};n.ImageDetail.ShoppingSourcesContainer=ReactRedux.connect(u)(r);n.ImageDetail.ShoppingSourcesContainer.displayName=”ShoppingSourcesContainer”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=function(n){function i(){return n!==null&&n.apply(this,arguments)||this}return __extends(i,n),i.prototype.render=function(){var n=ImageDetailReducers.getRecipeSourcesConfig(),i=ImageDetailReducers.getResourceString(n.DescriptionResourceKey);return React.createElement(t.InsightsModulePreview,{title:this.props.title,content:i,isExpanded:this.props.isExpanded,dataTag:”imageDetail.recipesPreview”})},i}(React.Component),r=function(n,t){var r=ImageDetailReducers.getInsightsRecipesItems(n,t.insightsId),i=r?r.length:0;return i==0&&(i=t.imageInfo?t.imageInfo.recipeSourcesCount:0),{itemCount:i}};n.ImageDetail.RecipesPreview=ReactRedux.connect(r)(i);n.ImageDetail.RecipesPreview.displayName=”RecipesPreview”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var Multimedia;(function(n){var t;(function(t){function e(t,i){var f=””,e,o;return i.totalTime&&(e=r(i.totalTime),o=u(e),f=n.ImageDetailUtils.stringFormat(t,o)),{dataType:SharedComponent.InfoCardSecondaryDatatype.meta,data:f}}function o(t,i){var e=””,o=””,f;return i.prepTime&&(f=r(i.prepTime),e=u(f)),i.cookTime&&(f=r(i.cookTime),o=u(f)),{dataType:SharedComponent.InfoCardSecondaryDatatype.meta,data:n.ImageDetailUtils.stringFormat(t,e,o)}}function r(n){var t=n.match(/P((([0-9]*\.?[0-9]*)Y)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)W)?(([0-9]*\.?[0-9]*)D)?)?(T(([0-9]*\.?[0-9]*)H)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)S)?)?/);return{years:parseFloat(t[3]),months:parseFloat(t[5]),weeks:parseFloat(t[7]),days:parseFloat(t[9]),hours:parseFloat(t[12]),minutes:parseFloat(t[14]),seconds:parseFloat(t[16])}}function u(n){var i=””,t;return!n||n.years||n.months||n.weeks||(t=n.days?n.days*1440:0,t+=n.hours?n.hours*60:0,t+=n.minutes?n.minutes:0,t+=n.seconds?n.seconds/60:0,i=t?t.toFixed(0):””),i}function s(n,t){return{dataType:SharedComponent.InfoCardSecondaryDatatype.domain,data:{format:n,text:extractDomainFromUrl(t.hostUrl,!1)}}}var i=ImageDetailReducers.getResourceString,f=function(){function t(){this.enableInsightsV2=!1;this.enableInsightsV2=ImageDetailReducers.getPageConfig().enableInsightsV2;var n=ImageDetailReducers.getRecipeSourcesConfig();this.domainFormat=this.enableInsightsV2?”{0}”:i(n.RecipeAtResourceKey);this.cookTimeFormat=i(n.CooktimeResourceKey);this.totalTimeFormat=i(n.TotalTimeResourceKey);this.titlePluralFormat=i(n.TitlePluralResourceKey);this.titleFormat=i(n.TitleResourceKey);this.ratingFormat=i(“RatingResource”);this.ratingPluralFormat=i(“RatingPluralResource”);this.beta=i(n.BetaResourceKey)}return t.prototype.createItems=function(t,i,r){var u=this;return t.map(function(t){var i=[],f,c,h;return(t.cookTime&&t.prepTime&&i.push(o(u.cookTimeFormat,t)),t.totalTime&&i.push(e(u.totalTimeFormat,t)),t.aggregateRating&&!u.enableInsightsV2&&i.push(n.ImageDetailUtils.getRating(t.aggregateRating,u.ratingFormat,u.ratingPluralFormat)),t.hostUrl&&(f=s(u.domainFormat,t),f&&i.push(f)),c=function(){r&&r(t.instInfo,”RecipeSource”,null)},h=React.createElement(SharedComponent.DetailInfoCard,{targetOption:”_blank”,className:”rep”,secondaryData:i,primaryText:t.title,link:t.hostUrl,onClick:c}),u.enableInsightsV2)?React.createElement(SharedComponent.DetailInfoCardContainer,{className:”rep_parent”,link:t.hostUrl,targetOption:”_blank”},h):h})},t.prototype.createTitle=function(t,i){if(i===void 0&&(i=null),i&&i.length>0)return n.ImageDetailUtils.stringFormat(i,t);var r=t>1?this.titlePluralFormat:this.titleFormat;return n.ImageDetailUtils.stringFormat(r,t)},t}();t.RecipeSourcesFactory=f})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i0?React.createElement(t,__assign({},n,{elementRef:this.props.elementRef})):null},i}(React.Component),u=function(n,t){var u=ImageDetailReducers.getPageConfig().enableInsightsV2,f=ImageDetailReducers.getRecipeSourcesConfig().PreviewItemCount,r=ImageDetailReducers.getInsightsRecipesItems(n,t.insightsId);return u&&r&&r.length>0&&t.moduleExpansionMode==i.SemiExpanded&&(r=r.slice(0,f)),{items:r,insightsState:ImageDetailReducers.getInsightsState(n,t.insightsId),ig:ImageDetailReducers.getCurrentImpressionId(n)}};n.ImageDetail.RecipesContainer=ReactRedux.connect(u)(r);n.ImageDetail.RecipesContainer.displayName=”RecipesContainer”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var r=n.ImageDetailUtils,i=function(n){function i(){var t=n!==null&&n.apply(this,arguments)||this;return t.content=”Location details on interactive map”,t}return __extends(i,n),i.prototype.render=function(){return React.createElement(t.InsightsModulePreview,{title:this.props.title,content:this.content,isExpanded:this.props.isExpanded,dataTag:”imageDetail.liveMapPreview”})},i}(React.Component);n.ImageDetail.LiveMapPreview=i;n.ImageDetail.LiveMapPreview.displayName=”LiveMapPreview”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var r=n.InstrumentationUtils.logActionClickEvent,i=ImageDetailActions.IImageDetailViewType,u=”mapControl”,f=33,e=function(t){function e(u){var e=t.call(this,u)||this;return e.setContainerStyle=function(n){switch(n){case i.DetailL2View:case i.VisualSearch:e.containerStyle={height:”calc(100% – “+(3*e.props.config.MapMarginInL2+f)+”px)”,position:”absolute”};e.props.insightsPosition!=ImageDetailActions.InsightsPosition.Bottom&&(e.containerStyle.width=”calc(100% – “+2*e.props.config.MapMarginInL2+”px)”);break;default:e.containerStyle={width:”calc(100% – “+2*e.props.config.MapMarginInL1+”px)”,height:e.props.config.MapHeightInL1+”px”}}},e.onPreviewClick=function(){e.props.addToDetailStateHistory();e.props.changePageView(ImageDetailActions.IImageDetailViewType.DetailL2View);e.props.changeSelectedModule(n.ImageDetailUtils.getModuleName(n.ImageDetailUtils.InsightsModuleType.livemap));r(“LiveMapPreview”,e.props.ig)},e.onLinkOutClick=function(n){var t=document.querySelector(“.bm_bottomLeftOverlay a”);t&&(r(“LiveMap”,e.props.ig),t.click(),n.stopPropagation())},e.setContainerStyle(u.viewType),e}return __extends(e,t),e.prototype.componentDidMount=function(){var n=document.createElement(“script”);n.src=”https://www.bing.com/api/maps/mapcontrol?callback=GetMap&#8221;;n.async=!0;n.defer=!0;document.body.appendChild(n);window.GetMap=o(this.props.viewport,this.props.config.CredentialKey)},e.prototype.componentWillReceiveProps=function(n){n.viewType!=this.props.viewType&&this.setContainerStyle(n.viewType)},e.prototype.render=function(){return React.createElement(“div”,{id:”livemap”},React.createElement(“div”,{id:u,style:this.containerStyle,onClick:this.props.viewType!=i.Default?null:this.onPreviewClick}),this.props.viewType!=i.Default&&React.createElement(“div”,{className:”link_out”,onClick:this.onLinkOutClick},ImageDetailReducers.getResourceString(this.props.config.LinkOutTextKey)))},e}(React.Component),o=function(n,t){return function(){var i=new Microsoft.Maps.Map(“#”+u,{credentials:t});Microsoft.Maps.loadModule(“Microsoft.Maps.WellKnownText”,function(){var t=Microsoft.Maps.WellKnownText.read(n);i.setView({bounds:Microsoft.Maps.LocationRect.fromLocations(t.getLocations())})})}},s=function(n){return{changePageView:function(t){n(ImageDetailActions.changePageView(t))},addToDetailStateHistory:function(){n(ImageDetailActions.addToDetailStateHistory())},changeSelectedModule:function(t){n(ImageDetailActions.changeInsightsSelectedModule(t))}}};t.MapsControl=ReactRedux.connect(null,s)(e);t.MapsControl.displayName=”MapsControl”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var i=function(n){function i(){return n!==null&&n.apply(this,arguments)||this}return __extends(i,n),i.prototype.render=function(){return this.props&&this.props.mapsViewPort?React.createElement(“div”,{className:”content_container”,elementRef:this.props.elementRef},React.createElement(t.MapsControl,{viewport:this.props.mapsViewPort,viewType:this.props.viewType,insightsPosition:this.props.insightsPosition,config:this.props.config,ig:this.props.ig})):null},i}(React.Component),r=function(n,t){return{mapsViewPort:t.imageAssociatedData?t.imageAssociatedData.livemap:””,config:ImageDetailReducers.getLiveMapsConfig(),insightsPosition:ImageDetailReducers.getInsightsPosition(n),ig:ImageDetailReducers.getCurrentImpressionId(n),viewType:ImageDetailReducers.getViewType(n)}};n.ImageDetail.LiveMapContainer=ReactRedux.connect(r)(i);n.ImageDetail.LiveMapContainer.displayName=”LiveMapContainer”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i0||n.isIntersecting)&&(r.setState({isImageVisible:!0}),r.intersectionObserver.unobserve(r.imageElement))})},r.cleanupIntersectionObserver=function(){r.intersectionObserver&&(r.intersectionObserver.disconnect(),r.intersectionObserver=null)},r.state={isImageVisible:!1},r.isLazyLoadEnabled=n&&n.lateLoadConfig&&n.lateLoadConfig.Enabled||!1,r}return __extends(r,t),r.prototype.render=function(){var n=this.props.lateLoadConfig.LoadIconSrc;return!this.isLazyLoadEnabled||this.state.isImageVisible?this.createActualImage():this.createImageLoadIcon()},r.prototype.componentDidMount=function(){var i=this,t;this.isLazyLoadEnabled&&(this.setupIntersectionObserver(),n.isTestHookEnabled&&n.isTestHookEnabled()&&(t=function(){i.setState({isImageVisible:!0})},sj_evt&&sj_evt.bind(“LateLoadImage.VPTest”,t)))},r.prototype.componentWillUnmount=function(){this.isLazyLoadEnabled&&this.cleanupIntersectionObserver()},r.prototype.createImageLoadIcon=function(){return this.createImageElement(this.props.lateLoadConfig.LoadIconSrc,!1)},r.prototype.createActualImage=function(){return this.createImageElement(this.props.src,!0)},r.prototype.createImageElement=function(n,t){var i=this;return React.createElement(“img”,__assign({src:n,width:this.props.width,height:this.props.height,onClick:this.props.onClick,onContextMenu:this.props.onContextMenu,onMouseLeave:this.props.onMouseLeave,title:this.props.title,alt:this.props.altText,className:this.props.className,style:this.props.style,role:this.props.role},t?{onLoad:this.props.onLoad}:{},{ref:function(n){i.imageElement=n;i.props.getRef&&i.props.getRef(n)}}))},r.prototype.componentWillReceiveProps=function(n){this.props&&n&&this.isLazyLoadEnabled&&this.props.src!==n.src&&(this.setState({isImageVisible:!1}),this.intersectionObserver.observe(this.imageElement))},r}(React.Component);n.LateLoadImage=t})(SharedComponent||(SharedComponent={}));var Multimedia;(function(n){var t;(function(t){function o(n){return n.EnableRelatedSearches||n.EnableImageBasedRelatedSearch}function s(n,t){if(t&&!h(n,t)){var r={text:t.text,displayText:t.displayText,searchUrl:t.webSearchUrl,instInfo:t.instInfo,thumbnailUrl:null},i=n.slice();return i.unshift(r),i}return n}function h(n,t){if(n&&n.length>0&&t)for(var i=0;i0}function c(n,t){if(n==t)return!0;if(n==null||t==null||n.length!=t.length)return!1;for(var i=0;i0&&(i=s(i,t.brqData),i=i.slice(0,u)),i}function a(n){return n.insightsRequestState==u.Success||n.insightsRequestState==u.Failed}function v(n,t,i){e(n.instInfo,”RelatedSearches”,t,{ViewName:i})}function y(n,t,i,r,u,f,e){var o=p(n,i,r,u),s=function(){e&&e(n)};return React.createElement(“div”,{className:”rsi”,key:t,onClick:s},React.createElement(“a”,{className:”rsic”,href:n.searchUrl,target:”_parent”,title:n.text},w(o,n.text,f),React.createElement(“div”,{className:”rsiac”},React.createElement(“span”,{className:”rsa”},n.text))))}function p(n,t,r,u){if(i&&i.isMockImageEnabled())return i.getMockImageUrl();var e=f.stringFormat(t,n.text,r,u);return f.createThumbnailUrlWithoutCropping(e)}function w(t,i,r){var u=”rsimg”,f=r.ImageLateLoadConfig;return f&&f.Enabled?React.createElement(SharedComponent.LateLoadImage,{className:u,src:t,altText:i,lateLoadConfig:r.ImageLateLoadConfig}):r.EnableImagePlaceHolder?React.createElement(n.ImageDetail.AccentColoredImage,{imageClassName:u,imageSrc:t,accentColor:r.PlaceHolderBgColor,imagePlaceHolderClass:”rsih”}):React.createElement(“img”,{className:u,src:t,alt:i})}var e=n.InstrumentationUtils.logResultClickEvent,u=ImageDetailActions.RequestState,f=n.ImageDetailUtils,i=typeof n.ImageDetailTestUtils!=”undefined”?n.ImageDetailTestUtils:null;t.isRelatedSearchesEnabled=o;t.hasRelatedSearches=r;t.hasSameRelatedSearches=c;t.getRelatedSearchItems=l;t.isInsightsReady=a;t.handleRelatedSearchClick=v;t.createImageAndTextCard=y})(t=n.RelatedSearchesUtil||(n.RelatedSearchesUtil={}))})(Multimedia||(Multimedia={}));var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Multimedia;(function(n){var t;(function(t){var r=n.ImageDetailUtils,i=n.RelatedSearchesUtil,u=function(n){function u(t){var i=n.call(this,t)||this;return i.relatedSearchesConfig=null,i.shouldRenderRelatedSearches=function(){return i.props.autoExpand||i.relatedSearchesConfig.EnableImageBasedRelatedSearch&&i.props.imageBasedRelatedSearches&&i.props.imageBasedRelatedSearches.length>0||i.relatedSearchesConfig.EnableRelatedSearches&&i.props.queryBasedRelatedSearches&&i.props.queryBasedRelatedSearches.length>0},i.getPreviewContent=function(){var t=i.relatedSearchesConfig.DescriptionText,n=i.props.imageBasedRelatedSearches&&i.props.imageBasedRelatedSearches.length||0;return n=20?n=20:n=10&&(n=10),r.stringFormat(t,n)},i.relatedSearchesConfig=ImageDetailReducers.getRelatedSearchesConfig(),i}return __extends(u,n),u.prototype.shouldComponentUpdate=function(n){return(n.imageInfo&&this.props.imageInfo&&n.imageInfo.id!=this.props.imageInfo.id||n.imageBasedRelatedSearches!=this.props.imageBasedRelatedSearches||n.queryBasedRelatedSearches!=this.props.queryBasedRelatedSearches)&&(i.hasRelatedSearches(n.imageBasedRelatedSearches)||i.hasRelatedSearches(n.queryBasedRelatedSearches))||n.isExpanded!=this.props.isExpanded},u.prototype.render=function(){return this.shouldRenderRelatedSearches()?React.createElement(t.InsightsModulePreview,{title:this.props.title,content:this.getPreviewContent(),isExpanded:this.props.isExpanded,dataTag:”imageDetail.relatedSearchesPreview”}):null},u}(React.Component),f=function(n){return{queryBasedRelatedSearches:ImageDetailReducers.getQueryBasedRelatedSearches(n),imageBasedRelatedSearches:ImageDetailReducers.getImageBasedRelatedSearches(n)}};t.RelatedSearchesPreview=ReactRedux.connect(f)(u);t.RelatedSearchesPreview.displayName=”RelatedSearchesPreview”})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}));var Multimedia;(function(n){var t;(function(t){var u=n.ImageDetailUtils,i=n.RelatedSearchesUtil,r=function(){function n(n,t,i,r){this.relatedSearchConfig=null;this.market=null;this.adultSetting=null;this.createRelatedSearchItems=function(n,t,i){for(var f=i>0?Math.min(i,t.length):t.length,u=[],r=0;r0}function d(n,t){return n&&n.insightsState&&n.insightsState.data&&n.insightsState.data[t]!=null}function h(n,t){return d(n,t)?n.insightsState.data[t].length:null}function g(){var n=ImageDetailReducers.getPagesIncludingConfig(),f=a(i.pagesincluding),v=t.toInsightLoadingMask(t.toSmartInsightsModule(e(t.PagesIncludingContainer,u.SemiExpanded),f),f),y=t.toInsightLoadingMask(t.toSmartInsightsModule(e(t.PagesIncludingContainer,u.Expanded),f),f);return{className:”pic”,expansionButtonText:ImageDetailReducers.getResourceString(n.expand),preview:t.PagesIncludingPreview,expandedPreview:v,tabView:y,getTitle:function(t,i){if(c){var r=t.imageInfo.pagesIncludingCount!=0?t.imageInfo.pagesIncludingCount:1;return l(r,n.title,i)}return ImageDetailReducers.getResourceString(n.title)},showExpansionButton:function(t){return t&&o(t.insightsState,i.pagesincluding)?h(t,”pagesIncluding”)>n.previewItemCount:t.imageInfo.pagesIncludingCount>n.previewItemCount},isEnabled:function(n){if(n){if(!s(r.getModuleName(i.pagesincluding)))return!1;if(n.scenario==ImageDetailActions.DetailScenario.Recommendations&&n.viewType!=ImageDetailActions.IImageDetailViewType.VisualSearch)return!0;if(n.viewType==ImageDetailActions.IImageDetailViewType.VisualSearch){if(o(n.insightsState,i.pagesincluding)){var t=h(n,”pagesIncluding”);return t>0}return!1}if(n.imageInfo)return n.imageInfo.pagesIncludingCount>0}return!1}}}function nt(){var f=ImageDetailReducers.getPageConfig(),h=ImageDetailReducers.getResourceString(f.vsImagesConfig.ExpansionResourceKey),n=a(i.similarimage),v=t.toInsightLoadingMask(t.toSmartInsightsModule(e(t.InsightsImageResultsModule,u.Expanded),n),n);return{className:”vsi”,expansionButtonText:h,preview:t.VisuallySimilarImagePreview,expandedPreview:f.enableVSIWtrfl?t.toInsightLoadingMask(t.toSmartInsightsModule(e(t.InsightsImageResultsModule,u.SemiExpanded),n),n):t.toInsightLoadingMask(t.toSmartInsightsModule(t.VisuallySimilarImageGridView,n),n),tabView:v,getTitle:function(n,t){return c?l(35,f.vsImagesConfig.TitleResourceKey,t):ImageDetailReducers.getResourceString(f.vsImagesConfig.TitleResourceKey)},isEnabled:function(n){return s(r.getModuleName(i.similarimage))?n.viewType==ImageDetailActions.IImageDetailViewType.VisualSearch&&o(n.insightsState,i.similarimage)?n.insightsState.data&&n.insightsState.data.visuallySimilarImages&&n.insightsState.data.visuallySimilarImages.length>0:n.imageInfo!=null:!1}}}function tt(){var u=ImageDetailReducers.getPageConfig(),f=ImageDetailReducers.getResourceString(u.vsProductsConfig.ExpansionResourceKey),n=a(i.similarproduct),e=t.toInsightLoadingMask(t.toSmartInsightsModule(t.InsightsRelatedProductsModule,n),n),h=t.toInsightLoadingMask(t.toSmartInsightsModule(t.VisuallySimilarProductView,n),n);return{className:”vsp”,expansionButtonText:f,preview:t.VisuallySimilarProductPreview,expandedPreview:h,tabView:e,getTitle:function(n,t){return c?l(20,u.vsProductsConfig.TitleResourceKey,t):ImageDetailReducers.getResourceString(u.vsProductsConfig.TitleResourceKey)},isEnabled:function(n){if(n){if(!s(r.getModuleName(i.similarproduct)))return!1;if(o(n.insightsState,i.similarproduct)){if(n.viewType==ImageDetailActions.IImageDetailViewType.VisualSearch)return n.insightsState&&n.insightsState.data&&y(n.insightsState.data);if(n.insightsState&&n.insightsState.data&&y(n.insightsState.data))return!0}if(n.viewType==ImageDetailActions.IImageDetailViewType.VisualSearch&&n.isHotspotClick||n.imageAssociatedData&&n.imageAssociatedData.image&&n.imageAssociatedData.image.metadata&&n.imageAssociatedData.image.metadata.similarProductsPresent||n.imageInfo&&n.imageInfo.metadata&&n.imageInfo.metadata.similarProductsPresent)return!0}return!1}}}function y(n){return n.visuallySimilarProducts&&n.visuallySimilarProducts.length>0}function it(){var n=ImageDetailReducers.getShoppingSourcesConfig(),f=”shoppingSources”;return{className:”shp”,expansionButtonText:ImageDetailReducers.getResourceString(n.ExpansionResourceKey),preview:t.ShoppingSourcesPreview,expandedPreview:t.toInsightLoadingMask(e(t.ShoppingSourcesContainer,u.SemiExpanded),null),tabView:t.toInsightLoadingMask(e(t.ShoppingSourcesContainer,u.Expanded),null),getTitle:function(t,i){var r=h(t,f);return r==null&&(r=t.imageInfo?t.imageInfo.shoppingSourcesCount:1),c?l(r,n.TitleResourceKey,i):p(r,n.TitleResourceKey,n.TitlePluralResourceKey)},showExpansionButton:function(t){return t&&o(t.insightsState,i.shoppingsources)?h(t,f)>n.PreviewItemCount:t.imageInfo.shoppingSourcesCount>n.PreviewItemCount},isEnabled:function(n){return s(r.getModuleName(i.shoppingsources))?n&&o(n.insightsState,i.shoppingsources)?h(n,f)>0:v(n,”shoppingSourcesCount”):!1}}}function rt(){var n=ImageDetailReducers.getRecipeSourcesConfig(),f=”recipes”;return{className:”rcp”,expansionButtonText:ImageDetailReducers.getResourceString(n.ExpansionResourceKey),preview:t.RecipesPreview,expandedPreview:t.toInsightLoadingMask(e(t.RecipesContainer,u.SemiExpanded),null),tabView:t.toInsightLoadingMask(e(t.RecipesContainer,u.Expanded),null),getTitle:function(t,i){return c?l(t.imageInfo.recipeSourcesCount,n.TitleResourceKey,i):t&&t.imageInfo?p(t.imageInfo.recipeSourcesCount,n.TitleResourceKey,n.TitlePluralResourceKey):null},showExpansionButton:function(t){return t&&o(t.insightsState,i.recipes)?h(t,f)>n.PreviewItemCount:t&&t.imageInfo.recipeSourcesCount>n.PreviewItemCount},isEnabled:function(n){return s(r.getModuleName(i.recipes))?n&&o(n.insightsState,i.recipes)?h(n,f)>0:v(n,”recipeSourcesCount”):!1}}}function ut(){var n=ImageDetailReducers.getLiveMapsConfig();return{className:”lmp”,expansionButtonText:ImageDetailReducers.getResourceString(n.ExpansionResourceKey),preview:t.LiveMapPreview,expandedPreview:t.toInsightLoadingMask(t.LiveMapContainer,null),tabView:t.toInsightLoadingMask(t.LiveMapContainer,null),getTitle:function(){return ImageDetailReducers.getResourceString(n.TitleResourceKey)},isEnabled:function(n){return s(r.getModuleName(i.livemap))?n.imageAssociatedData&&n.imageAssociatedData.livemap!=null:!1}}}function ft(){return typeof t.TriviaPreview!=”undefined”&&typeof t.TriviaContainer!=”undefined”?{className:”trv”,expansionButtonText:”See more trivia”,preview:t.TriviaPreview,expandedPreview:t.toInsightLoadingMask(e(t.TriviaContainer,u.SemiExpanded),null),tabView:t.toInsightLoadingMask(e(t.TriviaContainer,u.Expanded),null),getTitle:function(){return”People also ask”},isEnabled:function(n){return s(r.getModuleName(i.trivia))?n.imageAssociatedData&&n.imageAssociatedData.trivia!=null:!1}}:null}function et(){var n=ImageDetailReducers.getRelatedSearchesConfig();return{className:”rsc”,expansionButtonText:n.ExpansionButtonText,preview:t.RelatedSearchesPreview,expandedPreview:t.toInsightLoadingMask(t.RelatedSearchesContainer,null),tabView:t.toInsightLoadingMask(t.RelatedSearchesContainer,null),getTitle:function(t,i){return c?l(10,n.TitleResourceKey,i):ImageDetailReducers.getResourceString(n.TitleResourceKey)},isEnabled:function(t){return s(r.getModuleName(i.relatedSearches))?(n.EnableImageBasedRelatedSearch||n.EnableRelatedSearches)&&(!t.imageAssociatedData||t.imageAssociatedData.imageBasedRelatedSearches!=null||t.imageAssociatedData.queryBasedRelatedSearches!=null):!1}}}function a(n){var t=r.getModuleName(n),i=ImageDetailReducers.getInsightsModuleConfigs();return t&&i?i[t]:null}function p(t,i,r){var u=t>1?r:i;return n.ImageDetailUtils.stringFormat(ImageDetailReducers.getResourceString(u),t)}function l(t,i,r){return r==u.Preview?n.ImageDetailUtils.stringFormat(“{0} ({1})”,ImageDetailReducers.getResourceString(i),t):ImageDetailReducers.getResourceString(i)}function s(n){return!(w&&r.getSiteFilterCookie()&&b.indexOf(n)==-1)}function e(n,t){function i(i){return React.createElement(n,__assign({moduleExpansionMode:t},i))}function r(n){return n.displayName||n.name||”Component”}return i.displayName=”ModuleWithExpansionMode(“+r(n)+”)”,i}var u=ImageDetailActions.IImageDetailModuleExpansionMode,i=n.ImageDetailUtils.InsightsModuleType,r=n.ImageDetailUtils,o=r.isModuleResponseReady,f=null,w=ImageDetailReducers.getPageConfig().enableSiteFilter,b=ImageDetailReducers.getPageConfig().insightsSiteFilterModules,c=ImageDetailReducers.isMobileViewEnabled();n.ImageDetail.getInsightsComponentEntry=function(n){return f||k(),f[n]}})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={})); //]]> https://www.bing.com/rb/5k/cj,nj/e26a2640/55571cec.js?bu=Avkc_hw //0&&(o=c(function(){s();u(r,!1)},e))};Feedback.Bootstrap.InitializeFeedback({page:true},”sb_feedback”,false,false,true,true,false);; //]]> https://www.bing.com/rs/3P/eI/cj,nj/b7d4206d/b8379406.js https://www.bing.com/rs/3P/eW/cj,nj/992a3e40/69ec0415.js // <!–EndFragment–>