/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("event-tap",function(e,t){function a(t,n){n=n||e.Object.values(u),e.Array.each(n,function(e){var n=t[e];n&&(n.detach(),t[e]=null)})}var n=e.config.doc,r=e.Event._GESTURE_MAP,i=r.start,s="tap",o=/pointer/i,u={START:"Y_TAP_ON_START_HANDLE",END:"Y_TAP_ON_END_HANDLE",CANCEL:"Y_TAP_ON_CANCEL_HANDLE"};e.Event.define(s,{publishConfig:{preventedFn:function(e){var t=e.target.once("click",function(e){e.preventDefault()});setTimeout(function(){t.detach()},100)}},processArgs:function(e,t){if(!t){var n=e[3];return e.splice(3,1),n}},on:function(e,t,n){t[u.START]=e.on(i,this._start,this,e,t,n)},detach:function(e,t,n){a(t)},delegate:function(t,n,r,s){n[u.START]=e.delegate(i,function(e){this._start(e,t,n,r,!0)},t,s,this)},detachDelegate:function(e,t,n){a(t)},_start:function(e,t,n,i,s){var a={canceled:!1,eventType:e.type},f=n.preventMouse||!1;if(e.button&&e.button===3)return;if(e.touches&&e.touches.length!==1)return;a.node=s?e.currentTarget:t,e.touches?a.startXY=[e.touches[0].pageX,e.touches[0].pageY]:a.startXY=[e.pageX,e.pageY],e.touches?(n[u.END]=t.once("touchend",this._end,this,t,n,i,s,a),n[u.CANCEL]=t.once("touchcancel",this.detach,this,t,n,i,s,a),n.preventMouse=!0):a.eventType.indexOf("mouse")!==-1&&!f?(n[u.END]=t.once("mouseup",this._end,this,t,n,i,s,a),n[u.CANCEL]=t.once("mousecancel",this.detach,this,t,n,i,s,a)):a.eventType.indexOf("mouse")!==-1&&f?n.preventMouse=!1:o.test(a.eventType)&&(n[u.END]=t.once(r.end,this._end,this,t,n,i,s,a),n[u.CANCEL]=t.once(r.cancel,this.detach,this,t,n,i,s,a))},_end:function(e,t,n,r,i,o){var f=o.startXY,l,c,h=15;n._extra&&n._extra.sensitivity>=0&&(h=n._extra.sensitivity),e.changedTouches?(l=[e.changedTouches[0].pageX,e.changedTouches[0].pageY],c=[e.changedTouches[0].clientX,e.changedTouches[0].clientY]):(l=[e.pageX,e.pageY],c=[e.clientX,e.clientY]),Math.abs(l[0]-f[0])<=h&&Math.abs(l[1]-f[1])<=h&&(e.type=s,e.pageX=l[0],e.pageY=l[1],e.clientX=c[0],e.clientY=c[1],e.currentTarget=o.node,r.fire(e)),a(n,[u.END,u.CANCEL])}})},"3.16.0",{requires:["node-base","event-base","event-touch","event-synthetic"]});
YUI.add("better-throttle",function(e){"use strict";function t(t,n,r,i){function u(){o&&(o.cancel(),o=undefined)}function a(){u(),t.apply(r,arguments)}function f(){var t=(new Date).getTime();if(i)u();else if(t-s>n){s=t,a.apply(r,arguments);return}o||(o=e.later(n,r,a,arguments))}var s,o;return s=0,r=r||null,f}e.betterThrottle=t},"@VERSION@",{requires:["yui-later"]});
YUI.add("global-events",function(e){"use strict";function r(r,i){var s=t[r],o;if(s)return s.bound||(s.throttle?s.handle=e.one(s.target).on(s.type,e.betterThrottle(function(t){e.fire(r,{e:t})},s.throttle)):s.handle=e.one(s.target).on(s.type,function(t){e.fire(r,{e:t})}),n[r]=[],s.bound=!0),o=e.on(r,i),o.origDetach=o.detach,o.detach=function(){this.detach=this.origDetach,delete this.origDetach,e.globalEvents.unsubscribe(this)}.bind(o),n[r].push(o),o;throw"global event name: '"+r+"' does not exist"}function i(e){var r=e.evt.type,i=n[r].indexOf(e);e.origDetach&&(e.detach=e.origDetach),i!==-1&&(e.detach(),n[r].splice(i,1),n[r].length===0&&(t[r].handle.detach(),t[r].bound=!1))}var t={"window:click":{type:"click",target:window},"window:resize":{type:"resize",target:window,throttle:100},"window:scroll":{type:"scroll",target:window,throttle:100},"window:scroll:nothrottle":{type:"scroll",target:window,throttle:0},"window:keydown":{type:"keydown",target:window,throttle:0},"window:blur":{type:"blur",target:window,throttle:0}},n={};e.globalEvents={subscribe:r,unsubscribe:i}},"@VERSION@",{requires:["event","node","better-throttle"],affinity:"client"});
YUI.add("storage-helper",function(e){e.StorageHelper={setItem:function(t,n,r){var i=r?"sessionStorage":"localStorage";if(e.config.win)try{e.config.win[i][t]=n}catch(s){}},getItem:function(t,n){var r=n?"sessionStorage":"localStorage",i;if(e.config.win)try{i=e.config.win[r][t]}catch(s){}return i},remove:function(t,n){var r=n?"sessionStorage":"localStorage";if(e.config.win)try{e.config.win[r].removeItem(t)}catch(i){}},hasEntries:function(t,n){var r=n?"sessionStorage":"localStorage",i=!1;if(e.config.win)try{i=typeof e.config.win[r][t]!="undefined"}catch(s){}return i}},e.Storage={Instance:{_cache:{},_hasSessionStorage:!0,_clientIdKey:"",getClientIdKey:function(){return this._clientIdKey||(this._clientIdKey=e.config.win.appContext.clientId+"_"),this._clientIdKey},get:function(t){var n,r;try{t=t||"",n=this.getClientIdKey()+t,this._hasSessionStorage?r=e.config.win.sessionStorage.getItem(n):r=this._cache[n]}catch(i){this._hasSessionStorage=!1}return r},set:function(t,n){var r;try{t&&(r=this.getClientIdKey()+t,this._hasSessionStorage?e.config.win.sessionStorage.setItem(r,n):this._cache[r]=n)}catch(i){this._cache[r]=n,this._hasSessionStorage=!1}},has:function(t){var n=!1,r;try{r=this.getClientIdKey()+t,this._hasSessionStorage?n=!!e.config.win.sessionStorage.getItem(r):n=!!this._cache[r]}catch(i){this._hasSessionStorage=!1}return n},remove:function(t){var n;try{t=t||"",n=this.getClientIdKey()+t,this._hasSessionStorage?e.config.win.sessionStorage.removeItem(n):this._cache[n]=undefined}catch(r){this._hasSessionStorage=!1}},clear:function(){this.clearByKey(this.getClientIdKey())},clearByKey:function(t){var n,r,i,s=[];try{if(t)if(this._hasSessionStorage){for(n=0,i=e.config.win.sessionStorage.length;n<i;n++)r=e.config.win.sessionStorage.key(n),r&&r.indexOf(t)===0&&s.push(r);for(n=0,i=s.length;n<i;n++)e.config.win.sessionStorage.removeItem(s[n])}else{e.Object.each(this._cache,function(e,n){n.indexOf(t)===0&&s.push(n)});for(n=0,i=s.length;n<i;n++)this._cache[s[n]]=undefined}}catch(o){this._hasSessionStorage=!1}}}}},"@VERSION@",{requires:[]});
YUI.add("keyboard-manager",function(e){var t=e.KeyboardManager=function(){var t=this;this.keyEventScope=["*"],e.on("flickr:setKeyEventScope",function(e){t.setCurrentKeyEventScope(e)}),e.on("flickr:removeKeyEventScope",function(e){t.removeCurrentKeyEventScope(e)})},n;t.prototype={on:function(t,n,r){return typeof r=="undefined"&&(r=n,n=null),e.one("doc").on("key",this.handleKey.bind(this,r,n),t)},handleKey:function(e,t,r){if(r.metaKey||r.altKey||r.shiftKey||r.ctrlKey)return;if(this.inputHasFocus())return;var i=n.get(r,"keyEventScope");i||(i=this.getCurrentKeyEventScope(),n.add(r,{keyEventScope:i})),(t==="*"||t===i)&&e(r)},inputHasFocus:function(){var t,n=/^text|search|tel|url|email|password|datetime|date|month|week|time|datetime-local|number|range|color$/i,r;try{t=e.one(document.activeElement)}catch(i){return!1}return t?(r=t.get("tagName").toUpperCase(),r==="INPUT"?n.test(t.get("type")):r==="TEXTAREA"||r==="SELECT"?!0:t.getAttribute("contenteditable")||!1):!1},setCurrentKeyEventScope:function(e){var t=this.keyEventScope.indexOf(e);t===-1?this.keyEventScope.push(e):this.keyEventScope=this.keyEventScope.slice(0,t+1)},getCurrentKeyEventScope:function(){return this.keyEventScope.slice(-1)[0]},getKeyEventScopeStack:function(){return this.keyEventScope},removeCurrentKeyEventScope:function(e){var t=this.keyEventScope.indexOf(e);t>-1&&(this.keyEventScope=this.keyEventScope.slice(0,t))},resetCurrentKeyEventScope:function(e){this.keyEventScope=["*"]}},n=function(){function r(e){var t;switch(e.type){case"key":t=e.which+e.pageX+e.pageY;break;default:t=e.type+e.pageX+e.pageY}return t}function i(e){delete t[e]}var t={},n=1;return{add:function(s,o){var u,a=r(s),f;e.Lang.isObject(s)&&e.Lang.isObject(s._event)&&e.Lang.isObject(o)&&(f=e.later(n,this,i,a),u=t[a]||{},e.mix(u,o,!0),u.timer&&u.timer.cancel(),u.timer=f,t[a]=u)},get:function(s,o){var u=r(s),a=t[u]||{};return a.timer&&a.timer.cancel(),a.timer=e.later(n,this,i,u),o?a[o]:a}}}()},"@VERSION@",{requires:["event-key"]});
YUI.add("overflow-helper",function(e){function t(t){var n=0,r;return YUI.Env.isServer||(r=e.Node.create("<div></div>"),r.setStyle("width",100).setStyle("height",100).setStyle("overflow","scroll").setStyle("position","absolute").setStyle("top",-9999),t.append(r),n=r._node.offsetWidth-r._node.clientWidth,r.remove(!0)),n}function n(t,n){var r,i,s;YUI.Env.isServer||(r=e.Node.create("<div>test event</div>"),r.setStyle("height: 1px").setStyle("width","1px").setStyle("opacity",0).setStyle("position","absolute").setStyle("top",-99999).setStyle("left",-99999).setStyle("overflow","auto"),t.append(r),i=setTimeout(function(){r._node.removeEventListener("overflow",s),r.remove(!0),n(!1)},10),s=function(e){clearTimeout(i),r._node.removeEventListener("overflow",s),r.remove(!0),n(!0)},r._node.addEventListener("overflow",s,!1))}function r(e,t,r,i){var s=t==="over",o,u,a,f;"OverflowEvent"in window?(f=function(e){if(e.type===t+"flow"||e.orient===0&&e.horizontalOverflow===s||e.orient===1&&e.verticalOverflow===s||e.orient===2&&e.horizontalOverflow===s&&e.verticalOverflow===s)return r.call(this,e)},a=e._node.addEventListener("overflowchanged",f,!1),i({detach:function(){e._node.removeEventListener("overflowchanged",f)}})):n(e,function(n){n?(f=function(e){if(e.type===t+"flow"||e.orient===0&&e.horizontalOverflow===s||e.orient===1&&e.verticalOverflow===s||e.orient===2&&e.horizontalOverflow===s&&e.verticalOverflow===s)return r.call(this,e)},a=e._node.addEventListener(t+"flow",f,!1),i({detach:function(){e._node.removeEventListener(t+"flow",f)}})):(u=function(){e._node.scrollHeight>e._node.clientHeight?t==="over"&&r.call(e._node,{}):t==="under"&&r.call(e._node,{})},"MutationObserver"in window?(o=new MutationObserver(function(e){e.some(function(e){return u(),!0})}),o.observe(e._node,{attributes:!1,subtree:!0,childList:!0}),i({detach:function(){o.disconnect()}})):"MutationEvent"in window&&(f=function(e){setTimeout(function(){u()},10)},a=e._node.addEventListener("DOMSubtreeModified",f,!1),i({detach:function(){e._node.removeEventListener("DOMSubtreeModified",f)}})))})}e.OverflowHelper={detectScrollbarSize:t,addFlowListener:r}},"@VERSION@",{requires:[]});
YUI.add("client-app",function(e,t){function a(t){if(typeof t=="undefined")return e.Promise.reject({message:"Invalid config object supplied, was undefined."});var n=t.initialView,r=t.modelExport,i,s,o=t.auth,u=this;return o&&t.auth.signedIn?i=t.auth.csrf:i=null,e.config.flickr.csrf.token=i,e.config.flickr.requestConfig={auth:o},t.params.routeTiming=t.routeTiming,t.params.routeConfig=t.routeConfig,f(["rb","welcome","rd","cr"]),window.location.search&&window.location.search.match(/yc=/)&&(s=e.QueryString.parse(window.location.search.replace("?","")),e.config.flickr.ycParam=s.yc),e.transportFactory=function(n,r){return new e.ClientTransport(r)},l(n.name,e).then(function(){return c(n.name,o,r,t.params)}).then(function(){return d(n)}).then(function(){e.config.win.addEventListener("beforeunload",v.bind(u))}).then(e.config.win.onappinit)}function f(t){var n=window.location,r=window.history,i,s,o=!1;if(n.search&&r.replaceState){i=e.QueryString.parse(n.search.replace("?","")),t.forEach(function(e){e in i&&(delete i[e],o=!0)});if(o){s=e.QueryString.stringify(i);try{r.replaceState({},"",n.pathname+(s?"?"+s:""))}catch(u){}}}}function l(e,t){return t.betterUse(e,t)}function c(t,n,i,a){var f={},l;return e.Views&&e.Views[t]&&(f[t]={type:e.Views[t],preserve:!1}),u=new e.App({serverRouting:!0,viewContainer:"#content",container:"#content",linkSelector:":not(.server-only-link)",scrollToTop:!1,views:f}),s=a.flipper["enable-lighthouse-and-rapid-performance-beaconing"],o=a.flipper["enable-rapid-only-performance-beaconing"],o||e.FlickrClientMetrics.gatherColdStartData(),l=h(),a.auth=n,a.flapp=u,r=p(a),r.clientMetrics=new e.FlickrClientMetrics(r),o||(r.apiMetrics=new e.FlickrAPIMetrics(r)),r.routeTiming=a.routeTiming,r.routeConfig=a.routeConfig,r.initCuratorTools(),r.getHealthBeaconer(),e.mix(e.Node.DOM_EVENTS,{transitionend:!0,webkitTransitionEnd:!0}),e.ClientTransport.authorize(r),window.addEventListener("unload",function(t){e.ClientTransport.unloading=!0}),window.addEventListener("load",function(t){e.ClientTransport.unloading=!1}),r.modelImportExport.importAll(i)}function h(){return new e.FlickrRouter(u,e.config.flickr.routes)}function p(t){return window.appContext=new e.AppContext(t),window.appContext}function d(t){return new e.Promise(function(i,s){var o=setTimeout(function(){s(new Error("Initial View Timeout"))},1e4);t.params.appContext=r,u.showContent(e.one("#content > .view"),{view:{name:t.name,config:t.params}},function(u){e.one("body").removeClass("dark-loader"),u._params&&(u._params.keyEventScope=u.name+u._yuid),u.setViewDataOnHistory("referrer",document.referrer),E(t.name,t.spaceId),u.set("isRootView",!0),u.initialize().then(function(){S(),N(),x(),r.getKeyboardManager().setCurrentKeyEventScope(u.name+u._yuid),y(),clearTimeout(o),i()}).then(null,function(e){throw n.error("There was a problem initializing or activating the view.",{err:e}),s(),e})}),u.before("navigate",m),u.before("activeViewChange",b),e.on("history:change",g),u.after("activeViewChange",w)})}function v(t){var n,i,s=[],o,u,a=["flickr.photos.addView","flickr.groups.updateViewDate","flickr.photos.getPhotos","flickr.people.addView","flickr.photosets.addView"];r.getViewCounter().flushQueue();if(r.uploadIsInProgress())u=this.intlMessage({intlName:"client-app.UPLOAD_IN_PROGRESS"});else{for(n in r.writeAPICallsMadeOnThisPage)i=r.writeAPICallsMadeOnThisPage[n],i.completed||s.push(i);s.length&&(s.every(function(e){return a.indexOf(e.methodName)!==-1})||(e.config.flickr.requestConfig&&e.config.flickr.requestConfig.auth&&e.config.flickr.requestConfig.auth.isInsecureGod?(o=s.map(function(e){return e.methodName}).join(", "),u=this.intlMessage({intlName:"client-app.SAVING_LAST_ACTIONS"})+" In progress API Methods: "+o):u=this.intlMessage({intlName:"client-app.SAVING_LAST_ACTIONS"})))}return e.Storage.Instance.clear(),u&&((t||window.event).returnValue=u),u}function m(t){r.setClientSideRouted(!0),r.setPreviousLocation(),r.updateModelRefetchState(t.url,t.originEvent&&t.originEvent.currentTarget&&t.originEvent.currentTarget.hasClass("do-not-evict")),r.clearWriteAPICallCache(),r.setGPCredentials(null),e.loaderBar.start(),r.clientMetrics.clearPendingMeasurements(),r.clientMetrics.start(t.details[0].url),r.adManager.isEnabled()&&r.adManager.currentlyShowingAd&&r.adManager.adIsUnloading(),r.getKeyboardManager().resetCurrentKeyEventScope(),e.Object.each(r.modelRegistries,function(e,t){e.hasWeakSubscribers&&e.removeWeakSubscribers()}),i=!0}function g(t){e.Object.each(r.modelRegistries,function(e,t){e.hasWeakSubscribers&&e.removeWeakSubscribers()}),t.src==="popstate"&&y(),t.src==="popstate"&&!u.hasRoute(u.getPath())&&!e.Object.isEmpty(t.newVal)&&u.navigate(u.getPath()),r.getViewCounter().flushQueue({resetDuplicateTracking:!0}),i||r.updateModelRefetchState(),i=!1}function y(){e.UA.chrome>0&&(window.scrollTo(window.scrollX,window.scrollY+1),window.scrollTo(window.scrollX,window.scrollY-1))}function b(e){u.set("previousView",e.prevVal)}function w(t){var i=this.get("activeView");i.getViewDataFromHistory("referrer")===undefined&&i.setViewDataOnHistory("referrer",r.getPreviousURL()),r.clientMetrics.end(),T(),N(),x(),e.config.win.DARLA&&e.config.win.DARLA.event&&typeof e.config.win.DARLA.event=="function"&&e.soon(function(){try{e.config.win.DARLA.event("AGOF")}catch(t){n.error("error firing secureFrame event",{err:t})}}),r.adManager.setAdCouldBeShown(!1);if(e.config.win.onappclientnav)try{e.config.win.onappclientnav()}catch(t){}}function E(t,n){var i={spaceId:n,pageId:t.replace(/-/g,"_"),hostname:e.config.flickr.host["instance hostname"]||e.config.flickr.host.hostname,uuid:e.config.flickr.request.idShort,paft:!0,clientMetrics:r.clientMetrics,signedIn:r.getViewer().signedIn,rapidOnly:o,beaconToRapid:s,rapid:e.rapidTracker};r.Lighthouse=new e.Lighthouse(i)}function S(t){e.rapidTracker.getConf(u.get("activeView"),r,t).then(function(t){e.rapidTracker.init(t)})}function x(){var t=r.getViewer().intl;t==="de"&&e.use("hermes-template-agof",function(){var t=u.get("activeView"),r
,i;r=e.config.flickr.agof.spaceids[t.name]||e.config.flickr.agof.spaceids["default"],i=e.Template.get("hermes/agof")({spaceid:r}),e.one(".agof").set("innerHTML",i),n.log("AGOF",{spaceid:r})})}function T(t){e.rapidTracker&&e.rapidTracker.destroy&&e.rapidTracker.destroy(),S(t)}function N(){var t={c1:2,c2:7241469,c3:"",c4:encodeURIComponent(C(document.location)),c5:u.get("activeView").get("spaceid"),c6:"",c15:""};e.comscore&&e.comscore.beacon&&e.comscore.beacon(t)}function C(t){var n=t.pathname||"",r=(n.match(/^\/photos\/([^\/]+)/)||[])[1]||null,i;return r&&r!=="friends"&&(i=e.murmurhash(r,r+"secret insecure salt"),n=n.replace(r,i)),e.config.flickr.url.host+n}var n=require("lib/flog")(t),r,i=!1,s,o,u;e.ClientApp={init:a,beforeUnload:v,beforeNavigate:m,_loadInitialView:l,langBundles:["client-app"]},e.mix(e.ClientApp,e.Localizable)},"@VERSION@",{requires:["app-base","app-content","router","app-context","client-transport","flickr-router","flickr-client-metrics","flickr-api-metrics","handlebars-helpers","lighthouse","comscore","loader-bar","murmurhash","node","rapid","site-key","csrf-updater","better-use","flickr-promise","global-events","querystring-parse-simple","querystring-stringify-simple","storage-helper","keyboard-manager","dom","overflow-helper"],affinity:"client",langBundles:["client-app"]});
/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("intl",function(e,t){var n={},r="yuiRootLang",i="yuiActiveLang",s=[];e.mix(e.namespace("Intl"),{_mod:function(e){return n[e]||(n[e]={}),n[e]},setLang:function(e,t){var n=this._mod(e),s=n[i],o=!!n[t];return o&&t!==s&&(n[i]=t,this.fire("intl:langChange",{module:e,prevVal:s,newVal:t===r?"":t})),o},getLang:function(e){var t=this._mod(e)[i];return t===r?"":t},add:function(e,t,n){t=t||r,this._mod(e)[t]=n,this.setLang(e,t)},get:function(t,n,r){var s=this._mod(t),o;return r=r||s[i],o=s[r]||{},n?o[n]:e.merge(o)},getAvailableLangs:function(t){var n=e.Env._loader,r=n&&n.moduleInfo[t],i=r&&r.lang;return i?i.concat():s}}),e.augment(e.Intl,e.EventTarget),e.Intl.publish("intl:langChange",{emitFacade:!0})},"3.16.0",{requires:["intl-base","event-custom"]});
/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("base-pluginhost",function(e,t){var n=e.Base,r=e.Plugin.Host;e.mix(n,r,!1,null,1),n.plug=r.plug,n.unplug=r.unplug},"3.16.0",{requires:["base-base","pluginhost"]});
/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("template-base",function(e,t){function n(t,n){this.defaults=n,this.engine=t||e.Template.Micro,this.engine||e.error("No template engine loaded.")}n._registry={},n.register=function(e,t){return n._registry[e]=t,t},n.get=function(e){return n._registry[e]},n.render=function(t,r,i){var s=n._registry[t],o="";return s?o=s(r,i):e.error('Unregistered template: "'+t+'"'),o},n.prototype={compile:function(t,n){return n=n?e.merge(this.defaults,n):this.defaults,this.engine.compile(t,n)},precompile:function(t,n){return n=n?e.merge(this.defaults,n):this.defaults,this.engine.precompile(t,n)},render:function(t,n,r){return r=r?e.merge(this.defaults,r):this.defaults,this.engine.render?this.engine.render(t,n,r):this.engine.compile(t,r)(n,r)},revive:function(t,n){return n=n?e.merge(this.defaults,n):this.defaults,this.engine.revive?this.engine.revive(t,n):t}},e.Template=e.Template?e.mix(n,e.Template):n},"3.16.0",{requires:["yui-base"]});
YUI.add("flickr-view",function(e,t){function r(t,r,i,s,o){e.namespace("Views"),e.Views[t]&&n.warn("A view with this name already exists. Did you mean to redefine it?",{view:t}),s.destroy&&s.destroy!==e.FlickrView.prototype.destroy&&n.warn("`destroy` method was overridden. Did you mean `destructor`?",{view:t}),s.initialize&&s.initialize!==e.FlickrView.prototype.initialize&&n.warn("`initialize` method was overridden. Did you mean `initializer`?",{view:t}),e.Views[t]=e.Base.create(t,r,i,s,o);if(r&&r!==e.FlickrView&&r.prototype&&r.prototype.langBundles){var u=[],a=(e.Views[t].prototype.langBundles||[]).concat(r.prototype.langBundles);u=e.Array.dedupe(a),e.Views[t].prototype.langBundles=u}return e.Views[t]}var n=require("lib/flog")(t);e.FlickrView=e.Base.create("flickrView",e.Base,[],{viewState:null,subviews:{},subviewConfig:null,_eventHandles:null,initializer:function(e){return this.appContext=e.appContext,delete e.appContext,this.get("container").get("innerHTML")===""&&this.setContainerHTML(""),this.set("headContainer",""),this.isBuilt=!1,this.isActivated=!1,this.isErrorBuilt=!1,this.subviewsWithLoadingError={},this._params=e||{},this.subviews={},this._eventHandles=[],this.appContext&&!this.appContext.viewTiming&&(this.appContext.viewTiming={}),this.appContext&&(this.appContext.viewTiming[this.name]={initialize:0,loadState:0,buildContainer:0,buildHeadContainer:0,activate:0}),this},initialize:function(t){var r=this;return this.initializeStartTime=Date.now(),this.isErrorBuilt=!1,this.serverRendered=t&&t.serverRendered?t.serverRendered:!1,r.beforeDestroy&&(r.beforeDestroyHandler=r.before("destroy",r.beforeDestroy)),YUI.Env.isServer||this.registerEventHandler(this.appContext.flapp.after("activeViewChange",function(e){r.normalizedActivate()})),this.on("parentViewEvent",this.handleParentViewEvent.bind(this,this.name)),this.setupSubviews().then(function(){var e,t;if(r.isErrorBuilt)throw r.error.is404?r.error:(t=new Error("Subview of "+r.name+" causing loadState error"),r.error&&(t.message+=": "+r.error.message,r.error.method&&(t.message+=", method="+r.error.method),t.message+=" | subview failure: "+r.error.fatal,r.error.wasDealbreaker&&(t.message+=" dealbreaker failed "),r.error.wasMultipleSubviews&&(t.message+=" multiple subviews failed "),t.fatal=r.error.fatal),t);r.loadStateTimingStart=Date.now(),e=r.loadState();if(!e)throw new Error("View "+r.name+" loadState function does not return a promise");return e}).then(function(){r.appContext&&r.appContext.viewTiming&&r.appContext.viewTiming[r.name]&&(r.appContext.viewTiming[r.name].loadState=Date.now()-r.loadStateTimingStart);if(YUI.Env.isServer||!r.get("container").hasClass("requiredToShowOnServer")||t&&t.wasDeferred){var e=Date.now();try{r.buildContainer()}catch(i){throw n.error("Error building",{topic:r.name,err:i}),r.fire("loadingError",{message:i.message,fatal:!0,wasDealbreaker:!0}),r.buildErrorContainer(),r.isErrorBuilt=!0,i}r.appContext&&r.appContext.viewTiming&&r.appContext.viewTiming[r.name]&&(r.appContext.viewTiming[r.name].buildContainer=Date.now()-e);if(r.get("isRootView")){r._buildFullRootViewAdditionalViewClasses();var s=r.get("rootViewAdditionalViewClasses");s&&s.length>0&&r.get("container").addClass(s.join(" "))}}r.isBuilt=!0,r.isErrorBuilt=!1,r.fire("loadingSuccess")},function(e){throw r.fire("loadingError",{message:e.message,fatal:e.fatal,is404:e.is404,wasMultipleSubviews:e.wasMultipleSubviews,wasDealbreaker:e.wasDealbreaker}),r.buildErrorContainer(),r.isErrorBuilt=!0,n.error("Error loading state",{topic:r.name,err:e}),e}).then(function(){var t,n;return!r.isErrorBuilt&&!r.get("isActiveViewAgnostic")&&(t=Date.now(),r._buildFullHeadMeta(),r.buildHeadContainer=Date.now()-t),YUI.Env.isServer||(r.shouldDeferSubviews&&r._setupDeferredSubviewsInitialization(),n=Date.now(),r.normalizedActivate(),r.appContext&&r.appContext.viewTiming&&r.appContext.viewTiming[r.name]&&(r.appContext.viewTiming[r.name].activate=Date.now()-n)),r.appContext&&r.appContext.viewTiming&&r.appContext.viewTiming[r.name]&&(r.appContext.viewTiming[r.name].initialize=Date.now()-r.initializeStartTime),!YUI.Env.isServer&&r._params.logViewTimings&&r.wasRequiredToShow&&e.fletrics.set(r.name.replace(/\-/g,".")+".viewtiming",r.appContext.viewTiming[r.name].initialize),r},function(e){throw YUI.Env.isServer||(r.shouldDeferSubviews&&r._setupDeferredSubviewsInitialization(),r.normalizedActivate()),e}).catch(e.PromiseCatcher(this.name))},render:function(){return this},buildHeadContainer:function(){return this.set("headContainer",""),this},_buildSubviewHeadContainers:function(){var e=[],t=this,n="<script";return Object.keys(this.subviews).forEach(function(n){e.indexOf(t.subviews[n].get("headContainer"))===-1&&e.push(t.subviews[n].get("headContainer"))}),e.sort(function(e,t){var r=e.toLowerCase().indexOf(n)>-1,i=t.toLowerCase().indexOf(n)>-1;return r&&!i?1:!r&&i?-1:0}).join("")},_buildFullHeadMeta:function(){var e,t="";return this.buildHeadContainer(),e=this.get("headContainer"),e=e.concat(this._buildSubviewHeadContainers()),this.set("headContainer",e.concat(t)),this},setRootViewAdditionalViewClasses:function(){return this.set("rootViewAdditionalViewClasses",[]),this},_buildFullRootViewAdditionalViewClasses:function(){var e=[];return e=e.concat(this._buildSubviewRootViewAdditionalViewClasses()),this.set("rootViewAdditionalViewClasses",e),this},_buildSubviewRootViewAdditionalViewClasses:function(){this.setRootViewAdditionalViewClasses();var e=this.get("rootViewAdditionalViewClasses")||[],t=this;return Object.keys(this.subviews).forEach(function(n){var r=t.subviews[n]._buildSubviewRootViewAdditionalViewClasses();e=e.concat(r)}),e},_setupDeferredSubviewsInitialization:function(){setTimeout(function(){var t=e.config.win.document.body;t.scrollTop>0||t.clientHeight-50<=t.scrollHeight?this._loadDeferredSubviews():(this.deferredViewScrollListener=e.globalEvents.subscribe("window:scroll",this._loadDeferredSubviews.bind(this)),this.registerEventHandler(this.deferredViewScrollListener))}.bind(this
),10)},_loadDeferredSubviews:function(){this.loadingDeferred||(this.loadingDeferred=!0,this._removeDeferredViewScrollListener(),this._recursivelyLoadDeferredSubview(0,!1))},_removeDeferredViewScrollListener:function(){this.deferredViewScrollListener&&(this.deferredViewScrollListener.detach(),this.deferredViewScrollListener=null)},_recursivelyLoadDeferredSubview:function(t,r){var i=Object.keys(this.subviewConfig||[]).filter(function(e){var t=this.subviewConfig[e];return t.disabled===!0?!1:typeof t.disabled=="function"&&t.disabled.call(this,this._params)?!1:this.subviewConfig[e].canDefer}.bind(this)),s=this;if(t<=i.length-1){var o=i[t],u=e.merge(this._params,this.subviewConfig[o]),a;u.container=null,u.wasDeferred=!0,n.log("Loading deferred view",{topic:s.name,view:o});try{a=this.appContext.getView(o,u)}catch(f){this._onDeferredViewLoadingError(t,r,f);return}a.then(function(e){if(!e){n.error("An error occured trying to load the deferred view.",{topic:s.name}),r?(t++,r=!1):r=!0,s._recursivelyLoadDeferredSubview(t,r);return}e.initialize(u).then(function(){e.on("subviewViewEvent",function(t){t&&t.details&&t.details.length&&s.onSubviewEvent.call(s,e.name,t.details)}),u&&u.additionalViewClasses&&u.additionalViewClasses.forEach(function(t){e.get("container").addClass(t)}),s._addDeferredViewToDOM(e),e.normalizedActivate(),t++,s._recursivelyLoadDeferredSubview(t,!1)}).catch(s._onDeferredViewLoadingError.bind(this,t,r))})}},_onDeferredViewLoadingError:function(e,t,r){n.error("An error occured trying to initialize the deferred view",{topic:this.name,err:r}),t?(e++,t=!1):t=!0,this._recursivelyLoadDeferredSubview(e,t)},_addDeferredViewToDOM:function(e){if(!e){n.error("Non-view passed to _addDeferredViewToDOM.",{topic:this.name});return}var t=this.get("container").one("."+e.name),r=e.get("container");t&&r?t.replace(r):n.error("Could not add view to DOM in _addDeferredViewToDOM",{topic:this.name,view:e.name})},attachKeyEvent:function(e,t,n){return this.registerEventHandler(this.appContext.getKeyboardManager().on(e,n||this._params.keyEventScope||"*",t.bind(this)))},setContainerHTML:function(e){var t=this;return this.get("container").setHTML(e),YUI.Env.isServer||(this.get("container").generateID(),Object.keys(this.subviews||{}).forEach(function(e,n,r){var i=t.subviews[e],s=i.get("container"),o=i.getId?i.getId():s._yuid,u=t.get("container").one("#"+o);u&&u.replace(s)})),this},setupSubviews:function(){var t=this,r,i=[],s=[],o=[],u=this.appContext.flipper.isFlipped("enable-non-blocking-on-non-required-views"),a,f={};if(!this.subviewConfig)return e.Promise.resolve();Object.keys(this.subviewConfig).forEach(function(e){if(t.subviewConfig[e].disabled===!0)return;if(typeof t.subviewConfig[e].disabled=="function"&&t.subviewConfig[e].disabled.call(t,t._params))return;f[e]=t.subviewConfig[e]}),r=Object.keys(f).map(function(r){YUI.Env.isServer?a=f[r].requiredToShowOnServer||f[r].requiredToShow||t.appContext.forceServerRender&&!f[r].neverShowOnServer:a=f[r].requiredToShowOnClient||f[r].requiredToShow;var l=e.merge(t._params,f[r]);!t.shouldDeferSubviews&&l.canDefer&&delete l.canDefer;if(t.shouldDeferSubviews&&l.canDefer){n.log("Deferring subview.",{topic:t.name,view:r});var c=u?o:i;c.push(t.instantiateSubview(r,l).then(function(e){return e.setContainerHTML(""),e.get("container").addClass("deferred-view"),e}))}else if(a){var h=u?s:i;h.push(t.instantiateSubview(r,l).then(function(e){return e.wasRequiredToShow=!0,t.setupSubview(r,l,e)}))}else{var p=u?o:i;p.push(t.instantiateSubview(r,l).then(function(n){n.wasRequiredToShow=!1,YUI.Env.isServer||e.soon(function(){t.setupSubview(r,l,n)})}))}}).filter(function(e){return!!e});if(u){var l=s.length?e.Promise.all(s):e.Promise.resolve();return l.then(function(){o.length&&!YUI.Env.isServer&&e.Promise.all(o).then(function(){t.buildContainer(),t.normalizedActivate()})})}return i.length?e.Promise.all(i):e.Promise.resolve()},registerSubview:function(e,t){t||(t=e.name),this.subviews[t]=e},instantiateSubview:function(t,r){var i=this;return r.container=this.getContainer({isSubview:!0,subviewName:t,subviewParams:r}),this.appContext.getView(t,r).then(null,function(){return n.log("getView failed to load view, retrying once more."),i.appContext.getView(t,r)}).then(function(e){return e.on("loadingError",i.handleSubviewLoadingError.bind(i)),e.on("loadingSuccess",i.handleSubviewLoadingSuccess.bind(i)),e.on("subviewViewEvent",i.handleSubviewEvent.bind(i,e.name)),i.registerSubview(e,t),e._params&&(e._params.keyEventScope=i._params.keyEventScope),e}).catch(e.PromiseCatcher(this.name))},onSubviewEvent:function(e,t){return!0},onParentViewEvent:function(e,t){return!0},handleSubviewEvent:function(e,t){var n=t?t.details||[]:[];this.onSubviewEvent(e,n)!==!1&&this.fire.apply(this,["subviewViewEvent"].concat(n))},handleParentViewEvent:function(e,t){var n=t?t.details||[]:[],r,i=this;if(this.onParentViewEvent(e,n)!==!1)for(r in this.subviews)i.subviews[r].fire.apply(i.subviews[r],["parentViewEvent"].concat(n))},handleSubviewLoadingSuccess:function(e){this.subviewsWithLoadingError[e.target.name]&&delete this.subviewsWithLoadingError[e.target.name]},handleSubviewLoadingError:function(e){var t;this.subviewConfig[e.target.name].dealbreaker&&(this.hasDealbreakerSubviewLoadingError=!0),this.subviewsWithLoadingError[e.target.name]=e.details[0];if(!this.isErrorBuilt){t=Object.keys(this.subviewsWithLoadingError);if(this.hasDealbreakerSubviewLoadingError||t.length>=2)this.error={message:"",fatal:!0},t.forEach(function(e,n){var r=this.subviewsWithLoadingError[e];n!==t.length-1?this.error.message+="["+e+"] "+r.message+" | ":this.error.message+="["+e+"] "+r.message,r.is404&&(this.error.is404=!0),r.method&&(this.error.method+=r.method),r.fatal||(this.error.fatal=!1)}.bind(this)),this.fire("loadingError",{message:this.error.message,fatal:this.error.fatal,is404:this.error.is404,wasDealbreaker:this.hasDealbreakerSubviewLoadingError,wasMultipleSubviews:t&&t.length>=2}),this.buildErrorContainer(),this.isErrorBuilt=!0,n.error("subview forced the error loading state"
,{topic:this.name,view:e.target.name})}},setupSubview:function(t,r,i){var s=this;return r=e.merge(r||{}),r.alreadyRendered=s.alreadyRendered,i.set("isActiveViewAgnostic",s.get("isActiveViewAgnostic")),i.initialize(r).then(function(){return s.subviews[t]},function(e){n.error("Error getting/initializing view",{topic:s.name,err:e,view:t})}).catch(e.PromiseCatcher(this.name))},attachEvents:function(t){if(!t)return;var n={},r=this;Object.keys(t).forEach(function(i){var s,o;s={selector:(i.match(/([\w-_\#\.\[\]~|$^*= ]+) /i)||[])[1]||"[data-action]",type:(i.match(/([\w]+):/i)||[])[1]||"click",action:(i.match(/:([\w]+)/i)||[])[1]||"_default_"},o=s.selector+"/"+s.type,n[o]||(n[o]={},r.registerEventHandler(r.get("container").delegate(s.type,function(t){var i,u,a,f;i=t.target.ancestor(s.selector,!0);if(s.type==="click"){u=t.target.ancestor(".server-only-link",!0);if(u){if(t.metaKey===!0||t.ctrlKey===!0)return;e.config.win.location=u.get("href");return}}if(!i)return;a=i.getData()||{},f=a.action||"_default_";if(!n[o].hasOwnProperty(f))return;if(!n[o][f])throw new Error('Handler for "'+f+'" UI event is undefined');n[o][f].call(r,t,a)},s.selector))),n[o][s.action]=t[i]})},registerEventHandler:function(t){if(e.Lang.isFunction(t.detach))return this._eventHandles.push(t),t},detachRegisteredEvent:function(t){var n=this._eventHandles.indexOf(t);n!==-1&&e.Lang.isFunction(t.detach)&&(t.detach(),this._eventHandles.splice(n,1))},detachRegisteredEvents:function(){this._eventHandles.length&&(this._eventHandles.forEach(function(e){e.detach()}),this._eventHandles=[])},generateSignature:function(t,n){var r={},i;return e.Object.each(n,function(e,t){t!=="container"&&t!=="appContext"&&t!=="context"&&t!=="parentView"&&t!=="keyEventScope"&&typeof e!="undefined"&&typeof e!="function"&&(r[t]=typeof e=="object"?1:e)}),i=t+"__"+Object.keys(r).sort().map(function(e){return encodeURIComponent(e)+"_"+encodeURIComponent(r[e])}).join("__"),i},getContainer:function(t){t=t||{},t.subviewParams=t.subviewParams||{};var n,r,i=["view",t.subviewName||t.viewName||this.name],s,o=t.subviewName?t.subviewParams.additionalViewClasses:this.additionalViewClasses,u,a=t.subviewParams.preferredViewTag||"div";return(!t.isSubview||t.subviewParams.requiredToShowOnServer||t.subviewParams.requiredToShow)&&YUI.Env.isServer&&i.push("requiredToShowOnServer"),this.theme&&i.push(this.theme),e.Lang.isArray(o)&&o.length?i=i.concat(o):e.Lang.isFunction(o)&&(u=o.call(this),e.Lang.isArray(u)&&u.length&&(i=i.concat(u))),t.subviewName||i.push(e.FlickrView.ROOT_VIEW_CLASS_NAME),i=' class="'+i.join(" ")+'"',t.subview?n=t.subview.getId():t.subviewName&&t.subviewParams&&(n=this.generateSignature(t.subviewName,t.subviewParams)),YUI.Env.isServer?r={html:"",setHTML:function(e){this.html=e},getHTML:function(e){return this.html},get:function(e){switch(e){case"innerHTML":return this.html;case"outerHTML":return"<"+a+" "+i+(s?' style="'+Object.keys(s).reduce(function(e,t,n,r){return e+t+": "+s[t]+(n<r.length-1?"; ":"")},"")+'"':"")+(n?' data-view-signature="'+n+'"':"")+">"+this.html+"</"+a+">"}return null},hasChildNodes:function(){return!1},addClass:function(e){e=e.trim();if(e==="")return;i=i.slice(0,-1)+" "+e+'"'},hasClass:function(e){var t=i.split('"')[1],n=t.split(" ");return n.indexOf(e)>-1},removeClass:function(e){var t=i.split('"')[1],n=t.split(" "),r=n.indexOf(e);r!==-1&&(n.splice(r,1),i=' class="'+n.join(" ")+'"')},setStyle:function(e,t){s||(s={}),s[e]=t},setStyles:function(e){s||(s={}),Object.keys(e).forEach(function(t){s[t]=e[t]})},appendChild:function(e){this.html+=e.html},all:function(){return{each:function(){}}},one:function(){return null}}:(n&&(r=this.get("container").one('[data-view-signature="'+n+'"]')),r?r.removeAttribute("data-view-signature"):r=e.Node.create("<"+a+" "+i+"></"+a+">")),r},renderSubviews:function(){var e={},t=this;return Object.keys(this.subviews).forEach(function(e,r,i){try{t.subviews[e].render()}catch(s){n.error("Error rendering view",{topic:t.name,err:s,view:e})}}),e},templates:function(t){var r=e.Template.get("hermes/"+t),i=this.getLangBundles(),s=this,o;i.locales=this.appContext.lang||this.defaultLang;if(typeof r!="function")throw n.error("Template not found",{topic:this.name,template:t}),new Error("Template not found: "+t);return this.appContext.flipper&&(o=this.appContext.flipper),function(e){return e=e||{},!e.flippers&&o&&(e.flippers=o.toJSON()),s.appContext.forceServerRender&&(e.isServerRendered=!0),Object.keys(s.subviewConfig||{}).forEach(function(t){e[t]||(e[t]=s.subviews[t]?s.subviews[t].get("container"):"")}),r(e,{data:{intl:i,flippers:e.flippers}})}},loadState:function(){return e.Promise.resolve()},updateHead:function(){this.get("headContainer")!==null&&(e.one("head").all('[data-dynamic="true"]').remove(!0),e.one("head").append(this.get("headContainer")))},canActivate:function(){var e=!1;return(this.isBuilt||this.isErrorBuilt)&&!this.isActivated&&!this.isErrorActivated&&this.isActiveAndInDOM()&&(e=!0),e},isActiveAndInDOM:function(){var e=this.get("container");return e&&(this.get("isActiveViewAgnostic")||this.appContext.flapp.get("activeView").get("container").contains(e))&&e.inDoc()},activate:function(){return this},activateSubviews:function(){var e,t,r=this;for(e in this.subviews){t=r.subviews[e];try{t.normalizedActivate(),t.recursivelyActivateSubviews()}catch(i){n.error("Error activating view",{topic:this.name,err:i,view:e})}}return this},recursivelyActivateSubviews:function(e){var t,r,i=e||this.subviews,s=this;for(t in i){r=i[t];if(r.canActivate()){r.normalizedActivate();try{r.normalizedActivate(),s.recursivelyActivateSubviews(r.subviews)}catch(o){n.error("Error activating view",{topic:this.name,err:o,view:r})}}}return this},normalizedActivate:function(){this.canActivate()&&(this.isErrorBuilt?(this.isErrorActivated=!0,this.activateErrorContainer()):(e.rapidTracker.refreshTracker(),this.activate(),this.isActivated=!0,this.activateSubviews()))},buildErrorContainer:function(){this.setContainerHTML("")},activateErrorContainer:function(
){var e=this,t=this.get("container").one(".retry");t&&t.on("click",function(t){t.preventDefault(),e.isErrorActivated=!1,e.initialize()})},setViewDataOnHistory:function(t,n){return e.HistoryHelper.setData(this.name,t,n)},getViewDataFromHistory:function(t){return e.HistoryHelper.getData(this.name,t)},getTrackingSegments:function(){return{}},reload:function(t,n){var r=this,i=[];if(!t.length)return e.Promise.resolve();for(var s=0;s<t.length;s++)i.push(this.appContext.getModelRegistry(t[s]));return e.Promise.all(i).then(function(e){for(var t=0;t<e.length;t++)Array.isArray(n)?e[t].remove(n[t]):e[t].remove(n);YUI.Env.isServer||r.appContext.flapp.navigate(r.appContext.getLocation().href)}).catch(e.PromiseCatcher(this.name))},destroy:function(t){this.set("destroyed",!0);var n=this.get("container"),r;this.detachRegisteredEvents();if(!YUI.Env.isServer&&this.isActiveAndInDOM()){this.setRootViewAdditionalViewClasses();var i=this.get("rootViewAdditionalViewClasses")||[],s=e.one("."+e.FlickrView.ROOT_VIEW_CLASS_NAME);i&&s&&i.forEach(function(e){s.removeClass(e)})}return this._removeDeferredViewScrollListener(),e.Node&&n&&(n.detach&&n.detach(),t&&(t.remove||t["delete"])&&n.remove&&n.remove(!0),this.set("container",null)),this.destroySubviews(),r=e.FlickrView.superclass.destroy.call(this),this.beforeDestroyHandler&&this.beforeDestroyHandler.detach(),r},destroySubviews:function(){var e=this;Object.keys(this.subviews||{}).forEach(function(t,n,r){e.subviews[t].destroy()})},bringIntoFocus:function(){var e=this.get("container"),t=e.getAttribute("tabindex")||null;e.setAttribute("tabindex","-1"),e.focus(),e.blur(),t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")},setContainerWithTemplate:function(e,t){this.setContainerHTML(this.templates(e)(t))},godMessage:e.godMessage},{ATTRS:{container:{value:"",setter:function(e){return e||this.getContainer()}},spaceid:{value:792600503,validator:function(t){return e.Lang.isNumber(t)||e.Lang.isString(t)},setter:function(e){return parseInt(e,10)}},trackedElementIDs:{value:[],validator:function(t){return e.Lang.isArray(t)}},rapidConf:{value:{},validator:function(t){return e.Lang.isObject(t)}},isActiveViewAgnostic:{value:!1},isRootView:{value:!1},rootViewAdditionalViewClasses:{value:[],validator:function(t){return e.Lang.isArray(t)}}},create:r,ROOT_VIEW_CLASS_NAME:"flickr-view-root-view"}),e.mix(e.FlickrView.prototype,e.Localizable)},"@VERSION@",{requires:["base","base-css","pure-css","template-base","flickr-promise","handlebars-base","handlebars-helpers","localizable","history-helper","loaded-state-css","god-message","fletrics"]});
YUI.add("hermes-template-photo-page-scrappy",function(e,t){var n=e.Template.Handlebars.revive({compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s=t!=null?t:{},o=n.helperMissing,u=e.escapeExpression;return u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["global-nav-view"]:t,{name:"outlet",hash:{},data:i}))+"\n"+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["photo-well-view"]:t,{name:"outlet",hash:{},data:i}))+"\n"+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["sub-photo-view"]:t,{name:"outlet",hash:{},data:i}))+"\n"+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["signup-footer-view"]:t,{name:"outlet",hash:{},data:i}))+"\n"+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["footer-full-view"]:t,{name:"outlet",hash:{},data:i}))+"\n"+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["curator-photo-tools-view"]:t,{name:"outlet",hash:{},data:i}))},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/photo-page-scrappy",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("plugin",function(e,t){function n(t){!this.hasImpl||!this.hasImpl(e.Plugin.Base)?n.superclass.constructor.apply(this,arguments):n.prototype.initializer.apply(this,arguments)}n.ATTRS={host:{writeOnce:!0}},n.NAME="plugin",n.NS="plugin",e.extend(n,e.Base,{_handles:null,initializer:function(e){this._handles=[]},destructor:function(){if(this._handles)for(var e=0,t=this._handles.length;e<t;e++)this._handles[e].detach()},doBefore:function(e,t,n){var r=this.get("host"),i;return e in r?i=this.beforeHostMethod(e,t,n):r.on&&(i=this.onHostEvent(e,t,n)),i},doAfter:function(e,t,n){var r=this.get("host"),i;return e in r?i=this.afterHostMethod(e,t,n):r.after&&(i=this.afterHostEvent(e,t,n)),i},onHostEvent:function(e,t,n){var r=this.get("host").on(e,t,n||this);return this._handles.push(r),r},onceHostEvent:function(e,t,n){var r=this.get("host").once(e,t,n||this);return this._handles.push(r),r},afterHostEvent:function(e,t,n){var r=this.get("host").after(e,t,n||this);return this._handles.push(r),r},onceAfterHostEvent:function(e,t,n){var r=this.get("host").onceAfter(e,t,n||this);return this._handles.push(r),r},beforeHostMethod:function(t,n,r){var i=e.Do.before(n,this.get("host"),t,r||this);return this._handles.push(i),i},afterHostMethod:function(t,n,r){var i=e.Do.after(n,this.get("host"),t,r||this);return this._handles.push(i),i},toString:function(){return this.constructor.NAME+"["+this.constructor.NS+"]"}}),e.namespace("Plugin").Base=n},"3.16.0",{requires:["base-base"]});
YUI.add("ttfp-recorder-plugin",function(e,t){"use strict";function s(e){s.superclass.constructor.apply(this,arguments)}var n=require("lib/flog")(t),r="AFT",i="AFT_CL";s.NAME=s.NS="TTFPRecorderPlugin",s.ATTRS={selector:{value:""}},e.extend(s,e.Plugin.Base,{initializer:function(e){this.set("selector",e.selector),this.afterHostMethod("setContainerHTML",this._doAfterSetContainerHTML,this),this.afterHostMethod("setContainerWithTemplate",this._doAfterSetContainerHTML,this)},destructor:function(){},setSelector:function(e){this.set("selector",e)},testImageResolver:function(t,r,i){var s=this.get("host"),o,u=this;return function(a,f){var l=new Image,c=e.guid();if(window.LH&&i)try{o=window.LH.mark("mark_time_to_load_photo_only_start"+c).startTime}catch(h){}l.onload=function(){var e,f;t.inDoc()||a();if(l.onloadFired){a();return}l.onloadFired=!0;if(window.LH&&i){try{if(window.performance.getEntriesByName&&s.appContext.flipper.isFlipped("enable-resource-performance-timing")){var h=window.performance.getEntriesByName(l.src),p=h.length?h[0]:null;e=p?p.duration:null,f=p?p.startTime:o}}catch(d){}try{if(e&&f)window.LH.record("time_to_load_photo_only",{name:"time_to_load_photo_only",type:"mark",startTime:f,duration:e}),window.beaconError&&window.beaconError("time_to_load_photo_only",window.location.href,{duration:e});else{window.LH.mark("mark_time_to_load_photo_only"+c);var v=window.LH.measure("time_to_load_photo_only",{startMark:"mark_time_to_load_photo_only_start"+c,endMark:"mark_time_to_load_photo_only"+c});e=v.duration,window.beaconError&&window.beaconError("time_to_load_photo_only",window.location.href,{duration:e})}u.sendToClientMetrics("time_to_load_photo_only",e)}catch(m){n.warn("Missing start mark",{err:m})}}a(r)},l.onerror=function(){f("Failed to load image")},l.src=t.getAttribute("src"),l.complete&&(l.onloadFired=!0,a(r))}},_doAfterSetContainerHTML:function(){var e,t,n,s;s=this.get("host"),e=s.get("container"),s&&s.appContext&&s.appContext.clientMetrics&&e&&(t=e.one(this.get("selector")),n=s.appContext.clientMetrics,t&&(n.setPendingMark(this.testImageResolver(t,r,!0)),n.setPendingMark(this.testImageResolver(t,i)),n.beaconLater()))},sendToClientMetrics:function(e,t){var n=this.get("host");if(n&&n.appContext&&n.appContext.clientMetrics){var r=n.appContext.clientMetrics;r.record("time_to_load_photo_only",t),window.beaconError&&window.beaconError("time_to_load_photo_only",window.location.href,{duration:t})}}}),e.namespace("Plugin.FlickrView").TTFPRecorderPlugin=s},"@VERSION@",{requires:["plugin"]});
YUI.add("signin-helper",function(e){function t(t,n){e.FlickrStorage.store(t,n)}function n(e,n){var r="fave";t(r,e),m(r,n)}function r(e,t){var n="comment";m(n,t)}function i(e,n){var r="share";t(r,e),m(r,n)}function s(e,n){var r="joingroup";t(r,e),m(r,n)}function o(e,n){var r="follow";t(r,e),m(r,n)}function u(e,n){var r="download";t(r,e),m(r,n)}function a(e,n){var r="fave";t(r,e),y(r,n)}function f(e,t){var n="comment";y(n,t)}function l(e,n){var r="joingroup";t(r,e),y(r,n)}function c(e,n){var r="follow";t(r,e),y(r,n)}function h(e,n){var r="download";t(r,e),y(r,n)}function p(t){var n,r,i=[];if(!t)return;if(e.FlickrStorage.hasEntries()){n=e.FlickrStorage.retrieve();for(r in n)d(t,n[r])||i.push(n[r])}return e.FlickrStorage.remove(),i}function d(e,t){var n=t.key,r=t.value;switch(n){case"fave":return v(e,r),!0;case"share":return!1}}function v(e,t){var n=t.id,r=e.getModelRegistry("photo-engagement-models");r.then(function(e){var t=e.proxy(n);t.registry.addAsFave(n)&&t.remoteUpdate()})}function m(t,n){var r,i;n&&n.withPopup?(r=e.config.win.open(g(n),"_blank","height=650,resizable=1,scrollbars=1,location=yes"),i=setInterval(function(){r.closed&&(clearInterval(i),window.location.reload())},1e3)):e.config.win.location=g(n)}function g(t){t=t||{},t.closeWhenDone&&(t.postLoginUrl=e.url("/photo_grease_postlogin.gne",{protocol:!1}));var n=t.postLoginUrl||e.config.win.location.href,r=t.url||e.url("/signin/yahoo/",{protocol:!1});return r+"?redir="+encodeURIComponent(n)}function y(t,n){n=n||{};var r=n.postLoginUrl||e.config.win.location.href,i=n.url||e.url("/signup/",{protocol:!1});e.config.win.location=i+"?redir="+encodeURIComponent(r)}e.FlickrStorage={_storageKey:"flickrStorage",store:function(t,n){try{var r=[];e.StorageHelper.hasEntries(this._storageKey)&&(r=this.retrieve()),r.push({key:t,value:n}),e.StorageHelper.setItem(this._storageKey,JSON.stringify(r))}catch(i){}},retrieve:function(){var t={};try{t=JSON.parse(e.StorageHelper.getItem(this._storageKey))}catch(n){}return t},remove:function(){try{e.StorageHelper.remove(this._storageKey)}catch(t){}},hasEntries:function(){return e.StorageHelper.hasEntries(this._storageKey)}},e.SigninHelper={savePreLoginAction:t,addPendingFave:n,addPendingComment:r,addPendingShare:i,addPendingFollow:o,addPendingJoinGroup:s,addPendingDownload:u,checkPendingQueue:p,_redirectToSignin:m,_redirectToSignUp:y,_getSigninUrl:g,signUpPendingFave:a,signUpPendingComment:f,signUpPendingFollow:c,signUpPendingJoinGroup:l,signUpPendingDownload:h}},"@VERSION@",{requires:["url","storage-helper"]});
YUI.add("flutil",function(e){"use strict";var t,n=e.config.win,r=e.config.doc,i={transitionTimeout:2e3},s={getPrefixedStyleProperty:{}},o={};t=e.flutil={xbrowser:{transition:{property:"transitionProperty",duration:"transitionDuration",transitionEndEvent:"transitionend"}},setStylePrefixed:function(t,n,r){var i=this.getPrefixedStyleProperty(t);return e.Array.each(i,function(e){r.setStyle(e,n)}),r},getPrefixedStyleProperty:function(t){if(s.getPrefixedStyleProperty[t])return s.getPrefixedStyleProperty[t];var n=[],r=["-webkit-","-moz-","-ms-",""];return e.Array.each(r,function(e){n.push(e+t)}),s.getPrefixedStyleProperty[t]=n,n},dump:function(){var e=new Array(arguments.length),t;for(var n=0;n<e.length;++n)e[n]=arguments[n];t=typeof e[0]=="string"?e.shift():"LOG",e.unshift("color: #FC0"),e.unshift("%c["+t+"]"),console.log.apply(console,e)},perf:function(e){var t={};try{e.now()}catch(n){e={now:function(){return(new Date).getTime()}}}return{start:function(n){t[n||"perf"]=e.now()},stop:function(n){var r=e.now()-t[n||"perf"];n||(n="perf"),delete t[n],console.log(n,(r*1e3|0)/1e3,"ms")}}}(typeof window=="undefined"?{}:window.performance),extend:function(e){e||(e={});var t=new Array(arguments.length);for(var n=0;n<t.length;++n)t[n]=arguments[n];return Array.prototype.slice.call(t,1).forEach(function(t){if(!t)return;for(var n in t)e[n]=t[n]}),e},objectCreate:function(e,n){var r,i;return r=function(){},r.prototype=e,i=new r,n?t.extend(i,n):i},throttle:function(e,t){var n=function(){if(n._t){n._q=!0;return}n._t=setTimeout(function(){n._t=null,n._q&&n(),n._q=null},t),e()};return n},result:function(t){return e.Lang.isFunction(t)?t():t},onTransitionEnd:function(e,r){if(!r||typeof r!="function")return;var s,o,u,a;e=e.getDOMNode(),u=n.getComputedStyle(e)[t.xbrowser.transition.property],a=n.getComputedStyle(e)[t.xbrowser.transition.duration];if(!u||!a)return r();o=function(){clearTimeout(s),e.removeEventListener(t.xbrowser.transition.transitionEndEvent,o),r()},s=setTimeout(o,i.transitionTimeout),e.addEventListener(t.xbrowser.transition.transitionEndEvent,o)},toCamelCase:function(e){return e[0].toUpperCase()+e.slice(1).toLowerCase()},setCookie:function(t){if(!t.cookieName||typeof t.cookieValue=="undefined"||!t.path)throw new Error("[flutil.setCookie] Missing important parameters to set a cookie");var n=t.cookieName,r=t.cookieValue,i=t.domain||".flickr.com",s=t.path,o=t.expiresMonthsFromNow||3,u=e.Lang.isNumber(t.expires)?t.expires:e.moment().add(o,"months").toDate();t.remove&&e.Cookie.remove(n,{path:s}),e.Cookie.set(n,r,{domain:i,path:s,expires:u})},createFragment:function(e){var t=r.createElement("div"),n=r.createDocumentFragment(),i;t.innerHTML=e;while(i=t.firstChild)n.appendChild(i);return n},constrainToValues:function(e,t){return t.indexOf(e)<0?t[0]:e},escapeInput:function(e,t){var n;if(!r)return e;if(!e&&typeof e!="number")return"";t||(t="text");if(t==="html")return n=r.createElement("div"),n.appendChild(r.createTextNode(e)),n.innerHTML;if(t==="text")return n=r.createElement("div"),e=e.replace(/(<([^>]+)>\s*)+/ig," ").trim(),n.appendChild(r.createTextNode(e)),n.innerHTML;if(t==="numericstring")return(e+"").replace(/[^\d]/,"")},disableEvent:function(n,r){r=e.merge({excepted:":not(*)",onDisabledEvent:null},r);if(!document.body.addEventListener)return;o[n]=o[n]||{},o[n][r.excepted]&&t.enableEvent(n,r.excepted),o[n][r.excepted]=function(t){if(!r.excepted||!e.one(t.target).ancestors(r.excepted,!0).isEmpty())return;t.preventDefault(),t.stopPropagation(),r.onDisabledEvent&&r.onDisabledEvent(t)},document.body.addEventListener(n,o[n][r.excepted],!0)},enableEvent:function(t,n){n=e.merge({excepted:":not(*)"},n);if(!o[t]||!o[t][n.excepted])return;document.body.removeEventListener(t,o[t][n.excepted],!0),o[t][n.excepted]=null},unescape:function(t){if(!t||!e.Lang.isString(t))return t;var n={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#39;":"'","&#92;":"\\"};return t.replace(/(&amp;|&lt;|&gt;|&quot;|&#x27;|&#39;|&#92;)/ig,function(e){return n[e.toLowerCase()]})},normalizeURIComponents:function(e){var t,n,r,i;t={"&":["&amp;","&#x00026;","&#38;"],"<":["&lt;","&#x0003C;","&#60;"],">":["&gt;","&#x0003E;","&#62;"],'"':["&quot;","&#x00022;","&#34;"],"'":["&apos;","&#x00027;","&#39;"],"`":["&grave;","&DiacriticalGrave;","&#x00060;","&#96;"]},e=e.replace(/\+/g," ");for(n in t)r=n,i=t[n],e=e.replace(new RegExp(i.join("|"),"gi"),r);return e=decodeURIComponent(e),e},template:function(e,t){return e.replace(/\{\{([\w\.=]+)\}\}/g,function(e,n){var r=n.split(/=/),i;return i=r[0].split(/\./).reduce(function(e,t){return e?e[t]:null},t),i!==undefined&&i!==null?i+"":r[1]||""}).trim()},createHashCode:function(e){var t,n="0000000000";return typeof e!="object"?t=e+"":t=Object.keys(e||{}).map(function(t){var n=t;try{n+=JSON.stringify(e[t])}catch(r){n+="?"}return n}).join(""),t=t.split("").reduce(function(e,t){return e=(e<<5)-e+t.charCodeAt(0),e&e},0).toString().replace(/^-/,""),n.slice(0,-1*t.length)+t},camelCaseifyKeys:function(e){return Object.keys(e).reduce(function(n,r){return n[t.camelCaseify(r)]=e[r],n},{})},camelCaseify:function(e){return e.replace(/-(\w)/gi,function(e,t){return t.toUpperCase()})},unCamelCaseify:function(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^-/,"")},unicodeVariants:["(?:ae|\u00e6)","(?:oe|\u0153)","(?:ss|\u00df)","(?:th|\u00de)","[a\u00e1\u00e0\u00e2\u00e4\u00e3a\u00e5\u1ea5]","[e\u00e9\u00e8\u00ea\u00eb\u011b3]","[i\u00ed\u00ec\u00ee\u00ef\u01d0]","[o\u00f3\u00f2\u00f4\u00f6\u00f5\u01d2\u1ecf\u01a1\u1edb\u1edd\u1edf\u1ee1\u1ee3\u00f8]","[u\u00fa\u00f9\u00fb\u00fc\u01d4\u01da\u01b0\u1ee9\u1eeb\u1eed\u1eef\u1ef1]","[y\u00fd\u00ff]","[c\u00e7\u010d]","[d\u00d0]","[f\u0192]","[g\u01e7]","[h\u021f]","[j\u01f0]","[k\u01e9]","[l\u013e]","[n\u00f1\u0148]","[r\u0159\u00ae]","[s\u0161\u1e67]","[t\u0165]","[z\u017e]"],agnosticizeUnicode:function(e){var t=this.unicodeVariants,n=t.length,r;for(r=0;r<n;r++)e=e.replace(new RegExp(t[r],"gi"),t[r]);return e},buildHttpQuery:function(
e,t){return e+"?"+Object.keys(t||{}).map(function(e){return e+"="+encodeURIComponent(t[e])}).join("&")},formatNumbers:function(e){return Math.floor(e/1e6)>0?e=Math.floor(e/1e5)/10+"M":Math.floor(e/1e3)>0?e=Math.floor(e/100)/10+"k":e},formatIntlPluralNumber:function(t,n,r){var i=e.flutil.formatNumbers(n);return r?t.replace(/(?:\d*[\,\.]\d+)+/,i):t.replace(/(?:\d*[\,\.\s]\d+)+/,i)},openPopupWindow:function(t,n){var r,i,s,o,u,a;if(typeof window=="undefined")return;i=window,n=e.mix({name:"WIN"+(new Date).getTime(),ui:{}},n||{},!0),s=e.mix({dependent:!0,status:!0,scrollbars:!0,width:600,height:600},n.ui,!0),s.top||(s.top=(i.screen.height-s.height)/2|0),s.left||(s.left=(i.screen.width-s.width)/2|0),r=Object.keys(s).map(function(e){var t=s[e];return typeof t=="boolean"&&(t=t?"yes":"no"),e+"="+t}).join(","),i=i.open(t,n.name,r),i.focus();if(n.onUrlChange||n.onClose)o="_start_",a=setInterval(function(){if(!i.location){clearInterval(a),n.onClose&&n.onClose();return}try{u=i.location.href||"x-origin"}catch(t){i.postMessage("",e.url())}if(u===o)return;o=u,n.onUrlChange&&n.onUrlChange(u)},1e3);return i},parseYYYYMMDDDatestamp:function(t){return!e.Lang.isString(t)||t.length!==8?null:Date.parse(t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2))},photoCoords:{normalize:function(e,t,n,r){return{x:e/500,y:t/375,w:n/500,h:r/375}},denormalize:function(e){return{x:e.x*500,y:e.y*375,w:e.w*500,h:e.h*375}},denormX:function(e){return e.x*500},denormY:function(e){return e.y*375},denormW:function(e){return e.w*500},denormH:function(e){return e.h*375}},getGroupsOptoutValues:function(t){var n=[];return t["rebootify-group-members"]===!0&&n.push({name:"groups_members_opt",value:0}),t["enable-groups-discussion-optout"]===!0&&n.push({name:"groups_discuss_opt",value:0}),t["enable-groups-optout"]===!0&&n.push({name:"groups_opt",value:0}),{url:e.url("/help/forum/en-us/72157645851675914/lastpage#reply"),flippers:n}},nonLockingSynchronousLoop:function(e,t,n,r){var i=0,s,o=!0,u=Object.keys(e),a=function(e){t(e),i++,i>=f?n():i===s||o?(i===s&&(s+=r.threshold),o=!1,setTimeout(function(){a(u[i])},1)):a(u[i])},f=u.length;r=r||{},r.threshold=r.threshold||1e3,s=r.threshold,o=r.earlyUnlock!==!1,a(u[i])}}},"@VERSION@",{requires:["url"],optional:[]});
YUI.add("hermes-template-dialog-tooltip",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){return" ui-dialog-tooltip-witharrow"},3:function(e,t,n,r,i){return" drop-up"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o=t!=null?t:{};return'<div class="ui-dialog-wrapper ui-dialog ui-dialog-tooltip'+((s=n["if"].call(o,t!=null?t.arrow:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(o,t!=null?t.dropUp:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+'" data-action="halt">\n	<span class="ui-dialog-arrow"></span>\n	<div class="ui-dialog-body">\n	'+e.escapeExpression((n.dialogOutlet||t&&t.dialogOutlet||n.helperMissing).call(o,t!=null?t.content:t,{name:"dialogOutlet",hash:{},data:i}))+"\n	</div>\n</div>\n"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/dialog-tooltip",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-dialog-modal",function(e,t){var n=e.Template.Handlebars.revive({compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){return'<div class="ui-dialog-wrapper ui-dialog ui-dialog-modal">\n	<div class="ui-dialog-body">\n	'+e.escapeExpression((n.dialogOutlet||t&&t.dialogOutlet||n.helperMissing).call(t!=null?t:{},t!=null?t.content:t,{name:"dialogOutlet",hash:{},data:i}))+"\n	</div>\n</div>\n"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/dialog-modal",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-dialog-alert",function(e,t){var n=e.Template.Handlebars.revive({compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o=e.lambda,u=e.escapeExpression;return'<div class="ui-dialog-wrapper ui-dialog ui-dialog-alert">\n    <div class="dialog-title">\n		<h3>'+u(o((s=t!=null?t.attrs:t)!=null?s.title:s,t))+'</h3>\n		<i class="close-alert ui-dialog-button-close" data-action="dismiss"></i>\n    </div>\n    <div class="dialog-content">\n        <i class="ui-icon-modal-error '+u(o((s=t!=null?t.attrs:t)!=null?s.level:s,t))+'"></i>\n        <div class="alert-dialog-text">\n    	'+u((n.dialogOutlet||t&&t.dialogOutlet||n.helperMissing).call(t!=null?t:{},t!=null?t.content:t,{name:"dialogOutlet",hash:{},data:i}))+'\n    	</div>\n    </div>\n    <button class="ui-button ui-button-cta" data-action="ok">\n        <span>'+u(o((s=t!=null?t.attrs:t)!=null?s.confirmLabel:s,t))+"</span>\n    </button>\n</div>"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/dialog-alert",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-dialog-cta",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){return"ui-buttonbar-vertical"},3:function(e,t,n,r,i){var s;return'				<button class="ui-button ui-button-cta" data-action="confirm"><span>'+e.escapeExpression(e.lambda((s=t!=null?t.attrs:t)!=null?s.confirmButtonText:s,t))+"</span></button>\n"},5:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.buttonMarkup:t,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.program(8,i,0),data:i}))!=null?s:""},6:function(e,t,n,r,i){return"					"+e.escapeExpression(e.lambda(t!=null?t.buttonMarkup:t,t))+"\n"},8:function(e,t,n,r,i){var s;return'					<button class="ui-button" '+((s=n["if"].call(t!=null?t:{},t!=null?t.buttonAction:t,{name:"if",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))!=null?s:"")+"><span>"+e.escapeExpression(e.lambda(t!=null?t.buttonLabel:t,t))+"</span></button>\n"},9:function(e,t,n,r,i){return'data-action="'+e.escapeExpression(e.lambda(t!=null?t.buttonAction:t,t))+'"'},11:function(e,t,n,r,i){var s;return'				<button class="ui-button" data-action="decline"><span>'+e.escapeExpression(e.lambda((s=t!=null?t.attrs:t)!=null?s.cancelButtonText:s,t))+"</span></button>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o=e.escapeExpression,u=t!=null?t:{};return'<div class="ui-dialog-wrapper ui-dialog ui-dialog-cta">\n	<h1 class="ui-dialog-title">'+o(e.lambda((s=t!=null?t.attrs:t)!=null?s.title:s,t))+'</h1>\n	<div class="ui-dialog-body">\n		<div class="ui-util-paragraph">\n			'+o((n.dialogOutlet||t&&t.dialogOutlet||n.helperMissing).call(u,t!=null?t.content:t,{name:"dialogOutlet",hash:{},data:i}))+'\n		</div>\n		<div class="ui-buttonbar '+((s=n["if"].call(u,(s=t!=null?t.attrs:t)!=null?s.verticalButtonList:s,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+'">\n'+((s=n.unless.call(u,(s=t!=null?t.attrs:t)!=null?s.hideConfirmButton:s,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+"			\n"+((s=n.each.call(u,(s=t!=null?t.attrs:t)!=null?s.additionalButtons:s,{name:"each",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))!=null?s:"")+"			\n"+((s=n["if"].call(u,(s=t!=null?t.attrs:t)!=null?s.useCancelButton:s,{name:"if",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))!=null?s:"")+"		</div>\n	</div>\n</div>\n\n"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/dialog-cta",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("dialog",function(e){"use strict";var t,n,r={},i=e.config.win,s=e.config.doc;t={css:{state:"c-state-{{state}}",hidden:"ui-util-hidden",loading:"ui-util-loading",working:"ui-util-working",locked:"ui-util-locked",complete:"ui-util-complete",removed:"ui-util-removed",content:"js-content",wrapper:"ui-dialog-wrapper",anchorSelected:"ui-util-selected",curtain:"ui-dialog-modal-curtain",curtainClear:"ui-dialog-modal-curtain-clear",arrow:"ui-dialog-arrow"},transitionTimeout:2e3,debug:!1},n=e.merge(e.flutil,{log:function(){var e=new Array(arguments.length);for(var r=0;r<e.length;++r)e[r]=arguments[r];if(!t.debug||!console.log.apply)return;e.unshift("DIALOG"),n.dump.apply(null,e)},propagateWrapperAttributes:function(e,n){var r=[],i;return!n||!n.getDOMNode()||!n.getDOMNode().classList?r:(Array.prototype.slice.call(n.getDOMNode().classList).forEach(function(i){if(i===t.css.wrapper)return;n.removeClass(i),e.addClass(i),r.push(i)}),i=n.getAttribute("data-action"),i&&(n.removeAttribute("data-action"),r.push({attr:"data-action",restore:e.getAttribute("data-action")||null}),e.setAttribute("data-action",i)),r)},rollbackWrapperAttributes:function(e,t){if(!t)return;for(var n=0,r=t.length;n<r;n++)typeof t[n]=="object"?t[1].restore?e.setAttribute(t[n].name,t[n].restore):e.removeAttribute(t[n].name):e.removeClass(t[n])}}),e.namespace("Views").dialog={_dialogs:{},getInstance:function(t,r){var i,s,o;return r.id?s={id:r.id}:(s=e.merge(r),delete s.parent,delete s.rootEl,delete s.template,delete s.appContext,typeof s.content=="object"&&s.content instanceof e.FlickrView?s.content=s.content.get("container").toString():typeof s.content=="function"?s.content=s.content({}):s.content.toString()),i="SGL"+n.createHashCode(s),o=this._dialogs[t+":"+i],o?o:this._new(t,i,r)},getNewInstance:function(e,t){var n="OBJ"+(Object.keys(this._dialogs).length+1)+(new Date).getTime();return this._new(e,n,t)},_new:function(t,n,i){var s,o,u,a,f;if(e.Env.isServer)throw new Error("Dialogs are client-only!");i=e.mix(i||{});if(i.parent)o=i.parent,delete i.parent,a=o.getContainer({subviewName:t,subviewParams:i}),u=o.appContext;else{if(!i.appContext)throw new Error('Either the "appContext" or "parent" parameter is required!');o=null,u=i.appContext,a=e.Node.create("<div/>"),a.addClass("view").addClass(t)}return i.appContext=u,i.container=a,s=new r[t](i),f=t+(n?":"+n:""),s._parent=o,this.registerView(s,f),this._navigateCloseHook||(this._navigateCloseHook=u.flapp.on("navigate",this.close.bind(this))),s},registerView:function(e,t){var n=this;t=t||"REG"+(Object.keys(this._dialogs).length+1),e.manager=this,this._dialogs[t]=e,e.on("destroy",function(){delete n._dialogs[t]})},hide:function(e){this.close(e,"hide")},close:function(e,t){var n=this,r;t=t||"close",typeof e=="string"?r=function(r){if(e!==r.split(/:/)[0])return;n._dialogs[r][t]()}:typeof e=="object"?r=function(r){if(e===n._dialogs[r])return;n._dialogs[r][t]()}:r=function(e){n._dialogs[e].get("autoCloseable")&&n._dialogs[e][t]()},Object.keys(this._dialogs).forEach(r)},isOpen:function(e){},util:n},e.namespace("Views").dialogs=r,r["dialog-base"]=e.Base.create("dialog-base",e.FlickrView,[],{initializer:function(e){return e=e||{},this.state={},this.manager=null,this.appContext=this.appContext||e.appContext,this},render:function(){var n=this.templates(this.get("template"))(this.toJSON());return this.setContainerHTML(n),e.namespace("Views").dialog.util.propagateWrapperAttributes(this.get("container"),this.get("container").one("."+t.css.wrapper)),this.renderContent(),this.activate(),this.get("container").addClass(t.css.hidden),this.anchorToLayout(),this.state.visible=!0,this.hide(),this.state.rendered=!0,this.fire("rendered"),this},renderContent:function(r){var i=this.get("content"),s=this.get("container"),o=s.one("."+t.css.content);e.namespace("Views").dialog.util.rollbackWrapperAttributes(this.get("container"),this._contWrap);if(i instanceof e.FlickrView){i=i.get("container");if(!i)throw new Error("The Content View doesn't have a container");o.setHTML(""),o.appendChild(i)}else i instanceof e.Node?(o.setHTML(""),o.appendChild(i)):typeof i=="function"?(i=i(e.merge(this.toJSON(),r)),o.setHTML(i)):typeof i=="string"&&this.state.rendered&&o.setHTML(i);this._contWrap=n.propagateWrapperAttributes(s,o.one("."+t.css.wrapper))},renderCurtain:function(){var n=this,r,i=e.Number.parse(this.get("tintCurtain"));this.get("curtain")||(r=e.Node.create("<div/>"),r.addClass(t.css.curtain).addClass(t.css.hidden),this.get("visibleShim")||r.addClass(t.css.curtainClear),r.on("click",this.dismiss,this),i&&r.setStyle("backgroundColor","rgba(0, 0, 0, "+i+")"),this.set("curtain",r),this.get("appendCurtainTo")?this.get("appendCurtainTo").appendChild(r):this.get("container").ancestor()&&this.get("container").ancestor().insert(r,"after")),n.get("curtain").removeClass(t.css.hidden)},anchorToLayout:function(){var t=this.get("container"),n=this.get("anchorTo"),r,i=this.get("appendTo")||n||this.get("rootEl");if(!i){var s=new Error("Missing DOM node for anchoring dialog.");throw e.config&&e.config.win&&e.config.win.beaconError&&e.config.win.beaconError("dialogjs.failure "+(this._parent?this._parent.name:""),e.config.win.location.href,s),s}i.appendChild(t),this.get("positioning")?(this.get("dropUp")&&(r="bottomright"),this.refreshPosition(r)):this.manualPosition()},refreshPosition:function(n){var r,s,o,u,a,f,l,c,h=this.get("container"),p=this.get("anchorTo"),d=this.get("offsetLeft")||0,v,m;u=h.getDOMNode().getBoundingClientRect(),this.set("width",h.getComputedStyle("width")),this.set("height",h.getComputedStyle("height")),h.getComputedStyle("position")==="fixed"&&h.setStyles({marginLeft:(-1*u.width/2|0)-d+"px",marginTop:(-1*u.height/2|0)+"px"});if(p){r=p.getDOMNode().getBoundingClientRect(),this.set("anchorWidth",r.width),this.set("anchorHeight",r.height),m=e.merge({top:0,bottom:0,left:0,right:0},this.get("constraints")),c={top:m.top,bottom:i.innerHeight+m.bottom,left:m.left,right:i.innerWidth+m.right},a=[[r.bottom+u.height<c.bottom&&
r.right+u.width<c.right,{left:0,top:r.height},"topleft"],[r.bottom+u.height<c.bottom&&r.left-u.width>c.left,{right:0,top:r.height},"topright"],[r.top>u.height+c.top&&r.right+u.width<c.right,{left:0,bottom:r.height},"bottomleft"],[r.top>u.height+c.top&&r.left-u.width>c.left,{right:0,bottom:r.height},"bottomright"],[!0,{left:Math.round(-1*(u.width-r.width)/2),top:r.height},"topcenter"]],n&&(n=n.toLowerCase(),a=a.filter(function(e){return e[2]===n?(e[0]=!0,!0):!1})||a);while(a.length){l=a.shift();if(l[0]){f=l[1],h.addClass("ui-dialog-tooltip-witharrow-"+l[2]),h.setStyles(e.mix({top:"auto",bottom:"auto",left:"auto",right:"auto"},f,!0));break}}v=h.one("."+t.css.arrow),v&&(s=20,f.left!==0&&f.right!==0?o=Math.round((u.width-s)/2)+"px":o=Math.round((r.width-s)/2)+"px",v.setStyles({right:f.right===undefined?"auto":o,left:f.left===undefined?"auto":o}))}},manualPosition:function(){if(this.get("arrow")){var e=typeof this.get("arrow")=="string"?this.get("arrow"):"topleft";this.get("container").addClass("ui-dialog-tooltip-witharrow-"+e)}},activate:function(){var e={":confirm":this.confirm,":decline":this.decline,":dismiss":this.dismiss,":ok":this.dismiss,":halt":function(e){e.halt()}};return this.attachEvents(e),this},toJSON:function(){var t=this.getAttrs();return Object.keys(t).reduce(function(n,r){var i=t[r];return i instanceof e.Node?n:i instanceof e.FlickrView?n:(i&&i.toJSON&&(i=i.toJSON()),n[r]=i,n)},{})},isVisible:function(){return!!this.state.visible},isLocked:function(){return!!this.state.locked},isWorking:function(){return!!this.state.working},show:function(r){try{var i=this,s=this.get("container"),o=this.get("anchorTo");this.set("dismissing",!1),this.switchToLoading(!1);if(this.state.visible)return;this.state.rendered||this.render(),i.state.visible=!0,s.addClass(this.get("dialogClass")),this.fire("show"),s.removeClass(t.css.removed),setTimeout(function(){n.onTransitionEnd(s,r),s.removeClass(t.css.hidden),o&&o.addClass(t.css.anchorSelected)},10),e.fire("flickr:setKeyEventScope",this.getKeyEventScope())}catch(u){console&&console.error&&console.error("An error occured showing the dialog.")}},handleError:function(e){return function(t){console.error(e,!t.toString||t.toString().match(/^\[object/)?t:t.toString())}},getKeyEventScope:function(){return this.name+this._yuid},close:function(e){if(this._destroyed)return;var t=this;this.set("dismissing",!1),this.fire("close"),this.hide(function(){t.destructor(),e&&e()})},destructor:function(){var t=this.get("container");t.detach(),t.remove(),this.set("container",null),this.set("content",null),this.set("appendTo",null),this.set("anchorTo",null),this.set("rootEl",null),this.set("dialogClass",null),this.manager=null,e.FlickrView.prototype.destroy.call(this),this._destroyed=!0,this.fire("destroy"),this.detachAll()},hide:function(r){e.fire("flickr:removeKeyEventScope",this.getKeyEventScope());if(!this.state.visible)return;var i=this,s=this.get("container"),o=this.get("anchorTo"),u=this.get("curtain"),a=!this.state.rendered;this.state.visible=!1,o&&o.removeClass(t.css.anchorSelected),u?(this.set("curtain",null),u.detach(),this.get("dismissCurtainImmediately")?(u.addClass(t.css.hidden),u.remove()):(n.onTransitionEnd(u,function(){u.remove()}),u.addClass(t.css.hidden))):s.addClass(t.css.removed),e.namespace("Views").dialog.util.onTransitionEnd(s,function(){i.set("dismissing",!1),a||i.fire("hide"),i.state.visible||s.addClass(t.css.removed),r&&r()}),s.addClass(t.css.hidden)},toggle:function(e){this[this.state.visible?"hide":"show"](e),this.fire("toggle",this.state.visible)},switchToLoading:function(e){this.switchToUIState("loading",e)},switchToComplete:function(e){this.switchToUIState("complete",e)},switchToLocked:function(e){this.switchToUIState("locked",e)},switchToWorking:function(e){this.switchToUIState("working",e)},switchToUIState:function(e,n){var r;n=n===!1?!1:!0;if(this.state[e]===n)return;this.state[e]=n,r=t.css[e]||t.css.state.replace(/\{\{state\}\}/,e),this.get("container")[n?"addClass":"removeClass"](r)},confirm:function(t,n){t.halt(),this.fire("confirm",n),this.get("hideOnButtonClick")&&this.hide(),e.namespace("Views").dialog.util.log("CONFIRM")},decline:function(t,n){t.halt(),this.fire("decline",n),this.get("hideOnButtonClick")&&this.hide(),e.namespace("Views").dialog.util.log("DECLINE")},dismiss:function(t,n){if(this.isWorking()||!this.get("hideOnCurtainClick"))if(t.target===this.get("curtain"))return;this.set("dismissing",!0),t.halt(),this.fire("dismiss",n),this.hide(),e.namespace("Views").dialog.util.log("DISMISS")}},{ATTRS:{template:{value:"dialog"},anchorTo:{value:null},offsetLeft:{value:0},appendTo:{value:null},appendCurtainTo:{value:null},hideOnCurtainClick:{value:!0},tintCurtain:{value:0},rootEl:{value:e.Node&&e.one(s&&s.body)},content:{value:null},attrs:{value:{}},stack:{value:!1},hideOnButtonClick:{value:!0},visibleShim:{value:!0},positioning:{value:!0},arrow:{value:!1},dropUp:{value:!1},constraints:{value:{}},dialogClass:{value:""},autoCloseable:{value:!0},dismissCurtainImmediately:{value:!1}}}),r["dialog-tooltip"]=e.Base.create("dialog-tooltip",r["dialog-base"],[],{show:function(){this.get("stack")||this.manager&&this.manager.close&&this.manager.close(this),r["dialog-base"].prototype.show.apply(this,arguments),this.renderCurtain()}},{ATTRS:{template:{value:"dialog-tooltip"},offsetLeft:{value:0},visibleShim:{value:!1}}}),r["dialog-modal"]=e.Base.create("dialog-modal",r["dialog-base"],[],{anchorToLayout:function(){this.set("anchorTo",null),r["dialog-base"].prototype.anchorToLayout.apply(this,arguments)},show:function(e,t){var n=t||{},i=n.hideOthers||!1;i?this.get("stack")||this.manager.hide(this):this.get("stack")||this.manager.close(this),r["dialog-base"].prototype.show.call(this,e),this.renderCurtain()}},{ATTRS:{template:{value:"dialog-modal"}}}),r["dialog-alert"]=e.Base.create("dialog-alert",r["dialog-base"],[],{show:function(){this.get("stack")||this.manager.close(this),r["dialog-base"].prototype.show.apply(this,arguments),this.renderCurtain
()}},{ATTRS:{template:{value:"dialog-alert"},offsetLeft:{value:0},visibleShim:{value:!1}}}),r["dialog-cta"]=e.Base.create("dialog-cta",r["dialog-base"],[],{show:function(){this.get("stack")||this.manager.close(this),r["dialog-base"].prototype.show.apply(this,arguments),this.renderCurtain()},hide:function(){this.get("curtain")&&(this.get("curtain").remove(),this.set("curtain",null)),r["dialog-base"].prototype.hide.apply(this,arguments)}},{ATTRS:{template:{value:"dialog-cta"},offsetLeft:{value:0},visibleShim:{value:!1}}}),r["dialog-progress"]=e.Base.create("dialog-progress",r["dialog-base"],[],{},{ATTRS:{template:{value:"dialog-progress"}}}),e.Handlebars.registerHelper("dialogOutlet",function(n){var r=['<div class="'+t.css.content+'">'];return n instanceof e.FlickrView||n instanceof e.Node?r.push("<!--"+(n.name||"DOM-node")+"-->"):r.push((n||"")+""),r.push("</div>"),new e.Handlebars.SafeString(r.join(""))})},"@VERSION@",{requires:["flickr-view","handlebars-base","flutil","hermes-template-dialog-tooltip","hermes-template-dialog-modal","hermes-template-dialog-alert","hermes-template-dialog-cta","flickrui-css"]});
YUI.add("hermes-template-fluid-modal",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){return" html-modal"},3:function(e,t,n,r,i){return" subview-modal"},5:function(e,t,n,r,i){return'<div class="close-x"></div>'},7:function(e,t,n,r,i){var s;return'		<div class="head">\n'+((s=n["if"].call(t!=null?t:{},t!=null?t.navBarView:t,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.program(10,i,0),data:i}))!=null?s:"")+'			<div class="extra"></div>\n		</div>\n'},8:function(e,t,n,r,i){return'				<div class="nav"></div>\n'},10:function(e,t,n,r,i){var s;return'				<div class="title">\n'+((s=n["if"].call(t!=null?t:{},t!=null?t.title:t,{name:"if",hash:{},fn:e.program(11,i,0),inverse:e.program(13,i,0),data:i}))!=null?s:"")+"				</div>\n"},11:function(e,t,n,r,i){var s;return"						"+e.escapeExpression((s=(s=n.title||(t!=null?t.title:t))!=null?s:n.helperMissing,typeof s=="function"?s.call(t!=null?t:{},{name:"title",hash:{},data:i}):s))+"\n"},13:function(e,t,n,r,i){return"						"+e.escapeExpression((n.renderTrustedMarkup||t&&t.renderTrustedMarkup||n.helperMissing).call(t!=null?t:{},t!=null?t.htmlTitle:t,{name:"renderTrustedMarkup",hash:{},data:i}))+"\n"},15:function(e,t,n,r,i){return" lines"},17:function(e,t,n,r,i){var s,o,u=t!=null?t:{};return'			<div class="content text-only '+((s=n["if"].call(u,t!=null?t.noScroll:t,{name:"if",hash:{},fn:e.program(18,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(u,t!=null?t.showFooter:t,{name:"if",hash:{},fn:e.program(20,i,0),inverse:e.noop,data:i}))!=null?s:"")+'">\n				'+e.escapeExpression((o=(o=n.textMessage||(t!=null?t.textMessage:t))!=null?o:n.helperMissing,typeof o=="function"?o.call(u,{name:"textMessage",hash:{},data:i}):o))+"\n			</div>\n"},18:function(e,t,n,r,i){return" no-scroll"},20:function(e,t,n,r,i){return" has-footer"},22:function(e,t,n,r,i){var s,o=t!=null?t:{};return'			<div class="content html-only '+((s=n["if"].call(o,t!=null?t.noScroll:t,{name:"if",hash:{},fn:e.program(18,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(o,t!=null?t.showFooter:t,{name:"if",hash:{},fn:e.program(20,i,0),inverse:e.noop,data:i}))!=null?s:"")+'">\n				'+e.escapeExpression((n.renderTrustedMarkup||t&&t.renderTrustedMarkup||n.helperMissing).call(o,t!=null?t.htmlMessage:t,{name:"renderTrustedMarkup",hash:{},data:i}))+"\n			</div>\n"},24:function(e,t,n,r,i){var s,o=t!=null?t:{};return'			<div class="content subview '+((s=n["if"].call(o,t!=null?t.noScroll:t,{name:"if",hash:{},fn:e.program(18,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(o,t!=null?t.showFooter:t,{name:"if",hash:{},fn:e.program(20,i,0),inverse:e.noop,data:i}))!=null?s:"")+'"></div>\n'},26:function(e,t,n,r,i){var s;return'		<div class="foot">\n'+((s=n["if"].call(t!=null?t:{},(s=t!=null?t.buttons:t)!=null?s.visible:s,{name:"if",hash:{},fn:e.program(27,i,0),inverse:e.noop,data:i}))!=null?s:"")+"		</div>\n"},27:function(e,t,n,r,i){var s,o=t!=null?t:{};return'			<div class="buttons">\n				'+((s=n["if"].call(o,(s=(s=t!=null?t.buttons:t)!=null?s.action:s)!=null?s.visible:s,{name:"if",hash:{},fn:e.program(28,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n				"+((s=n["if"].call(o,(s=(s=t!=null?t.buttons:t)!=null?s.cancel:s)!=null?s.visible:s,{name:"if",hash:{},fn:e.program(33,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n"+((s=n["if"].call(o,(s=t!=null?t.buttons:t)!=null?s.flavorText:s,{name:"if",hash:{},fn:e.program(35,i,0),inverse:e.noop,data:i}))!=null?s:"")+"			</div>\n"},28:function(e,t,n,r,i){var s,o=t!=null?t:{};return'<button class="mini '+((s=n["if"].call(o,(s=(s=t!=null?t.buttons:t)!=null?s.action:s)!=null?s.isDangerous:s,{name:"if",hash:{},fn:e.program(29,i,0),inverse:e.noop,data:i}))!=null?s:"")+' action"'+((s=n["if"].call(o,(s=(s=t!=null?t.buttons:t)!=null?s.action:s)!=null?s.disabled:s,{name:"if",hash:{},fn:e.program(31,i,0),inverse:e.noop,data:i}))!=null?s:"")+">"+e.escapeExpression(e.lambda((s=(s=t!=null?t.buttons:t)!=null?s.action:s)!=null?s.label:s,t))+"</button>"},29:function(e,t,n,r,i){return"danger"},31:function(e,t,n,r,i){return' disabled="disabled"'},33:function(e,t,n,r,i){var s;return'<button class="mini alt cancel">'+e.escapeExpression(e.lambda((s=(s=t!=null?t.buttons:t)!=null?s.cancel:s)!=null?s.label:s,t))+"</button>"},35:function(e,t,n,r,i){var s,o=t!=null?t:{};return'				<div class="flavor-text secondary'+((s=n.unless.call(o,(s=(s=t!=null?t.buttons:t)!=null?s.flavorText:s)!=null?s.visible:s,{name:"unless",hash:{},fn:e.program(36,i,0),inverse:e.noop,data:i}))!=null?s:"")+'">'+e.escapeExpression((n.renderTrustedMarkup||t&&t.renderTrustedMarkup||n.helperMissing).call(o,(s=(s=t!=null?t.buttons:t)!=null?s.flavorText:s)!=null?s.text:s,{name:"renderTrustedMarkup",hash:{},data:i}))+"</div>\n"},36:function(e,t,n,r,i){return" hidden"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o,u=t!=null?t:{};return'<div class="modal'+((s=n["if"].call(u,t!=null?t.htmlMessage:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(u,t!=null?t.subview:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+" "+e.escapeExpression((o=(o=n.classList||(t!=null?t.classList:t))!=null?o:n.helperMissing,typeof o=="function"?o.call(u,{name:"classList",hash:{},data:i}):o))+'">\n	'+((s=n["if"].call(u,t!=null?t.showCancelX:t,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n"+((s=n["if"].call(u,t!=null?t.showHeader:t,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))!=null?s:"")+'	<div class="body'+((s=n["if"].call(u,t!=null?t.showBodyLines:t,{name:"if",hash:{},fn:e.program(15,i,0),inverse:e.noop,data:i}))!=null?s:"")+'">\n'+((s=n["if"].call(u,t!=null?t.textMessage:t,{name:"if",hash:{},fn:e.program(17,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(u,t!=null?t.htmlMessage:t,{name:"if",hash:{},fn:e.program(22,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(u,t!=null?t.subview:t,{name:"if",hash:{},fn:e.program(24,i,0),inverse:e.noop,data:i}))!=null?
s:"")+"	</div>\n"+((s=n["if"].call(u,t!=null?t.showFooter:t,{name:"if",hash:{},fn:e.program(26,i,0),inverse:e.noop,data:i}))!=null?s:"")+"</div>\n"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/fluid-modal",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("attribute-helpers",function(e){function t(e){if(typeof e=="undefined"||e===null)return!0}function n(n){return t(n)?!0:e.Lang.isString(n)?!0:e.Lang.isNumber(n)?!0:!1}function r(t){return e.Lang.isNumber(t)&&(t=t.toString()),e.Lang.isString(t)?t:undefined}function i(n){return t(n)?!0:[!0,!1].indexOf(n)!==-1?!1:n instanceof Array?!1:(typeof n=="string"&&(n=parseInt(n,10)),typeof n=="object"&&typeof n._d!="undefined"&&(n=n._d),e.moment(n).isValid()?!0:!1)}function s(t){var n=null,r=null;if(e.moment.isMoment(t))return t;if(t&&typeof t=="object"&&t._d){r=e.moment(t),r.isValid()||(r=e.moment(t._d));if(r.isValid())return r}return typeof t=="number"||t===parseInt(t,10).toString()?(n=parseInt(t,10),n.toString().length<=10?r=e.moment(n.toString(),"X"):r=e.moment(n),r):t&&!e.Lang.isBoolean(t)&&(e.moment(new Date(t)).isValid()||e.moment(new Date(t.toString().replace(" ","T"))).isValid())?e.moment(t):undefined}function o(n){return t(n)?!0:(e.Lang.isString(n)&&(n=parseInt(n,10)),e.Lang.isNumber(n)?!0:!1)}function u(t){return e.Lang.isString(t)&&(t=parseInt(t,10)),e.Lang.isNumber(t)?t<0?Math.ceil(t):Math.floor(t):undefined}function a(n){return t(n)?!0:(e.Lang.isString(n)&&(n=parseFloat(n)),e.Lang.isNumber(n)?!0:!1)}function f(t){return e.Lang.isString(t)&&(t=parseFloat(t)),e.Lang.isNumber(t)?t:undefined}function l(n){return t(n)?!0:e.Lang.isBoolean(n)?!0:[0,"0","false"].indexOf(n)>-1?!0:[1,"1","true"].indexOf(n)>-1?!0:!1}function c(e){return[!1,"0",0,"false"].indexOf(e)>-1?!1:[!0,"1",1,"true"].indexOf(e)>-1?!0:undefined}e.AttributeHelpers={validateString:n,coerceString:r,validateInteger:o,coerceInteger:u,validateFloat:a,coerceFloat:f,validateBoolean:l,coerceBoolean:c,validateDate:i,coerceDate:s}},"@VERSION@",{requires:[]});
YUI.add("fluid-overlay-manager-view",function(e){"use strict";var t=0,n=e.Base.create("overlayManager",e.Base,[],{add:function(n){var r=this.get("overlay"),i=n.getAttrs(),s=this;this.get("modals").push(n),r?i.dismissOnOverlayClick&&this.set("dismissOnOverlayClick",!0):(r=e.Node.create(this.get("overlayHTML")),e.one("body").append(r),this.set("overlay",r),t++,this.addOverlayClickHandler(r),this.addOverlayKeyHandler(r),i.dismissOnOverlayClick?this.set("dismissOnOverlayClick",!0):this.set("dismissOnOverlayClick",!1)),this.setOverlayStyle(i),i.dismissOnActionClick&&n.on("actionClick",function(){setTimeout(function(){s.close()},0)}),n.name==="fluid-modal-view"&&n.on("cancelClick",function(){setTimeout(function(){s.close()},0)})},setOverlayStyle:function(e){var t="",n="",r="",i=this.get("overlay");e.hideModalOverlay&&(t="transparent"),e.darkOverlay&&(t="dark-overlay"),e.invisibleOverlay&&(n="invisible"),e.overlayClassList&&(r=e.overlayClassList),i.setAttribute("class",this.get("overlayClass")+" "+r+" "+t+" "+n)},addOverlayClickHandler:function(e){e.getDOMNode().addEventListener("click",this.clickHandler.bind(this))},removeOverlayClickHandler:function(e){e.getDOMNode().removeEventListener("click",this.clickHandler.bind(this))},addOverlayKeyHandler:function(t){e.one("body").getDOMNode().addEventListener("keyup",this.keyHandler.bind(this))},removeOverlayKeyHandler:function(t){e.one("body").getDOMNode().removeEventListener("keyup",this.keyHandler.bind(this))},keyHandler:function(e){e.keyCode===27&&this.clickHandler()},clickHandler:function(){var e=this.get("modals").length-2,t="",n="",r="",i,s=this.get("overlay");this.get("dismissOnOverlayClick")&&(this.set("dismissOnOverlayClick",!1),this.close(),e>-1&&this.get("modals").length>0&&(i=this.get("modals")[e].getAttrs(),i.hideModalOverlay&&(t="transparent"),i.invisibleOverlay&&(n="invisible"),i.overlayClassList&&(r=i.overlayClassList),s.setAttribute("class",this.get("overlayClass")+" "+r+" "+t+" "+n),this.set("dismissOnOverlayClick",i.dismissOnOverlayClick)))},remove:function(e){var t=this.get("modals");if(e.isClosed){var n=t.indexOf(e);n>-1?t.splice(n,1):t.length===1&&(n=0,t.splice(n,1)),this.removeOverlay()}},close:function(){var e=this.get("modals").pop();e&&!e.isClosed&&e.close(),this.removeOverlay()},closeAll:function(){var e=this;this.get("modals").forEach(function(t,n){e.close()})},removeOverlay:function(){var e=this.get("overlay");if(this.get("modals").length===0&&e)this.removeOverlayClickHandler(e),this.removeOverlayKeyHandler(e),e.remove(),this.set("overlay",undefined),t--;else{var n=this.get("modals").length-1;n>-1&&this.setOverlayStyle(this.get("modals")[n].getAttrs())}},alreadyShowingModal:function(e){var t=!1;return e||(e="fluid-modal-view"),this.get("modals").forEach(function(n,r){n.name===e&&(t=!0)}),t}},{ATTRS:{modals:{value:[],validator:function(t){return e.Lang.isArray(t)}},overlayHTML:{},overlayClass:{},overlay:{value:undefined},dismissOnOverlayClick:{value:!0,setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},validator:function(t){return e.Lang.isBoolean(t)}}}});e.OverlayManager={DroparoundOverlay:new n({overlayHTML:'<div class="fluid-droparound-overlay"></div>',overlayClass:"fluid-droparound-overlay"}),ModalOverlay:new n({overlayHTML:'<div class="fluid-modal-overlay"><div class="balls"></div></div>',overlayClass:"fluid-modal-overlay"}),SignupInterstitialOverlay:new n({overlayHTML:'<div class="signup-interstitial-overlay interstitial-fade"></div>',overlayClass:"signup-interstitial-overlay interstitial-fade"}),ChalkboardOverlay:new n({overlayHTML:'<div class="fluid-chalkboard-overlay"></div>',overlayClass:"fluid-chalkboard-overlay"}),hasOverlay:function(){return t>0}}},"@VERSION@",{requires:["base","flickr-view","attribute-helpers","fluid-css","fluid-balls-css"],optional:[],langBundles:[],optionalRequires:["fluid"]});
YUI.add("fluid",function(e){"use strict";function n(){var n="",r=[];if(!t.prefix&&"getComputedStyle"in e.config.win){var i=e.config.win.getComputedStyle(e.config.doc.documentElement,"");if(!i)return t.prefix;r=Array.prototype.slice.call(e.config.win.getComputedStyle(e.config.doc.documentElement,"")),n=r.join("").match(/-(webkit|moz|ms)-/),n=n&&n.length>1?n[1]:"",t.prefix.raw=n.toLowerCase(),t.prefix.css="-"+n+"-",t.prefix.js=n.charAt(0).toUpperCase()+n.slice(1),t.prefix.dom="WebKit|Moz|MS".match(new RegExp("("+n+")","i"))[1]}return t.prefix}function r(t,n){return n=n||e.config.win,new e.Promise(function(r,i){setTimeout(e.bind(function(){r(t.call(n))},n),1)})}function i(e,n,r){return t.prefix.css!==""?r.getDOMNode().style.setProperty(t.prefix.css+e,n,null):r.setStyle(e,n),r}function s(n){var r=!1;return n+="",r=n in e.config.doc.body.style,r||(n=n.charAt(0).toUpperCase()+n.slice(1),r=t.prefix.raw+n in e.config.doc.body.style),r}function o(n,r){return r=r||{timeout:1e4,retry:!1},r.timeout=parseInt(r.timeout,10),isNaN(r.timeout)&&(r.timeout=1e4),new e.Promise(function(e,i){t.loadImage.imageQueue.push({src:n,options:r,done:e,error:i}),u()})}function u(){var e=null;t.loadImage.currentWorkers<t.loadImage.maxWorkers-1&&t.loadImage.imageQueue.length&&(t.loadImage.currentWorkers++,e={image:new Image,work:t.loadImage.imageQueue.shift(),timeout:null,loaded:null,finished:null},e.finished=function(e){return function(n){clearTimeout(e.timeout),e.image.removeEventListener("load",e.finished),e.image.removeEventListener("error",e.finished),e.image.removeEventListener("abort",e.finished),n.type==="load"?e.work.done(e.work.src):e.work.options.retry?o(e.work.src,{retry:!1,timeout:e.work.options.timeout}).then(function(e){return function(t){e(t)}}(e.work.done),function(e){return function(t){e(t)}}(e.work.done)):e.work.error(e.work.src),e.image=null,e=null,t.loadImage.currentWorkers--,u()}}(e),e.image.addEventListener("load",e.finished),e.image.addEventListener("error",e.finished),e.image.addEventListener("abort",e.finished),e.image.src=e.work.src,e.timeout=setTimeout(function(e){return function(){e.finished({type:"error"})}}(e),e.work.options.timeout),e.image.complete&&e.finished({type:"load"}))}function a(n){return n="https:"+n,new e.Promise(function(e,r){t.loadImageFastLane.imageHash[n]={done:e,error:r},t.loadImageFastLane.imageQueue.push(n),f()})}function f(){var e,n;t.loadImageFastLane.currentWorkers<t.loadImageFastLane.maxWorkers&&t.loadImageFastLane.imageQueue.length&&(e=t.loadImageFastLane.imageQueue.shift(),n=l(),n.onmessage=function(e){var n=e.data;t.loadImageFastLane.imageHash[n].done(n),t.loadImageFastLane.currentWorkers--,f()}.bind(this),n.postMessage(e),t.loadImageFastLane.currentWorkers++)}function l(){var e=window.URL||window.webkitURL,t;return t=e.createObjectURL(new Blob(["(",function(){self.onmessage=function(e){var t=new XMLHttpRequest,n=e.data;t.responseType="blob",t.onerror=function(){self.postMessage(n),self.close()},t.onload=function(){self.postMessage(n),self.close()},t.open("GET",n,!0),t.withCredentials=!0,t.send()}}.toString(),")()"],{type:"application/javascript"})),new Worker(t)}function c(t){var n;return t&&(n=e.config.doc.createElement("div"),n.appendChild(e.config.doc.createTextNode(t)),t=n.innerHTML),t}function h(t){var n,r;return e.config.doc.selection?(r=e.config.doc.selection.createRange(),r.moveStart=("character",-t.get("value").length),n=r.text.length):typeof t.get("selectionStart")=="number"&&(n=t.get("selectionStart")),n}function p(){var t="";return typeof e.config.win.getSelection!="undefined"?t=e.config.win.getSelection().toString():typeof e.config.doc.selection!="undefined"&&e.config.doc.selection.type==="Text"&&(t=e.config.doc.selection.createRange().text),t}function d(e){var t={"\u24b6":"A","\uff21":"A","\u00c0":"A","\u00c1":"A","\u00c2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\u00c3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\u00c4":"A","\u01de":"A","\u1ea2":"A","\u00c5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\u00c6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u00c7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\u00c8":"E","\u00c9":"E","\u00ca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\u00cb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\u00cc":"I","\u00cd":"I","\u00ce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\u00cf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69"
:"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\u00d1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\u00d2":"O","\u00d3":"O","\u00d4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\u00d5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\u00d6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\u00d8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u0152":"OE","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u1e9e":"SS","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\u00d9":"U","\u00da":"U","\u00db":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\u00dc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\u00dd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\u00e0":"a","\u00e1":"a","\u00e2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\u00e3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\u00e4":"a","\u01df":"a","\u1ea3":"a","\u00e5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\u00e6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u00e7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\u00e8":"e","\u00e9":"e","\u00ea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\u00eb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\u00ec":"i","\u00ed":"i","\u00ee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\u00ef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\u00f1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\u00f2":"o","\u00f3"
:"o","\u00f4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\u00f5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\u00f6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\u00f8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u0153":"oe","\u0276":"oe","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u017f":"s","\u1e9b":"s","\u00df":"ss","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\u00f9":"u","\u00fa":"u","\u00fb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\u00fc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\u00fd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\u00ff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\uff10":"0","\u2080":"0","\u24ea":"0","\u2070":"0","\u00b9":"1","\u2474":"1","\u2081":"1","\u2776":"1","\u24f5":"1","\u2488":"1","\u2460":"1","\uff11":"1","\u00b2":"2","\u2777":"2","\u2475":"2","\uff12":"2","\u2082":"2","\u24f6":"2","\u2461":"2","\u2489":"2","\u00b3":"3","\uff13":"3","\u248a":"3","\u2476":"3","\u2083":"3","\u2778":"3","\u24f7":"3","\u2462":"3","\u24f8":"4","\u2463":"4","\u248b":"4","\uff14":"4","\u2074":"4","\u2084":"4","\u2779":"4","\u2477":"4","\u248c":"5","\u2085":"5","\u24f9":"5","\u2478":"5","\u277a":"5","\u2464":"5","\uff15":"5","\u2075":"5","\u2479":"6","\u2076":"6","\uff16":"6","\u277b":"6","\u2086":"6","\u2465":"6","\u24fa":"6","\u248d":"6","\uff17":"7","\u2077":"7","\u277c":"7","\u24fb":"7","\u248e":"7","\u2087":"7","\u247a":"7","\u2466":"7","\u2467":"8","\u248f":"8","\u24fc":"8","\u247b":"8","\u2078":"8","\uff18":"8","\u277d":"8","\u2088":"8","\u24fd":"9","\uff19":"9","\u2490":"9","\u277e":"9","\u247c":"9","\u2089":"9","\u2468":"9","\u2079":"9"},n=e.split(""),r=!1,i,s;for(i=n.length-1;i>=0;i--)s=n[i],t.hasOwnProperty(s)&&(n[i]=t[s],r=!0);return r&&(e=n.join("")),e}var t={prefix:{raw:"",css:"",js:"",dom:""},loadImage:{maxWorkers:8,currentWorkers:0,imageQueue:[],workingWorkers:[]},loadImageFastLane:{maxWorkers:8,currentWorkers:0,imageHash:{},imageQueue:[],availabeWorkers:[],workingWorkers:[]}};(function(){n()})(),e.namespace("fluid"),e.mix(e.fluid,{determineBrowserPrefix:n,setStylePrefixed:i,supports:s,prefix:t.prefix,chill:r,loadImage:o,loadImageFastLane:a,escapeHtml:c,getTextFieldCursorPosition:h,getTextFieldSelection:p,removeDiacritics:d})},"@VERSION@",{requires:["flickr-promise"],optional:[],affinity:"client"});
YUI.add("fluid-modal-view",function(e,t){"use strict";var n=require("lib/flog")(t),r,i;r={css:{destinationContainer:"body",closeX:".close-x",buttonCancel:"button.cancel",buttonAction:"button.action",navBarContent:".head .nav",subviewContent:".content.subview",modalContent:".body .content"},options:{}},i={supportsTransform:!1,modal:{height:0,width:0}},e.namespace("Views").FluidModal=e.FlickrView.create(this.name,e.FlickrView,[],{langBundles:this.details.langBundles,initializer:function(e){this.set("isActiveViewAgnostic",!0);var t=this.get("modalOverlayType");return this.alreadyShowingModal=t.alreadyShowingModal(),this.alreadyShowingModal||t.add(this),this},activate:function(){var t=this.get("container"),n=this;return this.get("showCancelX")&&this.registerEventHandler(t.one(r.css.closeX).on("click",e.bind(this.handleCancel,this))),this.get("showFooter")&&this.get("showCancelButton")&&this.get("showButtons")&&this.registerEventHandler(t.one(r.css.buttonCancel).on("click",e.bind(this.handleCancel,this))),this.get("showFooter")&&this.get("showActionButton")&&this.get("showButtons")&&this.registerEventHandler(t.one(r.css.buttonAction).on("click",e.bind(this.handleAction,this))),this.registerEventHandler(this.appContext.flapp.on("activeViewChange",function(e){n.close(e)})),this.registerEventHandler(e.globalEvents.subscribe("window:resize",function(e){n.reposition()})),this.get("navBarView")&&n.get("navBarView").activate(),this.get("subview")&&(n.get("subview").activate(),n.registerEventHandler(n.get("subview").on("actionClick",e.bind(n.handleAction,n)))),this.fire("activated"),this},show:function(){return this.initialize().then(null,function(e){n.error("Error initializing modal",{err:e})}),this.isClosed=!1,this.freeze(),e.fire("flickr:setKeyEventScope",this.getKeyEventScope()),this},freeze:function(){e.one("body").setStyles({overflow:"hidden"})},unfreeze:function(){e.one("body").setStyles({overflow:"visible"})},enableActionButton:function(){var e=this.get("container").one("button.action");e&&e.getAttribute("disabled")&&e.removeAttribute("disabled")},disableActionButton:function(){var e=this.get("container").one("button.action");e&&e.setAttribute("disabled",!0)},showFlavorText:function(){var e=this.get("container").one(".buttons .flavor-text");e&&e.removeClass("hidden")},hideFlavorText:function(){var e=this.get("container").one(".buttons .flavor-text");e&&e.addClass("hidden")},buildContainer:function(){if(!this.alreadyShowingModal){var t=this,s=e.one(r.css.destinationContainer),o;o={showCancelX:this.get("showCancelX"),title:this.get("title"),htmlTitle:this.get("htmlTitle"),navBarView:!!this.get("navBarView"),noScroll:this.get("noScroll"),textMessage:this.get("textMessage"),htmlMessage:this.get("message")?this.get("message"):this.get("htmlMessage"),subview:!!this.get("subview"),showBodyLines:this.get("showBodyLines"),hideModalOverlay:this.get("hideModalOverlay"),darkOverlay:this.get("darkOverlay"),showHeader:this.get("showHeader"),showFooter:this.get("showFooter"),buttons:{visible:this.get("showButtons"),action:{visible:this.get("showActionButton"),label:this.get("actionButtonLabel"),disabled:this.get("actionButtonDisabled"),isDangerous:this.get("actionButtonIsDangerous")},cancel:{visible:this.get("showCancelButton"),label:this.get("cancelButtonLabel")}},classList:this.get("classList")},this.get("buttonFlavorText")&&(o.buttons.flavorText={visible:this.get("showButtonFlavorText"),text:this.get("buttonFlavorText")}),this.setContainerWithTemplate("fluid-modal",o),i.modal.width=this.get("width"),i.modal.minWidth=this.get("minWidth"),i.modal.height=this.get("height"),this.get("navBarView")&&(this.get("navBarView").appContext=t.appContext,this.get("navBarView").initialize().then(function(e){e.on("subviewViewEvent",function(e){e&&e.details&&e.details.length&&(t.get("subview")&&e.details[0]==="navigation"?t.get("subview").fire.apply(t.get("subview"),["parentViewEvent"].concat(e.details)):t.get("subview")&&e.details[0]==="search"&&t.get("subview").fire.apply(t.get("subview"),["parentViewEvent"].concat(e.details)),t.fire.apply(t,e.details))}),t.get("container").one(r.css.navBarContent).appendChild(e.get("container")),t.get("subview")||t.activate()})),this.get("subview")?(this.get("subview").appContext=t.appContext,this.get("subview").set("isActiveViewAgnostic",!0),this.get("subview").initialize().then(function(e){t.on("parentViewEvent",function(t){t&&t.details&&t.details.length&&e.fire.apply(e,["parentViewEvent"].concat(t.details))}),e.on("subviewViewEvent",function(e){e&&e.details&&e.details.length&&(t.get("navBarView")&&e.details[0]==="backToList"&&t.get("navBarView").fire.apply(t.get("navBarView"),["parentViewEvent"].concat(e.details)),t.fire.apply(t,e.details))}),t.get("container").one(r.css.subviewContent).appendChild(e.get("container")),s&&(s.append(t.get("container")),t.reposition()),t.activate()},function(e){n.error("Error initializing modal subview",{err:e})})):s&&(s.append(this.get("container")),this.reposition())}return this},reposition:function(){var t=this.get("container"),n=t.one(this.get("modalSelector")),s=e.one(e.config.win),o=parseInt(s.get("innerWidth"),10),u=parseInt(s.get("innerHeight"),10),a=i.modal.width?parseInt(i.modal.width,10):parseInt(n.getComputedStyle("width"),10),f,l=20,c={},h,p,d=n.one(".body"),v=0,m=this.get("showFooter")?parseInt(n.one(".foot").getComputedStyle("height"),10):0,g=0,y=parseInt(d.getComputedStyle("borderTopWidth"),10)+parseInt(d.getComputedStyle("borderBottomWidth"),10),b={};i.modal.height&&(v=parseInt(n.one(".head").getComputedStyle("height"),10),g=i.modal.height,n.get("showFooter")&&(m=parseInt(n.one(".foot").getComputedStyle("height"),10)),i.modal.height+v+m+4*l+y>=u&&(u<=700?g=u-v-m-y:g=u-v-m-4*l-y),n.setStyles({maxHeight:"none"}),this.get("fullWindow")?b.height=g+"px":this.get("maxHeight")&&(b.maxHeight=g+"px"),n.one(r.css.modalContent).setStyles(b)),f=parseInt(n.getComputedStyle("height"),10),h=n.getDOMNode().scrollHeight,p=n.getDOMNode().scrollWidth,c={
top:"50%",left:"50%",width:i.modal.width?a+"px":"",marginTop:-(f/2)+"px",marginLeft:-(a/2)+"px",minWidth:i.modal.minWidth?i.modal.minWidth+"px":""},f+2*l>u||h>f+1||a+2*l>o||p>a?(u<=700&&i.modal.height?c.maxHeight=u-10+"px":(c.maxHeight=u-2*l+"px",c.overflow="auto"),c.maxWidth=o-2*l+"px",c.marginTop=-(Math.min(parseInt(c.maxHeight,10),f)/2)+"px",c.marginLeft=-(Math.min(parseInt(c.maxWidth,10),a)/2)+"px"):(c.maxHeight="inherit",c.maxWidth="inherit",c.overflow="visible"),n.setStyles(c)},handleCancel:function(n){var r=this.get("subview");e.rapidTracker.beacon(t,"modalCancelClick"),r&&r.handleCancel&&r.handleCancel(),this.fire("cancelClick",n),this.close(n)},handleAction:function(e){var t=this.get("subview");this.fire("actionClick",e),t&&t.handleAction&&t.handleAction(),this.get("dismissOnActionClick")&&this.close(e)},close:function(t){e.fire("flickr:removeKeyEventScope",this.getKeyEventScope());var n=this.get("container");this.isClosed=!0,e.one("body").removeClass("scroll-fluid-modal"),this.get("subview")&&this.get("subview").destroy(),this.get("navBarView")&&this.get("navBarView").destroy(),n&&n.remove(!0),this.fire("close",t),this.destroy(),this.get("modalOverlayType").remove(this)},getKeyEventScope:function(){return this.name+this._yuid},destructor:function(){this.unfreeze(),this.detachAll()}},{ATTRS:{showCancelX:{value:!0},showCancelButton:{value:!0},showBodyLines:{value:!1},showActionButton:{value:!0},hideModalOverlay:{value:!1},darkOverlay:{value:!1},actionButtonLabel:{valueFn:function(){return this.intlMessage({intlName:"common.OK"})}},actionButtonIsDangerous:{value:!1},cancelButtonLabel:{valueFn:function(){return this.intlMessage({intlName:"common.CANCEL"})}},actionButtonDisabled:{value:!1},showButtons:{value:!0},dismissOnOverlayClick:{value:!1},dismissOnActionClick:{value:!0},title:{value:""},htmlTitle:{value:""},navBarView:{value:null},message:{value:null},textMessage:{value:null},htmlMessage:{value:null},width:{value:0},minWidth:{value:0},height:{value:0},fullWindow:{value:!1},subview:{value:null},classList:{value:""},buttonFlavorText:{value:""},showButtonFlavorText:{value:!0},showHeader:{value:!0},showFooter:{value:!0},noScroll:{value:!1},maxHeight:{value:!0},modalSelector:{value:".modal"},modalOverlayType:{value:e.OverlayManager.ModalOverlay}}})},"@VERSION@",{requires:["flickr-view","fluid-css","hermes-template-fluid-modal","fluid-overlay-manager-view"],optionalRequires:["fluid"],langBundles:["common"]});
YUI.add("hermes-lang-common",function(e,t){e.Intl.add("hermes/common","en-US",{SIGN_UP:["Sign Up"],YOU:["You"],PHOTOSTREAM:["Photostream"],SETS:["Sets"],ALBUMS:["Albums"],MAP:["Map"],FAVORITES:["Favorites"],GALLERIES:["Galleries"],COLLECTIONS:["Collections"],ARCHIVES:["Archives"],TAGS:["Tags"],PHOTOS_OF:["Photos of"],PROFILE:["Profile"],POPULAR:["Popular"],EXPLORE:["Explore"],ACTIVITY:["Recent activity"],STATS:["Stats"],ORGANIZE:["Organize"],HELP:["Help"],SETTINGS:["Settings"],SIGN_OUT:["Sign Out"],FLICKRMAIL:["FlickrMail"],ERROR:["Error"],OK:["OK"],OOPS:["Oops!"],SIGN_IN:["Sign in"],FORGET_IT:["Forget it"],WARNING:["Warning"],DONE:["Done"],ZOINKS:["Zoinks!"],CANCEL:["Cancel"],ON:["On"],OFF:["Off"],ABOUT:["About"],JOBS:["Jobs"],BLOG:["Blog"],APPS:["Apps"],BRAND:["Brand"],DEVELOPERS:["Developers"],STATUS:["Status"],COMMUNITY_GUIDELINES:["Community guidelines"],REPORT_ABUSE:["Report abuse"],PRIVACY:["Privacy"],TERMS:["Terms"],YAHOO_SAFELY:["Yahoo Safely"],FEEDBACK:["Feedback"],MOBILE:["Mobile"],APP_GARDEN:["App Garden"],COMMUNITY:["Community"],API_DOC:["API Doc"],DEVELOPER_GUIDE:["Developer Guide"],DEVELOPER_BLOG:["Developer Blog"],HELP_FORUM:["Help forum"],GUIDELINES:["Guidelines"],NUMBER:[{type:"number",valueName:"num"}],RETRY:["Retry"],EDIT:["Edit"],MORE:["More"],DELETE:["Delete"],LOADING:["Loading"],FOLLOW:["Follow"],FOLLOWING:["Following"],UNFOLLOW:["Unfollow"],FRIEND:["Friend"],FRIENDS:["Friends"],FAMILY:["Family"],PUBLIC:["Public"],FRIENDS_AND_FAMILY:["Friends & Family"],FRIEND_AND_FAMILY:["Friend & Family"],ALL:["All"],A_YAHOO_COMPANY:["Flickr, a Yahoo company"],A_YAHOO_COMPANY_WITH_LINK:['Flickr, <a href="https://info.yahoo.com">a Yahoo company</a>'],CONFIRMATION:["Confirmation"],FAVORITE:["Favorite"],SEARCH:["Search"],CONFIRM:["Confirm"],SELECT:["Select"],NEW:["New"],LOADING_WITH_ELLIPSES:["Loading..."],NONE:["None"],TITLE:["Title"],DESCRIPTION:["Description"],DECLINE:["Decline"],ACCEPT:["Accept"],CIRCA:["Circa"],SOMETIME_IN:["Sometime in..."],JANUARY:["January"],FEBRUARY:["February"],MARCH:["March"],APRIL:["April"],MAY:["May"],JUNE:["June"],JULY:["July"],AUGUST:["August"],SEPTEMBER:["September"],OCTOBER:["October"],NOVEMBER:["November"],DECEMBER:["December"],SAVE:["Save"],PLEASE_TRY_AGAIN:["Please try again"],YES:["Yes"],SQUARE:["Square"],THUMBNAIL:["Thumbnail"],SMALL:["Small"],MEDIUM:["Medium"],LARGE:["Large"],ORIGINAL:["Original"],REPLACE:["Replace"],SAVING:["Saving"],REPLACING:["Replacing"],JOIN:["Join"],SELECTED:[{type:"plural",valueName:"count",options:{one:"${#} selected",other:"${#} selected"}}],PREVIEW:["Preview"],DATE_TAKEN:["Date Taken"],DATE_POSTED:["Date Posted"],DATE_UPLOADED:["Date Uploaded"],PEOPLE:["People"],BETA:["Beta"],INVALID_DATE:["Invalid Date."],INVALID_DATE_TAKEN:["Invalid Date Taken."],INVALID_DATE_POSTED:["Invalid Date Posted."],INVALID_DATE_UPLOADED:["Invalid Date Uploaded."],FUTURE_DATE_POSTED:["Date Posted is set to the future."],FUTURE_DATE_UPLOADED:["Date Uploaded is set to the future."],INVALID_DATE_VALUE:["One or more of the dates you entered was invalid."],INVALID_DATE_TAKEN_VALUE:["Date Taken value is invalid."],INVALID_DATE_POSTED_VALUE:["Date Posted value is invalid."],INVALID_DATE_UPLOADED_VALUE:["Date Uploaded value is invalid."],JOIN_FLICKR:["Join Flickr"],DATE_UPLOADED_BEFORE_ACCOUNT:["Date Uploaded must be after your account creation date of ",{type:"date",valueName:"intlDate",format:"long"},"."],DOWNLOAD:["Download"],CHOOSE_VALID_DATE:["Please choose a valid date."],CHANGE:["Change"],FUTURE_DATE_TAKEN:["Date Taken is set to the future."],BY_USER:["by ","${user}"],BY_YOU:["by YOU!"],PHOTO_SELECTOR_ERROR_MESSAGE_GENERIC:["There was a problem uploading your photo. Please try again."],PHOTO_SELECTOR_ERROR_MESSAGE_FILE_TYPE:["Looks like this photo has an invalid file type. Upload a photo that is either a PNG or JPG."],PHOTO_SELECTOR_ERROR_MESSAGE_FILE_SIZE:["Looks like this photo is too large to upload. The largest photo size we can upload is 250 MB."],PHOTO_SELECTOR_ERROR_MESSAGE_FILE_COUNT:["Select only one photo to upload."],PHOTO_SELECTOR_ERROR_MESSAGE_LOW_QUALITY:['Looks like this photo doesn\'t meet the minimum requirements to get printed. Please choose a photo that\'s at least 975 &times; 825 pixels. Learn more about <a href="http://help.yahoo.com/kb/index?page=content&y=PROD_FLICKR&locale=en_US&id=SLN22567" target="_blank">requirements</a> for print products.'],PHOTO_SELECTOR_ERROR_MESSAGE_COLOR_SPACE:['Sorry, we cannot print photos with a CMYK or ProPhoto RGB colorspace. We recommend photos with an sRGB color space. <a href="https://help.yahoo.com/kb/flickr/creations-faq-sln22216.html?impressions=true#cont33" target="_blank">Learn more</a>.'],PHOTO_SELECTOR_BACK_TO_ALBUM_LIST:["Back to album list"],PHOTO_SELECTOR_BACK_TO_CATEGORY_LIST:["Back to category list"],PHOTO_SELECTOR_BACK_TO_SEARCH_LIST:["Back to search list"],MARKETPLACE:["Marketplace"],USERS_FAVES:["${who}","\u2019s favorites"],USERS_ALBUMS:["${who}","\u2019s albums"],LOAD_MORE_RESULTS:["Load more results"],CREATE_AN_ACCOUNT:["Create an account"],SIGN_IN_MESSAGE:["Sign in to Flickr using your Yahoo account to get started."],MISMATCHED_NSID_ERROR:['Something went wrong. Click "OK" to reload the page, or "Cancel" if you want to continue to browse the page (you won\'t be able to perform any actions, however).'],NETWORK_CONNECTIVITY_ISSUE:['Something went wrong reading data from our server.  Please verify your network settings and browser plugin/extension configurations.<br><br>Click "OK" to reload the page, or "Cancel" if you want to continue to browse the page (you may not be able to perform any actions, however).'],IE_STORAGE_ISSUE:['Something went wrong displaying images in your browser.  Please verify your browser settings at <b>Tools > Internet Options > General tab, Browsing history, \'Settings\' button > caches and databases</b>.<br><br>Click "OK" to reload the page, or "Cancel" if you want to continue to browse the page (you may not be able to perform any actions, however).'
],PHOTO_REMOVE_ERROR:["Something went wrong removing the photo...please try again."],LEARN_MORE:["Learn more"],LEARN_MORE_ABOUT_PRO:["Learn more about Pro"],EVERYTHING:["Everything"],ALPHA:["Alpha"],BACK:["Back"],UNTITLED:["Untitled"],HIDE_PHOTOS_FROM_PERSON:["Temporarily hide all photos from this person"],SHOW_MORE:["Show more"],CHOOSE_FILE:["Choose file"],PHOTO_BOOKS:["Photo books"],WALL_ART:["Wall art"],UPLOADING:["Uploading"],NUMERIC_PROGRESS_COUNT:["${progress}"," of ","${total}"],UPLOAD_DROP_TARGET:["Let go! We'll take it from here."],DRAG_AND_DROP:["You can drag and drop photos anywhere on this page"],OR:["or"],SELECT_FILES_TO_UPLOAD:["Select files to upload"],INSTALL:["Install"],INSTALL_FLICKR_UPLOADER_FOR_MAC:["Install Flickr Uploadr for Mac to quickly and safely backup your entire photo collection."],INSTALL_FLICKR_UPLOADER_FOR_WINDOWS:["Install Flickr Uploadr for Windows to quickly and safely backup your entire photo collection."],FLICKR_IS_ALMOST_CERTAINLY:["Flickr is almost certainly the best online photo management and sharing application in the world. Show off your favorite photos and videos to the world, securely and privately show content to your friends and family, or blog the photos and videos you take with a cameraphone."],TOGGLE_SLIDESHOW:["Toggle slideshow"],UPLOAD_MORE_INFO:['For details about our supported file formats, <a href="https://help.yahoo.com/kb/flickr/upload-limitations-flickr-sln15628.html" target="_blank">click here</a>.'],UPLOAD_ERROR_TITLE:["Uh oh..."],UPLOAD_ERROR_CATEGORY_INVALID:['Either we don\'t support these file types, or the files are damaged. <a href="https://help.yahoo.com/kb/flickr/upload-limitations-flickr-sln15628.html" target="_blank">Click here</a> for more info.'],UPLOAD_ERROR_CATEGORY_GENERIC:['These files failed to upload. You might try uploading them again. <a href="https://help.yahoo.com/kb/flickr/upload-limitations-flickr-sln15628.html" target="_blank">Click here</a> for more info.'],TRY_MDOT:["Try Flickr optimized for your mobile device"],VIDEO_NOT_SUPPORTED:["I'm sorry. Your browser doesn't support HTML5 video."],UNBLOCK:["Unblock"],START_SLIDESHOW:["Start slideshow"],EACH_FLICKR_ACCOUNT_HAS_STORAGE:["Each Flickr account comes with 1,000GB of free photo storage."],BUY_LICENSE:["License"],BUY_PHOTO:["Buy photo"],BUY:["Buy"],LICENSE_PHOTO:["License photo"],HAVE_YAHOO_ACCOUNT:["Have a Yahoo account?"],SIGN_UP_WITH_YAHOO:["Sign up with Yahoo"],SIGN_INTO_FLICKR:["Sign into Flickr"],NEVER_DELETE_WITH_ONE_TB:["Never delete a photo again with one terabyte of free storage."],CLICK_BUTTON_THIRD_PARTY:["Clicking this button will take you to a third party website."],LICENSE_TITLE_0:["All rights reserved"],LICENSE_DESC_0:["You must request permission from the creator to use this work."],LICENSE_TITLE_1:["Attribution, non-commercial, share alike"],LICENSE_DESC_1:["You can use this work, but only in a non-commercial way, so long as credit is given to the creator. You must then allow your work to be used under the same terms."],LICENSE_TITLE_2:["Attribution, non-commercial"],LICENSE_DESC_2:["You can use this work, but only in a non-commercial way, so long as credit is given to the creator."],LICENSE_TITLE_3:["Attribution, non-commercial, no derivatives"],LICENSE_DESC_3:["You can use this work, in its original form without any modifications and only in a non-commercial way, so long as credit is given to the creator."],LICENSE_TITLE_4:["Attribution only"],LICENSE_DESC_4:["You can use this work so long as credit is given to the creator."],LICENSE_TITLE_5:["Attribution, share alike"],LICENSE_DESC_5:["You can use this work so long as credit is given to the creator. You must then allow your work to be used under the same terms."],LICENSE_TITLE_6:["Attribution, no derivatives"],LICENSE_DESC_6:["You can use this work, in its original form without any modifications, so long as credit is given to the creator."],LICENSE_TITLE_7:["No known restrictions"],LICENSE_DESC_7:["The individual or organization posting the work is unaware of any restrictions. You should review the work prior to proceeding with use."],LICENSE_TITLE_8:["U.S. government works"],LICENSE_DESC_8:["Copyright protection is not available for any work of the United States Government."],LICENSE_TITLE_9:["Dedicated public domain work"],LICENSE_DESC_9:["You can use this work since the copyright is no longer enforced."],LICENSE_TITLE_10:["Public domain work"],LICENSE_DESC_10:["You can use this work since the copyright has expired."],TRENDING:["Trending"],GROUP_YOUR_BEST_SHOT:["Your Best Shot 2015"],DELETED_USER:["deleted"],EXPLORE_SLOW:["We're having some trouble displaying Explore at the moment. Please try again."],MODULES_BLOCKED:['Something went wrong loading required modules to display this page.  Please disable any browser extensions that may be blocking the page resources.<br><br>After disabling extensions, click "OK" to reload the page, or "Cancel" if you want to continue to browse the page (you may not be able to perform any actions, however).']})},"@VERSION@",{requires:["intl"]});
YUI.add("model-proxy",function(e,t){var n=require("lib/flog")(t);e.getModelProxyConstructor=function(t){function i(e){return function(){var n=new Array(arguments.length);for(var r=0;r<n.length;++r)n[r]=arguments[r];return n.unshift(this.id),t[e].apply(t,n)}}var r;return r=function(e){this.id=e,this.registry=t,this.isModel=!0},r.prototype={},e.getModelProxyConstructor.skipList.forEach(function(e){r.prototype[e]=function(){var t=new Error("Registry methods are not exposed on models.");throw n.error({err:t,method:e}),t}}),e.Object.each(t,function(t,n){if(r.prototype[n])return;if(n.indexOf("_")===0)return;if(!e.Lang.isFunction(t))return;if(Object.keys(t.prototype).length>0)return;r.prototype[n]=i(n)},this,!0),r},e.getModelProxyConstructor.skipList=["add","get","load","proxy","remoteRead","remoteCreate","attributeSearch","removeAll","getCount","serialize","deserialize"]},"@VERSION@",{requires:[]});
YUI.add("flickr-collection",function(e){var t={},n;n=e.FlickrCollection=function(e,t,n){this.registry=e,this.id=t,this.attrName=n,this._data=[],this.fetchedStart=!1,this.fetchedEnd=!1,this.totalItems=Number.MAX_VALUE},n.prototype={constructor:n,push:function(e){var t=this._data.concat();t.push(e),this.registry.setValue(this.id,this.attrName,t)},unshift:function(e){var t=this._data.concat();t.unshift(e),this.registry.setValue(this.id,this.attrName,t)},concat:function(e){var t=this._data.concat(e);this.registry.setValue(this.id,this.attrName,t)},remove:function(e){typeof e=="string"&&(e={id:e});var t=this.find(e,!0),n;return t&&(n=this._data.concat(),n.splice(t.index,1),this.registry.setValue(this.id,this.attrName,n)),t&&t.value},find:function(e,t){if(!e)return null;var n=null,r=Object.keys(e);return this._data.some(function(t,i){if(!t)return;if(r.every(function(n){return t[n]===e[n]}))return n={value:t,index:i},!0}),t?n:n?n.value:null},getFirstItem:function(){var e,t;for(e=0;e<this._data.length;e++){t=this._data[e];if(t)return{item:t,index:e}}return null},getLastItem:function(){var e,t;for(e=this._data.length-1;e>=0;e--){t=this._data[e];if(t)return{item:t,index:e}}return null},getList:function(){return this._data.concat()},size:function(){return this._data.length},toJSON:function(){var t=[];return e.Array.each(this.getList(),function(e){e&&t.push(e.toJSON())}),t},toString:function(){return this.registry.name+'["'+this.attrName+'"]'},appendToListMulti:function(e){this.concat(e)},appendToList:function(e){this.push(e)},prependToList:function(e){this.unshift(e)},getFromListByID:function(e,t){var n={},r;return n[t||"id"]=e,r=this.find(n),r?r:undefined},removeFromList:function(e,t){var n={};return n[t||"id"]=e,this.remove(n)},hasMinBoundary:function(){return this.fetchedStart},hasMaxBoundary:function(){return this.fetchedEnd},_setValue:function(e){this._data=e}},e.FlickrCollection.executeFetch=function(n,r,i,s){var o,u;return!s||!e.Lang.isFunction(s.run)?e.Promise.reject("(flickr-collection::executeFetch) invalid fetcher for "+r.name+"["+i+"]"):(o=JSON.stringify(n),u=t[o],u?u:(t[o]=s.run.call(s,n,r.appContext).then(function(e){return delete t[o],e},function(e){throw delete t[o],e}),t[o]))},e.FlickrCollection.trimArray=function(e){var t=0,n=e.length-1;while(t<e.length&&!e[t])t++;while(n>t&&!e[n])n--;return e.slice(t,n+1)}},"@VERSION@",{requires:[]});
YUI.add("paged-collection",function(e,t){function r(t){var r={page:1,perPage:0,pageContent:[]};return t?(t instanceof Array&&(t={pageContent:t}),t=e.merge(r,t),t):(n.warn("No pageData sent to PagedCollection; aborting."),null)}var n=require("lib/flog")(t);e.PagedCollection=function(e,t,n,r){this.constructor.superclass.constructor.call(this,e,t,n),r&&(r instanceof Array&&(r={pageContent:r,page:1,perPage:r.length}),r.totalPages&&(this.totalPages=r.totalPages),r.totalItems&&(this.totalItems=r.totalItems),this.fetchedStart=!!r.fetchedStart,this.fetchedEnd=!!r.fetchedEnd,this.addPage(r))},e.extend(e.PagedCollection,e.FlickrCollection,{getPage:function(t){var n,r,i,s,o,u,a;if(!t||!t.page||!t.perPage||t.forceAPICall)t||(t={}),s=!0;else{u=this.totalPages&&t.page>=this.totalPages,a=this.totalItems&&r>=this.totalItems,n=t.perPage*(t.page-1),r=Math.min(t.perPage*t.page,this.totalItems);if(!u&&!a||!this.fetchedEnd)for(i=n;i<r;i++)if(typeof this._data[i]=="undefined"||!this._data[i].exists()){s=!0;break}}return s?(t.pathAlias||(t.id=this.id),t.isCollection=!0,o=this.registry.attributes[this.attrName].pageFetch,o.fetchParams&&(t=e.merge(t,o.fetchParams)),e.FlickrCollection.executeFetch(t,this.registry,this.attrName,o.listFetcher)):e.when(this._data.slice(n,r))},addPage:function(e){var t=e.perPage*(e.page-1),n=t+Math.min(e.pageContent.length,e.perPage),r,i=0;if(e.forceAppend)this._data=this._data.concat(e.pageContent);else if(this._data.length<=t)this._data.length=t,this._data=this._data.concat(e.pageContent);else{this._data.length<n&&(this._data.length=n);for(r=t;r<n;r++)this._data[r]=e.pageContent[i],i++}e.totalPages&&(this.totalPages=e.totalPages,e.page>=this.totalPages&&(this.fetchedEnd=!0)),e.totalItems&&(this.totalItems=e.totalItems,this._data.length>=e.totalItems?this.fetchedEnd=!0:t+parseInt(e.perPage,10)>e.totalItems&&this._data.length<e.totalItems&&(this.fetchedEnd=!0)),this.fetchedStart=this._data&&typeof this._data[0]!="undefined"},removePage:function(e){},getPageOf:function(e,t){t||(n.warn("`perPage` must be specified; defaulting to 50."),t=50);var r=this.find(e,!0);return r?Math.floor(r.index/t)+1:-1},getNextIncompletePage:function(e){var t=e.page*(e.perPage-1),n=Math.floor(this._data.length/e.perPage)+1;for(t;t<this._data.length;t++)if(typeof this._data[t]=="undefined"||!this._data[t].exists()){n=Math.floor(t/e.perPage)+1;break}return n},_setValue:function(e){if(e instanceof Array)this.constructor.superclass._setValue.call(this,e);else{e=r(e);if(!e)return;e.remove?this.removePage(e):this.addPage(e)}}})},"@VERSION@",{requires:["flickr-collection"]});
YUI.add("flickr-model-registry",function(e,t){function i(t,n,r){return r===!1&&typeof t=="string"&&typeof n=="string"&&(t=t.toLowerCase(),n=n.toLowerCase()),t===n?!0:e.moment.isMoment(t)&&e.moment.isMoment(n)?t.diff(n)===0:e.Lang.isArray(t)&&e.Lang.isArray(n)&&s(t,n)?!0:e.Lang.isObject(t,!0)&&e.Lang.isObject(n,!0)&&o(t,n)?!0:!1}function s(t,n){var r=!0;return t.length!==n.length&&(r=!1),r&&e.Array.some(t,function(e,t){if(!i(n[t],e))return r=!1,!0}),r}function o(t,n){var r=!0;return e.Object.size(t)!==e.Object.size(n)&&(r=!1),r&&e.Object.some(t,function(e,t){if(!n.hasOwnProperty(t)||!i(n[t],e))return r=!1,!0}),r&&e.Object.some(n,function(e,n){if(!t.hasOwnProperty(n)||!i(t[n],e))return r=!1,!0}),r}function u(t){var n=t;return typeof t=="object"&&t!==null&&(Object.getPrototypeOf(t)===Array.prototype?(n=t.slice(),typeof t.hasMinBoundary!="undefined"&&(n.hasMinBoundary=t.hasMinBoundary),typeof t.hasMaxBoundary!="undefined"&&(n.hasMaxBoundary=t.hasMaxBoundary)):Object.getPrototypeOf(t)===Object.prototype&&(n={},e.Object.each(t,function(e,t){n[t]=e},this))),n}var n=require("lib/flog")(t);e.Models={};var r=e.FlickrModelRegistry=function(t){this.appContext=t,this.attributes=this.attributes||{},this.attributes.id={writeOnce:"initOnly",setter:function(t){return e.Lang.isString(t)||(e.Lang.isNumber(t)?t+="":(n.warn("`id` falling back to a Y.guid",{topic:this.name,val:t}),t=e.guid())),t}},this._setDefaultRemoteMethods(),this._validateAttributes(),this._data={},this._dataSize=0,this._subscribers=[],this.hasWeakSubscribers=!1,this._chainedEvents={},this._derivedCache=undefined,this._unsavedModels={}};r.prototype={attributeSearch:function(t,n){var r=[];return t.id?r.push(t.id):e.Object.each(this._data,function(s,o){var u=!0;e.Object.some(t,function(e,t){if(!i(e,s[t],!1)){if(n!==!0)return u=!1,!0;if(!i(e,this.getDefaultValue(s.id,t),!1))return u=!1,!0}},this),u&&r.push(o)},this),r},load:function(t,n){var r=this,i,s;return n||(n={}),e.Lang.isObject(t,!0)?(i=this.attributeSearch(t).sort()[0],n=e.merge(t,n||{})):(i=t,n=e.merge({id:i},n)),i&&this.exists(i)?e.when(i):(this._fetchPromises||(this._fetchPromises={}),s=i||JSON.stringify(n),this._fetchPromises[s]?this._fetchPromises[s]:(this._fetchPromises[s]=this.remoteRead(n).then(function(){var e=i,n,o;i||(n=r.attributeSearch(t),n.length>0&&(e=n[0])),delete r._fetchPromises[s];if(e&&r.exists(e))return e;throw o=new Error("["+r.name+"] Model ID is missing after fetching."),o.getModelFailure=!0,o}),this._fetchPromises[s]))},get:function(e,t){return this.load(e,t).then(this.proxy.bind(this))},add:function(t,r,i){var s;if(!e.Lang.isObject(t,!0)||e.Lang.isArray(t)){n.warn("`add` requires an object",{topic:this.name,data:t});return}return typeof r=="undefined"&&(r=!1),s=this.attributes.id.setter.apply(this,[t.id,undefined]),this._data[s]?n.warn("Attempt to add a model that is already in the registry.",{topic:this.name,id:s}):(this._data[s]={},this._dataSize++,this._queueEvent("modelsAdded",{id:s}),r?this._data[s]=t:Object.keys(this.attributes).forEach(function(e){var n=this.attributes[e],r=t[e];n.readOnly||this.setValue(s,e,r,!0,i)},this),this.appContext.markAsNewlyFetched(this.name,s)),this.proxy(s)},remove:function(e){if(!this.exists(e))return;delete this._data[e],this._dataSize--,this._removeChainedEvents(e),this._removeEventSubscribers(e),this._queueEvent("modelsRemoved",{id:e})},removeAll:function(){e.Object.each(this._data,function(e,t){this.remove(t)},this)},removeAllExcept:function(t){var n=t.reduce(function(e,t){return e[t]=!0,e},{});e.Object.each(this._data,function(e,t){n[t]||this.remove(t)},this)},_removeChainedEvents:function(t){var n;this._chainedEvents[t]&&(e.Object.each(this._chainedEvents[t],function(t,r){n=this.attributes[r],n&&(n.isModel?t.detach():(n.isListProxy||n.isCollection)&&e.Array.each(t,function(e){e.detach&&e.detach()}))},this),delete this._chainedEvents[t])},_removeEventSubscribers:function(t){var n=[];this._subscribers.length&&(e.Array.each(this._subscribers,function(e,r){e.id===t&&n.push(r)},this),e.Array.each(n,function(e){this._subscribers.splice(e,1)},this))},proxy:function(t){return this._ModelProxy||(this._ModelProxy=e.getModelProxyConstructor(this)),new this._ModelProxy(t)},getValue:function(t,r,i){var s,o,a;if(!t||!r){n.warn("`getValue` requires two arguments.",{topic:this.name,id:t,attr:r});return}if(!this.exists(t)){n.warn("`getValue` called for an id that doesn't exist in the registry.",{topic:this.name,id:t,attr:r});return}o=this.attributes[r];if(!o){n.warn("`getValue` called for an attribute that isn't defined",{topic:this.name,id:t,attr:r});return}return o.isListProxy?s=new e.ListProxy(this,t,r):(s=this._data[t][r],typeof s=="undefined"&&(s=this.getDefaultValue(t,r)),a=o.getter,!i&&a&&(s=a.apply(this,[s,t])),s=u(s)),s},setValue:function(t,r,s,o,a){var f,l,c,h,p,d,v;if(!t||!r||arguments.length<3){n.warn("`setValue` requires three arguments.",{topic:this.name,id:t});return}if(!this.exists(t)){n.warn("`setValue called for an id that is not in the registry.",{topic:this.name,id:t});return}f=this.attributes[r];if(!f){n.warn("Attribute is not present in the attributes list.",{topic:this.name,id:t,attr:r});return}if(f.readOnly){n.warn("Attribute is readOnly.",{topic:this.name,id:t,attr:r});return}if(f.writeOnce==="initOnly"&&!o){n.warn("Attribute can only be set during initialization.",{topic:this.name,id:t,attr:r});return}if(f.writeOnce===!0&&this._data[t][r]){n.warn("Attribute can only be set once.",{topic:this.name,id:t,attr:r});return}c=this.getValue(t,r),h=this._data[t][r],f.isListProxy&&(c=h);if(!a&&f.validator){d=f.validator;if(!e.Lang.isFunction(d)){n.warn("Attribute has an invalid validator.",{topic:this.name,validator:f.validator,attr:r});return}if(!d.apply(this,[s,t])){n.info("Attribute validation failed.",{topic:this.name,id:t,val:s,attr:r});return}}s=u(s),!a&&f.setter&&(s=f.setter.apply(this,[s,t])),f.isListProxy&&!e.Lang.isArray(s)&&(s=[]),f.isCollection&&(s?typeof s=="object"&&s instanceof e.PagedCollection||(c?(h=c
.getList(),c._setValue(s),s=c):(h=null,s=new e.PagedCollection(this,t,r,s))):s=new e.PagedCollection(this,t,r));if(!this._isDifferentValue(t,r,s,c)){!o;return}if(f.isModel)if(!e.Lang.isObject(s)||!s.isModel){n.warn("Attribute must be a ModelProxy instance.",{topic:this.name,id:t,attr:r});return}o||(l=this._getAttributeValuesDerivedBy(t,r)),this._data[t][r]=s,f.isListProxy&&s&&(s.hasMinBoundary&&this.getValue(t,r).setMinBoundary(),s.hasMaxBoundary&&this.getValue(t,r).setMaxBoundary()),(f.isModel||f.isListProxy||f.isCollection)&&this._chainEvents(t,r),o||(p=this.getValue(t,r),!f.isListProxy&&!f.isCollection&&this._setUnsaved(t,r,p,c,h),v={id:t,attrName:r,prevVal:c,newVal:p},f.isListProxy?v.listDiff=this._calcListDiff(p,c):f.isCollection&&(v.listDiff=this._calcListDiff(p,h)),this._queueEvent("valuesChanged",v),e.Object.size(l)&&e.Object.each(l,function(e,n){var s=this.getValue(t,n);if(!i(s,e)){v={id:t,attrName:n,prevVal:e,newVal:s,derivedBy:[r]};if(this.attributes[n].isListProxy||this.attributes[n].isCollection)v.listDiff=this._calcListDiff(s,e);this._queueEvent("valuesChanged",v)}},this))},setValues:function(t,n){var r={};e.Object.each(n,function(e,n){n!=="id"&&(r[n]=this.setValue(t,n,e))},this)},revertValue:function(e,t){this._unsavedModels[e]&&typeof this._unsavedModels[e][t]!="undefined"&&this.setValue(e,t,this._unsavedModels[e][t].lastSavedValRaw)},exists:function(t){var n;return e.Lang.isArray(t)?n=t[0]:e.Lang.isObject(t,!0)?n=this.attributeSearch(t)[0]:n=t,!!this._data[n]},addOrUpdate:function(e){if(this.exists(e.id)){var t,n;Object.keys(e).forEach(function(r){t=this.attributes[r],n=e[r],t&&!t.readOnly&&t.writeOnce!=="initOnly"&&this.setValue(e.id,r,n)},this)}else this.add(e);return this.appContext.markAsNewlyFetched(this.name,e.id),this.markChildModelsAsNewlyFetched(e.id),this.proxy(e.id)},markChildModelsAsNewlyFetched:function(e){var t=this.getOwnedModels(e),n=this;t.forEach(function(e){e&&(n.appContext.markAsNewlyFetched(e.registry.name,e.id),e.markChildModelsAsNewlyFetched(e.id))})},getOwnedModels:function(t){var r,i,s=[],o;if(!t)return n.warn("`getOwnedModels` requires a model id.",{topic:this.name,id:t}),s;if(!this.exists(t))return s;this._ModelProxy||(this._ModelProxy=e.getModelProxyConstructor(this));for(r in this.attributes){i=this.attributes[r];if(i.isModel)o=this.getValue(t,r),o&&o.exists()&&s.push(o);else if(i.isListProxy||i.isCollection)s=s.concat(this.getValue(t,r).getList().filter(function(e){return e&&e.isModel&&e.exists()}))}return s},hasAttribute:function(e){return!!this.attributes[e]},toJSON:function(e){var t={},n,r;if(e)for(n in this.attributes)t[n]=this.getValue(e,n),t[n]&&(this.attributes[n].isModel||this.attributes[n].isListProxy||this.attributes[n].isCollection)&&(t[n]=t[n].toJSON());else for(r in this._data)t[r]=this.toJSON(r);return t},on:function(t,n,r,i){var s;return t||(t=null),s={eventName:n,fn:r,id:t,weak:i},this._subscribers.push(s),i&&(this.hasWeakSubscribers=!0),{detach:function(){var t=e.Array.indexOf(this._subscribers,s);this._subscribers.splice(t,1)}.bind(this)}},removeWeakSubscribers:function(){var e=this._subscribers.length;if(e)while(e--)this._subscribers[e].weak&&this._subscribers.splice(e,1);this.hasWeakSubscribers=!1},getCount:function(){return this._dataSize},getDefaultValue:function(e,t){var n,r;return n=this.attributes[t],typeof n.defaultFn=="function"&&(r=n.defaultFn.call(this,e)),typeof r=="undefined"&&typeof n.defaultValue!="undefined"&&(r=n.defaultValue),r},_isDifferentValue:function(e,t,n,r){var s=this.attributes[t],o=s.getter;o&&(n=o.apply(this,[n,e]));if(typeof s.isListProxy!="undefined"&&s.isListProxy&&typeof r!="undefined"){if(n.hasMaxBoundary!==(typeof r.hasMaxBoundary!="undefined"&&r.hasMaxBoundary)||n.hasMinBoundary!==(typeof r.hasMinBoundary!="undefined"&&r.hasMinBoundary))return!0}else if(s.isCollection)return!0;return i(n,r)?!1:!0},_calcListDiff:function(t,n){var r,i,s,o,u={added:null,removed:null};return t instanceof e.ListProxy||t instanceof e.PagedCollection?r=t.getList():r=t,n instanceof e.ListProxy||n instanceof e.PagedCollection?i=n.getList():i=n,s=i.reduce(function(e,t){return t&&t.id&&(e[t.id]=!0),e},{}),o=r.reduce(function(e,t){return t&&t.id&&(e[t.id]=!0),e},{}),u.added=r.filter(function(e){return e&&!s[e.id]}),u.removed=i.filter(function(e){return e&&!o[e.id]}),u},_getAttributesDerivedBy:function(t){return this._derivedCache||(this._derivedCache={},e.Object.each(this.attributes,function(t,n){t.derivedBy&&e.Lang.isArray(t.derivedBy)&&e.Array.each(t.derivedBy,function(e){this._derivedCache[e]||(this._derivedCache[e]=[]),this._derivedCache[e].push(n)},this)},this)),this._derivedCache[t]},_getAttributeValuesDerivedBy:function(t,n){var r=this._getAttributesDerivedBy(n),i={};return r&&r.length&&e.Array.each(r,function(e){i[e]=this.getValue(t,e)},this),i},_queueEvent:function(t,n){var r;this._eventQueue||(this._eventQueue=[]),r=this._eventQueue,r.push({type:t,data:n}),this._eventPending||(this._eventPending=!0,setTimeout(function(){var t={};this._eventPending=!1,delete this._eventQueue,e.Array.each(r,function(e){var n=e.type,r=e.data,i=r.id;switch(n){case"modelsAdded":case"modelsRemoved":t[n]=t[n]||{},t[n][i]=r;break;case"valuesChanged":if(t.valuesChanged&&t.valuesChanged[i]&&t.valuesChanged[i][r.attrName]&&t.valuesChanged[i][r.attrName].newVal){t.valuesChanged[i][r.attrName].newVal=r.newVal,t.valuesChanged[i][r.attrName].derivedBy&&r.derivedBy&&(t.valuesChanged[i][r.attrName].derivedBy=t.valuesChanged[i][r.attrName].derivedBy.concat(r.derivedBy)),t.valuesChanged[i][r.attrName].chained&&!r.chained&&delete t.valuesChanged[i][r.attrName].chained;break}t.valuesChanged=t.valuesChanged||{},t.valuesChanged[i]=t.valuesChanged[i]||{},t.valuesChanged[i][r.attrName]=r}}),e.Object.each(t,function(e,t){this._fireEvent(t,e)},this)}.bind(this),0))},_fireEvent:function(t,n){e.Array.each(this._subscribers,function(e){e.eventName===t&&(e.id?n[e.id]&&e.fn.call(undefined,n[e.id]):e.fn.call(undefined,n))})},_chainEvents:function(t,n){var r=
this.attributes[n],i,s;this._chainedEvents[t]=this._chainedEvents[t]||{};if(r.isModel)this._chainedEvents[t][n]&&this._chainedEvents[t][n].detach(),s=this.getValue(t,n),this._chainedEvents[t][n]=s.on("valuesChanged",function(e){this._queueChainedEvent(t,n)}.bind(this));else if(r.isListProxy||r.isCollection)this._chainedEvents[t][n]&&e.Array.each(this._chainedEvents[t][n],function(e){e.detach()}),this._chainedEvents[t][n]=[],i=this.getValue(t,n),e.Array.each(i.getList(),function(e){e&&this._chainedEvents[t][n].push(e.on("valuesChanged",function(e){this._queueChainedEvent(t,n)}.bind(this)))},this)},_queueChainedEvent:function(t,n){var r=this.getValue(t,n),i;this._queueEvent("valuesChanged",{id:t,attrName:n,prevVal:r,newVal:r,chained:!0}),i=this._getAttributeValuesDerivedBy(t,n),e.Object.size(i)&&e.Object.each(i,function(e,r){this._queueEvent("valuesChanged",{id:t,attrName:r,newVal:e,derivedBy:[n],chained:!0})},this)},_deleteUnsaved:function(t,n){this._unsavedModels[t]&&this._unsavedModels[t][n]&&(delete this._unsavedModels[t][n],e.Object.size(this._unsavedModels[t])===0&&delete this._unsavedModels[t])},_setUnsaved:function(e,t,n,r,s){this._unsavedModels[e]&&this._unsavedModels[e][t]?i(n,this._unsavedModels[e][t].lastSavedVal)&&this._deleteUnsaved(e,t):(this._unsavedModels[e]=this._unsavedModels[e]||{},this._unsavedModels[e][t]={lastSavedVal:r,lastSavedValRaw:s})},_validateAttributes:function(){var t,r;t=["setter","getter","validator","defaultValue","defaultFn","derivedBy","readOnly","writeOnce","isModel","serialize","deserialize"],r=["isListProxy","isCollection","pageFetch","contextFetch","rangeFetch"],e.Object.each(this.attributes,function(i,s){e.Object.each(i,function(o,u){i.isListProxy||i.isCollection?e.Array.indexOf(r,u)===-1&&n.warn("Unknown property on collection attribute.",{topic:this.name,prop:u,attr:s}):e.Array.indexOf(t,u)===-1&&n.warn("Unknown property on attribute.",{topic:this.name,prop:u,attr:s})},this)},this)},_setDefaultRemoteMethods:function(){this.remote=this.remote||{},this.remote.create||(this.remote.create=function(t){return n.error("`remote.create` was called without being implemented.",{topic:this.name,attrs:t}),e.Promise.reject()}),this.remote.read||(this.remote.read=function(t){Object.keys(this.attributes).some(function(e){var t=this.attributes[e];if(e!=="id"&&!t.readOnly&&!t.isListProxy&&!t.isCollection&&!t.defaultValue&&!t.defaultFn)return!0},this),typeof t!="object"&&(t={id:t});var n={id:t.id};return this.add(n),e.Promise.resolve(n)}),this.remote.update||(this.remote.update=function(t,r){return n.error("`remote.update` was called without being implemented.",{topic:this.name,id:t,attrs:r}),e.Promise.reject()}),this.remote["delete"]||(this.remote["delete"]=function(t){return n.error("`remote.delete` was called without being implemented.",{topic:this.name,id:t}),e.Promise.reject()})},remoteCreate:function(e){return this.remote.create.call(this,e)},remoteRead:function(e){return this.remote.read.call(this,e)},remoteUpdate:function(t){var n={},r=this;return this._unsavedModels[t]&&e.Object.each(this._unsavedModels[t],function(e,r){n[r]={newVal:this.getValue(t,r),prevVal:e.lastSavedVal}},this),e.Object.size(n)>0?this.remote.update.call(this,t,n).then(function(e){return r._unsavedModels={},e}):e.Promise.resolve()},remoteBatchUpdate:function(e,t){return this.remote.batchUpdate.call(this,e,t)},remoteDelete:function(e){var t=this;return this.remote["delete"].call(this,e).then(function(){t.remove(e)})},getListPageByContinuation:function(t,n){var r=this,i=r.appContext,s,o,u,a,f,l,c,h,p,d,v="0",m="-1",g=e.APIHelper.request.getRebootPhotoExtras();switch(r.name){case"photo-groups-models":s="group-pool-models",o="groups",u="flickr.photos.getGroups",a="groups.group",g+=","+e.APIHelper.request.getRebootGroupExtras();break;case"photo-sets-models":s="set-models",o="sets",u="flickr.photos.getSets",a="sets.set";break;case"photo-galleries-models":s="gallery-models",o="galleries",u="flickr.photos.getGalleries",a="galleries.gallery"}return u?r.exists(t)?(r.continuationKeys=r.continuationKeys||{},r.getMorePromises=r.getMorePromises||{},l=r.continuationKeys[t]||v,l===m?e.Promise.resolve({newItems:[],loadedAll:!0}):(l===v&&(n+=r.getValue(t,o).getList().length),f={photo_id:t,extras:g,primary_photo_extras:"url_sq, url_t, url_s, url_m",continuation:l,per_page:n},h=t+"_"+l,p=r.getMorePromises[h],p?p:(d={apiResponse:i.callAPI(u,f,!0),contextRegistry:i.getModelRegistry(s),personRegistry:i.getModelRegistry("person-models")},r.name==="photo-groups-models"&&(d.groupRegistry=i.getModelRegistry("group-models")),r.getMorePromises[h]=(new e.FlickrPromise(d)).then(function(n){var i=[],s=n.apiResponse,u=n.contextRegistry,f=n.personRegistry,l=n.groupRegistry,p,d,v;return d=a.split(".").reduce(function(t,n){return e.Lang.isObject(t)?t[n]:undefined},s),d&&(e.Array.each(d,function(t){e.APIHelper.response.addContextToRegistry(t,u,f,l),i.push(u.proxy(t.id))}),i.length&&(v=r.getValue(t,o).getList().map(function(e){return e.getValue("id")}),i=i.filter(function(e){return v.indexOf(e.getValue("id"))===-1}),i.length&&r.getValue(t,o).appendToListMulti(i))),c=s[o].continuation,typeof c=="undefined"?c=m:e.Lang.isNumber(c)&&(c+=""),p=c===m,r.continuationKeys[t]=c,delete r.getMorePromises[h],{newItems:i,loadedAll:p}},function(e){throw delete r.getMorePromises[h],e}),r.getMorePromises[h]))):e.Promise.reject("[api-helper] getListPageByContinuation was called for an ID that isn't in the registry: "+t):e.Promise.reject("[api-helper] getListPageByContinuation was called without an invalid registry type: "+r.name)},getBuriedValue:function(e,t){var n,r={};return n=this.getValue(e,t),n&&n.payload&&(r=n.payload),r},setBuriedValue:function(e,t,n,r){return this.setValue(e,t,{payload:n},r)}},e.mix(r.prototype,e.Localizable)},"@VERSION@",{requires:["flickr-promise","model-proxy","list-proxy","moment","paged-collection","localizable"]});