1import{a as De}from"./chunk-YD4VDQMJ.js";import{a as ne,b as Wt}from"./chunk-M2CAQTRN.js";import{a as Ht}from"./chunk-2477KWTZ.js";import"./chunk-AJAGWQON.js";import{a as qt}from"./chunk-YJC5ONPK.js";import"./chunk-QJBD4VRJ.js";import"./chunk-W6FYOFIK.js";import{b as $t}from"./chunk-QMNK3GO2.js";import"./chunk-DSDDXUEL.js";import"./chunk-W3HULUU6.js";import{a as zt}from"./chunk-HGIBWS5A.js";import"./chunk-WY3PYQ3K.js";import"./chunk-TRKHOV73.js";import"./chunk-NE7QIBGA.js";import"./chunk-O3DZWUYU.js";import"./chunk-X42GTVFF.js";import"./chunk-JA3TLQKN.js";import"./chunk-GU2FORAA.js";import"./chunk-DUA22LOF.js";import"./chunk-OXXAYQVU.js";import{h as Ut}from"./chunk-7E5C6QEM.js";import"./chunk-QUDN46XZ.js";import{a as ge}from"./chunk-UTEUPMSH.js";import"./chunk-O7AZBXAP.js";import"./chunk-DI6ZWPYY.js";import"./chunk-Y4SM5U3Y.js";import"./chunk-TGPJ3R7Z.js";import"./chunk-6JR2UR3Y.js";import{a as Nt}from"./chunk-V3245JVX.js";import{a as Rt}from"./chunk-L2NZRRA3.js";import{a as jt}from"./chunk-IA4BIHPN.js";import"./chunk-HWD6DZMR.js";import"./chunk-KJKDN4Z7.js";import"./chunk-WZOFKC7B.js";import"./chunk-FGXNUQX4.js";import"./chunk-JVRNJPL7.js";import{a as Ot}from"./chunk-Z2HMW2IQ.js";import"./chunk-4MPIUD7L.js";import"./chunk-OMAR6RBO.js";import"./chunk-VOQH6L45.js";import{a as At,b as Bt}from"./chunk-QROLBOKH.js";import{a as Ft}from"./chunk-FXQ5ITI2.js";import{a as Pt}from"./chunk-GIDJVD54.js";import"./chunk-72DQ4U6K.js";import"./chunk-25YTDFSJ.js";import"./chunk-ARZGPVXK.js";import"./chunk-XRJHSHSG.js";import{a as O}from"./chunk-JE2WTDKI.js";import"./chunk-NKJNLA4H.js";import"./chunk-WL334ETE.js";import"./chunk-WDIOLPZ2.js";import{a as fe}from"./chunk-LFVYZXVL.js";import{b as Et}from"./chunk-JBGTHU2Q.js";import"./chunk-X6WED2AZ.js";import{b as lt,c as de}from"./chunk-OWUF4SRJ.js";import{a as dt}from"./chunk-56U2VUAK.js";import"./chunk-YA3REOTQ.js";import{a as Le}from"./chunk-7WOG2EAO.js";import"./chunk-HB4JGH6L.js";import"./chunk-HO7Z6GDI.js";import"./chunk-IHLDGMX5.js";import"./chunk-YFJ6KMKI.js";import"./chunk-BZ5C7JNQ.js";import"./chunk-FPCIQYGC.js";import"./chunk-FHCTE6FP.js";import{e as Vt}from"./chunk-E34OQ4RJ.js";import"./chunk-H4EPMV5Z.js";import"./chunk-MYI3YS2M.js";import"./chunk-JN6AA4VD.js";import{a as ct}from"./chunk-ZSHO3KMD.js";import"./chunk-QVGEDMLN.js";import"./chunk-UZY2R5Q5.js";import{a as io}from"./chunk-5GAGQHFR.js";import"./chunk-RYT6C367.js";import"./chunk-SNZM6YGS.js";import"./chunk-33XKUF6S.js";import"./chunk-3PGMBZAP.js";import"./chunk-FQFO62CD.js";import"./chunk-VT7CJSCD.js";import{a as _e}from"./chunk-PNYSZFNB.js";import{A as gt,G as ht,L as Ct,M as St,O as vt,P as yt,R as bt,U as ue,V as wt,W as xt,X as Tt,i as Q,ia as Mt,k as U,l as mt,la as kt,m as ut,s as me,t as _t,w as ft,wa as Lt,ya as Dt}from"./chunk-Y3MTRBLK.js";import"./chunk-XMBPLYUK.js";import"./chunk-QRMJLQVM.js";import"./chunk-24HYNKH3.js";import{g as pt}from"./chunk-ZL7MM2RJ.js";import{a as It}from"./chunk-D4PVEYVW.js";import"./chunk-XQ3OH5B7.js";import"./chunk-5AZO2E3H.js";import"./chunk-DE65ZGA7.js";import"./chunk-65I45D2I.js";import"./chunk-GZL4NBTB.js";import{a as E}from"./chunk-OMIAKVTT.js";import{D as ce,r as ie}from"./chunk-3XCK7DOC.js";import{b as at}from"./chunk-PJWNDC7A.js";import{L as st,M as j,N,c as et,e as ke,h as tt,i as ot,p as it,u as nt,x as rt}from"./chunk-QDFFLVTB.js";import"./chunk-JIVZONLP.js";import"./chunk-S43ITSQ5.js";import{e as Ze,h as Je,i as pe,k as oe}from"./chunk-5FWAKVG3.js";import{q as Xe,s as Ye,z as k}from"./chunk-KAXBUATZ.js";import{$ as Ae,$c as X,A as Pe,Ac as H,Bc as W,Cc as c,Cd as ee,Dc as r,Dd as He,Eb as we,Ec as s,Fa as w,Fc as v,Jb as a,Jd as K,Kd as te,Ld as We,Ob as G,Oc as y,Sa as _,T as Fe,Ta as f,Td as Me,Ud as Ke,Vc as u,Wb as h,Xc as l,Yd as Qe,ab as F,ad as Y,bc as I,bd as Z,cc as x,ce as Ge,g as Ie,gc as Ne,hd as xe,i as Ee,jd as m,kd as V,ld as J,pa as Be,r as Oe,rd as B,sa as Re,sd as A,ta as je,tc as Ue,td as R,ud as $e,vc as C,vd as qe,wd as Te,xc as S,yc as le,z as ae,zc as ze}from"./chunk-XW6AEKHB.js";import{a as se,b as Ve,i as oo,l as b}from"./chunk-6G35VSEK.js";var he=(()=>
1{class i{static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275mod=x({type:i})}static{this.\u0275inj=w({imports:[k,j,N,de,jt,It,zt,ne]})}}return i})();var no=()=>({});function ro(i,d){if(i&1){let e=y();r(0,"app-form",4),u("save",function(t){_(e);let n=l();return f(n.onSave(t))}),s()}if(i&2){let e=l();c("isLoading",e.isLoading)("sponsorTypes",e.sponsorTypes)("data",ee(3,no))}}var ve=(()=>{class i{constructor(e,o,t){this.sponsorService=e,this.utilitiesService=o,this.sessionService=t,this.sponsorTypes=[],this.open=Ge(!1),this.saved=Qe(),this.isLoading=!1,Ke(()=>{this.open()&&(this.isLoading=!1)})}onSave(e){return b(this,null,function*(){this.isLoading=!0;let o=yield this.sponsorService.create(e);o&&o.success?(e.logoObj&&(yield this.sponsorService.uploadImage(o.data,e.logoObj,"image")),e.bannerObj&&(yield this.sponsorService.uploadImage(o.data,e.bannerObj,"banner")),this.isLoading=!1,this.open.set(!1),this.saved.emit(o.data)):(this.isLoading=!1,this.utilitiesService.alert({header:"Error",message:o.message?o.message:"Unknown error."}))})}static{this.\u0275fac=function(o){return new(o||i)(h(O),h(E),h(Ut))}}static{this.\u0275cmp=I({type:i,selectors:[["app-create"]],viewQuery:function(o,t){if(o&1&&X(ne,5),o&2){let n;Y(n=Z())&&(t.form=n.first)}},inputs:{sponsorTypes:"sponsorTypes",open:[1,"open"]},outputs:{open:"openChange",saved:"saved"},decls:6,vars:5,consts:[["heading","Create sponsor","size","lg",3,"openChange","dismissible","open"],[3,"isLoading","sponsorTypes","data"],["cnpModalFooter","","variant","secondary",3,"click"],["cnpModalFooter","",3,"click","disabled","loading"],[3,"save","isLoading","sponsorTypes","data"]],template:function(o,t){o&1&&(r(0,"cnp-modal",0),R("openChange",function(p){return A(t.open,p)||(t.open=p),p}),C(1,ro,1,4,"app-form",1),r(2,"cnp-button",2),u("click",function(){return t.open.set(!1)}),m(3,"Close"),s(),r(4,"cnp-button",3),u("click",function(){return t.form==null?null:t.form.formSubmit()}),m(5," Save "),s()()),o&2&&(c("dismissible",!1),B("open",t.open),a(),S(t.open()?1:-1),a(3),c("disabled",(t.form==null||t.form.formGroup==null?null:t.form.formGroup.invalid)||(t.form==null?null:t.form.isTicketRequiredButMissing)||t.isLoading)("loading",t.isLoading))},dependencies:[ne,ue,U],encapsulation:2})}}return i})();var Kt=(()=>{class i{static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275mod=x({type:i})}static{this.\u0275inj=w({imports:[k,he,ge,ve]})}}return i})();function ao(i,d){if(i&1&&m(0),i&2){let e=l().$implicit;J(" ",e.type," ")}}function lo(i,d){i&1&&m(0," Default (not set) ")}function po(i,d){if(i&1&&(r(0,"option",18),C(1,ao,1,1),C(2,lo,1,0),s()),i&2){let e=d.$implicit,o=d.$index;c("value",o),a(),S(e.type.length>0?1:-1),a(),S(e.type===""?2:-1)}}function co(i,d){if(i&1){let e=y();r(0,"div",7)(1,"label",16),m(2,"Sponsor types: "),s(),r(3,"select",17),u("change",function(t){_(e);let n=l();return f(n.onSortSponsorTypeChange(t))}),v(4,"option",18),H(5,po,3,3,"option",18,le),s()()}if(i&2){let e=l();a(5),W(e.sponsorTypes)}}function mo(i,d){if(i&1&&(r(0,"label",21)(1,"p"),m(2),s()()),i&2){let e=l().$implicit;a(2),V(e.type)}}function uo(i,d){i&1&&(r(0,"label",21),m(1,"No sponsor type"),s())}function _o(i,d){if(i&1&&(r(0,"option",24),m(1),s()),i&2){let e=d.$implicit,o=l().$implicit;c("selected",e===o.logoSize),a(),J(" ",e," ")}}function fo(i,d){if(i&1){let e=y();r(0,"cnp-button",28),u("click",function(){_(e);let t=l(),n=t.$implicit,p=t.$index,g=l(2);return f(g.sortSponsorType(n,p,"up"))}),v(1,"cnp-icon",29),s()}i&2&&c("iconOnly",!0)}function go(i,d){if(i&1){let e=y();r(0,"cnp-button",30),u("click",function(){_(e);let t=l(),n=t.$implicit,p=t.$index,g=l(2);return f(g.sortSponsorType(n,p,"down"))}),v(1,"cnp-icon",31),s()}if(i&2){let e=l().$index;xe("no-up",!e),c("iconOnly",!0)}}function ho(i,d){if(i&1){let e=y();r(0,"li",19)(1,"div",6)(2,"div",20),C(3,mo,3,1,"label",21),C(4,uo,2,0,"label",21),s(),r(5,"div",22)(6,"label"),m(7,"Sponsor logo size: "),s(),r(8,"select",23),u("change",function(t){let n=_(e).$implicit,p=l(2);return f(p.onSortLogoSize(t,n))}),H(9,_o,2,2,"option",24,ze),s()(),r(11,"div",25),C(12,fo,2,1,"cnp-button",26),C(13,go,2,3,"cnp-button",27),s()()()}if(i&2){let e=d.$implicit,o=d.$index,t=l(2);c("value",o),a(3),S(e.type.length>0?3:-1),a(),S(e.type===""?4:-1),a(2),Ue("for","sponsor-sort-logo-size-"+o),a(2),c("id","sponsor-sort-logo-size-"+o),a(),W(t.logoSizes),a(3),S(o?12:-1),a(),S(o<t.sponsorTypes.length-1?13:-1)}}function Co(i,d){if(i&1&&(r(0,"ul",12),H(1,ho,14,7,"li",19,le),s()),i&2){let e=l();a(),W(e.sponsorTypes)}}function So(i,d){if(i&1){let e=y();r(0,"cnp-button",28),u("click",function(){_(e);let t=l(),n=t.$implicit,p=t.$index,g=l(2);return f(g.sortSponsor(n,p,"up"))}),v(1,"cnp-icon",29),s()}i&2&&c("iconOnly",!0)}function vo(i,d){if(i&1){let e=y();r(0,"cnp-button",30),u("click",function(){_(e);let t=l(),n=t.$implicit,p=t.$index,g=l(2);return f(g.sortSponsor(n,p,"down"))}),v(1,"cnp-icon",31),s()}if(i&2){let e=l().$index;xe("no-up",!e),c("iconOnly",!0)}}function yo(i,d){if(i&1&&(r(0,"li",32)(1,"span",21),m(2),s(),C(3,So,2,1,"cnp-button",26),C(4,vo,2,3,"cnp-button",27),s()),i&2){let e=d.$implicit,o=d.$index,t=l(2);c("value",e),a(2),V(e.name),a(),S(o?3:-1),a(),S(o<t.sponsorsToSort.length-1?4:-1)}}function bo(i,d){if(i&1&&(r(0,"ul",12),H(1,yo,5,4,"li",32,le),s()),i&2){let e=l();a(),W(e.sponsorsToSort)}}var Qt=(()=>{class i{constructor(e,o,t){this.sponsorService=e,this.modal=o,this.utilities=t,this.isLoading=!1,this.logoSizes=["","XLarge","Large","Medium","Default"],this.sponsorTypeIndex={},this.sponsorIndex={},this.currentSponsorType=""}ngOnInit(){this.sponsorTypes=this.sortConfig.config,this.verifySortConfig()}verifySortConfig(){let e={};
1this.sponsors.forEach(o=>{e[o.PK]=o}),Object.assign(this.sponsorIndex,e);for(let o=0;o<this.sponsorTypes.length;o++){let t=this.sponsorTypes[o];t.list=t.list.filter(n=>this.sponsors.some(p=>p.PK===n));for(let n of t.list)e[n]&&delete e[n];this.sponsorTypeIndex[t.type]=o}if(Object.keys(e).length){console.log("Sponsors missing from config detected!");for(let o of Object.values(e)){let t=this.sponsorTypeIndex[o.type];this.sponsorTypes[t].list.push(o.PK)}console.log("Missing sponsors re-added to sort config.")}}onSortOptionChange(e){return b(this,null,function*(){this.sortOption=e.target.value})}onSortSponsorTypeChange(e){return b(this,null,function*(){this.currentSponsorType=e.target.value,console.log(this.currentSponsorType),this.currentSponsorType==="None"?this.sponsorsToSort=[]:this.sponsorsToSort=this.sortConfig.config[this.currentSponsorType].list.map(o=>this.sponsorIndex[o])})}sortSponsorType(e,o,t){return b(this,null,function*(){this.swap(this.sortConfig.config,e,o,t)})}sortSponsor(e,o,t){return b(this,null,function*(){this.swap(this.sortConfig.config[this.currentSponsorType].list,e.PK,o,t),this.swap(this.sponsorsToSort,e,o,t)})}onSortLogoSize(e,o){return b(this,null,function*(){this.logoSize=e.target.value;let t=this.sortConfig.config.findIndex(n=>n.type===o.type);t>=0&&(this.sortConfig.config[t].logoSize=this.logoSize)})}saveConfig(){return b(this,null,function*(){try{this.isLoading=!0,yield this.sponsorService.sort(this.sortConfig.config),this.modal.close(this.sortConfig)}catch(e){this.utilities.alert({header:"An error occurred while saving sort configuration",message:e.message})}finally{this.isLoading=!1}})}swap(e,o,t,n){let p;switch(n){case"up":if(t-1<0){this.utilities.alert({header:"An error occurred while sorting",message:"Out of bounds"});break}p=e[t-1],e[t-1]=o,e[t]=p;break;case"down":if(t+1>=e.length){this.utilities.alert({header:"An error occurred while sorting",message:"Out of bounds"});break}p=e[t+1],e[t+1]=o,e[t]=p;break;default:this.utilities.alert({header:"An error occurred while sorting",message:"Invalid direction"});break}return e}static{this.\u0275fac=function(o){return new(o||i)(h(O),h(ie),h(E))}}static{this.\u0275cmp=I({type:i,selectors:[["app-sponsor-sort"]],decls:30,vars:4,consts:[[1,"ds-modal-header"],[1,"ds-modal-title"],["type","button","aria-label","Close",1,"ds-modal-close",3,"click"],["name","close"],[1,"ds-modal-body"],[1,"form-group"],[1,"row"],[1,"col"],["for","sponsor-sort-option"],["cnpInput","","id","sponsor-sort-option",3,"change"],["value","sponsorType"],["value","specificSponsorType"],[1,"sort-list"],[1,"ds-modal-footer"],["variant","secondary",3,"click"],[3,"click","loading"],["for","sponsor-sort-type"],["cnpInput","","id","sponsor-sort-type",3,"change"],[3,"value"],[1,"sort-list-item",3,"value"],[1,"sort-type-name"],[1,"me-auto"],[1,"col-9","sort-size-row"],["cnpInput","",3,"change","id"],[3,"selected"],[1,"col-2"],["variant","ghost","size","sm","ariaLabel","Move up","title","Move up",3,"iconOnly"],["variant","ghost","size","sm","ariaLabel","Move down","title","Move down",3,"iconOnly","no-up"],["variant","ghost","size","sm","ariaLabel","Move up","title","Move up",3,"click","iconOnly"],["name","chevron-up"],["variant","ghost","size","sm","ariaLabel","Move down","title","Move down",3,"click","iconOnly"],["name","chevron-down"],[1,"sort-list-item","d-flex",3,"value"]],template:function(o,t){o&1&&(r(0,"div",0)(1,"h4",1),m(2,"Configure sponsor arrangement"),s(),r(3,"button",2),u("click",function(){return t.modal.dismiss()}),v(4,"cnp-icon",3),s()(),r(5,"div",4)(6,"p"),m(7," You can sort which sponsor types will appear first, as well as the order that each sponsor will appear per type. "),s(),r(8,"div",5)(9,"div",6)(10,"div",7)(11,"label",8),m(12,"Sort: "),s(),r(13,"select",9),u("change",function(p){return t.onSortOptionChange(p)}),v(14,"option"),r(15,"option",10),m(16,"Sponsor types"),s(),r(17,"option",11),m(18,"Sponsors from specific type"),s()()(),C(19,co,7,0,"div",7),s(),v(20,"br"),r(21,"div",6)(22,"div",7),C(23,Co,3,0,"ul",12),C(24,bo,3,0,"ul",12),s()()()(),r(25,"div",13)(26,"cnp-button",14),u("click",function(){return t.modal.dismiss()}),m(27,"Close"),s(),r(28,"cnp-button",15),u("click",function(){return t.saveConfig()}),m(29,"Save"),s()()),o&2&&(a(19),S(t.sortOption==="specificSponsorType"?19:-1),a(4),S(t.sortOption==="sponsorType"?23:-1),a(),S(t.sortOption==="specificSponsorType"?24:-1),a(4),c("loading",t.isLoading))},dependencies:[U,Q,me],styles:[".sort-list[_ngcontent-%COMP%]{margin:0;padding:0;list-style:none}.sort-list-item[_ngcontent-%COMP%]{padding:var(--cnp-space-3) 0;border-block-end:1px solid var(--cnp-color-border-subtle)}
1.sort-type-name[_ngcontent-%COMP%]{width:100%}.sort-size-row[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--cnp-space-2)}"]})}}return i})();var Gt=(()=>{class i{static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275mod=x({type:i})}static{this.\u0275inj=w({imports:[k,Qt]})}}return i})();Le.register("modules/imageHandler",Bt);Le.register("modules/videoHandler",At);var Xt=(()=>{class i{labelEditor(e,o){e?.root?.setAttribute("aria-label",o)}constructor(e,o,t,n,p,g){this.sponsorsService=e,this.formBuilder=o,this.modalController=t,this.activeModal=n,this.util=p,this.quillUtil=g,this.save=new G,this.quillModules=this.quillUtil.getStandardModules()}ngOnInit(){this.formGroup=this.formBuilder.group({message:[this.data?this.data.message:"",[ke.required]],subject:[this.data?this.data.subject:"",[ke.required]],sponsors:[this.sponsors?this.sponsors:""]})}formSubmit(){return b(this,null,function*(){this.formGroup.markAllAsTouched();let e=yield this.sponsorsService.createSponsorsNotification(this.formGroup.value);e?.success?this.activeModal.close(e.data):alert("Error saving item. "+(e?.message||""))})}static{this.\u0275fac=function(o){return new(o||i)(h(O),h(st),h(ie),h(ie),h(E),h(qt))}}static{this.\u0275cmp=I({type:i,selectors:[["app-sponsor-notification"]],inputs:{data:"data",sponsors:"sponsors"},outputs:{save:"save"},decls:19,vars:3,consts:[[1,"ds-modal-header"],[1,"ds-modal-title"],["type","button","aria-label","Close",1,"ds-modal-close",3,"click"],["name","close"],[3,"formGroup"],[1,"ds-modal-body"],[1,"form-group"],["label","Subject","controlId","sponsor-notification-subject"],["cnpInput","","id","sponsor-notification-subject","type","text","formControlName","subject"],[1,"group-label"],["formControlName","message",1,"cnp-quill-themed",3,"onEditorCreated","modules"],[1,"ds-modal-footer"],["variant","secondary",3,"click"],[3,"click"]],template:function(o,t){o&1&&(r(0,"div",0)(1,"h4",1),m(2),s(),r(3,"button",2),u("click",function(){return t.activeModal.dismiss()}),v(4,"cnp-icon",3),s()(),r(5,"form",4)(6,"div",5)(7,"div",6)(8,"cnp-field",7),v(9,"input",8),s()(),r(10,"div",6)(11,"span",9),m(12,"Message"),s(),r(13,"quill-editor",10),u("onEditorCreated",function(p){return t.labelEditor(p,"Message")}),s()()(),r(14,"div",11)(15,"cnp-button",12),u("click",function(){return t.activeModal.dismiss()}),m(16,"Close"),s(),r(17,"cnp-button",13),u("click",function(){return t.formSubmit()}),m(18,"Submit"),s()()()),o&2&&(a(2),V(t.data?"Update notification":"Create notification"),a(3),c("formGroup",t.formGroup),a(8),c("modules",t.quillModules))},dependencies:[j,it,et,tt,ot,N,nt,rt,lt,kt,me,U,Q],styles:[".group-label[_ngcontent-%COMP%]{display:block;margin-block-end:var(--cnp-space-1);font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}"]})}}return i})();var Yt=(()=>{class i{static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275mod=x({type:i})}static{this.\u0275inj=w({imports:[k,j,N,de,Xt]})}}return i})();var Zt=oo(io());var xo=i=>[i];function To(i,d){if(i&1&&(r(0,"a",8),m(1),s()),i&2){let e=d.$implicit;c("routerLink",He(2,xo,e.PK)),a(),V(e.name)}}function Mo(i,d){if(i&1&&m(0),i&2){let e=d.value;V(e||"(No type)")}}function ko(i,d){if(i&1&&(r(0,"cnp-status-pill",9),m(1),K(2,"titlecase"),s()),i&2){let e=d.value;c("tone",e==="active"?"success":"danger"),a(),V(te(2,2,e))}}function Lo(i,d){if(i&1&&(m(0),K(1,"dateFormat")),i&2){let e=d.value;V(We(1,1,e,!1))}}function Do(i,d){if(i&1){let e=y();r(0,"section",0)(1,"h3",1),m(2),s(),r(3,"cnp-table",2),u("selectedChange",function(t){_(e);let n=l();return f(n.onSelectedChange(t))})("orderSaved",function(t){_(e);let n=l();return f(n.onOrderSaved(t))})("reorderCancelled",function(){_(e);let t=l();return f(t.onReorderCancelled())}),Ne(4,To,2,4,"ng-template",3)(5,Mo,1,1,"ng-template",4)(6,ko,3,4,"ng-template",5)(7,Lo,2,4,"ng-template",6),s(),r(8,"cnp-paginator",7),R("pageChange",function(t){_(e);let n=l();return A(n.page,t)||(n.page=t),f(t)})("pageSizeChange",function(t){_(e);let n=l();return A(n.pageSize,t)||(n.pageSize=t),f(t)}),s()()}if(i&2){let e=l();a(2),V(e.type||"None"),a(),c("ariaLabel",(e.type||"None")+" sponsors")("selectable",!0)("selectionBar",!1)("reorderable",!0)("reorderLocked",!!e.filterValue()||e.dragAndDropDisabled)("reorderLockReason",e.reorderLockReason())("reorderSaving",e.isSortLoading())("loading",e.isLoading)("columns",e.columns)("rows",e.pageRows())("rowKey",e.byPk)("selectLabel",e.nameOf)("reorderLabel",e.nameOf)("selected",e.selected()),a(5),c("total",e.filteredRows().length)("pageSizeOptions",e.pageSizeOptions),B("page",e.page)("pageSize",e.pageSize)}}var re=(()=>
1{class i{set dataSourceData(e){this.data=e||[],this.syncFilteredRows()}set filter(e){this.filterValue.set(e||""),this.syncFilteredRows()}constructor(e,o,t){this.sponsorService=e,this.utilities=o,this.toastService=t,this.dragAndDropDisabled=!1,this.isLoading=!1,this.selectedChange=new G,this.refresh=new G,this.data=[],this.filteredRows=F([]),this.filterValue=F(""),this.page=F(1),this.pageSize=F(50),this.isSortLoading=F(!1),this.selected=F(new Set),this.pageRows=Me(()=>{let n=this.pageSize(),p=(this.page()-1)*n;return this.filteredRows().slice(p,p+n)}),this.reorderLockReason=Me(()=>this.filterValue()?"Reordering is off while a search is applied. Clear the search to change the order.":"Reordering is off for this list."),this.columns=[{key:"name",header:"Name"},{key:"type",header:"Type"},{key:"status",header:"Status"},{key:"dateCreated",header:"Created"}],this.pageSizeOptions=[25,50,100],this.byPk=n=>n.PK,this.nameOf=n=>n.name}matchesFilter(e,o){let t=o.trim().toLowerCase();return Object.values(e).some(n=>`${n}`.toLowerCase().includes(t))}syncFilteredRows(){let e=this.filterValue(),o=e===""?[...this.data]:this.data.filter(n=>this.matchesFilter(n,e));this.filteredRows.set(o);let t=Math.max(1,Math.ceil(o.length/this.pageSize()));this.page()>t&&this.page.set(t)}onSelectedChange(e){this.selected.set(e),this.selectedChange.emit(Array.from(e))}clearSelection(){this.selected.set(new Set),this.selectedChange.emit([])}onOrderSaved(e){return b(this,null,function*(){this.isSortLoading.set(!0);let o=(this.page()-1)*this.pageSize(),t=[...this.data];t.splice(o,e.length,...e);let n=t.map(T=>T.PK),p=this.sortConfig.config,g=p.findIndex(T=>T.type===this.type);g!==-1&&(p[g].list=n);try{yield this.sponsorService.sort(p),this.toastService.showSuccess("Success","Sorted successfully")}catch(T){let z="Encounter an error!";T instanceof Error&&(z=T.message),this.utilities.alert({header:"An error occurred while saving sorting order",message:z})}this.isSortLoading.set(!1),this.refresh.emit()})}onReorderCancelled(){this.refresh.emit()}static{this.\u0275fac=function(o){return new(o||i)(h(O),h(E),h(_e))}}static{this.\u0275cmp=I({type:i,selectors:[["app-sponsor-table"]],inputs:{dataSourceData:"dataSourceData",type:"type",sortConfig:"sortConfig",filter:"filter",dragAndDropDisabled:"dragAndDropDisabled",isLoading:"isLoading"},outputs:{selectedChange:"selectedChange",refresh:"refresh"},decls:1,vars:1,consts:[[1,"sponsor-type-section"],[1,"sponsor-type-heading"],[3,"selectedChange","orderSaved","reorderCancelled","ariaLabel","selectable","selectionBar","reorderable","reorderLocked","reorderLockReason","reorderSaving","loading","columns","rows","rowKey","selectLabel","reorderLabel","selected"],["cnpCell","name"],["cnpCell","type"],["cnpCell","status"],["cnpCell","dateCreated"],["noun","sponsors",3,"pageChange","pageSizeChange","total","pageSizeOptions","page","pageSize"],[1,"record",3,"routerLink"],[3,"tone"]],template:function(o,t){o&1&&C(0,Do,9,19,"section",0),o&2&&S(t.isLoading||t.filteredRows().length>0?0:-1)},dependencies:[yt,vt,ut,bt,pe,Ye,Et],styles:["[_nghost-%COMP%]{display:block}.sponsor-type-section[_ngcontent-%COMP%]{background:var(--cnp-color-bg-card);border-radius:var(--cnp-radius-container);box-shadow:var(--cnp-shadow-low);padding:var(--cnp-space-5) var(--cnp-space-card-padding)}.sponsor-type-heading[_ngcontent-%COMP%]{margin:0 0 var(--cnp-space-4);font-size:var(--cnp-font-size-control-lg);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-heading)}.record[_ngcontent-%COMP%]{color:var(--cnp-color-link);font-weight:var(--cnp-font-weight-medium);text-decoration:none}.record[_ngcontent-%COMP%]:hover, .record[_ngcontent-%COMP%]:focus-visible{text-decoration:underline}"],changeDetection:0})}}return i})();var Vo=()=>[],Io=()=>["text","text","pill","text"],Eo=(i,d)=>d.type;function Oo(i,d){if(i&1){let e=y();r(0,"cnp-button",16),u("click",function(){_(e);let t=l(2);return f(t.create())}),v(1,"cnp-icon",17),m(2," Create "),s()}}function Po(i,d){if(i&1){let e=y();C(0,Oo,3,0,"cnp-button"),r(1,"cnp-button",11),u("click",function(){_(e);let t=l();return f(t.import())}),v(2,"cnp-icon",12),m(3," Import "),s(),r(4,"cnp-button",11),u("click",function(){_(e);let t=l();return f(t.downloadCSV())}),v(5,"cnp-icon",13),m(6," Export "),s(),r(7,"a",14),v(8,"cnp-icon",15),m(9," Settings "),s()}if(i&2){let e=l();S(e.currentUser.isSponsorCreateAttendee===!0?0:-1)}}function Fo(i,d){if(i&1){let e=y();r(0,"div",20)(1,"span",31),m(2,"Banner"),s(),r(3,"div",32),v(4,"img",33),r(5,"cnp-button",34),u("click",function(){_(e);let t=l(2);return f(t.deleteBanner())}),m(6,"Delete"),s()(),r(7,"div")(8,"a",35),m(9,"View full image"),s()()()}if(i&2){let e=l(2);a(4),c("src",e.sponsorPageDetails.banner,we),a(4),c("href",e.sponsorPageDetails.banner,we)}}function Ao(i,d){if(i&1){let e=y();r(0,"cnp-bulk-bar",36),u("clear",function(){_(e);let t=l(2);return f(t.clearSelection())}),r(1,"cnp-button",37),u("click",function(){_(e);let t=l(2);return f(t.bulkDeleteSponsor())}),v(2,"cnp-icon",38),m(3," Delete "),s()()}if(i&2){let e=l(2);c("count",e.selectedSponsorRows.length),a(),c("loading",e.actionLoading)}}function Bo(i,d){if(i&1){let e=y();r(0,"cnp-accordion",18)(1,"cnp-accordion-item",19),C(2,Fo,10,2,"div",20),v(3,"app-attribute-view",21)(4,"app-attribute-view",22),K(5,"markdown"),v(6,"app-attribute-view",23)(7,"app-attribute-view",24)(8,"app-attribute-view",25)(9,"app-attribute-view",26),s()(),r(10,"div",27)(11,"cnp-toolbar",28)(12,"cnp-search-field",29),R("valueChange",function(t){_(e);let n=l();return A(n.query,t)||(n.query=t),f(t)}),s()()(),C(13,Ao,4,2,"cnp-bulk-bar",30)}if(i&2){let e=l();c("headingLevel",3),a(2),S(e.sponsorPageDetails.banner?2:-1),a(),c("value",e.sponsorPageDetails.heading),a(),c("value",te
1(5,12,e.sponsorPageDetails.description)),a(2),c("value",e.sponsorPageDetails.showSponsorNames?"Show":"Hide"),a(),c("value",e.sponsorPageDetails.showSponsorTypes?"Show":"Hide"),a(),c("value",e.sponsorPageDetails!=null&&e.sponsorPageDetails.sponsorsLayout?e.sponsorPageDetails.sponsorsLayout:"default"),a(),c("value",e.sponsorPageDetails.showSponsorDescription?"Show":"Hide"),a(2),c("count",e.loadFailed?"":e.resultCount)("rule",!1),a(),B("value",e.query),a(),S(e.selectedSponsorRows.length>0?13:-1)}}function Ro(i,d){i&1&&(r(0,"section",3)(1,"div",39),v(2,"cnp-skeleton",40),s(),v(3,"cnp-skeleton",41),s()),i&2&&(a(2),c("rows",1),a(),c("rows",4)("columns",ee(3,Io)))}function jo(i,d){if(i&1){let e=y();r(0,"cnp-callout",4),m(1," Something went wrong loading this list, so it is not shown here. Any sponsors you saw before may be out of date. "),r(2,"cnp-button",42),u("click",function(){_(e);let t=l();return f(t.refresh())}),m(3,"Retry"),s()()}if(i&2){let e=l();a(2),c("loading",e.isLoading)}}function No(i,d){if(i&1){let e=y();r(0,"app-sponsor-table",44),u("selectedChange",function(t){_(e);let n=l().$implicit,p=l(2),g=Te(6);return f(p.selectedSponsorChange(t,n,g))})("refresh",function(){_(e);let t=l(3);return f(t.refresh())}),s()}if(i&2){let e=l().$implicit,o=l(2);c("filter",e.filter)("dataSourceData",e.group)("type",e.type)("sortConfig",o.sortConfig)("dragAndDropDisabled",(o.sponsorPageDetails==null?null:o.sponsorPageDetails.sponsorSortMode)==="name"||o.isSponsorAdminMicro)}}function Uo(i,d){if(i&1&&C(0,No,1,5,"app-sponsor-table",43),i&2){let e=l(2);S(e.currentUser.isSponsorViewAttendees?0:-1)}}function zo(i,d){if(i&1&&H(0,Uo,1,1,null,null,Eo),i&2){l();let e=Te(6);W(e)}}function $o(i,d){i&1&&v(0,"cnp-empty-state",5)}function qo(i,d){i&1&&v(0,"cnp-empty-state",6)}function Ho(i,d){if(i&1){let e=y();r(0,"app-import-body",45),u("done",function(t){_(e);let n=l();return f(n.onImportDone(t))}),s()}if(i&2){let e=l();c("headerData",e.sponsorImportHeaders)}}function Wo(i,d){if(i&1){let e=y();r(0,"cnp-dropdown",46),u("select",function(t){_(e);let n=l();return f(n.importBody==null?null:n.importBody.downloadTemplate(t))}),m(1," Download template "),s(),r(2,"cnp-button",11),u("click",function(){_(e);let t=l();return f(t.importOpen=!1)}),m(3,"Close"),s(),r(4,"cnp-button",47),u("click",function(){_(e);let t=l();return f(t.importBody==null?null:t.importBody.upload())}),m(5," Preview "),s()}if(i&2){let e=l();c("items",e.importFormatItems),a(4),c("disabled",(e.importBody==null?null:e.importBody.isLoading)??!1)("loading",(e.importBody==null?null:e.importBody.isLoading)??!1)}}function Ko(i,d){if(i&1){let e=y();r(0,"cnp-checkbox",48),u("changed",function(t){_(e);let n=l();return f(n.importBody==null?null:n.importBody.toggleOverwrite(t))}),s(),r(1,"cnp-button",49),u("click",function(){_(e);let t=l();return f(t.importOpen=!1)}),m(2," Close "),s(),r(3,"cnp-button",47),u("click",function(){_(e);let t=l();return f(t.importBody==null?null:t.importBody.import())}),m(4),s()}if(i&2){let e=l();c("checked",(e.importBody==null?null:e.importBody.updateExisting)??!1)("disabled",(e.importBody==null?null:e.importBody.isLoading)??!1),a(),c("disabled",(e.importBody==null?null:e.importBody.isLoading)??!1),a(2),c("disabled",!(e.importBody!=null&&e.importBody.successCount)||((e.importBody==null?null:e.importBody.hasHeaderErrors)??!1)||((e.importBody==null?null:e.importBody.isLoading)??!1))("loading",(e.importBody==null?null:e.importBody.isLoading)??!1),a(),J(" Import",e.importBody!=null&&e.importBody.successCount?" ("+e.importBody.successCount+(e.importBody.successCount===1?" row)":" rows)"):""," ")}}var ye=(()=>{class i{constructor(e,o,t,n,p,g,T,z,M,$,P,be){this.toastService=e,this.auth=o,this.userService=t,this.eventService=n,this.sponsorService=p,this.router=g,this.route=T,this.settingService=z,this.utilities=M,this.confirmService=$,this.csvDownloadService=P,this.importDataService=be,this.actionLoading=!1,this.createOpen=!1,this.importOpen=!1,this.importFormatItems=[{id:"csv",label:"csv"},{id:"xlsx",label:"xlsx"}],this.selectedSponsorRows=[],this.isLoading=!1,this.loadFailed=!1,this.columnsToDisplay=["name","type","status","dateCreated"],this.dataSource={data:[]},this.sponsorPageDetails={banner:"",heading:"",description:"",showSponsorNames:!0,showSponsorTypes:!0,sponsorsLayout:"",showSponsorDescription:!0,sponsorSortMode:"manual"},this.currentUser={isSponsorViewAttendees:!1,isSponsorCreateAttendee:!1,isSponsorUpdatePage:!1,isSponsorSession:!1,isSponsorSpeakers:!1,isSponsorAsset:!1,isSponsorAttachments:!1,isSponsorAnalytics:!1,isSponsorSortMode:!1,isNotificationSponsors:!1,isSponsorEventAttendeesAccess:!1,isLeadsActivationAccess:!1,isSponsorInvitedAttendeeAcce
1ss:!1},this.isSponsorAdminMicro=!0,this.resultCount="",this.hasSponsorRows=!1,this.refresh$=new Ie,this.query=F(""),this.query$=at(this.query),this.sponsorPageDetails$=new Ee(this.sponsorPageDetails),this.headerData=[["Name","String","Required","Sponsor full name","name",["name"]],["Status","String","Optional","Sponsor status [active, inactive]","status",["status"]],["Visible","Boolean","Optional","Homepage visibility [true, false]","visible",["visible"]],["Is_show_interested","Boolean","Optional","Show interested button [true, false]","isShowInterested",["is_show_iterested"]],["Is_show_logo_in_sponsor_zone","Boolean","Optional","Show sponsor logo on all sponsors' page' [true, false]","isShowLogoInSponsorZone",["is_show_logo_in_sponsor_zone"]],["Is_sponsor_clickable","Boolean","Optional","Make logo clickable [true, false]","isSponsorClickable",["is_sponsor_clickable"]],["Description","String","Optional","Sponsor details","description",["description"]],["Embeded_video_position","String","Optional","Embedded video position [left, right, center]","embededVideoPosition",["embeded_video_position"]],["Type","String","Optional","Sponsor type","type",["type"]],["Custom_sponsor_color","String","Optional","Branding HEX color ex. #E3B219","customSponsorColor",["customsponsorcolor"]],["Sponsor_url","String","Optional","Sponsor URL in this format: https://www.sponsorsiteexample.com","sponsorUrl",["sponsor_url"]],["Facebook_url","String","Optional","Sponsor Facebook URL","facebookUrl",["facebook_url"]],["Linkedin_url","String","Optional","Sponsor LinkedIn URL","linkedinUrl",["linkedin_url"]],["X_url","String","Optional","Sponsor X URL","X Url",["x_url"]],["Instagram_url","String","Optional","Sponsor Instagram URL","instagramUrl",["instagram_url"]],["Wechat_url","String","Optional","Sponsor WeChat URL","wechatUrl",["wechat_url"]],["External_sponsor_url","String","Optional","Redirect URL when logo is clicked, in this format: https://www.sponsorsiteexample.com","externalSponsorUrl",["external_sponsor_url"]],["Tags","String","Optional","Tags for sponsor","tags",["tags"]],["Button_label","String","Optional","Know more about the sponsor button label","buttonLabel",["button_label"]]],this.sponsorImportHeaders=[]}ngOnInit(){this.sponsorPageDetails.heading=this.eventService?.data?.name??"",this.load(),this.isLoading=!0,this.sponsorService.load(!0),this.loadSponsorPageDetails(),this.authSubscription=this.auth.userSubject.subscribe(e=>{this.user=e}),this.loadFailedSubscription=this.sponsorService.loadFailed$.subscribe(e=>{this.loadFailed=e}),this.userSubscribe()}userSubscribe(){this.userSubscription=this.userService.onUsersChanged(e=>{this.listUsers=e.filter(o=>o.isAnalyticsAccess===!1&&o.isAnalyticsBIAccess===!1&&o.isAttendeeAccess===!1&&o.isChatAccess===!1&&o.isGamificationAccess===!1&&o.isMeetingAccess===!1&&o.isNotificationAccess===!1&&o.isPageAccess===!1&&o.isPlaylistAccess===!1&&o.isPollAccess===!1&&o.isRegistrationSettingAccess===!1&&o.isSessionAccess===!1&&o.isSettingAccess===!1&&o.isSpeakerAccess===!1&&o.isSponsorAccess===!0&&o.isTicketAccess===!1&&o.isUserAccess===!1)})}ngOnDestroy(){this.userSubscription.unsubscribe(),this.authSubscription.unsubscribe(),this.loadFailedSubscription?.unsubscribe()}create(){this.createOpen=!0}onSponsorCreated(e){this.router.navigate([e.PK],{relativeTo:this.route})}refresh(){return b(this,null,function*(){this.loadSponsorPageDetails(),this.refresh$.next(!0)})}view(e){this.router.navigate(["speakers",e])}load(){this.filter$=this.query$.pipe(Fe(200),ae(o=>o.trim()),ae(o=>o.toLowerCase()),Ae(),Be());let e=this.refresh$.pipe(Re(!0),je(()=>(this.isLoading=!0,Oe(this.sponsorService.load(!0).finally(()=>{this.isLoading=!1})))));this.groupedByType$=Pe([this.filter$,this.sponsorService.onChange,this.sponsorPageDetails$,e]).pipe(ae(([o,t,n])=>{let p=n?.sponsorSortMode||"manual";this.sortConfig=t.find(M=>M.PK==="sponsor-sort-config")??{config:[{type:"",logoSize:"Default",list:[]}]};let g=t.filter(M=>M.PK!=="sponsor-sort-config");this.filtedData=g;let T=[];this.sortConfig.config.forEach(M=>{let $=0,P=M.list.map(L=>{let q=this.findSponsor(g,L);return q&&(q.sort=$++),q}).filter(L=>L),be=g.filter(L=>L.type==M.type&&!M.list.includes(L.PK)).map(L=>(L.sort=$++,L));P=P.concat(be),p==="name"?P.sort((L,q)=>L.name.toLowerCase().localeCompare(q.name.toLowerCase())):P.sort((L,q)=>
1L.sort-q.sort),T.push({type:M.type,group:P,filter:o})});let z=T.reduce((M,$)=>M+(o===""?$.group.length:$.group.filter(P=>this.matchesFilter(P,o)).length),0);return this.resultCount=`${z} sponsor${z===1?"":"s"}`,this.hasSponsorRows=T.some(M=>M.group.length>0),this.loadUserAccess(),T}))}findSponsor(e,o){return e.find(t=>t.PK===o)}matchesFilter(e,o){let t=o.trim().toLowerCase();return Object.values(e).some(n=>`${n}`.toLowerCase().includes(t))}loadSponsorPageDetails(){this.settingService.getSetting("sponsor-page").then(e=>{e?.data&&(this.sponsorPageDetails=se(se({},this.sponsorPageDetails),e.data),this.sponsorPageDetails$.next(this.sponsorPageDetails))})}deleteBanner(){return b(this,null,function*(){if(yield this.confirmService.ask({heading:"Delete banner?",consequence:"This removes the sponsors page banner. This cannot be undone.",confirmWord:"",confirmLabel:"Delete"}))try{let o={banner:""};(yield this.settingService.set("sponsor-page",o)).success&&(this.loadSponsorPageDetails(),this.toastService.showSuccess("Successful","Banner deleted successfully"))}catch(o){this.utilities.alert({message:o.message})}})}loadUserAccess(){return b(this,null,function*(){if(!(!this.user||this.userAccess)&&(this.userAccess=this.userService.profile.access,this.userAccess)){if((this.userAccess.isSponsorViewAttendees||typeof this.userAccess.isSponsorViewAttendees>"u")&&(this.currentUser.isSponsorViewAttendees=!0),this.currentUser.isSponsorViewAttendees===!1){let e=this.user.attributes.email.toLowerCase();if(this.dataSourcePortal){let o=this.dataSourcePortal.filter(t=>t?.email===e);this.dataSource.data=o}}Object.keys(this.currentUser).forEach(e=>{e in this.userAccess?this.currentUser[e]=this.userAccess[e]:e!=="isSponsorAdminMicro"&&(this.currentUser[e]=!0)}),this.userAccess.isSponsorAdminMicro?this.isSponsorAdminMicro=!0:this.isSponsorAdminMicro=!1}})}downloadCSV(){return b(this,null,function*(){let e=this.filtedData.map(n=>Ve(se({},n),{dateCreated:(0,Zt.default)(n.dateCreated).format("YYYY-MM-DD HH:mm"),description:this.removeHTMLTags(n.description)})),o=this.eventService.data?.brandingColors?.split("__--__")[0].split(":")[1];e.forEach(n=>{if(n.tags){n.tags=n.tags.map(g=>g.name).join(", ");let p=n.customSponsorColor.split("__--__");n.customSponsorColor=p[0].split(":")[1]??o,n.embedVideoPosition=n.embedVideoPosition??"center"}});let t=[["Sponsor id","PK"],["Name","name"],["Description","description"],["Status","status"],["Type","type"],["Show sponsor logo on all sponsors' page","isShowLogoInSponsorZone"],["Company URL","
1sponsorURL"],["External website URL","externalSponsorURL"],["DateCreated","dateCreated"],["Visible","visible"],["Is show interested","isShowInterested"],["Is sponsorclickable","isSponsorClickable"],["Embeded video position","embedVideoPosition"],["Custom sponsor color","customSponsorColor"],["Linkedin URL","linkedinURL"],["Facebook URL","facebookURL"],["Twitter URL","twitterURL"],["Wechat URL","wechatURL"],["Instagram URL","instagramURL"],["Tags","tags"],["Button label","buttonLabel"]];this.csvDownloadService.fromJsonList("sponsors",[...e],[...new Set(t)],{checkOvercapCells:!0})})}removeHTMLTags(e){return(new DOMParser().parseFromString(e,"text/html").body.textContent||"").trim()}import(){return b(this,null,function*(){this.sponsorImportHeaders=this.importDataService.getHeaders(this.headerData);let e=this.sortConfig?.config??[];if(e){let o=[];e.forEach(t=>{t.type!==""&&o.push(t.type)}),o!==null&&o.length!==0&&(this.sponsorImportHeaders.find(t=>t.name==="Type").description=`Sponsor type [${o.join(", ")}]`)}this.importOpen=!0})}onImportDone(e){return b(this,null,function*(){this.importOpen=!1,e&&(yield this.sponsorService.load(!0))})}selectedSponsorChange(e,o,t){let n=[];if(o){o.selected=e;for(let p of t)p.selected?.length&&(n=n.concat(p.selected))}else n=e;n=n.filter((p,g)=>n.findIndex(T=>T===p)===g),this.selectedSponsorRows=n}clearSelection(){this.sponsorTables?.forEach(e=>e.clearSelection()),this.selectedSponsorRows=[]}get allFilteredEmpty(){let e=this.sponsorTables?.toArray()??[];return e.length>0&&e.every(o=>o.filteredRows().length===0)}bulkDeleteSponsor(){return b(this,null,function*(){let e=[...this.selectedSponsorRows],o=e.length;if(this.actionLoading=!0,yield this.confirmService.ask({heading:`Delete ${o} sponsor${o===1?"":"s"}?`,consequence:"This permanently deletes the selected sponsors and all of their content. This cannot be undone.",confirmLabel:"Delete"})){let n=!1;try{if((yield this.sponsorService.bulkDeleteSponsors(e))?.success)n=!0,this.toastService.showSuccess("Success",`Successfully deleted ${o} sponsors.`);else throw new Error("Failed to delete.")}catch(p){this.toastService.showDanger("Failed",`Failed to delete sponsors. ${p.message}`)}yield this.sponsorService.load(!0),n&&this.clearSelection()}this.actionLoading=!1})}static{this.\u0275fac=function(o){return new(o||i)(h(_e),h(pt),h(dt),h(ct),h(O),h(Je),h(Ze),h(Vt),h(E),h(Mt),h(Ot),h($t))}}static{this.\u0275cmp=I({type:i,selectors:[["ng-component"]],viewQuery:function(o,t){if(o&1&&(X(De,5),X(re,5)),o&2){let n;Y(n=Z())&&(t.importBody=n.first),Y(n=Z())&&(t.sponsorTables=n)}},decls:19,vars:15,consts:[[1,"sponsor-page"],["heading","Sponsors",3,"level"],["cnpPageHeaderDescription",""],[1,"skeleton-section"],["tone","danger","heading","Sponsors could not be loaded","live","alert"],["icon","inbox","heading","No sponsors yet"],["icon","no-results","heading","No sponsors match your search"],[3,"openChange","saved","sponsorTypes","open"],["heading","Import sponsors","size","lg",3,"openChange","dismissible","open"],["module","sponsors",3,"headerData"],["cnpModalFooter","",1,"import-actions"],["variant","secondary",3,"click"],["name","import"],["name","export"],["cnpButton","","variant","secondary","routerLink","settings"],["name","settings"],[3,"click"],["name","create"],[3,"headingLevel"],["heading","Page settings"],[1,"preview-page-banner"],["label","Heading",3,"value"],["label","Description",3,"value"],["label","Show sponsor names",3,"value"],["label","Show sponsor types",3,"value"],["label","Layout",1,"text-capitalize",3,"value"],["label","Show sponsor description",3,"value"],[1,"list-toolbar-card"],["ariaLabel","Sponsor list controls",3,"count","rule"],["label","Search sponsors","placeholder","Search sponsors",1,"search",3,"valueChange","value"],["noun","sponsor","clearLabel","Clear selection",3,"count"],[1,"banner-label"],[1,"banner-wrapper"],["alt","Banner",3,"src"],["variant","danger","size","sm",3,"click"],["target","_blank",1,"banner-link",3,"href"],["noun","sponsor","clearLabel","Clear selection",3,"clear","count"],["variant","danger","size","sm",3,"click","loading"],["name","delete"],[1,"skeleton-heading"],["preset","text","label","",3,"rows"],["preset","table-row","label","Loading sponsors",3,"rows","columns"],["cnpCalloutAction","","variant","secondary",3,"click","loading"],[3,"filter","dataSourceData","type","sortConfig","dragAndDropDisabled"],[3,"selectedChange","refresh","filter","dataSourceData","type","sortConfig","dragAndDropDisabled"],["module","sponsors",3,"done","headerData"],[3,"select","items"],[3,"click","disabled","loading"],["label","Overwrite existing",3,"changed","checked","disabled"],["variant","secondary",3,"click","disabled"]],template:function(o,t){if(o&1){let n=y();r(0,"div",0)(1,"cnp-page-header",1)(2,"p",2),m(3," This page corresponds to your sponsor zone and allows you to include company boilerplates, images & videos.
1Categorize & tier your sponsors by creating sponsor types i.e: gold, silver & bronze. When creating individual sponsor profiles, under type input the 'group' name so that the chosen sponsors become categorized. Select sort mode to change sponsor group, logo sizes. Change the size of your sponsors logos by selecting sort mode. "),s(),C(4,Po,10,1),s(),C(5,Bo,14,14),$e(6),K(7,"async"),C(8,Ro,4,4,"section",3)(9,jo,4,1,"cnp-callout",4)(10,zo,2,0)(11,$o,1,0,"cnp-empty-state",5),C(12,qo,1,0,"cnp-empty-state",6),r(13,"app-create",7),R("openChange",function(g){return _(n),A(t.createOpen,g)||(t.createOpen=g),f(g)}),u("saved",function(g){return _(n),f(t.onSponsorCreated(g))}),s(),r(14,"cnp-modal",8),R("openChange",function(g){return _(n),A(t.importOpen,g)||(t.importOpen=g),f(g)}),C(15,Ho,1,1,"app-import-body",9),r(16,"div",10),C(17,Wo,6,3)(18,Ko,5,6),s()()()}if(o&2){a(),c("level",2),a(3),S(t.isSponsorAdminMicro?-1:4),a(),S(t.isSponsorAdminMicro?-1:5),a();let n=qe(te(7,11,t.groupedByType$));a(2),S(t.isLoading&&!n?8:t.loadFailed?9:t.hasSponsorRows?10:11),a(4),S(!t.loadFailed&&t.query()&&t.allFilteredEmpty?12:-1),a(),c("sponsorTypes",(t.sortConfig==null?null:t.sortConfig.config)??ee(14,Vo)),B("open",t.createOpen),a(),c("dismissible",!1),B("open",t.importOpen),a(),S(t.importOpen?15:-1),a(2),S(((t.importBody==null?null:t.importBody.viewStatus)??"select")==="select"?17:18)}},dependencies:[pe,Pt,re,gt,Tt,xt,U,mt,Lt,Q,ht,_t,Ct,wt,Dt,ve,ue,ft,St,De,Xe,Rt],styles:["[_nghost-%COMP%]{display:block}.sponsor-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-card-gap);padding:var(--cnp-space-page-gutter-y) var(--cnp-space-page-gutter-x)}.skeleton-section[_ngcontent-%COMP%]{background:var(--cnp-color-bg-card);border-radius:var(--cnp-radius-container);box-shadow:var(--cnp-shadow-low);padding:var(--cnp-space-5) var(--cnp-space-card-padding)}.skeleton-heading[_ngcontent-%COMP%]{max-inline-size:200px;margin-block-end:var(--cnp-space-4)}.banner-label[_ngcontent-%COMP%]{color:var(--cnp-color-text-secondary);font-size:var(--cnp-font-size-label)}.banner-link[_ngcontent-%COMP%]{color:var(--cnp-color-link);font-size:var(--cnp-font-size-label)}.preview-page-banner[_ngcontent-%COMP%] .banner-wrapper[_ngcontent-%COMP%] cnp-button[_ngcontent-%COMP%]{display:none;position:absolute;top:6px;left:6px}.preview-page-banner[_ngcontent-%COMP%] .banner-wrapper[_ngcontent-%COMP%]:hover cnp-button[_ngcontent-%COMP%]{display:block}.list-toolbar-card[_ngcontent-%COMP%]{background:var(--cnp-color-bg-card);border-radius:var(--cnp-radius-container);box-shadow:var(--cnp-shadow-low)}.search[_ngcontent-%COMP%]{--cnp-search-field-width: 220px;min-width:0}.import-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--cnp-space-3);width:100%}"]})}}return i})();var Qo=[{path:"",component:ye},{path:"settings",loadChildren:()=>import("./chunk-GJIBE2WV.js").then(i=>i.SettingsModule)},{path:":id",loadChildren:()=>import("./chunk-RWGADLSV.js").then(i=>i.ViewRoutingModule)}],Jt=(()=>{class i{static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275mod=x({type:i})}static{this.\u0275inj=w({imports:[oe.forChild(Qo),oe]})}}return i})();var eo=(()=>{class i{static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275mod=x({type:i})}static{this.\u0275inj=w({imports:[k,oe,ce,fe,re]})}}return i})();var to=(()=>{class i{static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275mod=x({type:i})}static{this.\u0275inj=w({imports:[k,he,ge,Wt]})}}return i})();var Zn=(()=>{class i{static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275mod=x({type:i})}static{this.\u0275inj=w({imports:[k,fe,Jt,Ft,Ht,Nt,Kt,to,Yt,Gt,eo,N,j,ce,ye]})}}return i})();export{Zn as SponsorModule};
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.