(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{522:function(t,e,s){"use strict";s.r(e);var n=s(220),i=s(23),a=s(3).a.extend({components:{dashboardInput:n.f,dashboardUserCard:n.j},props:{customValidity:{type:String,default:""},value:{type:Array,default:()=>[]},placeholder:{type:String,default:"Search"}},data:()=>({potentialAuthors:[],newAuthor:"",searchResults:[],authors:[],toggle:!1}),watch:{authors:{handler:function(t){this.$emit("input",t)},deep:!0},value:{handler:function(t){t&&t!=this.authors&&(this.authors=t)},immediate:!0}},async mounted(){const t=await Object(i.c)({postType:"user",conditions:{accessLevel:{$gt:99}},options:{limit:100}});this.potentialAuthors=t.map(t=>({name:`${t.displayName} (${t.email})`,value:t._id}))},methods:{addAuthor(){this.authors.includes(this.newAuthor)||this.authors.push(this.newAuthor),this.newAuthor=""},deleteItem(t){this.$delete(this.authors,t)},setValidity(){const t=this.value;let e="";this.min&&(!t||t.length<this.min)?e=`Add at least ${this.min} item`:this.max&&t&&t.length>this.max&&(e=`Add no more than ${this.max} items`),this.$emit("update:customValidity",e)}}}),o=(s(684),s(531)),r=Object(o.a)(a,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"user-list-input"},[s("div",{staticClass:"user-list-items"},[t._l(t.authors,(function(e,n){return s("div",{key:n,staticClass:"added-user"},[s("dashboard-user-card",{staticClass:"custom-list-item",attrs:{"post-id":e},on:{remove:function(e){return t.deleteItem(n)}}})],1)})),t._v(" "),s("div",{staticClass:"input-text"},[s("dashboard-input",{attrs:{list:t.potentialAuthors,input:"factor-input-select",placeholder:"Select Author"},on:{change:function(e){return t.addAuthor(e)}},model:{value:t.newAuthor,callback:function(e){t.newAuthor=e},expression:"newAuthor"}})],1)],2)])}),[],!1,null,null,null);e.default=r.exports},531:function(t,e,s){"use strict";function n(t,e,s,n,i,a,o,r){var u,d="function"==typeof t?t.options:t;if(e&&(d.render=e,d.staticRenderFns=s,d._compiled=!0),n&&(d.functional=!0),a&&(d._scopeId="data-v-"+a),o?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},d._ssrRegister=u):i&&(u=r?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(d.functional){d._injectStyles=u;var l=d.render;d.render=function(t,e){return u.call(e),l(t,e)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,u):[u]}return{exports:t,options:d}}s.d(e,"a",(function(){return n}))},562:function(t,e,s){},684:function(t,e,s){"use strict";var n=s(562);s.n(n).a}}]);