YUI.add("flickr-groups-getTopContributors-fetcher",function(o,r){"use strict";function t(r,t){var e={id:r.id+"-"+t,nsid:r.id,dateJoined:r.dateJoined?o.moment(r.dateJoined.toString(),"X"):o.moment(),groupDiscussionCount:r.groupDiscussionCount,groupPhotoCount:r.groupPhotoCount,pathAlias:r.pathAlias,rank:r.rank,realname:r.realname,username:r.username,isPro:r.isPro,proBadge:r.proBadge,buddyicon:r.iconurls};return r.latestPhoto&&(e.latestPhotoId=r.latestPhoto.id,e.latestPhotoTitle=r.latestPhoto.name),e}o.namespace("ModelFetchers")["flickr-groups-getTopContributors"]={run:function(t,e){var i=this;return o.Promise.all([e.callAPI("flickr.groups.getTopContributors",this._processParams(t),!0),e.getModelRegistry("group-top-contributors-models"),e.getModelRegistry("group-contributor-models")]).then(function(o){return i._processResponse(o,t)},o.FetcherErrorLogger(r))},_processParams:function(o){return{group_id:o.id,type:"all",extras:"include_viewer,is_pro,icon_urls"}},_processResponse:function(o,r){var e,i,s,n=o[0],u=o[1],a=o[2];return i={photoContributors:[],discussionContributors:[],id:r.id},n&&n.contributors&&[{k:"photos",v:"photoContributors"},{k:"discussions",v:"discussionContributors"}].forEach(function(o){n.contributors[o.k]&&(e=n.contributors[o.k]).contributor&&e.contributor.forEach(function(e){s=t(e,r.id),i[o.v].push(a.addOrUpdate(s))})}),n&&n.viewer&&0!==n.viewer.length?(s=t(n.viewer,r.id),i.viewer=a.addOrUpdate(s)):i.viewer=null,u.addOrUpdate(i),u.proxy(i.id)}}},"@VERSION@",{requires:["flickr-promise","api-helper","moment","url-helper"],optional:["group-top-contributors-models","group-contributor-models"]});YUI.add("group-top-contributors-models",function(t){function r(t){r.superclass.constructor.call(this,t)}t.Models[this.name]=r,t.extend(r,t.FlickrModelRegistry,{name:this.name,remote:{read:function(r){var o=this;return t.ModelFetchers["flickr-groups-getTopContributors"].run(r,this.appContext).then(function(t){return o})}},attributes:{viewer:{isModel:!0,defaultValue:null},contributors:{isCollection:!0},photoContributors:{isCollection:!0},discussionContributors:{isCollection:!0}}})},"@VERSION@",{requires:["flickr-model-registry","flickr-promise","flickr-groups-getTopContributors-fetcher","attribute-helpers"]});YUI.add("group-pool-models",function(t){function e(t){e.superclass.constructor.call(this,t)}t.Models[this.name]=e,t.extend(e,t.FlickrModelRegistry,{name:this.name,remote:{read:function(e){return t.ListFetchers["flickr-groups-pools-getPhotos"].run(e,this.appContext)},addPhoto:function(e,o){return e.registryName=this.name,t.ModelCreators["flickr-groups-pools-add"].run(e,o)},removePhoto:function(e,o){return e.registryName=this.name,t.ModelDeletors["flickr-groups-pools-remove"].run(e,o)},invitePhoto:function(e,o){return t.ModelCreators["flickr-groups-invite-photo-invite"].run(e,o)},cancelPhotoInvitation:function(e,o){return t.ModelDeletors["flickr-groups-invite-photo-cancel"].run(e,o)},acceptPhoto:function(e,o){return t.ModelUpdaters["flickr-groups-admin-acceptPhoto"].run(e,o)},declinePhoto:function(e,o){return t.ModelDeletors["flickr-groups-admin-declinePhoto"].run(e,o)}},addPhotoRemote:function(t,e){return this.remote.addPhoto.call(this,{photoID:e,groupID:t},this.appContext)},removePhotoRemote:function(t,e){return this.remote.removePhoto.call(this,{photoIds:e,groupID:t},this.appContext)},invitePhotoRemote:function(t,e){return this.remote.invitePhoto.call(this,{photoID:e,groupID:t},this.appContext)},cancelPhotoInvitationRemote:function(t,e){return this.remote.cancelPhotoInvitation.call(this,{photoID:e,groupID:t},this.appContext)},hasPhoto:function(t,e){return this.getValue(t,"photoPageList").getFromListByID(e)||this.getValue(t,"photoContextList").getFromListByID(e)},acceptPhotoRemote:function(t,e){return this.remote.acceptPhoto.call(this,{photoIds:e,groupID:t},this.appContext)},declinePhotoRemote:function(t,e){return this.remote.declinePhoto.call(this,{photoIds:e,groupID:t},this.appContext)},addPhotoLocal:function(t,e){var o=this.getValue(t,"group");return this.getValue(t,"photoPageList").unshift(e),this.getValue(t,"photoPageList").totalItems++,this.getValue(t,"photoContextList").hasMaxBoundary()&&this.getValue(t,"photoContextList").appendToList(e),o.setValue("poolCount",o.getValue("poolCount")+1),this},removePhotoLocal:function(t,e){var o=this.getValue(t,"group");return this.getValue(t,"photoPageList").removeFromList(e.getValue("id")),this.getValue(t,"photoPageList").totalItems--,this.getValue(t,"photoContextList").removeFromList(e.getValue("id")),o.setValue("poolCount",o.getValue("poolCount")-1),this},acceptPhotoLocal:function(t,e){var o=this.getValue(t,"group");return o.setValue("pendingCount",o.getValue("pendingCount")-1),this.addPhotoLocal(t,e),this},declinePhotoLocal:function(t,e){var o=this.getValue(t,"group");return o.setValue("pendingCount",o.getValue("pendingCount")-1),this},attributes:{displayType:{readOnly:!0,defaultFn:function(){return"group"}},pathAlias:{validator:function(e,o){return t.AttributeHelpers.validateString(e)},setter:function(e){return t.AttributeHelpers.coerceString(e)},defaultFn:function(t){return t}},photoPageList:{isCollection:!0,pageFetch:{listFetcher:t.ListFetchers["flickr-groups-pools-getPhotos"]}},photoContextList:{isListProxy:!0,contextFetch:{listFetcher:t.ListFetchers["flickr-groups-pools-getContext"],listItemIdField:"photoId"}},group:{isModel:!0},urlSuffix:{readOnly:!0,derivedBy:["pathAlias"],defaultFn:function(t){var e=this.getValue(t,"pathAlias");return e||(e=t),"pool-"+e}},url:{readOnly:!0,derivedBy:["group"],defaultFn:function(t){return this.getValue(t,"group").getValue("url")}},title:{readOnly:!0,derivedBy:["group"],defaultFn:function(t){return this.getValue(t,"group").getValue("title")}},poolCount:{readOnly:!0,derivedBy:["group"],defaultFn:function(t){return this.getValue(t,"group").getValue("poolCount")}},filteredPoolCount:{validator:function(e){return t.AttributeHelpers.validateInteger(e)},setter:function(e){return t.AttributeHelpers.coerceInteger(e)},defaultFn:function(t){return this.getValue(t,"group").getValue("poolCount")}},friendlyPoolCount:{readOnly:!0,derivedBy:["group"],defaultFn:function(t){return this.getValue(t,"group").getValue("friendlyPoolCount")}}}},{buildCompoundId:function(t,e){return t+"-"+e},extractGroupFromCompoundId:function(t){return t.split("-")[0]}})},"@VERSION@",{requires:["flickr-model-registry","flickr-promise","flickr-groups-pools-getContext-fetcher","flickr-groups-pools-getPhotos-fetcher","flickr-groups-pools-add-creator","flickr-groups-pools-remove-deletor","flickr-groups-invite-photo-invite-creator","flickr-groups-invite-photo-cancel-deletor","flickr-groups-admin-acceptPhoto-updater","flickr-groups-admin-declinePhoto-deletor","attribute-helpers"],optional:["group-top-contributors-models"]});YUI.add("flickr-groups-create-creator",function(e,r){"use strict";e.namespace("ModelCreators")["flickr-groups-create"]={run:function(o,t){var i={user_id:o.userId,name:o.name,description:o.description,grouptype:o.privacyLevel,age_restriction:o.ageRestriction,safety_level:o.safetyLevel};return t.callAPI("flickr.groups.create",i).then(function(r){return"ok"===r.stat?t.getModel("group-pool-models",r.groupNsid):e.Promise.reject(r)},e.FetcherErrorLogger(r))}}},"@VERSION@",{requires:["flickr-promise","group-pool-models"],optional:[]});YUI.add("group-info-models",function(e){function t(e){t.superclass.constructor.call(this,e)}e.Models[this.name]=t,e.extend(t,e.FlickrModelRegistry,{name:this.name,remote:{read:function(t){return e.ModelFetchers["flickr-groups-getInfo"].run(t,this.appContext)},join:function(t,r){return e.ModelCreators["flickr-groups-join"].run(t,r)},leave:function(t,r){return e.ModelDeletors["flickr-groups-leave"].run(t,r)},create:function(t,r){return e.ModelCreators["flickr-groups-create"].run(t,r)}},join:function(e){var t=this.getValue(e,"group");return t&&t.setValue("isMember",!0),this},leave:function(e){var t=this.getValue(e,"group");return t&&(t.setValue("isAdmin",!1),t.setValue("isModerator",!1),t.setValue("isMember",!1),this.setValue(e,"hasPendingRequestToJoin",!1)),this},declineInvite:function(e){var t=this,r={group_id:e};return this.appContext.callAPI("flickr.groups.invite.member.decline",r).then(function(r){return t.setValue(e,"isInvited",!1),r})},attributes:{pathAlias:{validator:function(t,r){return e.AttributeHelpers.validateString(t)},setter:function(t){return e.AttributeHelpers.coerceString(t)},defaultValue:""},description:{validator:function(t,r){return e.AttributeHelpers.validateString(t)},setter:function(t){return e.AttributeHelpers.coerceString(t)},defaultValue:""},secureDescription:{validator:function(t,r){return e.AttributeHelpers.validateString(t)},setter:function(t){return e.AttributeHelpers.coerceString(t)},defaultValue:""},rules:{validator:function(t,r){return e.AttributeHelpers.validateString(t)},setter:function(t){return e.AttributeHelpers.coerceString(t)},defaultValue:""},roles:{},secureRules:{validator:function(t,r){return e.AttributeHelpers.validateString(t)},setter:function(t){return e.AttributeHelpers.coerceString(t)},defaultValue:""},hasPendingRequestToJoin:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},photoLimitOptOut:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},isInvited:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},discussionsLocked:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},privacy:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultValue:1},restrictions:{},throttle:{},poolPreviewRowsVisibleCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultFn:function(e){return 1}},coverPhotoAttribution:{},group:{isModel:!0}}})},"@VERSION@",{requires:["flickr-model-registry","flickr-promise","flickr-groups-getInfo-fetcher","flickr-groups-join-creator","flickr-groups-leave-deletor","flickr-groups-create-creator","attribute-helpers","group-models"]});YUI.add("flickr-groups-getInfo-fetcher",function(e,o){"use strict";e.namespace("ModelFetchers")["flickr-groups-getInfo"]={run:function(r,t){var s=this;return e.Promise.all([t.callAPI("flickr.groups.getInfo",this._processParams(r),!0),t.getModelRegistry("group-info-models"),t.getModelRegistry("group-models"),t.getModelRegistry("group-blast-models"),t.getModelRegistry("group-activity-models")]).then(function(e){return s._processResponse(e,r)},e.FetcherErrorLogger(o))},_processParams:function(o){var r={extras:e.APIHelper.request.getRebootPhotoExtras()+","+e.APIHelper.request.getRebootGroupExtras()+", blast_user_info, date_last_viewed, has_pending_invite, coverphoto_attribution, is_locked",secure_image_embeds:1,lang:void 0};if(o.id)r.group_id=o.id;else{if(!o.pathAlias)throw new Error("[flickr-groups-getInfo-fetcher] `id` or `pathAlias` is required.");r.group_path_alias=o.pathAlias}return r},_processResponse:function(o,r){var t,s,i,a,p=o[0],u=o[1],l=o[2],g=o[3],d=o[4];return i=l.parseGroupModel(r.id,r.pathAlias,p.group),l.addOrUpdate(i),s={id:i.id,viewedPool:e.moment(p.group.viewedDates?p.group.viewedDates.pool:void 0),viewedDiscussions:e.moment(p.group.viewedDates?p.group.viewedDates.discussions:void 0),group:l.proxy(i.id)},d.addOrUpdate(s),i=l.proxy(i.id),a={id:i.id,blastMessage:p.group.blast?p.group.blast.content:"",blastMessageSecure:p.group.blast?p.group.secureBlast.content:"",blastUserId:p.group.blast?p.group.blast.userId:"",blastDateAdded:p.group.blast?e.moment(p.group.blast.dateBlastAdded,"X"):e.moment(),blastUserName:p.group.blast?p.group.blast.userName:"",blastPathAlias:p.group.blast?p.group.blast.userPathAlias:"",blastUserNSID:p.group.blast?p.group.blast.userNsid:"",blastRealName:p.group.blast?p.group.blast.realName:"",blastUserStatus:p.group.blast?p.group.blast.userStatus:""},g.addOrUpdate(a),t={id:p.group.id,pathAlias:p.group.pathAlias||r.pathAlias,description:p.group.description.content,secureDescription:p.group.secureDescription?p.group.secureDescription.content:"",rules:p.group.rules.content,roles:p.group.roles,secureRules:p.group.secureRules.content,restrictions:p.group.restrictions,throttle:p.group.throttle,poolPreviewRowsVisibleCount:p.group.pool_rows,group:i,discussionsLocked:"1"===p.group.isLocked,hasPendingRequestToJoin:p.group.has_pending_request_to_join,isInvited:p.group.is_invited,coverPhotoAttribution:p.group.coverphoto,photoLimitOptOut:p.group.photo_limit_opt_out},u.addOrUpdate(t),u.proxy(t.id)}}},"@VERSION@",{requires:["flickr-promise","api-helper"],optional:["group-info-models","group-models"]});YUI.add("group-models",function(e){function t(e){t.superclass.constructor.call(this,e)}e.Models[this.name]=t,e.extend(t,e.FlickrModelRegistry,{name:this.name,parseGroupModel:function(t,r,n){var o,i={id:n.id||t||n.nsid,pathAlias:n.pathAlias||r||n.pathalias,title:n.title,invitationOnly:n.invitationOnly,memberCount:n.memberCount,poolCount:n.photos,poolPreviewRowsVisibleCount:n.pool_rows,topicCount:"string"===n.topicCount?n.topicCount:void 0,pendingCount:n.pool_pending_count,memberPendingCount:n.member_pending_count,iconurls:e.APIHelper.response.removeProtocolFromURL(n.iconurls),isMember:n.is_member||n.member||n.isMember,isModerator:n.is_moderator||n.moderator||n.isModerator,isAdmin:n.is_admin||n.admin||n.isAdmin,eighteenplus:n.eighteenplus,coverPhotoUrls:e.APIHelper.response.removeProtocolFromURL(n.coverphotoUrl),latestPhotoActivity:e.moment(n.date_activity_detail?n.date_activity_detail.pool:void 0,"X"),latestDiscussionActivity:e.moment(n.date_activity_detail?n.date_activity_detail.discussions:void 0,"X"),showPoolToNonMembers:n.show_pool,showDiscussionToNonMembers:n.show_discussion,needsInterstitial:n.needs_interstitial,muted:n.muted};return"string"==typeof n.datecreate?o=n.datecreate:n.datecreate&&"string"==typeof n.datecreate.content&&(o=n.datecreate.content),o?(o+=" +0700",i.dateCreated=e.moment(o,"YYYY-MM-DD HH:mm:ss Z")):i.dateCreated=new e.moment,!i.title&&n.name&&(i.title="string"==typeof n.name?n.name:n.name.content),!i.memberCount&&n.members&&(i.memberCount="string"!=typeof n.members?n.members.content:n.members),!i.poolCount&&n.poolCount&&(i.poolCount="string"!=typeof n.poolCount?n.poolCount.content:n.poolCount),i.topicCount||(n.topicCount?i.topicCount="string"!=typeof n.topicCount?n.topicCount.content:n.topicCount:i.topicCount=0),n.privacy&&(parseInt(n.privacy,10)?i.privacy=parseInt(n.privacy,10):n.privacy.content&&(i.privacy=n.privacy.content)),i},getLargestCoverPhotoSize:function(t,r){return e.PhotoModelHelper.getLargestSize(t,r)},attributes:{title:{validator:function(t,r){return e.AttributeHelpers.validateString(t)},setter:function(t){return e.AttributeHelpers.coerceString(t)},defaultValue:""},pathAlias:{validator:function(t,r){return e.AttributeHelpers.validateString(t)},setter:function(t){return e.AttributeHelpers.coerceString(t)||void 0},defaultFn:function(e){return e}},isModerator:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},invitationOnly:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},isMember:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},isAdmin:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},memberCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultFn:function(e){return 0}},poolCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultFn:function(e){return 0}},friendlyPoolCount:{readOnly:!0,derivedBy:["poolCount"],getter:function(t,r){return e.Number.format(this.getValue(r,"poolCount"),{thousandsSeparator:","})}},pendingCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultFn:function(e){return 0}},memberPendingCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultFn:function(e){return 0}},topicCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultFn:function(e){return 0}},groupPoolAddURL:{readOnly:!0,derivedBy:["pathAlias"],defaultFn:function(e){return"/groups/"+this.getValue(e,"pathAlias")+"/pool/add/"}},dateCreated:{validator:function(t){return e.AttributeHelpers.validateDate(t)},setter:function(t){return e.AttributeHelpers.coerceDate(t)},defaultFn:function(t){return e.moment()},serialize:function(e){return e.format("X")},deserialize:function(t){return e.moment(t,"X")}},latestPhotoActivity:{validator:function(t){return e.AttributeHelpers.validateDate(t)},setter:function(t){return e.AttributeHelpers.coerceDate(t)},defaultFn:function(t){return e.moment()},serialize:function(e){return e.format("X")},deserialize:function(t){return e.moment(t,"X")}},latestDiscussionActivity:{validator:function(t){return e.AttributeHelpers.validateDate(t)},setter:function(t){return e.AttributeHelpers.coerceDate(t)},defaultFn:function(t){return e.moment()},serialize:function(e){return e.format("X")},deserialize:function(t){return e.moment(t,"X")}},showPoolToNonMembers:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},showDiscussionToNonMembers:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},eighteenplus:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},needsInterstitial:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},privacy:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultFn:function(e){return 0}},iconurls:{},bestIconURL:{readOnly:!0,derivedBy:["iconurls"],defaultFn:function(t,r){var n=e.URLHelper.getGroupIconURL(this.getValue(t,"iconurls"),r);return n||void 0}},mediumIconURL:{readOnly:!0,derivedBy:["iconurls"],defaultFn:function(t){var r=e.URLHelper.getGroupIconURL(this.getValue(t,"iconurls"),"medium");return r||void 0}},url:{readOnly:!0,derivedBy:["group"],defaultFn:function(e){return"/groups/"+(this.getValue(e,"pathAlias")||e)+"/"}},urlMembersPage:{readOnly:!0,derivedBy:["group","url"],defaultFn:function(e){return this.getValue(e,"url")+"members"}},urlPoolPage:{readOnly:!0,derivedBy:["group","url"],defaultFn:function(e){return this.getValue(e,"url")+"pool"}},urlDiscussionPage:{readOnly:!0,derivedBy:["group","url"],defaultFn:function(e){return this.getValue(e,"url")+"discuss"}},urlPendingMembersPage:{readOnly:!0,derivedBy:["id"],defaultFn:function(e){return"/groups_pending.gne?id="+e}},urlPendingPhotosPage:{readOnly:!0,derivedBy:["pathAlias"],defaultFn:function(e){return"/groups/"+this.getValue(e,"pathAlias")+"/admin/pending"}},coverPhotoUrls:{},latestGroupActivity:{readOnly:!0,derivedBy:["latestPhotoActivity","latestDiscussionActivity","dateCreated"],defaultFn:function(t){var r=this.getValue(t,"latestDiscussionActivity"),n=this.getValue(t,"latestPhotoActivity"),o=this.getValue(t,"dateCreated");return r.isValid()&&(o=e.moment.min(o,r)),n.isValid()&&(o=e.moment.min(o,n)),o}},muted:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1}}})},"@VERSION@",{requires:["flickr-model-registry","flickr-promise","api-helper","url-helper","moment","flickr-groups-getInfo-fetcher","attribute-helpers","photo-model-helper"]});YUI.add("flickr-groups-pools-getGroups-fetcher",function(e,r){"use strict";e.namespace("ListFetchers")["flickr-groups-pools-getGroups"]={run:function(s,o){var p=this;return e.Promise.all([o.callAPI("flickr.groups.pools.getGroups",{extras:e.APIHelper.request.getRebootGroupExtras()+", icon_urls, needs_interstitial",page:s.page||0,per_page:s.perPage||400},!0),o.getModelRegistry("person-groups-models"),o.getModelRegistry("group-pool-models"),o.getModelRegistry("group-models")]).then(function(e){return p._processResponse(e,s)},e.FetcherErrorLogger(r))},_processResponse:function(r,s){var o=r[0],p=r[1],u=r[2],t=r[3],i=o.groups,a=s.id,l={},g=[];if(i)return i.group&&e.Array.each(i.group,function(e,r){var s,o,p;p=t.parseGroupModel(e.id,e.pathAlias,e),s=t.addOrUpdate(p),o=u.addOrUpdate({id:e.id,pathAlias:e.pathAlias,group:s}),g.push(o)}),l={id:a,memberCount:o.userGroupMemberships?o.userGroupMemberships.member:null,moderatorCount:o.userGroupMemberships?o.userGroupMemberships.moderator:null,adminCount:o.userGroupMemberships?o.userGroupMemberships.admin:null,invitedCount:o.userGroupMemberships?o.userGroupMemberships.invited:null},l.groups=e.APIHelper.response.addOrReplaceListByPage({current:p.exists(a)?p.proxy(a).getValue("groups").getList():[],perPage:s.perPage,pageNum:s.page,totalItems:o.groups.total,newPages:g}),p.exists(a)?p.setValue(a,"groups",l.groups):p.add(l),l.groups}}},"@VERSION@",{requires:["flickr-promise","api-helper"],optional:["person-groups-models","group-models","group-pool-models","person-models"]});