YUI.add("hermes-template-photo-card-overlay-icon",(function(n,e){var o=n.Template.Handlebars.revive({1:function(n,e,o,l,a){return"\t\tautoplay\n"},3:function(n,e,o,l,a){return"\t\tvideo\n"},5:function(n,e,o,l,a){return"\t\tplay\n\t"},7:function(n,e,o,l,a){return'\t\t<svg class="icon icon-autoplay"><use xlink:href="#icon-autoplay"></use></svg>\n'},9:function(n,e,o,l,a){return'\t\t<svg class="icon icon-video"><use xlink:href="#icon-video"></use></svg>\n'},11:function(n,e,o,l,a){return'\t\t<svg class="icon icon-play"><use xlink:href="#icon-play"></use></svg>\n'},compiler:[8,">= 4.3.0"],main:function(n,e,o,l,a){var t,i=null!=e?e:n.nullContext||{},r=n.hooks.helperMissing,u=n.lookupProperty||function(n,e){if(Object.prototype.hasOwnProperty.call(n,e))return n[e]};return'<div class="photo-card-overlay-icon\n'+(null!=(t=(u(o,"ifCond")||e&&u(e,"ifCond")||r).call(i,null!=e?u(e,"type"):e,"===","autoplay",{name:"ifCond",hash:{},fn:n.program(1,a,0),inverse:n.noop,data:a,loc:{start:{line:2,column:1},end:{line:4,column:12}}}))?t:"")+(null!=(t=(u(o,"ifCond")||e&&u(e,"ifCond")||r).call(i,null!=e?u(e,"type"):e,"===","video",{name:"ifCond",hash:{},fn:n.program(3,a,0),inverse:n.noop,data:a,loc:{start:{line:5,column:1},end:{line:7,column:12}}}))?t:"")+(null!=(t=(u(o,"ifCond")||e&&u(e,"ifCond")||r).call(i,null!=e?u(e,"type"):e,"===","play",{name:"ifCond",hash:{},fn:n.program(5,a,0),inverse:n.noop,data:a,loc:{start:{line:8,column:1},end:{line:10,column:12}}}))?t:"")+'">\n\n'+(null!=(t=(u(o,"ifCond")||e&&u(e,"ifCond")||r).call(i,null!=e?u(e,"type"):e,"===","autoplay",{name:"ifCond",hash:{},fn:n.program(7,a,0),inverse:n.noop,data:a,loc:{start:{line:12,column:1},end:{line:14,column:12}}}))?t:"")+"\n"+(null!=(t=(u(o,"ifCond")||e&&u(e,"ifCond")||r).call(i,null!=e?u(e,"type"):e,"===","video",{name:"ifCond",hash:{},fn:n.program(9,a,0),inverse:n.noop,data:a,loc:{start:{line:16,column:1},end:{line:18,column:12}}}))?t:"")+"\n"+(null!=(t=(u(o,"ifCond")||e&&u(e,"ifCond")||r).call(i,null!=e?u(e,"type"):e,"===","play",{name:"ifCond",hash:{},fn:n.program(11,a,0),inverse:n.noop,data:a,loc:{start:{line:20,column:1},end:{line:22,column:12}}}))?t:"")+"\n</div>"},useData:!0}),l={};n.Array.each([],(function(e){var o=n.Template.get("hermes/"+e);o&&(l[e]=o)})),n.Template.register("hermes/photo-card-overlay-icon",(function(e,a){return(a=a||{}).partials=a.partials?n.merge(l,a.partials):l,o(e,a)}))}),"@VERSION@",{requires:["template-base","handlebars-base"]});YUI.add("hermes-template-photo-list-photo",(function(n,t){var e=n.Template.Handlebars.revive({1:function(n,t,e,o,l){var r,a,i=null!=t?t:n.nullContext||{},c=n.lookupProperty||function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};return'\t<div class="photo-list-photo-container">\n\t\t<img loading="lazy" src="'+n.escapeExpression("function"==typeof(a=null!=(a=c(e,"photoUrl")||(null!=t?c(t,"photoUrl"):t))?a:n.hooks.helperMissing)?a.call(i,{name:"photoUrl",hash:{},data:l,loc:{start:{line:3,column:27},end:{line:3,column:39}}}):a)+'" height="100%" width="100%">\n'+(null!=(r=c(e,"if").call(i,null!=t?c(t,"isVideo"):t,{name:"if",hash:{},fn:n.program(2,l,0),inverse:n.noop,data:l,loc:{start:{line:4,column:2},end:{line:6,column:9}}}))?r:"")+"\n"+(null!=(r=c(e,"if").call(i,null!=t?c(t,"hasInteraction"):t,{name:"if",hash:{},fn:n.program(4,l,0),inverse:n.program(7,l,0),data:l,loc:{start:{line:8,column:2},end:{line:15,column:9}}}))?r:"")+"\t</div>\n"},2:function(n,t,e,o,l){var r,a=n.lookupProperty||function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};return null!=(r=n.invokePartial(a(o,"photo-card-overlay-icon"),t,{name:"photo-card-overlay-icon",hash:{type:"video"},data:l,indent:"\t\t\t",helpers:e,partials:o,decorators:n.decorators}))?r:""},4:function(n,t,e,o,l){var r,a=n.lookupProperty||function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};return(null!=(r=a(e,"if").call(null!=t?t:n.nullContext||{},null!=t?a(t,"showInteractionBarPlaceholder"):t,{name:"if",hash:{},fn:n.program(5,l,0),inverse:n.noop,data:l,loc:{start:{line:9,column:3},end:{line:11,column:10}}}))?r:"")+'\t\t\t<div class="interaction-view"></div>\n'},5:function(n,t,e,o,l){return'\t\t\t\t<div class="interaction-view-placeholder"></div>\n'},7:function(n,t,e,o,l){var r,a=n.lookupProperty||function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};return'\t\t\t<a class="click-target" href="'+n.escapeExpression("function"==typeof(r=null!=(r=a(e,"photoPageUrl")||(null!=t?a(t,"photoPageUrl"):t))?r:n.hooks.helperMissing)?r.call(null!=t?t:n.nullContext||{},{name:"photoPageUrl",hash:{},data:l,loc:{start:{line:14,column:33},end:{line:14,column:49}}}):r)+'" tabindex="0" role="heading" aria-level="3"></a>\n'},9:function(n,t,e,o,l){var r,a=null!=t?t:n.nullContext||{},i=n.lookupProperty||function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};return(null!=(r=i(e,"if").call(a,null!=t?i(t,"isVideo"):t,{name:"if",hash:{},fn:n.program(10,l,0),inverse:n.noop,data:l,loc:{start:{line:18,column:1},end:{line:20,column:8}}}))?r:"")+"\n"+(null!=(r=i(e,"if").call(a,null!=t?i(t,"hasInteraction"):t,{name:"if",hash:{},fn:n.program(12,l,0),inverse:n.program(15,l,0),data:l,loc:{start:{line:22,column:1},end:{line:29,column:8}}}))?r:"")},10:function(n,t,e,o,l){var r,a=n.lookupProperty||function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};return null!=(r=n.invokePartial(a(o,"photo-card-overlay-icon"),t,{name:"photo-card-overlay-icon",hash:{type:"video"},data:l,indent:"\t\t",helpers:e,partials:o,decorators:n.decorators}))?r:""},12:function(n,t,e,o,l){var r,a=n.lookupProperty||function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};return(null!=(r=a(e,"if").call(null!=t?t:n.nullContext||{},null!=t?a(t,"showInteractionBarPlaceholder"):t,{name:"if",hash:{},fn:n.program(13,l,0),inverse:n.noop,data:l,loc:{start:{line:23,column:2},end:{line:25,column:9}}}))?r:"")+'\t\t<div class="interaction-view"></div>\n'},13:function(n,t,e,o,l){return'\t\t\t<div class="interaction-view-placeholder"></div>\n'},15:function(n,t,e,o,l){var r,a=n.lookupProperty||function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};return'\t\t<a class="click-target" href="'+n.escapeExpression("function"==typeof(r=null!=(r=a(e,"photoPageUrl")||(null!=t?a(t,"photoPageUrl"):t))?r:n.hooks.helperMissing)?r.call(null!=t?t:n.nullContext||{},{name:"photoPageUrl",hash:{},data:l,loc:{start:{line:28,column:32},end:{line:28,column:48}}}):r)+'" tabindex="0" role="heading" aria-level="3"></a>\n'},compiler:[8,">= 4.3.0"],main:function(n,t,e,o,l){var r,a=n.lookupProperty||function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};return null!=(r=a(e,"if").call(null!=t?t:n.nullContext||{},null!=t?a(t,"allowLazyLoading"):t,{name:"if",hash:{},fn:n.program(1,l,0),inverse:n.program(9,l,0),data:l,loc:{start:{line:1,column:0},end:{line:30,column:7}}}))?r:""},usePartial:!0,useData:!0}),o={};n.Array.each(["photo-card-overlay-icon","photo-card-overlay-icon"],(function(t){var e=n.Template.get("hermes/"+t);e&&(o[t]=e)})),n.Template.register("hermes/photo-list-photo",(function(t,l){return(l=l||{}).partials=l.partials?n.merge(o,l.partials):o,e(t,l)}))}),"@VERSION@",{requires:["template-base","handlebars-base","hermes-template-photo-card-overlay-icon","hermes-template-photo-card-overlay-icon"]});YUI.add("photo-list-photo-view",(function(e){var t=require("hermes-core/type-validator");e.namespace("Views")[this.name]=e.Base.create(this.name,e.FlickrView,[],{langBundles:this.details.langBundles,initializer:function(e){return""===this.get("container").get("innerHTML")&&this.setContainerHTML(""),this.set("isZombie",!YUI.Env.isServer&&e.requiredToShowOnServer&&this.get("layoutItem")&&!this.get("layoutItem").isAwake),this.onlyShowCurateForOwner=e.onlyShowCurateForOwner,this.allowLazyLoading=e.allowLazyLoading,this},loadState:function(){var t=e.URLHelper.getPhotoPage({photoId:this.get("model").getValue("id"),pathAlias:this.get("model").getValue("owner").getValue("pathAlias"),contextSuffix:this.get("contextSuffix")});return this.set("photoPageUrl",t),e.Promise.resolve()},buildContainer:function(){var t,i=this.get("container"),a=this.get("layoutItem");if(a.isAwake)this.updateGeometry(),this.setContainerHTML(this.render()),YUI.Env.isServer?(this.allowLazyLoading||i.setStyles({"background-image":"url("+this.get("photoUrl")+")"}),i.addClass("awake"),this.get("model").getValue("needsInterstitial")&&i.addClass("restricted-image")):(this.allowLazyLoading||this.get("showLowResImageFirst")&&i.setStyles({backgroundImage:"url("+this.get("model").getValue("sizes").sq.url+")"}).addClass("low-res"),this.downloadCacheAndSetImage());else if(YUI.Env.isServer)this.set("isZombie",!0);else if(!YUI.Env.isServer||this.get("isZombie")){var r="";t=e.Node.create(this.get("placeHolderHTML")).set("innerHTML",this.render()),this.get("model").getValue("needsInterstitial")&&(r=" restricted-image"),t.setAttrs({id:i.getAttribute("id"),className:i.getAttribute("class")+r}),this.updateNodeGeometry(a,t),this.serialize(t),this.set("isReallySleeping",!0),this.set("isZombie",!1),this.downloadCacheAndSetImage()}return this.get("model").getValue("isVideo")&&this.get("container").addClass("is-video"),this.get("showInteractionBarPlaceholder")&&(this.get("model").getValue("aspectRatio")>1?i.addClass("landscape"):i.addClass("portrait")),this},activate:function(){var e;return this.renderInteractionView().then(function(e){this.fire("activated")}.bind(this)),this.get("showLowResImageFirst")&&((e=this.get("parentContainer").getDOMNode()).addEventListener("transitionend",this.removeTransition),e.addEventListener("webkitTransitionEnd",this.removeTransition)),this.registerEventHandler(this.get("interactionContainer").delegate(["blur","focus"],this.toggleKeyboardFocusStyling.bind(this),"a, .engagement-item")),this},toggleKeyboardFocusStyling:function(e){var t=e.target.ancestor(".interaction-view");t&&t.toggleClass("has-keyboard-focus","focus"===e.type)},setHoverVisible:function(e){var t=this.get("interactionContainer");t&&(e?t.addClass("manual-hover"):t.removeClass("manual-hover"))},render:function(){return this.templates("photo-list-photo")({photoPageUrl:this.get("photoPageUrl"),hasInteraction:!!this.get("interactionViewName")&&!this.appContext.forceServerRender,showInteractionBarPlaceholder:this.get("showInteractionBarPlaceholder"),isVideo:this.get("model").getValue("isVideo"),photoUrl:this.get("model").getValue("needsInterstitial")?e.config.flickr.urls.assetRoot+"/images/photo-fuzzy-t.png":this.get("photoUrl"),allowLazyLoading:this.allowLazyLoading})},removeTransition:function(e){e&&e.target&&e.target.classList&&e.target.classList.contains("photo-list-photo-view")&&e.target.classList.remove("low-res")},downloadCacheAndSetImage:function(){this.allowLazyLoading?this.handleImageLoad(!0,this.get("photoUrl")):e.fluid.loadImage(this.get("photoUrl"),{timeout:1e3,retry:!0}).then(function(e){this.handleImageLoad(!0,e)}.bind(this),function(e){this.handleImageLoad(!1,e+"?retry="+Date.now())}.bind(this))},handleImageLoad:function(t,i){var a,r=this,n=this.get("isReallySleeping");a=n?this.deserialize():this.get("container"),this.allowLazyLoading||a.setStyle("backgroundImage","url("+i+")"),t||a.setStyle("backgroundColor","#eee"),this.get("model").getValue("needsInterstitial")&&a.addClass("restricted-image"),n?this.serialize(a):e.fluid.chill((function(){var e,i=this.get("container");n||(i.addClass("awake"),setTimeout((function(){(e=r.get("interactionView"))&&e.updateBreakpoints&&e.updateBreakpoints()}),0),this.fire(t?"loaded":"loadError"))}),this),a=null},updateGeometry:function(e){var t,i=this.get("isReallySleeping");e?this.set("layoutItem",e):e=this.get("layoutItem"),t=i?this.deserialize():this.get("container"),this.updateNodeGeometry(e,t),i&&this.serialize(t),t=null},updateNodeGeometry:function(t,i){YUI.Env.isServer?i.setStyles({transform:"translate("+t.geometry.left+"px, "+t.geometry.top+"px)","-webkit-transform":"translate("+t.geometry.left+"px, "+t.geometry.top+"px)","-ms-transform":"translate("+t.geometry.left+"px, "+t.geometry.top+"px)"}):e.fluid.setStylePrefixed("transform","translate("+t.geometry.left+"px, "+t.geometry.top+"px)",i),i.setStyles({width:t.geometry.width+"px",height:t.geometry.height+"px"})},sleep:function(){var t,i;this.get("isReallySleeping")||(YUI.Env.isServer?this.set("isZombie",!0):(this.get("id"),this.destroyInteractionView(),(i=this.get("container")).removeClass("awake"),this.serialize(i),t=e.Node.create(this.get("placeHolderHTML")),this.get("parentContainer").replaceChild(t,i),this.set("container",t),this.set("isReallySleeping",!0),this.set("isZombie",!1),i=null))},wake:function(){var t,i,a,r=this;this.get("isReallySleeping")&&(this.get("id"),t=this.get("container"),i=this.get("parentContainer"),a=this.deserialize(),i.replaceChild(a,t),this.set("container",a),this.set("isReallySleeping",!1),this.renderInteractionView(),e.fluid.chill((function(){var e;this.get("container").addClass("awake"),setTimeout((function(){(e=r.get("interactionView"))&&e.updateBreakpoints&&e.updateBreakpoints()}),0)}),this),t=null)},isAwake:function(){return!this.get("isReallySleeping")},serialize:function(t){if(YUI.Env.isServer)throw new Error("Impossible to `serialize` on the server (uses sessionStorage). Maybe you meant to call `sleep`?");t&&e.Storage.Instance.set(this.get("storageId"),t.getDOMNode().outerHTML)},deserialize:function(){if(YUI.Env.isServer)throw new Error("Impossible to `deserialize` on the server (uses sessionStorage). Maybe you meant to call `wake`?");var t,i=e.Storage.Instance.get(this.get("storageId"));return i&&(t=e.Node.create(i),this.dematerialize()),t},dematerialize:function(){if(YUI.Env.isServer)throw new Error("Impossible to `dematerialize` on the server (uses sessionStorage).");e.Storage.Instance.remove(this.get("storageId"))},renderInteractionView:function(){var t,i,a=this,r=this.get("interactionViewName"),n=this.get("interactionView");return r&&!n?(i=this.onlyShowCurateForOwner?this.get("model").getValue("isOwner"):void 0,this.appContext.getView(r,e.merge(this._params,{id:this.get("id"),container:this.get("interactionContainer"),model:this.get("model"),listModelParams:this.get("listModelParams"),photoPageUrl:this.get("photoPageUrl"),isActiveViewAgnostic:this.get("isActiveViewAgnostic"),engagementModelName:this.get("engagementModelName"),layoutWidth:this.get("layoutItem").geometry.width,showCurate:i})).then(function(e){return this.set("interactionView",e),this.registerEventHandler(this.get("interactionView").on("hoverActionOpened",this.setHoverVisible.bind(this,!0))),this.registerEventHandler(this.get("interactionView").on("hoverActionClosed",this.setHoverVisible.bind(this,!1))),e.initialize()}.bind(this)).then((function(e){return setTimeout((function(){a.isAwake()&&e&&e.updateBreakpoints&&e.updateBreakpoints()}),0),e}))):n?(n.get("container").inDoc()||((t=n.get("container")).addClass("interaction-view"),this.get("interactionContainer")||this.buildContainer(),this.get("container").replaceChild(t,this.get("interactionContainer")),n.normalizedActivate(),setTimeout((function(){n&&n.updateBreakpoints&&n.updateBreakpoints()}),0)),e.Promise.resolve(n)):e.Promise.resolve(null)},destroyInteractionView:function(){var e=this.get("interactionView");e&&(e.destroy(),this.set("interactionView",null))},destructor:function(){this.dematerialize()}},{ATTRS:{id:{writeOnce:"initOnly",validator:function(e,i){return t.photoId(e)}},parentSignature:{writeOnce:"initOnly"},storageId:{readOnly:!0,derivedBy:["id","parentSignature"],getter:function(){return this.get("parentSignature")+"-"+this.get("id")}},layoutItem:{validator:function(e,t){return"object"==typeof e&&e.hasOwnProperty("aspectRatio")&&e.hasOwnProperty("geometry")&&"object"==typeof e.geometry&&e.geometry.hasOwnProperty("width")&&e.geometry.hasOwnProperty("height")&&e.geometry.hasOwnProperty("top")&&e.geometry.hasOwnProperty("left")&&e.hasOwnProperty("isAwake")}},photoUrl:{value:"/images/spaceball.gif",getter:function(e,t){var i,a=this.get("model"),r=this.get("layoutItem"),n={};return this.get("showInteractionBarPlaceholder")?(a.getValue("aspectRatio")>1?n.height=r.geometry.height-(this.get("interactionBarHeight")||0):n.width=r.geometry.width,i=a.getSizeToFit(n,{includeSquare:1===r.aspectRatio})):i=a.getSizeToFit({width:r.geometry.width,height:r.geometry.height},{includeSquare:1===r.aspectRatio}),i.url}},photoPageUrl:{writeOnce:!0,validator:function(t,i){return e.AttributeHelpers.validateString(t)}},model:{value:null},listModelParams:{value:null},parentContainer:{writeOnce:"initOnly"},contextSuffix:{writeOnce:"initOnly",value:null,validator:function(t,i){return e.AttributeHelpers.validateString(t)}},measureAFT:{value:!1,validator:function(t,i){return e.AttributeHelpers.validateBoolean(t)}},isReallySleeping:{value:!1,validator:function(t,i){return e.AttributeHelpers.validateBoolean(t)}},isZombie:{value:!1,validator:function(t,i){return e.AttributeHelpers.validateBoolean(t)}},placeHolderHTML:{value:'<div class="youcansleepwhenyouredead" />',validator:function(t,i){return e.AttributeHelpers.validateString(t)}},showLowResImageFirst:{value:!1,validator:function(t,i){return e.AttributeHelpers.validateBoolean(t)}},interactionViewName:{writeOnce:"initOnly",value:null,validator:function(t,i){return e.AttributeHelpers.validateString(t)}},showInteractionBarPlaceholder:{writeOnce:"initOnly",value:!1,validator:function(t,i){return e.AttributeHelpers.validateBoolean(t)}},interactionBarHeight:{writeOnce:"initOnly",value:null,validator:function(t,i){return e.AttributeHelpers.validateInteger(t)}},engagementModelName:{writeOnce:"initOnly",value:null,validator:function(t,i){return e.AttributeHelpers.validateString(t)}},interactionView:{value:null},interactionContainer:{value:null,getter:function(e,t){return e||YUI.Env.isServer||(e=this.get("container").one(".interaction-view")),e}}}})}),"@VERSION@",{requires:["flickr-view","hermes-template-photo-list-photo","url-helper","attribute-helpers"],optionalRequires:["fluid","storage-helper","hermes-core"],langBundles:["common"]});YUI.add("hermes-template-photo-list-static-item",(function(e,t){var a=e.Template.Handlebars.revive({compiler:[8,">= 4.3.0"],main:function(e,t,a,i,r){return'<div class="photo-list-static-item-container">\n\t<div>\n\t</div>\n</div>\n'},useData:!0}),i={};e.Array.each([],(function(t){var a=e.Template.get("hermes/"+t);a&&(i[t]=a)})),e.Template.register("hermes/photo-list-static-item",(function(t,r){return(r=r||{}).partials=r.partials?e.merge(i,r.partials):i,a(t,r)}))}),"@VERSION@",{requires:["template-base","handlebars-base"]});YUI.add("photo-list-static-item-view",(function(e){e.PhotolistStaticItemView=e.namespace("Views")[this.name]=e.Base.create(this.name,e.FlickrView,[],{langBundles:this.details.langBundles,initializer:function(e){return""===this.get("container").get("innerHTML")&&this.setContainerHTML(""),this.set("layoutItem",e.layoutItem),this.set("isZombie",!YUI.Env.isServer&&e.requiredToShowOnServer&&this.get("layoutItem")&&!this.get("layoutItem").isAwake),this},loadState:function(){return e.Promise.resolve()},buildContainer:function(){var t,i=this.get("container"),r=this.get("layoutItem");if(r.isAwake)this.updateGeometry(),this.setContainerHTML(this.render());else if(YUI.Env.isServer)this.set("isZombie",!0);else if(!YUI.Env.isServer||this.get("isZombie")){(t=e.Node.create(this.get("placeHolderHTML")).set("innerHTML",this.render())).setAttrs({id:i.getAttribute("id"),className:i.getAttribute("class")+""}),this.updateNodeGeometry(r,t),this.serialize(t),this.set("isReallySleeping",!0),this.set("isZombie",!1)}return this},activate:function(){return this.fire("activated"),this},setHoverVisible:function(e){},render:function(){return!0},removeTransition:function(e){},updateGeometry:function(e){var t,i=this.get("isReallySleeping");e?this.set("layoutItem",e):e=this.get("layoutItem"),t=i?this.deserialize():this.get("container"),this.updateNodeGeometry(e,t),i&&this.serialize(t),t=null},updateNodeGeometry:function(t,i){YUI.Env.isServer?i.setStyles({transform:"translate("+t.geometry.left+"px, "+t.geometry.top+"px)"}):e.fluid.setStylePrefixed("transform","translate("+t.geometry.left+"px, "+t.geometry.top+"px)",i),i.setStyles({width:t.geometry.width+"px",height:t.geometry.height+"px"})},sleep:function(){var t,i;this.get("isReallySleeping")||(YUI.Env.isServer?this.set("isZombie",!0):(this.get("id"),this.destroyInteractionView(),(i=this.get("container")).removeClass("awake"),this.serialize(i),t=e.Node.create(this.get("placeHolderHTML")),this.get("parentContainer").replaceChild(t,i),this.set("container",t),this.set("isReallySleeping",!0),this.set("isZombie",!1),i=null))},wake:function(){var e,t,i;this.get("isReallySleeping")&&(this.get("id"),e=this.get("container"),t=this.get("parentContainer"),i=this.deserialize(),t.replaceChild(i,e),this.set("container",i),this.set("isReallySleeping",!1),e=null)},isAwake:function(){return!this.get("isReallySleeping")},serialize:function(t){if(YUI.Env.isServer)throw new Error("Impossible to `serialize` on the server (uses sessionStorage). Maybe you meant to call `sleep`?");t&&e.Storage.Instance.set(this.get("storageId"),t.getDOMNode().outerHTML)},deserialize:function(){if(YUI.Env.isServer)throw new Error("Impossible to `deserialize` on the server (uses sessionStorage). Maybe you meant to call `wake`?");var t,i=e.Storage.Instance.get(this.get("storageId"));return i&&(t=e.Node.create(i),this.dematerialize()),t},dematerialize:function(){if(YUI.Env.isServer)throw new Error("Impossible to `dematerialize` on the server (uses sessionStorage).");e.Storage.Instance.remove(this.get("storageId"))},renderInteractionView:function(){return e.Promise.resolve(null)},destroyInteractionView:function(){},destructor:function(){this.dematerialize()}},{ATTRS:{id:{},parentSignature:{writeOnce:"initOnly"},storageId:{readOnly:!0,derivedBy:["id","parentSignature"],getter:function(){return this.get("parentSignature")+"-"+this.get("id")}},layoutItem:{},model:{value:null},listModelParams:{value:null},parentContainer:{writeOnce:"initOnly"},contextSuffix:{writeOnce:"initOnly",value:null,validator:function(t,i){return e.AttributeHelpers.validateString(t)}},measureAFT:{value:!1,validator:function(t,i){return e.AttributeHelpers.validateBoolean(t)}},isReallySleeping:{value:!1,validator:function(t,i){return e.AttributeHelpers.validateBoolean(t)}},isZombie:{value:!1,validator:function(t,i){return e.AttributeHelpers.validateBoolean(t)}},placeHolderHTML:{value:'<div class="youcansleepwhenyouredead" />',validator:function(t,i){return e.AttributeHelpers.validateString(t)}},showLowResImageFirst:{value:!1,validator:function(t,i){return e.AttributeHelpers.validateBoolean(t)}},interactionViewName:{writeOnce:"initOnly",value:null,validator:function(t,i){return e.AttributeHelpers.validateString(t)}},showInteractionBarPlaceholder:{writeOnce:"initOnly",value:!1,validator:function(t,i){return e.AttributeHelpers.validateBoolean(t)}},interactionBarHeight:{writeOnce:"initOnly",value:null,validator:function(t,i){return e.AttributeHelpers.validateInteger(t)}},engagementModelName:{writeOnce:"initOnly",value:null,validator:function(t,i){return e.AttributeHelpers.validateString(t)}},interactionView:{value:null},interactionContainer:{value:null,getter:function(e,t){return e||YUI.Env.isServer||(e=this.get("container").one(".interaction-view")),e}}}})}),"@VERSION@",{requires:["flickr-view","hermes-template-prbd-moola-position","hermes-template-photo-list-static-item","url-helper","attribute-helpers"],optionalRequires:["fluid","storage-helper","hermes-core"],langBundles:["common"]});YUI.add("photo-list-view",(function(t,e){"use strict";var i=require("hermes-core/flog")(e),o={containerWidth:"fullWidth",subtractScrollbarWidth:!1,pageParams:{page:1,perPage:50},parentName:"",subviewMapping:{"photo-models":{name:"photo-list-photo-view",params:null},"photo-lite-models":{name:"photo-list-photo-view",params:null},"set-models":{name:"photo-list-album-view",params:null},"photo-list-static-item-view":{name:"photo-list-static-item-view",params:null},"photo-list-moola-item-view":{name:"photo-list-moola-item-view",params:null}},paginateOnScroll:!0,keepAwakeOnScroll:!1,parentContainer:t.config.win,loadMoreMargin:3,relayoutOnResize:!0,recenterOnResize:!1,responsiveRowHeight:!1,maintainScrollPosition:!0,interactionViewName:"photo-list-photo-interaction-view",engagementModelName:"photo-engagement-models",itemFilterFunction:null,injectPhotolistContextParams:null,beaconViews:!0,scrollInterruptParams:null,scrollToWithId:!1,handleCollectionChanged:!1,allowLazyLoading:!1},n={480:.5,800:.75,1280:1,1600:1.25},s=Object.keys(n);t.FlickrView.create(this.name,t.FlickrView,[],{langBundles:this.details.langBundles,initializer:function(e){var n,s=t.merge(o,e.photoListConfig);if(void 0===s)throw new Error("photo-list-view must be initialized with config params wrapped in a `photoListConfig` object.");if(s.initialItems)this.initialItems=s.initialItems.concat(),s.paginateOnScroll=!1;else{if(void 0===s.modelParams)throw new Error("photo-list-view must be initialized with `modelParams`.");if(void 0===s.modelParams.registryName)throw new Error("photo-list-view must be initialized with `modelParams.registryName`.");if(void 0===s.modelParams.modelIdOrAttributes)throw new Error("photo-list-view must be initialized with `modelParams.modelIdOrAttributes`.");if(void 0===s.modelParams.collectionAttributeName)throw new Error("photo-list-view must be initialized with `modelParams.collectionAttributeName`.")}if(void 0===s.parentName)throw new Error("photo-list-view must be initialized with the `parentName` (the name of the module containing the photolist).");return this.parentName=s.parentName,this.modelParams=s.modelParams,this.pageParams=s.pageParams,this.subviewMapping=s.subviewMapping,this.loadMoreMargin=s.loadMoreMargin,this.relayoutOnResize=s.relayoutOnResize,this.recenterOnResize=s.recenterOnResize,this.responsiveRowHeight=s.responsiveRowHeight,this.contextSuffix=s.contextSuffix,this.initializeWithFirstPage=s.initializeWithFirstPage,!YUI.Env.isServer&&s.beaconViews&&(this.viewBeaconer={beaconer:this.appContext.getViewCounter(),beaconAttribute:s.viewBeaconAttribute||"id",beaconRestrictedAttribute:s.viewBeaconRestrictedAttribute||"needsInterstitial",beaconAlwaysBeacon:s.viewBeaconAlwaysBeacon||!1,beaconIsOwnerAttribute:s.viewBeaconIsOwnerAttribute||"isOwner"}),s.subtractScrollbarWidth?YUI.Env.isServer?this.scrollbarWidth=this.appContext.viewportData.scrollbarWidth:this.scrollbarWidth=t.OverflowHelper.detectScrollbarSize(t.one("body")):this.scrollbarWidth=0,s.layout?(s.layout instanceof t.PhotoListLayout?(i.warn("Passing a PhotoListLayout instance into PhotoListView is deprecated. Instead, send the layout config object, and PhotoListView will create the PhotoListLayout for you."),this.photoListLayout=s.layout):(this.isMobile&&s.mobileLayout&&(0===Object.keys(s.mobileLayout).length&&(s.mobileLayout={targetRowHeight:200,containerPadding:{right:16,left:16},itemSpacing:{horizontal:16,vertical:16}}),s.layout.targetRowHeight=s.mobileLayout.targetRowHeight||s.layout.targetRowHeight,s.layout.containerPadding=t.merge(s.layout.containerPadding||{},s.mobileLayout.containerPadding||{}),s.layout.itemSpacing=t.merge(s.layout.itemSpacing||{},s.mobileLayout.itemSpacing||{})),this.photoListLayout=new t.PhotoListLayout(t.merge(s.layout,{appContext:this.appContext}))),delete s.layout.appContext):this.photoListLayout=new t.PhotoListLayout({appContext:this.appContext}),this.photoListLayout.containerWidth||(YUI.Env.isServer||(n=this.appContext.flapp.get("activeView")),this.appContext.hasClientSideRouted()&&n&&n.name===this.parentName?this.photoListLayout.containerWidth=this.calculateContainerWidth("previousContainerWidth"):(this.explicitContainerWidth=s.containerWidth,this.photoListLayout.containerWidth=this.calculateContainerWidth(this.explicitContainerWidth))),this.baseRowHeight=this.photoListLayout.targetRowHeight,this.responsiveRowHeight&&this.adjustRowHeightToContainerWidth(),this.paginateOnScroll=s.paginateOnScroll,this.paginateOnScroll&&this.photoListLayout.layout&&this.photoListLayout.hasLimitedNumberOfRows()&&i.warn("When photo-list-layout::maxNumRows is specified, photo-list::paginateOnScroll should probably be set to `false`."),this.parentContainer=s.parentContainer,this.keepAwakeOnScroll=s.keepAwakeOnScroll,this.keepAwakeOnScroll&&(this.photoListLayout.sleepTopAndBottom=!1),this.loadingMoreBottom=!1,this.loadingMoreTop=!1,this.lastItemCached=!1,this.firstItemCached=!1,this.itemsMappedToAspectRatios=[],this.lowestPageInView=this.pageParams.page,this.highestPageInView=this.pageParams.page,this.pageParams.viewPageSize&&(this.lastPageInView=this.pageParams.page+Math.ceil(this.pageParams.viewPageSize/this.pageParams.perPage)-1,isNaN(this.lastPageInView)&&i.warn("Error calculating `this.lastPageInView`. Verify values passed for `config.pageParams`.")),this.modelsById={},this.subviewsById={},this.fetchedOnlyInitPage=!1,this.perPageDoubles=0,this.interactionViewName=s.interactionViewName,this.showInteractionBarPlaceholder=s.showInteractionBarPlaceholder||!1,this.interactionBarHeight=s.interactionBarHeight,this.engagementModelName=s.engagementModelName,this.maintainScrollPosition=s.maintainScrollPosition,this.scrollToWithId=s.scrollToWithId,this.handleCollectionChanged=s.handleCollectionChanged,this.allowLazyLoading=s.allowLazyLoading,this.itemFilterFunction=s.itemFilterFunction,s.injectPhotolistContextParams&&(this.injectPhotolistContextParams=t.merge(s.injectPhotolistContextParams)),""===this.get("container").get("innerHTML")&&this.setContainerHTML(""),s.scrollInterruptParams&&(this.scrollInterruptParams=s.scrollInterruptParams,this.scrollInterruptState={nextInterrupt:this.scrollInterruptParams.pageCounts[0],numPagesLoaded:0,numInterrupts:0,isInterrupted:!1,footer:null,footerHeight:0}),this.isHidden=s.isHidden,delete e.photoListConfig,this.params=e,this},loadState:function(){var e,o,n=this;return this.initialItems?this.setItems(this.initialItems).then(this.loadStateSubviewsReady.bind(this),(function(t){i.error("Error displaying initial items",{err:t})})):(e=t.merge(this.modelParams.fetchParams,this.pageParams),this.paginateOnScroll&&!this.scrollToWithId&&(e.page=2*(this.pageParams.page-1)+1,e.perPage=Math.floor(.5*this.pageParams.perPage),this.fetchedOnlyInitPage=!0),this.appContext.getModel(this.modelParams.registryName,this.modelParams.modelIdOrAttributes,e).then((function(i){var s,a=i.getValue(n.modelParams.collectionAttributeName),r=a.getList();if(n.set("collectionModel",i),n.lastPageInView)return(o=Math.min(a.getNextIncompletePage(n.pageParams),n.lastPageInView+1))<=n.pageParams.page?a.getPage(e):(s=a.getList().slice((n.pageParams.page-1)*n.pageParams.perPage,(o-1)*n.pageParams.perPage),t.Promise.resolve(s));var l=(e.page||1)*(e.perPage||0);return r.length&&(a.fetchedEnd||r.length>=l)&&!n.initializeWithFirstPage?t.Promise.resolve(r):a.getPage(e)}),(function(t){i.error("error fetching model",{err:t})})).then((function(e){var i=n.get("collectionModel").getValue(n.modelParams.collectionAttributeName),s=i.getList(),a=i.getFirstItem(),r=i.getLastItem();return e&&e.length?(n.lastPageInView?(n.lowestPageInView=n.pageParams.page,o===n.lastPageInView?n.highestPageInView=o-(Math.floor(n.pageParams.viewPageSize/n.pageParams.perPage)-1):n.highestPageInView=Math.max(n.lowestPageInView,o)):n.initializeWithFirstPage?(n.lowestPageInView=1,n.highestPageInView=1):(n.lowestPageInView=Math.floor(a.index/n.pageParams.perPage)+1,n.highestPageInView=Math.floor(r.index/n.pageParams.perPage)+1),!YUI.Env.isServer&&n.scrollInterruptState&&n.updateScrollInterruptState(n.highestPageInView-1),(i.fetchedEnd&&e.length&&s.length&&e[e.length-1]&&s[s.length-1]&&e[e.length-1].id===s[s.length-1].id||n.highestPageInView>=n.lastPageInView)&&(n.lastItemCached=!0),n.itemFilterFunction&&"function"==typeof n.itemFilterFunction&&(e=e.filter(n.itemFilterFunction)),n.layOutItems(e,"bottom")):t.Promise.resolve(null)}),(function(t){i.error("Calculate layout and generate subviews",{err:t})})).then(this.loadStateSubviewsReady.bind(this),(function(t){i.warn("Error loading items from registry",{err:t,registry:n.modelParams.registryName,modelIdOrAttributes:n.modelParams.modelIdOrAttributes})})))},loadStateSubviewsReady:function(t){this.photoListLayout.getAwakeItems().length;YUI.Env.isServer||this.get("container").hasClass("requiredToShowOnServer")&&this.photoListLayout.containerWidth!==this.retrieveContainerWidth()&&(this._relayoutQueued=!0)},buildContainer:function(){return this.setContainerHTML(""),this.get("container").setStyle("height",this.containerHeight+"px"),this.initialLayoutResponse&&(this.renderSubviews(null,this.initialLayoutResponse),delete this.initialLayoutResponse),this},activate:function(){var e;return this._relayoutQueued&&(this._relayoutQueued=!1,this.initialLayoutResponse?(this.buildContainer(),this.storeContainerWidth(this.photoListLayout.containerWidth)):this.handleResize(null)),!this.paginateOnScroll&&this.keepAwakeOnScroll||(this.handleScroll(),this.parentContainer!==t.config.win&&this.parentContainer instanceof t.Node?this.registerEventHandler(this.parentContainer.on("scroll",this.handleScroll.bind(this))):this.registerEventHandler(t.globalEvents.subscribe("window:scroll",this.handleScroll.bind(this)))),this.relayoutOnResize&&this.registerEventHandler(t.globalEvents.subscribe("window:resize",this.handleResize.bind(this))),!YUI.Env.isServer&&this.maintainScrollPosition?this.photoListLayout.hasLimitedNumberOfRows()||(!(e=this.appContext.getReferrer())||e&&e!==this.appContext.flapp.getPath())&&this.restoreScrollPosition():!YUI.Env.isServer&&this.scrollToWithId&&this.scrollToId(this.scrollToWithId),this.injectPhotolistContextParams&&this.registerEventHandler(this.get("container").delegate("click",this.injectPhotolistContext.bind(this),"a")),this.registerEventHandler(this.get("container").delegate("click",this.subviewExtraToolClicked.bind(this),".extra-tool")),this.registerEventHandler(this.get("container").delegate("key",this.subviewExtraToolClicked.bind(this),"down:13",".extra-tool")),Object.keys(this.subviewMapping).some(function(t){return this.subviewMapping[t]&&"photo-list-tile-view"===this.subviewMapping[t].name}.bind(this))&&this.registerEventHandler(this.get("container").delegate("mouseenter",this.subviewLicenseMouseenter.bind(this),".license")),this.handleCollectionChanged&&this.registerEventHandler(this.get("collectionModel").on("valuesChanged",this.onCollectionModelValuesChanged.bind(this))),this.isHidden&&this.hide(),this.activateSubviews(),this},addStaticItemsBetweenItems:function(t){if(!t)return i.warn("No items found in addStaticItemsBetweenItems"),[];let e=this.photoListLayout.staticViewsConfig.cadence,o=this.photoListLayout.staticViewsConfig.staticViewsQueueLength,n=this.photoListLayout.staticViewsConfig.isFullRow;if(!e||!o||n)return t;if(t.length<e)return i.warn("Items collection is not large enough to add static views in between"),t;for(var s=1;s<t.length;s++)s%e==0&&o&&(t.splice(s,0,{id:"static-p"+(this.highestPageInView-1)+"-"+s,isStaticItem:!0,aspectRatio:1.5,width:300}),o--,i.info("Photolist: Added static view at index "+s));return t},setItems:function(t,e){var i,o=this;return this.containerHeight=0,this.itemsMappedToAspectRatios=[],this.modelsById={},this.subviewsById={},this.get("collectionModel")&&((i=this.get("collectionModel").getValue(this.modelParams.collectionAttributeName)).fetchedStart?this.firstItemCached=!0:this.firstItemCached=!1,i.fetchedEnd&&!e?this.lastItemCached=!0:this.lastItemCached=!1),this.get("container").setHTML(""),this.photoListLayout.clear(),this.get("showThrobberDuringLoad")&&this.toggleThrobber(!0),this.layOutItems(t,"bottom").then((function(t){o.get("showThrobberDuringLoad")&&o.toggleThrobber(!1)}))},getContainingElementData:function(){var e,i=this.get("container");return e={height:0,scrollLeft:0,scrollTop:0},e=this.parentContainer!==t.config.win&&this.parentContainer instanceof t.Node?{height:this.parentContainer.get("offsetHeight"),scrollLeft:this.parentContainer.getDOMNode().scrollLeft,scrollTop:this.parentContainer.getDOMNode().scrollTop}:{height:this.appContext.viewportData.getHeight(),scrollLeft:YUI.Env.isServer?0:t.config.win.pageXOffset,scrollTop:YUI.Env.isServer?0:t.config.win.pageYOffset},i&&(e.scrollLeft-=i.get("offsetLeft"),e.scrollTop-=i.get("offsetTop")),e},setContainerScrollTop:function(e){this.parentContainer!==t.config.win&&this.parentContainer instanceof t.Node?this.parentContainer.getDOMNode().scrollTop=e:t.config.win.scrollTo(0,e)},setTargetRowHeight:function(t){return this.photoListLayout.updateTargetRowHeight(t),this.handleResize(null,!0)},getSubview:function(t){return this.subviewsById[t]},handleScroll:function(e){var i,o,n,s=this,a=this.get("container"),r=a.get("clientHeight"),l=this.getContainingElementData(),h=l.height,c=l.scrollTop,d=!0;if(!this.isHidden){for(var u in i=a.get("offsetParent").get("offsetTop")-a.get("offsetTop")+r,n=c+h,this.subviewsById){d=!1;break}d||(!this.paginateOnScroll||this.scrollInterruptState&&this.scrollInterruptState.isInterrupted||((!this.lastPageInView||this.highestPageInView<this.lastPageInView)&&i-n<this.loadMoreMargin*h&&this.loadMore("bottom"),!this.lastPageInView&&c<this.loadMoreMargin*h&&this.lowestPageInView>1&&this.loadMore("top")),this.keepAwakeOnScroll||(o=this.photoListLayout.computeWakeSleep(l.scrollTop,l.scrollLeft),this.wakeOrSleepSubviews(o.wakeSleepChangedItems),!YUI.Env.isServer&&this.viewBeaconer&&o.inViewportChangedItems&&this.processInViewportItems(o.inViewportChangedItems)),void 0!==e&&(this.afterScrollTimeoutId&&t.config.win.clearTimeout(this.afterScrollTimeoutId),this.afterScrollTimeoutId=t.config.win.setTimeout((function(){s.paginateOnScroll&&s.storeScrollPosition(),s.paginateOnScroll&&!s.keepAwakeOnScroll&&s.validateWakeSleep(o),delete s.afterScrollTimeoutId}),250)))}},handleResize:function(t,e){this.responsiveRowHeight&&this.adjustRowHeightToContainerWidth();var i,o,n=this.calculateContainerWidth(),s=this.get("container"),a=this.getContainingElementData(),r={diffType:"relayout",firstPage:this.firstItemCached,lastPage:this.lastItemCached};if(e||n-this.scrollbarWidth!==this.photoListLayout.containerWidth)return this.storeContainerWidth(n),this.photoListLayout.containerWidth=n-this.scrollbarWidth,i=this.photoListLayout.computeLayout(null,a.scrollTop,a.scrollLeft,r),this.containerHeight=i.containerHeight,this.scrollInterruptState&&this.scrollInterruptState.isInterrupted&&this.scrollInterruptState.loadMoreElement&&this.scrollInterruptState.loadMoreElement.setStyle("width",this.photoListLayout.containerWidth+"px"),s.setStyle("height",i.containerHeight+"px"),o=this.updateSubviews(i,"bottom"),this.recenterOnResize&&this.scrollToCenterItem(i.allLayoutItems),o},loadMore:function(e){"search-photos-lite-models"===this.modelParams.registryName&&this.modelParams.fetchParams&&this.modelParams.fetchParams.apiParams&&void 0!==this.modelParams.fetchParams.apiParams.page&&delete this.modelParams.fetchParams.apiParams.page;var o=this,n=this.get("collectionModel").getValue(this.modelParams.collectionAttributeName),s=n.getList(),a=t.merge(this.modelParams.fetchParams,this.pageParams);if("bottom"!==e||this.loadingMoreBottom)"top"!==e||this.loadingMoreTop||(a.page=this.lowestPageInView-1,o.lowestPageInView>1&&(this.loadingMoreTop=!0,n.getPage(a).then((function(t){n.fetchedStart&&t[0].id===n.getList()[0].id&&(o.firstItemCached=!0),o.lowestPageInView=o.lowestPageInView-1,o.layOutItems(t,e).then((function(t){o.loadingMoreTop=!1,o.paginateOnScroll&&(a.page<=0?i.warn("loadMore fetching beyond start of collection; aborting",{params:a}):o.handleScroll())}))}),(function(t){i.error("loadMore page fetch failed",{err:t}),o.toggleThrobber(!1)}))));else{if(this.fetchedOnlyInitPage?(a.page=2*(this.pageParams.page-1)+2,a.perPage=Math.floor(.5*this.pageParams.perPage)):a.page=this.highestPageInView+1,n.fetchedEnd&&this.lastItemCached)return;this.loadingMoreBottom=!0,this.scrollInterruptParams&&this.scrollInterruptParams.footerToHideWhileScrolling&&!this.scrollInterruptState.footer&&(this.scrollInterruptState.footer=t.one(this.scrollInterruptParams.footerToHideWhileScrolling),this.scrollInterruptState.footer&&(this.scrollInterruptState.footerHeight=this.scrollInterruptState.footer.get("clientHeight"),this.setFooterDisplay(!1))),this.get("showThrobberDuringLoad")&&this.toggleThrobber(!0),n.getPage(a).then((function(t){s=n.getList(),n.fetchedEnd&&t[t.length-1].id===s[s.length-1].id&&(o.lastItemCached=!0),o.fetchedOnlyInitPage?o.fetchedOnlyInitPage=!1:(a.perPageDoubling&&o.perPageDoubles<a.perPageDoubling&&(o.perPageDoubles++,o.pageParams.perPage*=2,o.highestPageInView=Math.floor(.5*o.highestPageInView),o.lastPageInView=Math.floor(.5*o.lastPageInView)),o.highestPageInView=o.highestPageInView+1),o.highestPageInView>=o.lastPageInView&&(o.lastItemCached=!0),o.itemFilterFunction&&"function"==typeof o.itemFilterFunction&&(t=t.filter(o.itemFilterFunction)),o.layOutItems(t,e).then((function(t){o.loadingMoreBottom=!1,o.paginateOnScroll&&(n.totalItems&&(a.page-1)*a.perPage>n.totalItems?i.warn("loadMore fetching beyond end of collection; aborting",{params:a,total:n.totalItems}):o.handleScroll())})),o.scrollInterruptState&&(o.lastItemCached?o.setFooterDisplay(!0):(o.scrollInterruptState.numPagesLoaded++,o.checkScrollInterruptionState())),o.get("showThrobberDuringLoad")&&o.toggleThrobber(!1)}),(function(t){i.error("loadMore page fetch failed",{err:t}),o.toggleThrobber(!1)}))}},layOutItems:function(e,o,n){if(!e||!e.length)return t.Promise.resolve();var s,a,r,l=this.containerHeight,h={},c=this.get("container"),d=this.getContainingElementData();if(this.photoListLayout.staticViewsConfig&&this.photoListLayout.staticViewsConfig.includeStaticViews&&!this.photoListLayout.isFullRow&&(e=this.addStaticItemsBetweenItems(e)),e=this.cacheModelsById(e),s=this.itemsToAspectRatios(e),"bottom"===o)this.itemsMappedToAspectRatios=this.itemsMappedToAspectRatios.concat(s),a=s,h.diffType="append",this.lastItemCached&&(h.lastPage=!0);else{if("top"!==o)return void i.warn("Unsupported `layOutItems` direction",{direction:o});this.itemsMappedToAspectRatios=s.concat(this.itemsMappedToAspectRatios),a=s,h.diffType="prepend",this.firstItemCached&&(h.firstPage=!0)}return n&&(h.diffType="relayout",h.diffDirection=o),r=this.photoListLayout.computeLayout(a,d.scrollTop,d.scrollLeft,h),c.setStyle("height",r.containerHeight+"px"),this.containerHeight=r.containerHeight,"top"===o&&this.setContainerScrollTop(this.containerHeight-l),this.updateSubviews(r,o)},updateSubviews:function(t,e){var o,n=this;return this.instantiateSubviews(t.newItems).then((function(i){return i=i.filter((function(t){return!!t})),n.updateSubviewGeometry(t.layoutChangedItems),n.isBuilt?(n.renderSubviews(i,t,e),n.activateSubviews(i),t.wakeSleepChangedItems.length&&(o=t.wakeSleepChangedItems.filter((function(e){return-1===t.newItems.indexOf(e)}))).length&&n.wakeOrSleepSubviews(o),t.inViewportChangedItems.length&&n.processInViewportItems(t.inViewportChangedItems)):n.initialLayoutResponse=t,i}),(function(t){i.error("Error instantiating subviews",{err:t})}))},instantiateSubviews:function(e){var o,n=[],s=this,a=this.get("container");e.forEach((function(e,r){o=s.modelsById[e.id],e.isStaticItem||o?s.subviewsById[e.id]?n.push(t.Promise.resolve(s.subviewsById[e.id])):n.push((function(o,n){let r=0,l="";e.isStaticItem&&(r=e.id+"-"+(s.highestPageInView-1),l=s.photoListLayout.staticViewsConfig.staticViewsName);var h=t.merge(s.params,{id:e.isStaticItem?r:e.id,parentSignature:s.getPhotolistSignature(),model:o,contextSuffix:s.contextSuffix,layoutItem:n,parentContainer:a,interactionViewName:s.interactionViewName,showInteractionBarPlaceholder:s.showInteractionBarPlaceholder,interactionBarHeight:s.interactionBarHeight,engagementModelName:s.engagementModelName,allowLazyLoading:s.allowLazyLoading}),c=s.subviewMapping[e.isStaticItem?l:o.registry.name];return c.params&&(h=t.merge(h,c.params)).removePoolPhoto&&(h.listModelParams=s.modelParams),s.instantiateSubview(c.name,h).then((function(t){return t.initialize().then((function(t){return s.subviewsById[n.id]=t,s.subviews={},t}),(function(t){return i.warn("Error in lifecycle of subview",{err:t,view:c.name}),s.photoListLayout.invalidateItem(n.id),null}))}),(function(t){i.warn("Error instantiating subview",{err:t,view:c.name})}))})(o,e)):i.warn("Model missing from cache",{modelId:e.id})}));var r=t.Promise.all(n);return r.then((function(t){return!YUI.Env.isServer&&s.viewBeaconer&&s.viewBeaconer.beaconer.flushQueue({avoidDuplicates:!0}),t})),r},renderSubviews:function(t,e,o){var n,s,a,r,l=this.get("container"),h=this;t||(t=[],e.allLayoutItems.forEach((function(e){var i=h.subviewsById[e.id];i&&t.push(i)}))),o||(o="bottom"),YUI.Env.isServer?(n=t.map((function(t){return t.get("container").get("outerHTML")})),"top"===o?l.setHTML(n.join("")+l.getHTML()):("bottom"===o||i.warn("Unsupported `renderSubviews` direction; appending changed subviews.",{direction:o}),l.setHTML(l.getHTML()+n.join("")))):("top"===o&&t.reverse(),s=YUI.config.doc.createDocumentFragment(),t.forEach((function(t){t&&s.appendChild(t.get("container").getDOMNode())})),"top"===o?l.prepend(s):("bottom"===o||i.warn("Unsupported `renderSubviews` direction; appending changed subviews.",{direction:o}),l.append(s))),a=e.wakeSleepChangedItems.filter((function(t){return-1!==e.newItems.indexOf(t)})),this.updateSubviewGeometry(a),this.keepAwakeOnScroll?(r=e.wakeSleepChangedItems.filter((function(t){return-1!==e.leadingOrphans.indexOf(t)||-1!==e.trailingOrphans.indexOf(t)})),a.forEach((function(t){t.isAwake=!0})),this.wakeOrSleepSubviews(a.concat(r))):this.wakeOrSleepSubviews(e.wakeSleepChangedItems)},updateSubviewGeometry:function(t){var e,o=this;t.forEach((function(t){(e=o.subviewsById[t.id])?e.updateGeometry?e.updateGeometry(t):e.get("container").setStyles({width:t.geometry.width+"px",height:t.geometry.height+"px",transform:"translate("+t.geometry.left+"px, "+t.geometry.top+"px)"}):i.warn("Subview missing from cache for geometry update",{layoutItemId:t.id})}))},wakeOrSleepSubviews:function(t){var e,o=this;t.forEach((function(t){(e=o.subviewsById[t.id])?e.wake&&e.sleep?t.isAwake?e.wake():e.sleep():e.get("container").setStyle("display",t.isAwake?"":"none"):i.warn("Subview missing from cache for wake/sleep update",{layoutItemId:t.id})}))},processInViewportItems:function(e){var i,o=this;e.forEach((function(e){if(e.isInViewport){if(!(i=o.subviewsById[e.id]))return;!YUI.Env.isServer&&o.viewBeaconer&&o.viewBeaconer.beaconer&&i.get("model")&&i.get("model").registry&&i.get("model").registry.hasAttribute(o.viewBeaconer.beaconIsOwnerAttribute)&&!i.get("model").getValue(o.viewBeaconer.beaconIsOwnerAttribute)&&(o.viewBeaconer.beaconAlwaysBeacon||i.get("model").registry.hasAttribute(o.viewBeaconer.beaconRestrictedAttribute)&&!i.get("model").getValue(o.viewBeaconer.beaconRestrictedAttribute))&&o.viewBeaconer.beaconer.queue(i.get("model").getValue(o.viewBeaconer.beaconAttribute),t.config.win.document.location.href)}}))},activateSubviews:function(t){if(!t)for(var e in t=[],this.subviewsById)t.push(this.subviewsById[e]);t.forEach((function(t){t.normalizedActivate()}))},removeItems:function(t){var e=this;t.forEach((function(t){e.photoListLayout.invalidateItem(t.id),e.itemsMappedToAspectRatios=e.itemsMappedToAspectRatios.filter((function(e){return e.id!==t.id})),e.modelsById[t.id]&&delete e.modelsById[t.id],e.subviewsById[t.id]&&(e.subviewsById[t.id].destroy({remove:!0}),delete e.subviewsById[t.id])}))},onCollectionModelValuesChanged:function(t,e){var i,o,n,s,a;if(t[this.modelParams.collectionAttributeName]&&t[this.modelParams.collectionAttributeName].listDiff&&(i=t[this.modelParams.collectionAttributeName].listDiff,!this.loadingMoreBottom&&!this.loadingMoreTop)){var r,l,h,c;if(n=(o=this.get("collectionModel").getValue(this.modelParams.collectionAttributeName)).getList(),i.added.length)s=i.added,-1!==(r=n.indexOf(s[0])-1)&&(l=n[r])&&this.modelsById[l.id]&&(a="bottom",o.fetchedEnd&&s[s.length-1].id===n[s.length-1].id&&(this.lastItemCached=!0)),-1!==(h=n.indexOf(s[s.length-1])+1)&&(c=n[h+1])&&this.modelsById[c.id]&&(a="top",o.fetchedStart&&s[0].id===n[0].id&&(this.firstItemCached=!0)),a&&this.layOutItems(s,a,e);i.removed.length&&(this.removeItems(i.removed),this.handleResize(null,!0))}},toggleThrobber:function(t){var e=this.get("container"),i=this.get("throbberNode");void 0===t&&(t=!this.get("isThrobberShowing")),t?(e.setStyle("height",this.containerHeight+100+"px"),e.setStyle("position","relative"),i&&i.appendTo(e)):(i&&i.remove(),e.setStyle("position","initial")),this._set("isThrobberShowing",t)},checkScrollInterruptionState:function(t){var e;if(this.scrollInterruptState||t)if(this.scrollInterruptState.numPagesLoaded>=this.scrollInterruptState.nextInterrupt){if(this.scrollInterruptState.numInterrupts++,e=this.scrollInterruptParams.pageCounts[this.scrollInterruptParams.pageCounts.length-1],this.scrollInterruptState.numInterrupts>=this.scrollInterruptParams.pageCounts.length)if("exponential"===this.scrollInterruptParams.repeatMode)this.scrollInterruptState.nextInterrupt+=e*Math.pow(2,this.scrollInterruptState.numInterrupts-this.scrollInterruptParams.pageCounts.length);else this.scrollInterruptState.nextInterrupt+=e;else this.scrollInterruptState.nextInterrupt+=this.scrollInterruptParams.pageCounts[this.scrollInterruptState.numInterrupts];t||this.interruptScroll()}else this.get("container").setStyle("paddingBottom","0px")},updateScrollInterruptState:function(t){this.scrollInterruptState.numPagesLoaded=t;for(var e=0;e<=t;e++)this.checkScrollInterruptionState(!0)},interruptScroll:function(){this.scrollInterruptState.isInterrupted||(this.scrollInterruptState.isInterrupted=!0,this.scrollInterruptState.loadMoreElement||(this.scrollInterruptState.loadMoreElement=t.Node.create(this.templates("infinite-scroll-load-more")({}))),this.get("container").ancestor().append(this.scrollInterruptState.loadMoreElement),this.scrollInterruptState.loadMoreElementHeight||(this.scrollInterruptState.loadMoreElementHeight=parseInt(this.scrollInterruptState.loadMoreElement.getComputedStyle("height").replace("px",""),10)+20,this.registerEventHandler(this.scrollInterruptState.loadMoreElement.on("click",this.onLoadMoreClicked.bind(this))),this.scrollInterruptState.loadMoreElement.setStyles({width:this.photoListLayout.containerWidth+"px"})),this.setFooterDisplay(!0),this.get("container").setStyle("paddingBottom",this.scrollInterruptState.loadMoreElementHeight+"px"))},onLoadMoreClicked:function(e){var i,o=t.config.win.pageYOffset;this.scrollInterruptState.isInterrupted&&(this.scrollInterruptState.isInterrupted=!1,this.scrollInterruptState.loadMoreElement.remove(),this.setFooterDisplay(!1),this.get("container").setStyle("paddingBottom",this.scrollInterruptState.footerHeight+this.scrollInterruptState.loadMoreElementHeight-100+"px"),this.loadMore("bottom"),i=t.config.win.pageYOffset,t.config.win.scrollBy(0,o-i))},setFooterDisplay:function(t){this.scrollInterruptState.footer&&this.fire("subviewViewEvent","footerDisplayChanged")},cacheModelsById:function(t){if(t&&t.length){var e=this.modelsById,i=[];return t.forEach((function(t){t&&!e[t.id]&&(e[t.id]=t,i.push(t))})),i}},itemsToAspectRatios:function(t){var e=[],i=this.photoListLayout.forceAspectRatio,o=void 0!==i&&!isNaN(i),n=i||1;return t.forEach((function(t){t.isStaticItem?e.push({id:t.id,isStaticItem:!0,width:t.width,height:t.height,aspectRatio:t.aspectRatio}):void 0!==t&&e.push({id:t.id,aspectRatio:o?n:t.getValue("aspectRatio")})})),e},calculateContainerWidth:function(e){if(e||(e=this.explicitContainerWidth),"number"==typeof e)return e;var i,o;if("previousContainerWidth"===e)o=this.getContainerWidthFromCache();else YUI.Env.isServer||(this.isActiveAndInDOM()?o=this.get("container").get("clientWidth")-this.scrollbarWidth:(i=this.get("container"),this.isBuilt&&i||(i=t.one("."+this.parentName)),i&&(o=parseInt(i.getStyle("width"))))),o||(o=this.getContainerWidthFromCache());return o},getContainerWidthFromCache:function(){var t;return(t=this.retrieveContainerWidth())||(t=this.appContext.viewportData.getWidth()-this.scrollbarWidth),this._relayoutQueued=!0,t},adjustRowHeightToContainerWidth:function(t){var e,i,o,a,r;if((t=this.calculateContainerWidth(t))<s[0])i=this.baseRowHeight*n[s[0]];else if(t>s[s.length-1])i=this.baseRowHeight*n[s[s.length-1]];else for(r=0;r<s.length-1;r++)if((e=(t-(o=s[r]))/((a=s[r+1])-o))>=0&&e<=1){i=this.baseRowHeight*n[o]+e*this.baseRowHeight*(n[a]-n[o]);break}this.photoListLayout.targetRowHeight=i},storeContainerWidth:function(t){var e=this.parentName;e&&this.appContext.viewportData.setContainerWidth(e,t)},retrieveContainerWidth:function(){var t=this.parentName;return t?this.appContext.viewportData.getContainerWidth(t):0},getLayoutItemsOnScreen:function(t){if(YUI.Env.isServer)return[];var e,i,o=this.get("container"),n=this.getContainingElementData();return e=n.scrollTop-o.getXY()[1],i=e+n.height,t||(t=this.photoListLayout.getCurrentLayout())?t.filter((function(t){return t.geometry.top+t.geometry.height>e&&t.geometry.top<i})):[]},scrollToCenterItem:function(e){if(!this.photoListLayout.hasLimitedNumberOfRows()&&0!==this.getContainingElementData().scrollTop){var i,o=this.photoListLayout.getCurrentLayout(),n=this.get("container").getXY()[1],s=this;this.layoutItemAtScreenCenter||(i=this.getLayoutItemsOnScreen(o),this.layoutItemAtScreenCenter=i[Math.floor(.5*i.length)]),e.some((function(e){
if(e.id===s.layoutItemAtScreenCenter.id)return s.parentContainer!==t.config.win&&s.parentContainer instanceof t.Node?s.parentContainer.getDOMNode().scrollTop=n+e.geometry.top+.5*(e.geometry.height-s.parentContainer.get("offsetHeight")):t.config.win.scrollTo(0,n+e.geometry.top+.5*(e.geometry.height-s.appContext.viewportData.getHeight())),!0})),this.deleteResizeCenterTimeoutId&&t.config.win.clearTimeout(this.deleteResizeCenterTimeoutId),this.deleteResizeCenterTimeoutId=t.config.win.setTimeout((function(){s.layoutItemAtScreenCenter&&(delete s.layoutItemAtScreenCenter,delete s.deleteResizeCenterTimeoutId)}),1e3)}},storeScrollPosition:function(){var e=this.getLayoutItemsOnScreen();e.length&&t.StorageHelper.setItem(this.getPhotolistSignature(),e[0].id,!0)},restoreScrollPosition:function(){this.scrollToId(null,!0)},scrollToId:function(e,i){let o,n,s=this.get("container");e||(e=t.StorageHelper.getItem(this.getPhotolistSignature(),!0)),o=this.photoListLayout.getLayoutItem(e),o&&(!o.geometry||o.isInViewport&&o.geometry.top-this.photoListLayout.containerPadding.top<=0||(n=s.get("offsetParent")?s.get("offsetParent").get("offsetTop")+s.get("offsetTop"):s.get("offsetTop"),t.one(".global-nav-view")&&!i&&(n-=t.one(".global-nav-view").get("offsetHeight")),t.one(".fluid-subnav")&&!i&&(n-=t.one(".fluid-subnav").get("offsetHeight")),i&&(n+=50),this.setContainerScrollTop(o.geometry.top+n)))},validateWakeSleep:function(t){var e,i,o,n,s=this.photoListLayout.getAwakeItems(),a=t.allLayoutItems.indexOf(s[0]),r=t.allLayoutItems.indexOf(s[s.length-1]),l=[];for(e=a;e<r;e++)i=t.allLayoutItems[e],(o=this.subviewsById[i.id])&&((n=!i.isAwake)||(n=o.isAwake?!o.isAwake():0===o.get("container").get("children").size()),n&&i&&(i.isAwake=!0,l.push(i)));l.length&&this.wakeOrSleepSubviews(l)},getPhotolistSignature:function(){var e,i,o,n=0;if(!this.signature){if(YUI.Env.isServer){if(e=this.appContext.request.path,this.appContext.request.query)for(i in this.appContext.request.query)t.config.flickr.routing_params.indexOf(i)<0&&(e+=i+this.appContext.request.query[i]);e=t.flutil.normalizeURIComponents(e)}else e=t.flutil.normalizeURIComponents(t.config.win.location.pathname+t.config.win.location.search);if(this.modelParams)if("string"!=typeof this.modelParams.modelIdOrAttributes)for(i in this.modelParams.modelIdOrAttributes)e+=i+""+this.modelParams.modelIdOrAttributes[i];else e+=this.modelParams.modelIdOrAttributes;for(this.parentName&&(e+=this.parentName),e=(e=e.toLowerCase()).replace(/\W/g,""),o=0;o<e.length;o++)n+=e.charCodeAt(o);this.signature="photolist-"+n.toString(36)}return this.signature},injectPhotolistContext:function(e){var o,n,s,a,r,l,h,c=e.currentTarget.getAttribute("href"),d=t.URLHelper.PHOTOPAGE_PATTERN.exec(c),u="";if(d&&d.length>=5){if(o=this.get("collectionModel").getValue(this.modelParams.collectionAttributeName).getList().map((function(t){return t.id})).filter((function(t){return!!t})),a=d[4],-1===(r=o.indexOf(a)))return void i.warn("Clicked photo id not found in photolist. Aborting photolist injection and passing through to photopage.");if((n=o.slice(r,r+50)).length<50&&(s=Math.max(0,r-(50-n.length)),n=o.slice(s,r).concat(n)),c.indexOf("#")>-1&&(h=c.split("#"),c=h[0],u="#"+h[1]),"/"===c.substr(-1)&&(c=c.substr(0,c.length-1)),l=c+"/in/photolist-"+t.URLHelper.generateShortenedPhotolist(n)+u,e.halt(),this.injectPhotolistContextParams&&this.injectPhotolistContextParams.rapidBeaconConfig){var g=this.injectPhotolistContextParams.rapidBeaconConfig;t.Snowplough&&t.Snowplough.sendStructuredEvent({category:g.searchTerm,action:"searchResultClick",label:g.searchSection,property:a,value:r+1})}e.metaKey||e.ctrlKey||e.which&&2===e.which?t.config.win.open(l,"_blank"):this.appContext.flapp.navigate(l)}},subviewExtraToolClicked:function(e){var i,o=e.target.getDOMNode(),n=o.dataset.id,s=this.modelsById[n];if(n&&s){if(o.classList.contains("more-menu")){var a=[],r=o.dataset.menuItems.split(",");r&&(r.indexOf("exclude-people")>-1&&a.push({text:this.intlMessage({intlName:"common.HIDE_PHOTOS_FROM_PERSON"}),callback:function(){this.fire("subviewViewEvent","bigScotch",s.getValue("ownerNsid"),n)}.bind(this)}),r.indexOf("ban-user")>-1&&(i=function(t){this.fire("subviewViewEvent","banUser"+(t?"AndRemove":""),s.getValue("owner").id)},a.push({text:this.intlMessage({intlName:"common.GROUP_BAN_USER"}),callback:i.bind(this,!1)}),a.push({text:this.intlMessage({intlName:"common.GROUP_BAN_USER_REMOVE_PHOTOS"}),callback:i.bind(this,!0)})),r.indexOf("remove-user")>-1&&(i=function(t){this.fire("subviewViewEvent","removeUser"+(t?"AndRemove":""),s.getValue("owner").id)},a.push({text:this.intlMessage({intlName:"common.GROUP_REMOVE_USER"}),callback:i.bind(this,!1)}),a.push({text:this.intlMessage({intlName:"common.GROUP_REMOVE_USER_REMOVE_PHOTOS"}),callback:i.bind(this,!0)}))),a.length&&this.openSubviewMenu(e.target,a,this.subviewsById[n])}else o.classList.contains("remove-photo")?(this.fire("subviewViewEvent","photoList:removePhoto",n),o.classList.contains("remove-fave")?this.appContext.getModelRegistry(this.engagementModelName).then(function(e){return e.remoteDelete({photoId:n,userId:this.modelParams.modelIdOrAttributes.id||this.modelParams.modelIdOrAttributes}).then(function(t){this.get("collectionModel").getValue(this.modelParams.collectionAttributeName).remove(s)}.bind(this),function(e){new t.Views.FluidModal({appContext:this.appContext,title:this.intlMessage({intlName:"common.OOPS"}),showActionButton:!0,showCancelButton:!1,textMessage:this.intlMessage({intlName:"common.PHOTO_REMOVE_ERROR"})}).show()}.bind(this))}.bind(this)):o.classList.contains("remove-group-pool")?this.get("collectionModel").removePhotoRemote(n).then(function(t){this.get("collectionModel").getValue(this.modelParams.collectionAttributeName).remove(s)}.bind(this),function(e){new t.Views.FluidModal({appContext:this.appContext,title:this.intlMessage({intlName:"common.OOPS"}),showActionButton:!0,showCancelButton:!1,textMessage:this.intlMessage({intlName:"common.PHOTO_REMOVE_ERROR"})}).show()}.bind(this)):o.classList.contains("remove-showcase-photo")?this.fire("subviewViewEvent","showcase:remove",s,n):o.classList.contains("remove-photosof-you")?this.fire("subviewViewEvent","photosofyou:remove",s,n):o.classList.contains("remove-own-photo")&&this.fire("subviewViewEvent","ownphoto:remove",s,n)):o.classList.contains("big-scotch")&&this.fire("subviewViewEvent","scotch:big",s.getValue("ownerNsid"),n);e.halt()}},openSubviewMenu:function(e,i,o){var n,s,a,r,l,h=new t.Views.FluidDroparound({appContext:this.appContext,showDropArrow:!0,observePageResize:!0,anchorElement:e,positionFixed:!1,preferBottom:!0,dismissOnOverlayClick:!0,closeOnScroll:!0,menuItems:i}),c=this;this.registerEventHandler(h.on("selected",(function(t){t&&t.menuItem&&t.menuItem.callback&&t.menuItem.callback(t.menuItem.selected,t.origEvent)}))),l=h.on("closeDroparound",(function(t){c.detachRegisteredEvent(l),c.detachRegisteredEvent(n),c.detachRegisteredEvent(s),a&&clearTimeout(a),o.setHoverVisible&&o.setHoverVisible(!1)})),this.registerEventHandler(l),h.show(),n=h.get("container").on("mouseleave",(function(t){if(h){var e=o.get("container");if(e){var i=e.getDOMNode().getBoundingClientRect();(t.clientX<i.left||t.clientX>i.right||t.clientY<i.top||t.clientY>i.bottom)&&h.close()}}})),this.registerEventHandler(n),s=t.one("document").on("mousemove",t.betterThrottle((function(t){a&&clearTimeout(a),a=setTimeout((function(){r(t)}),200)}))),this.registerEventHandler(s),r=function(t){if(h){var e=h.getDroparoundContainer(),i=o.get("container");if(i&&e){var n=i.getDOMNode().getBoundingClientRect(),s=e.getDOMNode().getBoundingClientRect();!(t.clientX<n.left||t.clientX>n.right||t.clientY<n.top||t.clientY>n.bottom)||t.clientX>s.left&&t.clientX<s.right&&t.clientY>s.top&&t.clientY<s.bottom||h.close()}}},o.setHoverVisible&&o.setHoverVisible(!0)},subviewLicenseMouseenter:function(e){var i,o=e.currentTarget&&e.currentTarget.getData("license-type")&&e.currentTarget.getData("license-type").toString();o&&(this.licenseTooltipHoverTimer&&clearTimeout(this.licenseTooltipHoverTimer),this.licenseTooltip&&this.licenseTooltip.close(),this.licenseTooltipHoverTimer=setTimeout(function(){this.licenseTooltip=new t.Views.FluidDroparound({appContext:this.appContext,anchorElement:e.target,showDropArrow:!0,positionFixed:!1,preferBottom:!0,invisibleOverlay:!0,autoSizeToContent:!0,width:300,classList:"license-tooltip",htmlMessage:this.templates("license-detail")({title:"common.LICENSE_TITLE_"+o,body:"common.LICENSE_DESC_"+o})}),this.licenseTooltip.show()}.bind(this),300),i=this.get("container").delegate("mouseleave",function(t){this.licenseTooltip&&this.licenseTooltip.close(),i.detach(),clearTimeout(this.licenseTooltipHoverTimer)}.bind(this),".license"),this.registerEventHandler(i))},show:function(){this.isHidden=!1,this.get("container").setStyle("display","block")},hide:function(){this.isHidden=!0,this.get("container").setStyle("display","none")}},{ATTRS:{showThrobberDuringLoad:{value:!0,validator:function(e,i){return t.AttributeHelpers.validateBoolean(e)}},isThrobberShowing:{readOnly:!0,value:!1},throbberNode:{readOnly:!0,getter:function(e){return YUI.Env.isServer||void 0!==e||(e=t.Node.create('<div style="position: absolute; bottom: 40px; left: 0; right: 0;"><div class="flickr-dots"></div></div>'),this._set("throbberNode",e)),e}}}})}),"@VERSION@",{requires:["flickr-view","hermes-template-infinite-scroll-load-more","hermes-template-license-detail","photo-list-layout","photo-list-photo-view","photo-list-static-item-view","overflow-helper","storage-helper","attribute-helpers","url-helper","paged-collection","fluid-droparound-view","flutil"],optionalRequires:["global-events","hermes-core"],langBundles:["common"]});YUI.add("hermes-template-photo-selector-photolist-subview",(function(e,t){var l=e.Template.Handlebars.revive({compiler:[8,">= 4.3.0"],main:function(e,t,l,r,a){var o=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return e.escapeExpression((o(l,"outlet")||t&&o(t,"outlet")||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},null!=t?o(t,"photo-list-view"):t,{name:"outlet",hash:{},data:a,loc:{start:{line:1,column:0},end:{line:1,column:26}}}))},useData:!0}),r={};e.Array.each([],(function(t){var l=e.Template.get("hermes/"+t);l&&(r[t]=l)})),e.Template.register("hermes/photo-selector-photolist-subview",(function(t,a){return(a=a||{}).partials=a.partials?e.merge(r,a.partials):r,l(t,a)}))}),"@VERSION@",{requires:["template-base","handlebars-base"]});