"use strict";(self.webpackChunkpackage_edit=self.webpackChunkpackage_edit||[]).push([[503],{6188:(t,e,i)=>{i.r(e),i.d(e,{default:()=>u});var n=function(){var t=this,e=t._self._c;return e("div",{class:t.blockClasses},[e("div",{staticClass:"agent-header"},[e("div",{staticClass:"agent-name"},[e("i",{staticClass:"fas agent-icon",class:t.agentTypeIcon(t.contributor.agent_type)}),t._v(" "),e("b",[t._v(t._s(t.contributor.standardisedName))])]),t._v(" "),e("div",{staticClass:"edit-icons"},[t.contributor.external_id&&t.settings.canEdit?e("span",{staticClass:"edit-icon",attrs:{title:"Download contributor details from external source"},on:{click:function(){return t.syncAgent(t.contributorId)}}},[e("i",{staticClass:"fas",class:t.contributor.meta.syncing?"fa-spinner fa-spin":"fa-arrow-alt-circle-down"})]):t._e(),t._v(" "),t.settings.canEdit?e("span",{staticClass:"edit-icon",attrs:{title:"Edit"},on:{click:t.startEdit}},[e("i",{staticClass:"fas fa-edit"})]):t._e(),t._v(" "),t.contributor.meta.is_temporary?t._e():e("span",{staticClass:"edit-icon",attrs:{title:"Remove this contributor"},on:{click:function(){return t.eventBus.$emit(t.events.removeContributor,t.contributorId)}}},[e("i",{staticClass:"fas fa-minus-circle"})])])]),t._v(" "),e("div",{staticClass:"agent-identifier"},[t.contributor.external_id?e("a",{attrs:{href:t.contributor.externalIdUrl}},[e("i",{class:t.agentIdIcon(t.contributor.external_id_scheme)}),t._v(" "+t._s(t.contributor.external_id)+"\n        ")]):t._e(),t._v(" "),t.contributor.user_id?e("a",{attrs:{href:"/user/"+t.contributor.user_id,target:"_blank"}},[e("i",{staticClass:"far fa-smile"}),t._v(" user profile\n        ")]):t._e()]),t._v(" "),e("div",{staticClass:"agent-affiliations"},[t._l(t.affiliations.slice(0,t.affiliationLimit),(function(i){return e("span",{staticClass:"agent-affiliation"},[t._v("\n            "+t._s(i.other_agent.displayName)+" "),i.affiliation_type?[t._v("("+t._s(i.affiliation_type)+")")]:t._e()],2)})),t._v(" "),t.affiliations.length>t.affiliationLimit?e("span",{staticClass:"agent-affiliation"},[t._v("\n            "+t._s(t.affiliations.length-t.affiliationLimit)+" more\n        ")]):t._e()],2)])};n._withStripped=!0;var a=i(3851),r=i(5170),s=i(821);function o(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e,i=1;i<arguments.length;i++)e=null==arguments[i]?{}:arguments[i],i%2?o(Object(e),!0).forEach((function(i){l(t,i,e[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):o(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}));return t}function l(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}const f={name:"ShowAgent",extends:r.Z,data:function(){return{affiliationLimit:5}},computed:c(c({},(0,a.Se)(["agentIdIcon","agentTypeIcon"])),{},{affiliations:function(){return s.Z.query().with("affiliations.other_agent").with("affiliations.meta").find(this.contributorId).affiliations.filter((function(t){return!t.meta.to_delete}))},blockClasses:function(){var t=["agent-detail","agent-".concat(this.contributor.agent_type.toLowerCase())];return 0===this.contributor.activities.filter((function(t){return!t.meta.to_delete})).length&&t.push("agent-empty"),t}}),methods:c(c({},(0,a.nv)(["syncAgent"])),{},{startEdit:function(){s.Z.updateMeta(this.contributorId,{is_editing:!0})}})};const u=(0,i(1900).Z)(f,n,[],!1,null,null,null).exports}}]);
