1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},l=(new e.Error).stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="4ba5a0b4-cf13-44de-9550-dd26f03931f8",e._sentryDebugIdIdentifier="sentry-dbid-4ba5a0b4-cf13-44de-9550-dd26f03931f8")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"prod"};(self.webpackChunknew_influencing=self.webpackChunknew_influencing||[]).push([[341],{93790:function(){},80341:function(e,l,t){"use strict";t.r(l),t.d(l,{default:function(){return K}});var a=t(20641),o=t(50953),i=t(75181),s=t(55611),r=t(81660),d=t(40393),u=t(16932),n=t(73838),m=t(92113),p=t(89461),b=t(21827),c=t(46431),f=t(86365),h=t(82389),y=t(96027),g=t(98981),v=t(59271),R=t(82124),k=t(12664);const w={class:"media-responsibility-group d-flex fd-column gap-24"},T={class:"media-responsibilities-data-item media-responsibilities-data-content-for"},U={class:"d-flex gap-12"},_={class:"d-flex gap-12"},A={class:"d-flex gap-12"};var F=(0,a.pM)({__name:"mediaResponsibilityGroup",props:{outlet:{},roles:{},beats:{},roleTitle:{},outletLabel:{default:"What is the primary outlet/channel you can create content for?"},showRemove:{type:Boolean},expect:{},loading:{type:Boolean},disabled:{type:Boolean}},emits:["update:beats","update:roles","update:outlet","update:roleTitle","remove","updated"],setup(e,{expose:l,emit:t}){const u=t,F=e,I=(0,R.Pj)(),C=(0,a.EW)((()=>!!F.outlet)),{showOutletCreationInput:O,loadingOutletCreation:V,urlErrors:E,url:B,createNewOutlet:x}=(()=>{const e=(0,o.KR)(!1),[l,t]=(0,v.eY)(!1),{errors:a,data:{url:s}}=(0,g.o)((0,k.Ik)({url:(0,k.Yj)().label("URL").url().required()}),{initialParams:{url:"https://"}});return{urlErrors:a,url:s,loadingOutletCreation:l,showOutletCreationInput:e,createNewOutlet:function(){t(!0),(0,i.J)(I.state.currentUser.slug).relationOutletCreateOutletByUrl((0,o.R1)(s)).then((e=>{u("update:outlet",e),t(!1)})).catch(d.dk)}}})(),{errors:L,valid:W,validate:X}=(0,y.M)(F,{outlet:(0,k.Ik)().label("Outlet").nullable().required(),roles:(0,k.YO)().label("Roles").min(1),beats:(0,k.YO)().label("Beats").min(1),roleTitle:(0,k.Yj)().label("Role Title").min(3).max(255).required()});(0,a.wB)([()=>F.outlet,()=>F.roles,()=>F.beats],(()=>D())),(0,a.wB)((()=>F.outlet),((e,l)=>{l&&(0,i.J)(I.state.currentUser.slug).relationOutletDelete(l.value).catch(d.dk)}));const{cancelBeatUpdate:z}=(()=>{let e;return(0,a.wB)((()=>F.outlet),(l=>{e?.cancel(),l&&0==F.beats.length&&(e=n.f.getBeatsFromOutlet(l.value).then((e=>{u("update:beats",e)})))})),{cancelBeatUpdate:()=>e?.cancel()}})();function Y(){u("remove"),F.outlet&&(0,i.J)(I.state.currentUser.slug).relationOutletDelete(F.outlet.value).catch(d.dk)}(0,a.wB)((()=>F.beats),(()=>{z()}));const D=(0,v.Q0)((async()=>{if(await X(),(0,o.R1)(W)){const e=(0,i.J)(I.state.currentUser.slug);e.relationOutletCreate(F.outlet.value,F.roles.map((e=>e.value)),F.beats.map((e=>e.value)),F.roleTitle).then((()=>e.updateBeatsThatIFollow(F.beats))).then((()=>{u("updated")})).catch(d.dk)}}),1e3);return l({valid:W,validate:X}),(e,l)=>{const t=(0,a.g2)("IBtn"),i=(0,a.g2)("IIcon");return(0,a.uX)(),(0,a.CE)("div",w,[(0,a.Lk)("div",T,[(0,a.bF)(r.A,{label:e.outletLabel},{default:(0,a.k6)((({id:r})=>[(0,a.Lk)("div",U,[(0,o.R1)(O)?((0,a.uX)(),(0,a.Wv)(h.A,{key:0,class:"w-100",error:(0,o.R1)(E).url},{default:(0,a.k6)((()=>[(0,a.Lk)("div",_,[(0,a.bF)(b.A,{id:r,modelValue:(0,o.R1)(B),"onUpdate:modelValue":l[0]||(l[0]=e=>(0,o.i9)(B)?B.value=e:null),placeholder:"https://",size:"medium",shimmer:e.loading},null,8,["id","modelValue","shimmer"]),(0,a.bF)(t,{size:"medium",loading:(0,o.R1)(V),onClick:(0,o.R1)(x)},{default:(0,a.k6)((()=>l[6]||(l[6]=[(0,a.eW)(" Create ")]))),_:1},8,["loading","onClick"])])])),_:2},1032,["error"])):((0,a.uX)(),(0,a.Wv)(h.A,{key:1,class:"w-100",error:(0,o.R1)(L).outlet},{default:(0,a.k6)((()=>[(0,a.bF)(c.A,{id:r,size:"medium",api:(0,o.R1)(n.f).getOutletsForMultiselect,disableIds:e.expect??[],disabled:e.disabled,modelValue:e.outlet,shimmer:e.loading,hideClear:"","onUpdate:modelValue":l[1]||(l[1]=e=>u("update:outlet",e))},null,8,["id","api","disableIds","disabled","modelValue","shimmer"])])),_:2},1032,["error"])),e.showRemove?((0,a.uX)(),(0,a.Wv)(s.A,{key:2,class:"media-responsibility-group-btn-remove",size:"medium",title:"Remove responsibility",shimmer:e.loading,square:"",onClick:Y},{default:(0,a.k6)((()=>[(0,a.bF)(i,{name:"delete"})])),_:1},8,["shimmer"])):(0,a.Q3)("",!0)])])),_:1},8,["label"]),(0,a.bF)(p.A,{modelValue:(0,o.R1)(O),"onUpdate:modelValue":l[2]||(l[2]=e=>(0,o.i9)(O)?O.value=e:null),class:"mt-12",title:"Let me add with an URL",
1shimmer:e.loading},null,8,["modelValue","shimmer"])]),(0,a.bF)(r.A,{label:"Role title"},{default:(0,a.k6)((({id:t})=>[(0,a.bF)(h.A,{error:(0,o.R1)(L).roleTitle},{default:(0,a.k6)((()=>[(0,a.bF)(b.A,{id:t,size:"medium",disabled:e.disabled||!C.value,modelValue:e.roleTitle,shimmer:e.loading,"onUpdate:modelValue":l[3]||(l[3]=e=>u("update:roleTitle",e))},null,8,["id","disabled","modelValue","shimmer"])])),_:2},1032,["error"])])),_:1}),(0,a.bF)(r.A,{class:"media-responsibilities-data-item",label:"In your work for Influencing please check any responsibilities that apply to your role"},{default:(0,a.k6)((()=>[(0,a.bF)(h.A,{error:(0,o.R1)(L).roles},{default:(0,a.k6)((()=>[(0,a.Lk)("div",A,[(0,a.bF)(c.A,{size:"medium",api:(0,o.R1)(n.f).getRelationsRolesOutlet,disabled:e.disabled||!C.value,modelValue:e.roles,shimmer:e.loading,multiple:"","onUpdate:modelValue":l[4]||(l[4]=e=>u("update:roles",e))},null,8,["api","disabled","modelValue","shimmer"])])])),_:1},8,["error"])])),_:1}),(0,a.bF)(r.A,{class:"media-responsibilities-data-item",label:"Which Influencing beats are of relevance to you? Click on the input if you want to edit beats:"},{default:(0,a.k6)((({id:t})=>[(0,a.bF)(h.A,{error:(0,o.R1)(L).beats},{default:(0,a.k6)((()=>[(0,a.bF)(f.A,{id:t,placeholder:"Search beats",size:"medium",title:"Click to edit",disabled:e.disabled||!C.value,modelValue:e.beats,shimmer:e.loading,treeType:(0,o.R1)(m.H),"onUpdate:modelValue":l[5]||(l[5]=e=>u("update:beats",e))},null,8,["id","disabled","modelValue","shimmer","treeType"])])),_:2},1032,["error"])])),_:1})])}}});const I={class:"media-responsibilities-data p-16"},C={key:0,class:"media-responsibilities-step-divider"};var O=(0,a.pM)({__name:"BeatsOutlets",emits:["updated"],setup(e,{expose:l,emit:t}){const n=[new u.p2("Journalist",2005)],m=t,p=(0,R.Pj)(),b=(0,i.J)(p.state.currentUser.slug),[c,f]=(0,v.eY)(!1),h=(0,o.KR)([]),y=(0,a.EW)((()=>(Array.isArray((0,o.R1)(h))&&(0,o.R1)(h)?.every((e=>(0,o.R1)(e.valid))))??!1)),g=(0,a.EW)((()=>k.map((e=>e.outlet?.value)).filter((e=>null!=e)))),{data:k,removeResponsibility:w,addResponsibility:T}=(()=>{const e=(0,o.Kh)([]);return{data:e,addResponsibility:function(){e.push({beats:[],outlet:void 0,roles:n,roleTitle:p.state.currentUser.jobTitle})},removeResponsibility:function(l){e.splice(l,1)}}})();return(0,a.sV)((()=>{f(),b.relationOutletGet().then((e=>{const l=e.map((e=>(e.roles=e.roles.length?e.roles:n,e)));k.push(...l)})).then((()=>{0==k.length&&T(),f(!1)})).catch(d.dk)})),l({validate:async function(){return Promise.all((0,o.R1)(h).map((e=>e.validate())))},valid:y}),(e,l)=>{const t=(0,a.g2)("IIcon");return(0,a.uX)(),(0,a.CE)("div",I,[(0,o.R1)(c)?((0,a.uX)(),(0,a.Wv)(F,{key:0,outletURL:"",roleTitle:"",beats:[],expect:[],loading:(0,o.R1)(c),roles:[]},null,8,["loading"])):(0,a.Q3)("",!0),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)((0,o.R1)(k),((e,t)=>((0,a.uX)(),(0,a.CE)("div",{key:e.outlet?.value||t},[t>0?((0,a.uX)(),(0,a.CE)("hr",C)):(0,a.Q3)("",!0),(0,a.bF)(F,{ref_for:!0,ref_key:"mediaResponsibilityGroupRef",ref:h,beats:e.beats,"onUpdate:beats":l=>e.beats=l,outlet:e.outlet,"onUpdate:outlet":l=>e.outlet=l,roleTitle:e.roleTitle,"onUpdate:roleTitle":l=>e.roleTitle=l,roles:e.roles,"onUpdate:roles":l=>e.roles=l,outletLabel:"Select outlet",expect:g.value,showRemove:(0,o.R1)(k).length>1,onRemove:e=>(0,o.R1)(w)(t),onUpdated:l[0]||(l[0]=e=>m("updated"))},null,8,["beats","onUpdate:beats","outlet","onUpdate:outlet","roleTitle","onUpdate:roleTitle","roles","onUpdate:roles","expect","showRemove","onRemove"])])))),128)),(0,a.bF)(r.A,{class:"mt-24",label:"Is there any other outlet you regularly work for or contribute to?"},{default:(0,a.k6)((()=>[(0,a.bF)(s.A,{class:"c-blue",size:"medium",shimmer:(0,o.R1)(c),onClick:(0,o.R1)(T)},{default:(0,a.k6)((()=>[(0,a.bF)(t,{name:"plus-circle"}),l[1]||(l[1]=(0,a.eW)(" Add outlet "))])),_:1},8,["shimmer","onClick"])])),_:1})])}}}),V=t(85072),E=t.n(V),B=t(97825),x=t.n(B),L=t(77659),W=t.n(L),X=t(55056),z=t.n(X),Y=t(10540),D=t.n(Y),J=t(41113),j=t.n(J),P=t(93790),S=t.n(P),q={};
1q.styleTagTransform=j(),q.setAttributes=z(),q.insert=W().bind(null,"head"),q.domAPI=x(),q.insertStyleElement=D();E()(S(),q),S()&&S().locals&&S().locals;var K=O}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.