PageSourceSearch

https://account.canapii.com/chunk-2ICUCSYK.js

js canapii.com collected 2026-10-01 12:00:28 UTC 462,591 bytes, 4 lines download raw bytes

1import{a as Yo,b as Zo}from"./chunk-4UJCXNJE.js";import{a as na}from"./chunk-PREQYC5K.js";import{a as Jo,b as Xo,c as ln,d as Ai,e as Ei,f as ea,g as ta}from"./chunk-STOWEBK7.js";import{a as Qo}from"./chunk-N3C2H6FG.js";import"./chunk-HVKBQ4UW.js";import{b as Ko}from"./chunk-KPUSPNGO.js";import{a as Wo}from"./chunk-OHETVC3G.js";import{a as pt}from"./chunk-H37AFGLG.js";import{a as qo}from"./chunk-DDP2AJ2G.js";import{c as Ie}from"./chunk-O6T6UJOX.js";import"./chunk-NE7QIBGA.js";import"./chunk-2SGXIXZG.js";import"./chunk-JIFKKBLC.js";import"./chunk-C4MS7DNK.js";import"./chunk-IHJMD6TU.js";import{a as jo}from"./chunk-P43UV5FY.js";import"./chunk-A4FIOM7M.js";import"./chunk-YZMJNOQO.js";import"./chunk-ZM2M4T7I.js";import"./chunk-Q3SQLHFQ.js";import"./chunk-KATBQBTT.js";import{a as Ho}from"./chunk-CP2M7TFD.js";import{a as $o}from"./chunk-4OSARKSK.js";import{a as Jn}from"./chunk-TNNTZHL4.js";import"./chunk-4VSEFKV4.js";import"./chunk-AVEAC6TK.js";import{a as Go}from"./chunk-Y4SM5U3Y.js";import"./chunk-BYR6FOHH.js";import"./chunk-4R3OCM6P.js";import{b as Ro}from"./chunk-4URW5AOX.js";import{a as Uo}from"./chunk-OJOX72FE.js";import{a as Zn}from"./chunk-SHLKCSFW.js";import"./chunk-KJKDN4Z7.js";import{a as No}from"./chunk-MTEBZJP6.js";import{a as Bo}from"./chunk-FAHKMKKT.js";import{a as Yn}from"./chunk-GXMR6KNK.js";import"./chunk-63S7Z45L.js";import"./chunk-UZGYBFOB.js";import{a as Vo}from"./chunk-GA4ZWRQ2.js";import"./chunk-4MPIUD7L.js";import{a as Lo,b as zt}from"./chunk-5WZSE4JV.js";import{a as Kn}from"./chunk-QWDTC75K.js";import"./chunk-XEDJBE7K.js";import{a as Io,c as Lt}from"./chunk-CWCQVFQA.js";import"./chunk-PU4BAJCF.js";import{a as Qn}from"./chunk-MX45D7L5.js";import"./chunk-RDBQLGOI.js";import"./chunk-WWE47JCL.js";import"./chunk-72DQ4U6K.js";import"./chunk-W6QVGQJH.js";import{a as zo}from"./chunk-D2HMEQE7.js";import"./chunk-BENDDUCM.js";import"./chunk-D7TP2RB2.js";import{a as vo,c as Co}from"./chunk-FJ2I7HMZ.js";import"./chunk-CCGT3L3J.js";import"./chunk-BRMPHYYJ.js";import{e as _o,f as rt}from"./chunk-VADS3VHW.js";import{a as Wn}from"./chunk-IDTQSFGF.js";import{c as qn}from"./chunk-QSR4XSOW.js";import{a as Ft,b as Vn,c as At,d as Ln}from"./chunk-ZGH3XX3D.js";import{a as kt}from"./chunk-EYV3GWVO.js";import"./chunk-F2XU6FO6.js";import"./chunk-QRJZTPS2.js";import"./chunk-MYCFWLKL.js";import"./chunk-V7ASBT5W.js";import{c as jn}from"./chunk-HB4JGH6L.js";import{a as Hn}from"./chunk-EALUEWFB.js";import"./chunk-MZRJWZOV.js";import"./chunk-MWH5Q7LD.js";import"./chunk-FYEJJVAJ.js";import"./chunk-ETPYH4DV.js";import"./chunk-L6HRYWNR.js";import"./chunk-6E33DBBC.js";import{e as W}from"./chunk-VJX6N2HB.js";import"./chunk-H4EPMV5Z.js";import{d as fo}from"./chunk-BCE55JYA.js";import"./chunk-MYI3YS2M.js";import{a as Se,b as Pe,k as Dn,m as We,n as On,q as Pn,r as we,s as In}from"./chunk-3KNWRENG.js";import{a as X}from"./chunk-6PXU6RTR.js";import"./chunk-6DH3EJIN.js";import{a as Bn}from"./chunk-UZY2R5Q5.js";import{a as sr}from"./chunk-5GAGQHFR.js";import"./chunk-RXRKGCUL.js";import"./chunk-LW7CZM4G.js";import"./chunk-EW2NZJHY.js";import{a as $n}from"./chunk-ZIK5QK3P.js";import"./chunk-GAHMBGQ7.js";import{a as So}from"./chunk-UAWJ3VGL.js";import"./chunk-VT7CJSCD.js";import{e as Vt}from"./chunk-EDTOPITP.js";import{a as se}from"./chunk-R2ER225G.js";import{Aa as ue,C as Fo,D as Ao,H as Eo,I as ko,O as lt,P as Rn,Q as Un,R as Gn,S as ct,T as To,X as Z,Y as Do,a as st,b as Nn,ba as de,c as wo,d as Tt,f as Dt,h as yo,j as ve,k as Ot,l as V,ma as ke,n as Pt,oa as ye,pa as pe,qa as ze,ra as dt,sa as Be,u as ce,v as xo,y as Mo,ya as Oo}from"./chunk-TU3JUKDL.js";import"./chunk-6JETGMQG.js";import"./chunk-VRQFSSVW.js";import{g as Et}from"./chunk-K3U65WJB.js";import{a as It}from"./chunk-E3FOSCHV.js";import"./chunk-J2VV25SD.js";import{g as Po}from"./chunk-D7LJQ2E3.js";import"./chunk-7UO5WQYP.js";import{c as zn}from"./chunk-RGZN3DMZ.js";import{a as Ke}from"./chunk-Y4544WYO.js";import"./chunk-73R64QIM.js";import{a as le}from"./chunk-KOEZPSOA.js";import{I as Tn,J as ho,K as go,t as at}from"./chunk-ZEL44FAF.js";import"./chunk-RT33Z4W3.js";import{B as mo,C as En,J as kn,K as fe,L,M as z,c as _e,e as D,h as oe,i as te,l as po,o as Le,p as ae,q as uo,t as re,w as Ee,x as nt,y as it,z as ot}from"./chunk-CTTXKPH2.js";import{a as bo}from"./chunk-EURTYAWN.js";import"./chunk-CT5YU3F2.js";import{e as lo,h as co,j as Mt}from"./chunk-B5NVKW3K.js";import{p as An,q as yt,u as ro,w as so,z as $}from"./chunk-MRC2PHN7.js";import{$ as Zi,Ac as et,B as bt,Bc as Fe,Bd as Fn,Cb as eo,Cc as R,Cd as oo,Dc as U,Dd as Q,Ea as Oe,Eb as K,Ec as u,Ed as qe,Fa as B,Fc as r,Gc as a,Hc as S,I as yn,Ia as Me,Id as Y,Ja as be,Jb as s,Jd as ie,Kd as tt,Nc as G,Nd as ao,Ob as T,Od as sn,P as St,Qc as y,Sa as g,T as Yi,Ta as _,V as xn,Vb as to,Wb as w,Xc as h,Zc as l,bc as P,bd as me,cc as N,cd as he,d as Qi,dd as ge,gc as J,hd as A,ib as wt,id as an,jd as ne,ka as Ji,ld as p,md as E,nd as je,od as Ae,pd as no,qd as Fi,r as Je,ra as Mn,s as Ct,sd as H,ta as Xi,td as j,ud as q,ue as xt,vc as M,xc as f,yd as io,z as Xe,zc as v,zd as rn}from"./chunk-77LCFR2D.js";import{a as x,b as O,i as on,l as b}from"./chunk-6G35VSEK.js";function lr(i,c){if(i&1&&S(0,"img",2),i&2){let e=l();u("src",e.detail.banner,K)}}function cr(i,c){i&1&&S(0,"cnp-icon",3)}function dr(i,c){if(i&1){let e=y();r(0,"cnp-callout",13),p(1," The login banner could not be loaded. "),r(2,"cnp-button",14),h("click",function(){g(e);let n=l();return _(n.loadData())}),p(3," Retry "),a()()}if(i&2){let e=l();s(2),u("loading",e.loading)}}var ia="Failed to remove image. Please refresh the page and try again.",Xn=(()=>{class i{constructor(e,t,n,o){this.modalService=e,this.pageService=t,this.confirmService=n,this.toast=o,this.loadFailed=!1,this.loading=!1,this.removing=!1}ngOnInit(){this.loadData()}loadData(){return b(this,null,function*(){this.loading=!0;try{let e=yield this.pageService.getList("login-banner");this.loadFailed=!e?.success,e?.success&&e.data&&(this.detail=e.data)}finally{this.loading=!1}})}changePhoto(){return b(this,null,function*(){let e=this.modalService.open(Qn,{backdrop:"static",keyboard:!1});e.componentInstance.customAspectRatio=800/1280,e.componentInstance.resizeWidth=800,e.componentInstance.resizeHeight=1280,e.componentInstance.cropBoxResizable=!1,e.componentInstance.isResize=!0,e.componentInstance.uploadFunction=t=>this.pageService.updateLoginBanner(t),e.componentInstance.showCentralizedFilesButton=!0,yield e.result.catch(()=>{}),yield this.loadData()})}removePhoto(){return b(this,null,function*(){if(!this.removing){this.removing=!0;try{if(!(yield this.confirmRemove()))return;(yield this.pageService.remove({recordType:this.detail.SK,GSI1:this.detail.GSI1}))?.success?(this.detail.banner=null,this.toast.showSuccess("Success","Image removed successfully.")):this.toast.showWarning("Error",ia)}catch(e){console.debug("Failed to remove the login banner",e),this.toast.showWarning("Error",ia)}finally{this.removing=!1}}})}confirmRemove(){return this.confirmService.ask({heading:"Remove the login banner?",consequence:"The login page goes back to its default banner. You can upload another one at any time.",confirmWord:"",confirmLabel:"Remove banner"})}static{this.\u0275fac=function(t){return new(t||i)(w(at),w($o),w(ke),w(se))}}static{this.\u0275cmp=P({type:i,selectors:[["app-login-banner"]],decls:17,vars:4,consts:[[1,"image-card"],[1,"image-preview"],["alt","Login banner",3,"src"],["name","image",1,"image-placeholder"],[1,"image-info"],[1,"image-label"],[1,"image-size"],[1,"image-actions"],["label","Login banner","text","Used on the right side of the login page. Dimension: 800x1280. Keep important text or logo in the middle to avoid cut-off."],["variant","secondary","size","sm",1,"image-upload",3,"click"],["name","upload-horizontal"],["variant","ghost","size","sm","ariaLabel","Remove login banner",3,"click","iconOnly","disabled"],["name","delete"],["tone","danger","live","alert"],["cnpCalloutAction","","variant","secondary","loadingLabel","Loading",3,"click","loading"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"div",1),f(2,lr,1,1,"img",2)(3,cr,1,0,"cnp-icon",3),a(),r(4,"div",4)(5,"span",5),p(6,"Login banner"),a(),r(7,"span",6),p(8,"9:16 ratio"),a()(),r(9,"div",7),S(10,"cnp-help-icon",8),r(11,"cnp-button",9),h("click",function(){return n.changePhoto()}),S(12,"cnp-icon",10),p(13," Upload "),a(),r(14,"cnp-button",11),h("click",function(){return n.removePhoto()}),S(15,"cnp-icon",12),a()(),f(16,dr,4,1,"cnp-callout",13),a()),t&2&&(s(2),v(n.detail!=null&&n.detail.banner?2:3),s(12),u("iconOnly",!0)("disabled",!(n.detail!=null&&n.detail.banner)||n.removing),s(2),v(n.loadFailed?16:-1))},dependencies:[V,ue,ye,ve],styles:["[_nghost-%COMP%]{display:grid}.image-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-3);min-width:0;padding:var(--cnp-space-4);background:var(--cnp-color-bg-card);border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-container)}.image-preview[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:140px;overflow:hidden;background:var(--cnp-color-bg-surface);border:1px dashed var(--cnp-color-border);border-radius:var(--cnp-radius-element)}.image-preview[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%;max-height:100%;object-fit:contain}.image-placeholder[_ngcontent-%COMP%]{color:var(--cnp-color-icon-muted)}.image-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:var(--cnp-space-1);text-align:center}.image-label[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-semibold);color:var(--cnp-color-text-heading)}.image-size[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.image-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--cnp-space-2)}.image-upload[_ngcontent-%COMP%]{flex:1}"]})}}return i})();var oa=(()=>
1{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,Jn]})}}return i})();var _t={homeAgenda:{sub:"A dedicated page used to manage the home tab",title:"Tabbed contents"},attendees:{sub:"A list of all event registrants",title:"Attendee list"},generalAgenda:{sub:"Overview of event's agenda",title:"Event agenda"},myAgenda:{sub:"A page to view booked sessions and meetings",title:"My agenda"},speakers:{sub:"",title:"Speakers"},polls:{sub:"Multiple choice and open text questions",title:"Polls"},faqs:{sub:"Add your own or use Canapii\u2019s ready made questions",title:"FAQs"},supporters:{sub:"Dedicated expo area",title:"Sponsors"},run:{sub:"",title:"Gallery"},resourceCenter:{sub:"",title:"Resource center"},gamification:{sub:"Award points for engagement",title:"Gamification"},vod:{sub:"A dedicated page to show selected playlists",title:"Video on demand"},forum:{sub:"Message board for discussing topics",title:"Forum"},projects:{sub:"",title:"Projects"},venue:{sub:"A page to create venue location",title:"Venue"},venueMap:{sub:"A page to create floorplan",title:"Floorplan"},hyhyve:{sub:"",title:"Networking with HyHyve"},noteTaking:{sub:"",title:"My notes"},favorites:{sub:"",title:"Favorites"},allagenda:{sub:"Event agenda and/or my agenda",title:"Agenda"},allchat:{sub:"",title:"Chat"},playlists:{sub:"",title:"Sessions"},flights:{sub:"",title:"Flights"},hotel:{sub:"",title:"Hotels"},socialWall:{sub:"",title:"Social wall"},shoutOut:{sub:"",title:"Shout-out"},eventWall:{sub:"",title:"Event wall"},interactiveFloorplan:{sub:"interactive floor plan for venue navigation",title:"Interactive floorplan"}};function ut(i,c=_t){return i?.altName||c?.[i?.menu]?.title||i?.name||""}var pr=(i,c)=>c.menu;function ur(i,c){if(i&1){let e=y();r(0,"cnp-checkbox",8),h("changed",function(n){g(e);let o=l().$implicit,d=l(2);return _(d.selectMenu({checked:n},o))}),a()}if(i&2){let e=l().$implicit,t=l(2);u("label",t.menuLabel(e))("description",(t.descriptions[e.menu]==null?null:t.descriptions[e.menu].sub)??"")("disabled",t.isLoading||t.remainingSlots===0&&!t.selectedMenus.includes(e))}}function mr(i,c){if(i&1&&f(0,ur,1,3,"cnp-checkbox",7),i&2){let e=c.$implicit;v(e.visible?0:-1)}}function hr(i,c){if(i&1&&(r(0,"fieldset",1)(1,"legend",4),p(2,"Select menu"),a(),r(3,"p",5),p(4),a(),r(5,"div",6),R(6,mr,1,1,null,null,pr),a()()),i&2){let e=l();s(4),E(e.remainingHint),s(2),U(e.groupItem)}}var aa=5,cn=(()=>{class i{get writeActive(){return this.isLoading}constructor(e,t){this.settingService=e,this.toastService=t,this.added=new T,this.open=!1,this.hasError=!1,this.isLoading=!1,this.groupItem=[],this.descriptions=_t,this.selectedMenus=[]}openWith(e){this.menu=e.menu,this.otherFeatures=e.otherFeatures,this.appmenulength=e.appmenulength,this.appmenu=e.appmenu,this.defappmenu=e.defappmenu,this.selectedMenus=[],this.buildChoices(),this.open=!0}close(){this.open=!1}ngOnInit(){this.menu&&this.buildChoices()}buildChoices(){this.groupItem=[],this.filteredMenu=this.menu.value.filter(e=>!this.appmenu.some(t=>t.name===e.name)),this.filteredMenu.forEach(e=>{!e.items&&e.menu!=="myAgenda"&&e.menu!=="generalAgenda"&&this.groupItem.push(e)}),this.filteredAppMenu=this.defappmenu.filter(e=>!this.appmenu.some(t=>t.name===e.name)),this.filteredAppMenu.forEach(e=>{e.items||this.groupItem.push(e)})}menuLabel(e){return ut(e)}get remainingSlots(){return Math.max(0,aa-this.appmenulength-this.selectedMenus.length)}get remainingHint(){let e=this.remainingSlots;return e===0?"No more items can be added.":`You can add ${e} more ${e===1?"item":"items"}.`}get overLimit(){return this.appmenulength+this.selectedMenus.length>aa}addAppMenu(){return b(this,null,function*(){this.isLoading=!0;let e=this.selectedMenus.findIndex(t=>t.sort===1);e!==-1&&(this.selectedMenus[e].sort=2);try{let t=yield this.settingService.addAppMenu(this.selectedMenus);t?.success?(this.toastService.showSuccess("Successful","Successfully added"),this.open=!1,this.added.emit()):this.toastService.showDanger("Error",t?.message||"An unexpected error has occurred while saving. Please refresh the page and try again.")}catch(t){console.debug("Failed to add app menus",t),this.toastService.showDanger("Error","An unexpected error has occurred while saving. Please refresh the page and try again.")}finally{this.isLoading=!1}})}selectMenu(e,t){return b(this,null,function*(){if(e.checked)this.selectedMenus.push(t);else{let n=this.selectedMenus.findIndex(o=>o===t);this.selectedMenus.splice(n,1)}})}static{this.\u0275fac=function(t){return new(t||i)(w(W),w(se))}}static{this.\u0275cmp=P({type:i,selectors:[["app-add-app-menu"]],inputs:{menu:"menu",appmenulength:"appmenulength",appmenu:"appmenu",otherFeatures:"otherFeatures",defappmenu:"defappmenu"},outputs:{added:"added"},decls:6,vars:7,consts:[["heading","Add app menu",3,"openChange","open","dismissible","showClose"],[1,"choice-group"],["cnpModalFooter","","variant","secondary",3,"click","disabled"],["cnpModalFooter","","variant","primary","loadingLabel","Saving",3,"click","disabled","loading"],[1,"choice-legend"],[1,"choice-hint"],[1,"choice-list"],[3,"label","description","disabled"],[3,"changed","label","description","disabled"]],template:function(t,n){t&1&&(r(0,"cnp-modal",0),q("openChange",function(d){return j(n.open,d)||(n.open=d),d}),f(1,hr,8,1,"fieldset",1),r(2,"cnp-button",2),h("click",function(){return n.close()}),p(3," Close "),a(),r(4,"cnp-button",3),h("click",function(){return n.addAppMenu()}),p(5," Save "),a()()),t&2&&(H("open",n.open),u("dismissible",!1)("showClose",!n.writeActive),s(),v(n.open?1:-1),s(),u("disabled",n.isLoading),s(2),u("disabled",n.isLoading||n.overLimit)("loading",n.isLoading))},dependencies:[V,lt,Z],styles:[".dialog-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-5)}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6)}@media (width <= 768px){.form-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.span-2[_ngcontent-%COMP%]{grid-column:1/-1}.field-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-1);min-width:0}.field-block[_ngcontent-%COMP%] > cnp-segmented[_ngcontent-%COMP%], .field-block[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{align-self:flex-start}.field-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--cnp-space-1);font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.field-action[_ngcontent-%COMP%]{flex:none;margin-inline-start:var(--cnp-space-2);white-space:nowrap}cnp-combobox[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.theme-preview[_ngcontent-%COMP%]{max-width:100%;margin-top:var(--cnp-space-1);border-radius:var(--cnp-radius-element)}.choice-group[_ngcontent-%COMP%]{min-width:0;margin:0;padding:0;border:0}.choice-legend[_ngcontent-%COMP%]{float:none;width:auto;margin:0 0 var(--cnp-space-1);padding:0;font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.choice-hint[_ngcontent-%COMP%]{margin:0 0 var(--cnp-space-2);font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.choice-hint.is-required[_ngcontent-%COMP%]{color:var(--cnp-color-danger-fg)}.choice-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-3);padding:var(--cnp-space-4);border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-element)}"]})}}return i})();var ra=(()=>
1{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,L,z,cn]})}}return i})();var gr=(i,c)=>c.menu;function _r(i,c){if(i&1&&(r(0,"cnp-field",8,0),S(2,"input",9),a(),r(3,"cnp-field",10,1),S(5,"textarea",11),a()),i&2){let e=A(1),t=A(4),n=l(2);u("required",!0)("error",n.groupNameError),s(2),M("aria-describedby",e.controlAttrs().describedBy)("aria-invalid",e.controlAttrs().invalid)("aria-required",e.controlAttrs().required),s(3),M("aria-describedby",t.controlAttrs().describedBy)}}function fr(i,c){if(i&1){let e=y();r(0,"div",6)(1,"span",12),p(2," Usage "),S(3,"cnp-help-icon",13),a(),r(4,"cnp-segmented",14),h("valueChange",function(n){g(e);let o=l(2);return _(o.selectMobileAccess(n))}),a()()}if(i&2){let e=l(2);s(4),u("segments",e.mobileAccessSegments)("value",e.mobileAccess)}}function vr(i,c){if(i&1){let e=y();r(0,"div",6)(1,"span",12),p(2," Target attendees "),S(3,"cnp-help-icon",15),a(),r(4,"app-target-attendees",16),h("changed",function(n){g(e);let o=l(2);return _(o.onTargetAttendeesChanged(n))}),a()()}if(i&2){let e=l(2);s(4),u("data",e.targetAttendees)("showLabel",!1)("withUpdate",!1)("withEdit",!0)}}function Cr(i,c){i&1&&(r(0,"p",18),p(1,"Select at least 2 menu items."),a())}function br(i,c){if(i&1){let e=y();r(0,"cnp-checkbox",21),h("changed",function(n){g(e);let o=l().$implicit,d=l(3);return _(d.selectMenu({checked:n},o.menu))}),a()}if(i&2){let e=l().$implicit,t=l(3);u("label",t.menuLabel(e))("description",(t.descriptions[e.menu]==null?null:t.descriptions[e.menu].sub)??"")("disabled",t.isLoading)}}function Sr(i,c){if(i&1&&f(0,br,1,3,"cnp-checkbox",20),i&2){let e=c.$implicit;v(e.visible?0:-1)}}function wr(i,c){if(i&1&&(r(0,"fieldset",7)(1,"legend",17),p(2,"Select menu"),a(),f(3,Cr,2,0,"p",18),r(4,"div",19),R(5,Sr,1,1,null,null,gr),a()()),i&2){let e=l(2);s(),ne("visually-hidden",e.menu.key==="addMenu"),s(2),v(e.menu.key!=="addMenu"&&e.selectedMenus.length<2?3:-1),s(2),U(e.groupItem)}}function yr(i,c){if(i&1&&(r(0,"form",3),f(1,_r,6,6),f(2,fr,5,2,"div",6),f(3,vr,5,4,"div",6),f(4,wr,7,3,"fieldset",7),a()),i&2){let e=l();u("formGroup",e.groupForm),s(),v(e.menu.key!=="addMenu"?1:-1),s(),v(e.type&&e.menu.key!=="addMenu"?2:-1),s(),v(e.menu.key==="updateGroup"?3:-1),s(),v(e.menu.key!=="updateGroup"?4:-1)}}var dn=(()=>{class i{get writeActive(){return this.isLoading}constructor(e,t,n){this.settingService=e,this.fb=t,this.toastService=n,this.saved=new T,this.open=!1,this.hasError=!1,this.isLoading=!1,this.groupItem=[],this.selectedMenus=[],this.mobileAccess="both",this.targetAttendees=[],this.mobileMenuAccesOptions=[{value:"both",viewValue:"Both"},{value:"highlight",viewValue:"Highlight"},{value:"sidebar",viewValue:"Sidebar"}],this.mobileAccessSegments=this.mobileMenuAccesOptions.map(o=>({value:o.value,label:o.viewValue})),this.descriptions=_t}get heading(){return this.menu?.key==="addMenu"?"Add menu":this.menu?.key==="updateGroup"?"Update group menu":"Create group menu"}openWith(e){this.menu=e.menu,this.type=e.type??void 0,this.groupItem=[],this.selectedMenus=[],this.mobileAccess="both",this.targetAttendees=[],this.buildForm(),this.open=!0}close(){this.open=!1}get canSave(){return this.isLoading?!1:this.menu?.key==="addMenu"?!0:this.menu?.key==="updateGroup"?!this.groupForm?.invalid:!this.groupForm?.invalid&&this.selectedMenus.length>=2}save(){if(this.menu?.key==="addMenu"){this.addMenu();return}if(this.menu?.key==="updateGroup"){this.updateGroupNameDesc();return}this.addGroup()}ngOnInit(){this.menu&&this.buildForm()}buildForm(){if(this.menu.value.forEach(e=>{e.items||this.groupItem.push(e)}),this.groupForm=this.fb.group({groupName:[null,[D.required]],groupDescription:""},{}),this.menu.key==="updateGroup"&&this.menu.group){let e=this.menu.group;this.groupForm.patchValue({groupName:e.name,groupDescription:e.description}),this.mobileAccess=e.mobileAccess||"both",this.targetAttendees=e.targetAttendees?[...e.targetAttendees]:[]}}get groupNameError(){let e=this.groupForm?.controls?.groupName;return e?.errors?.required&&e.touched?"Group name is required.":""}menuLabel(e){return ut(e)}addGroup(){return b(this,null,function*(){this.isLoading=!0;let e={name:this.groupForm.controls.groupName.value,description:this.groupForm.controls.groupDescription.value,items:this.selectedMenus,sort:this.menu.lastSortValue,visible:!0};this.type&&(e.mobileAccess=this.mobileAccess);
1let t=this.type?yield this.settingService.addHighlightGroupMenu(e):yield this.settingService.addGroupMenu(e);t?.data?this.closeSaved(t,"Group successfully added"):this.keepRefused(t,"Failed to add group")})}addMenu(){return b(this,null,function*(){this.isLoading=!0;let e=this.menu.group,t=this.snapshotGroup(e,["items"]);this.selectedMenus.forEach(o=>{let d=this.groupItem.find(m=>m.menu===o);d&&e.items.push(d)});let n=this.type?yield this.settingService.updateHighlightGroupMenu(e):yield this.settingService.updateGroupMenu(e);n?.success?this.closeSaved(n,"Successfully added"):this.keepRefused(n,"Failed to add the menu to the group",t)})}updateGroupNameDesc(){return b(this,null,function*(){if(this.groupForm.invalid){this.groupForm.markAllAsTouched();return}this.isLoading=!0;let e=this.menu.group,t=this.snapshotGroup(e,["name","description","targetAttendees","mobileAccess"]);e.name=this.groupForm.controls.groupName.value,e.description=this.groupForm.controls.groupDescription.value,e.targetAttendees=this.targetAttendees,this.type&&(e.mobileAccess=this.mobileAccess);let n=this.type?yield this.settingService.updateHighlightGroupMenu(e):yield this.settingService.updateGroupMenu(e);n?.success?this.closeSaved(n,"Group updated successfully"):this.keepRefused(n,"Failed to update the group",t)})}closeSaved(e,t){this.isLoading=!1,this.toastService.showSuccess("Successful",t),this.open=!1,this.saved.emit(e)}keepRefused(e,t,n){this.isLoading=!1,n?.(),this.toastService.showDanger("Failed",e?.message||t)}snapshotGroup(e,t){let n=t.map(o=>{let d=e[o];return{key:o,had:Object.keys(e).includes(o),value:d,contents:Array.isArray(d)?[...d]:null}});return()=>{for(let{key:o,had:d,value:m,contents:C}of n){if(!d){delete e[o];continue}C&&m.splice(0,m.length,...C),e[o]=m}}}isExist(e){return this.selectedMenus.findIndex(n=>n===e)>=0}selectAll(e){e.checked?this.groupItem.forEach(t=>{this.selectedMenus.push(t.menu)}):this.selectedMenus=[]}isSelectAll(){return this.selectedMenus.length===this.menu.value.length}selectMenu(e,t){if(e.checked)this.selectedMenus.push(t);else{let n=this.selectedMenus.findIndex(o=>o===t);this.selectedMenus.splice(n,1)}}selectMobileAccess(e){this.mobileAccess=e}onTargetAttendeesChanged(e){this.targetAttendees=e}static{this.\u0275fac=function(t){return new(t||i)(w(W),w(fe),w(se))}}static{this.\u0275cmp=P({type:i,selectors:[["app-add-update-group-menu"]],inputs:{menu:"menu",type:"type"},outputs:{saved:"saved"},decls:6,vars:8,consts:[["groupNameField",""],["groupDescriptionField",""],[3,"openChange","heading","open","dismissible","showClose"],[1,"dialog-stack",3,"formGroup"],["cnpModalFooter","","variant","secondary",3,"click","disabled"],["cnpModalFooter","","variant","primary","loadingLabel","Saving",3,"click","disabled","loading"],[1,"field-block"],[1,"choice-group"],["label","Group name","controlId","groupName",3,"required","error"],["cnpInput","","id","groupName","type","text","formControlName","groupName","placeholder","Enter group name"],["label","Group description","controlId","groupDescription"],["cnpInput","","id","groupDescription","formControlName","groupDescription","placeholder","Enter description"],[1,"field-label"],["label","Usage","text","Show in which menu type"],["ariaLabel","Menu usage type",3,"valueChange","segments","value"],["label","Target attendees","text","Control who can see this menu item."],[3,"changed","data","showLabel","withUpdate","withEdit"],[1,"choice-legend"],[1,"choice-hint","is-required"],[1,"choice-list"],[3,"label","description","disabled"],[3,"changed","label","description","disabled"]],template:function(t,n){t&1&&(r(0,"cnp-modal",2),q("openChange",function(d){return j(n.open,d)||(n.open=d),d}),f(1,yr,5,5,"form",3),r(2,"cnp-button",4),h("click",function(){return n.close()}),p(3,"Close"),a(),r(4,"cnp-button",5),h("click",function(){return n.save()}),p(5," Save "),a()()),t&2&&(u("heading",n.heading),H("open",n.open),u("dismissible",!1)("showClose",!n.writeActive),s(),v(n.open?1:-1),s(),u("disabled",n.isLoading),s(2),u("disabled",!n.canSave)("loading",n.isLoading))}
1,dependencies:[z,ae,_e,oe,te,re,Ee,Ie,V,lt,pe,ye,Z,ce,de],styles:[".dialog-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-5)}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6)}@media (width <= 768px){.form-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.span-2[_ngcontent-%COMP%]{grid-column:1/-1}.field-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-1);min-width:0}.field-block[_ngcontent-%COMP%] > cnp-segmented[_ngcontent-%COMP%], .field-block[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{align-self:flex-start}.field-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--cnp-space-1);font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.field-action[_ngcontent-%COMP%]{flex:none;margin-inline-start:var(--cnp-space-2);white-space:nowrap}cnp-combobox[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.theme-preview[_ngcontent-%COMP%]{max-width:100%;margin-top:var(--cnp-space-1);border-radius:var(--cnp-radius-element)}.choice-group[_ngcontent-%COMP%]{min-width:0;margin:0;padding:0;border:0}.choice-legend[_ngcontent-%COMP%]{float:none;width:auto;margin:0 0 var(--cnp-space-1);padding:0;font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.choice-hint[_ngcontent-%COMP%]{margin:0 0 var(--cnp-space-2);font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.choice-hint.is-required[_ngcontent-%COMP%]{color:var(--cnp-color-danger-fg)}.choice-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-3);padding:var(--cnp-space-4);border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-element)}"]})}}return i})();var sa=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,L,z,dn]})}}return i})();function mt(i){return typeof i=="string"?i:i?.url}var la="One or more screenshots could not be uploaded. Please try again.";function ei(i,c){return i.size/1024/1e3>c}function xr(i){return new Promise(c=>{let e=new Image,t=URL.createObjectURL(i),n=o=>{URL.revokeObjectURL(t),c(o)};e.onload=()=>n({width:e.width,height:e.height}),e.onerror=()=>n({width:0,height:0}),e.src=t})}function ti(t,n){return b(this,arguments,function*(i,c,e=xr){for(let o=0;o<i.length;o++){let d=i[o],m=d.name.split(".").pop()?.toLowerCase();if(!["jpg","png"].includes(m)||!c(d,yield e(d)))return!1}return!0})}function pn(i){return typeof i=="string"&&i.trim()!==""}function ni(i,c,e,t){return b(this,null,function*(){i.busy[i.key]=!0;try{let n=yield Promise.allSettled(Array.from(c,m=>e.upload(m,"image","branded-app-assets",!0))),o=!1,d=i.control.value;for(let m of n){let C=m.status==="fulfilled"&&m.value?.success?m.value.data:void 0;pn(C)?d.push(C):o=!0}i.control.setValue(d),i.afterStore(),o&&t.alert({header:"Error",message:la})}catch{t.alert({header:"Error",message:la})}finally{i.busy[i.key]=!1}})}var ca=i=>String(i).padStart(2,"0");function ee(i){return i?.year?`${i.year}-${ca(i.month)}-${ca(i.day)}`:""}function De(i){let c=/^(\d{4})-(\d{2})-(\d{2})$/.exec(i??"");return c?{year:Number(c[1]),month:Number(c[2]),day:Number(c[3])}:null}function Qe(i,c,e,t){return t||!i||!c?c:(e==="min"?i<c:i>c)?i:c}function Re(i,c=()=>null){return e=>{let t=ee(e.value),n=ee(i()),o=ee(c());return t&&n&&t<n?{dateMin:n}:t&&o&&t>o?{dateMax:o}:null}}function Fr(i,c){i&1&&(r(0,"cnp-callout",20),p(1," If you publish through your organization's accounts, you must understand the requirements for both Apple App Store and Google Play. You must also provide the following files to support development: "),r(2,"ul",24)(3,"li"),p(4,"iOS development and distribution certificate"),a(),r(5,"li"),p(6,"iOS development and distribution provisioning profiles"),a(),r(7,"li"),p(8,"iOS APNs certificate for push notification"),a(),r(9,"li"),p(10,"Android keystore file, key alias and key password for app signing"),a(),r(11,"li"),p(12,"ProGuard Rules (if applicable)"),a()()())}function Ar(i,c){if(i&1){let e=y();r(0,"div",25)(1,"span",17),p(2," Status "),S(3,"cnp-help-icon",26),a(),r(4,"cnp-segmented",27),h("valueChange",function(n){g(e);let o=l();return _(o.toggleStatus(n))}),a()(),r(5,"cnp-date-field",28),h("valueChange",function(n){g(e);let o=l();return _(o.setReleaseDate(n))}),a(),r(6,"cnp-field",29,4),S(8,"textarea",30),a()}if(i&2){let e=A(7),t=l();s(4),u("segments",t.statusSegments)("value",t.formGroup.get("status").value),s(),u("required",!0)("value",t.releaseDateIso)("min",t.releaseMinShown)("max",t.releaseMaxShown)("disabled",t.isDisabledReleaseDate)("hint",t.isDisabledReleaseDate?"Planned release date cannot be after the start date of the event.":"")("error",t.fieldError(t.formGroup.get("releaseDate"),"Planned release date")),s(3),M("aria-describedby",e.controlAttrs().describedBy)}}function Er(i,c){i&1&&(r(0,"cnp-callout",21),p(1," There are some errors. Please try to fix the errors above and then click Save again. "),a())}var ii=(()=>
1{class i{set data(e){this._data=x({appStoreName:"",installedAppName:"",shortDescription:"",fullDescription:"",appStoreDeployment:"canapii",appIcon:"",appSplashScreen:"",pushNotificationIcon:"",iOSiPhoneScreenshots:[],iOSiPadScreenshots:[],androidPhoneScreenshots:[],androidTabletScreenshots:[],androidFeaturedGraphic:"",releaseDate:"",notes:"",status:"active"},e)}get data(){return this._data}get writeActive(){return!!this.isLoading}constructor(e,t,n,o){this.settingService=e,this.eventService=t,this.accountService=n,this.formBuilder=o,this.submit=new T,this.closeModal=new T,this.subscription$=[],this.isSuperAdmin=!1,this.hasSaveError=!1,this.hasError=!1,this.now=new Date,this.isDisabledReleaseDate=!1,this.fieldError=be(pt).message,this.deploymentSegments=[{value:"canapii",label:"Canapii"},{value:"own",label:"Own"}],this.statusSegments=[{value:"active",label:"Active"},{value:"locked",label:"Locked"}]}ngOnInit(){this.subscription$.push(this.accountService.onChanged.subscribe(d=>{this.isSuperAdmin=!!d.user.superadmin,this.formGroup?.get("releaseDate")?.updateValueAndValidity()})),this.minDate={year:this.now.getFullYear(),month:this.now.getMonth()+1,day:this.now.getDate()};let e=new Date(this.eventDetail.startDate),t=e>=this.now?e:this.now;this.maxDate={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};let n=this.data.releaseDate?new Date(this.data.releaseDate):null;this.releaseDateModel=n?{year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()}:null,this.isDisabledReleaseDate=this.now>e;let o=Re(()=>this.minDate,()=>this.maxDate);this.formGroup=this.formBuilder.group({appStoreName:[this.data.appStoreName,[D.required,D.maxLength(30)]],installedAppName:[this.data.installedAppName,[D.required,D.maxLength(15)]],shortDescription:[this.data.shortDescription,[D.required,D.maxLength(80)]],fullDescription:[this.data.fullDescription,[D.required,D.maxLength(4e3)]],appStoreDeployment:[this.data.appStoreDeployment,[D.required]],releaseDate:[this.releaseDateModel,d=>this.releaseDateChecked?D.required(d)??o(d):null],notes:[this.data.notes,[]],status:[this.data.status,[D.required]]})}counterOf(e,t){let n=this.formGroup.get(e)?.value;return`${typeof n=="string"?n.length:0} / ${t}`}get releaseDateIso(){return ee(this.releaseDateControl?.value)}get minDateIso(){return ee(this.minDate)}get maxDateIso(){return ee(this.maxDate)}get releaseMinShown(){return Qe(this.releaseDateIso,this.minDateIso,"min",this.releaseDateChecked)}get releaseMaxShown(){return Qe(this.releaseDateIso,this.maxDateIso,"max",this.releaseDateChecked)}get releaseDateChecked(){return this.isSuperAdmin&&!this.isDisabledReleaseDate}setReleaseDate(e){let t=this.releaseDateControl;t.setValue(De(e)),t.markAsDirty(),t.markAsTouched()}formSubmit(){return b(this,null,function*(){let e=this.formGroup,t=this.releaseDateControl.value;this.hasError=!e.valid,this.hasError||this.submit.emit({appStoreName:e.get("appStoreName").value,installedAppName:e.get("installedAppName").value,shortDescription:e.get("shortDescription").value,fullDescription:e.get("fullDescription").value,appStoreDeployment:e.get("appStoreDeployment").value,releaseDate:t?this.toISODate(new Date(t.year,t.month-1,t.day))+"T00:00:00Z":this.data.releaseDate,notes:e.get("notes").value,status:e.get("status").value,appIcon:this.data.appIcon,appSplashScreen:this.data.appSplashScreen,pushNotificationIcon:this.data.pushNotificationIcon,iOSiPhoneScreenshots:this.data.iOSiPhoneScreenshots,iOSiPadScreenshots:this.data.iOSiPadScreenshots,androidPhoneScreenshots:this.data.androidPhoneScreenshots,androidTabletScreenshots:this.data.androidTabletScreenshots,androidFeaturedGraphic:this.data.androidFeaturedGraphic})})}pad(e,t=2){let n=e+"";for(;n.length<t;)n="0"+n;return n}toISODate(e){return e.getFullYear()+"-"+this.pad(e.getMonth()+1)+"-"+this.pad(e.getDate())}toggleAppstoreDeployment(e){this.formGroup.controls.appStoreDeployment.setValue(e)}toggleStatus(e){this.formGroup.controls.status.setValue(e)}close(){this.closeModal.emit()}get releaseDateControl(){return this.formGroup.get("releaseDate")}
1ngOnDestroy(){this.subscription$.forEach(e=>e.unsubscribe())}static{this.\u0275fac=function(t){return new(t||i)(w(W),w(X),w($n),w(fe))}}static{this.\u0275cmp=P({type:i,selectors:[["app-update-detail"]],inputs:{isLoading:"isLoading",eventDetail:"eventDetail",data:"data"},outputs:{submit:"submit",closeModal:"closeModal"},decls:27,vars:36,consts:[["appStoreNameField",""],["installedAppNameField",""],["shortDescriptionField",""],["fullDescriptionField",""],["notesField",""],["heading","Update branded app details","size","lg",3,"openChange","open","dismissible","showClose"],[3,"formGroup"],[1,"form-grid"],["label","App store name","controlId","brandedAppStoreName","help","This is how your app will be displayed in the app store.",3,"required","counter","error"],["cnpInput","","id","brandedAppStoreName","type","text","formControlName","appStoreName","required",""],["label","Installed app name","controlId","brandedInstalledAppName","help","This is how your app will be displayed once installed on a device.",3,"required","counter","error"],["cnpInput","","id","brandedInstalledAppName","type","text","formControlName","installedAppName","required",""],["label","Short description","controlId","brandedShortDescription","help","A brief summary that describes what your app is all about.",1,"span-all",3,"required","counter","error"],["cnpInput","","id","brandedShortDescription","type","text","formControlName","shortDescription","required",""],["label","Full description","controlId","brandedFullDescription","help","A comprehensive overview of your app's features, benefits, and functionality.",1,"span-all",3,"required","counter","error"],["cnpInput","","id","brandedFullDescription","name","fullDescription","formControlName","fullDescription","rows","6","required",""],[1,"choice","span-all"],[1,"choice-label"],["label","App store deployment","text","Canapii publishes the app under Canapii's Apple App Store and Google Play accounts; Own publishes it under your organization's accounts."],["ariaLabel","App store deployment",3,"valueChange","segments","value"],["tone","warning","heading","Reminder"],["tone","danger",1,"form-error"],["cnpModalFooter","","variant","secondary",3,"click","disabled"],["cnpModalFooter","","loadingLabel","Saving",3,"click","disabled","loading"],[1,"callout-list"],[1,"choice"],["label","Status","text","Changing the status to locked will hide the update buttons and stop all details from being changed/removed by anyone but a superadmin."],["ariaLabel","Status",3,"valueChange","segments","value"],["label","Planned release date","mode","date","help","The target date to release the app to the public. Keep in mind that the app store review process can take anywhere from a few hours to several days, depending on various factors. It is recommended to set the date at least a week before the start of the event.",3,"valueChange","required","value","min","max","disabled","hint","error"],["label","Notes","controlId","brandedNotes",1,"span-all"],["cnpInput","","id","brandedNotes","name","notes","formControlName","notes"]],template:function(t,n){if(t&1){let o=y();r(0,"cnp-modal",5),h("openChange",function(){return g(o),_(n.close())}),r(1,"form",6)(2,"div",7)(3,"cnp-field",8,0),S(5,"input",9),a(),r(6,"cnp-field",10,1),S(8,"input",11),a(),r(9,"cnp-field",12,2),S(11,"input",13),a(),r(12,"cnp-field",14,3),S(14,"textarea",15),a(),r(15,"div",16)(16,"span",17),p(17," Ap
1p store deployment "),S(18,"cnp-help-icon",18),a(),r(19,"cnp-segmented",19),h("valueChange",function(m){return g(o),_(n.toggleAppstoreDeployment(m))}),a(),f(20,Fr,13,0,"cnp-callout",20),a(),f(21,Ar,9,10),a(),f(22,Er,2,0,"cnp-callout",21),a(),r(23,"cnp-button",22),h("click",function(){return g(o),_(n.close())}),p(24,"Close"),a(),r(25,"cnp-button",23),h("click",function(){return g(o),_(n.formSubmit())}),p(26," Save "),a()()}if(t&2){let o=A(4),d=A(7),m=A(10),C=A(13);u("open",!0)("dismissible",!1)("showClose",!n.writeActive),s(),u("formGroup",n.formGroup),s(2),u("required",!0)("counter",n.counterOf("appStoreName",30))("error",n.fieldError(n.formGroup.get("appStoreName"),"App store name")),s(2),M("aria-describedby",o.controlAttrs().describedBy)("aria-invalid",o.controlAttrs().invalid)("aria-required",o.controlAttrs().required),s(),u("required",!0)("counter",n.counterOf("installedAppName",15))("error",n.fieldError(n.formGroup.get("installedAppName"),"Installed app name")),s(2),M("aria-describedby",d.controlAttrs().describedBy)("aria-invalid",d.controlAttrs().invalid)("aria-required",d.controlAttrs().required),s(),u("required",!0)("counter",n.counterOf("shortDescription",80))("error",n.fieldError(n.formGroup.get("shortDescription"),"Short description")),s(2),M("aria-describedby",m.controlAttrs().describedBy)("aria-invalid",m.controlAttrs().invalid)("aria-required",m.controlAttrs().required),s(),u("required",!0)("counter",n.counterOf("fullDescription",4e3))("error",n.fieldError(n.formGroup.get("fullDescription"),"Full description")),s(2),M("aria-describedby",C.controlAttrs().describedBy)("aria-invalid",C.controlAttrs().invalid)("aria-required",C.controlAttrs().required),s(5),u("segments",n.deploymentSegments)("value",n.formGroup.get("appStoreDeployment").value),s(),v(n.formGroup.get("appStoreDeployment").value==="own"?20:-1),s(),v(n.isSuperAdmin?21:-1),s(),v(n.hasError?22:-1),s(),u("disabled",n.writeActive),s(2),u("disabled",!n.formGroup.valid)("loading",n.isLoading)}},dependencies:[V,ue,ze,pe,ye,ce,Z,de,L,ae,_e,oe,te,En,z,re,Ee],styles:[".asset-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-6)}.asset-field[_ngcontent-%COMP%]{min-width:0;padding:0;margin:0;border:0}.asset-label[_ngcontent-%COMP%]{float:none;width:auto;padding:0;margin:0 0 var(--cnp-space-2);font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-semibold);line-height:inherit;color:var(--cnp-color-text-secondary)}.asset-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;gap:var(--cnp-space-2);min-width:0}.asset-rules[_ngcontent-%COMP%]{padding-inline-start:var(--cnp-space-5);margin:0;font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.asset-rules[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--cnp-color-link)}.field-error[_ngcontent-%COMP%]{margin:0;font-size:var(--cnp-font-size-label);color:var(--cnp-color-danger-fg)}.preview-label[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.preview[_ngcontent-%COMP%]{position:relative;display:block;max-width:100%;max-height:100%;overflow:hidden;background:url(/assets/image-vertical.jpg) center/cover;border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-container)}.preview.no-bg[_ngcontent-%COMP%]{background:none}.preview[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:block;width:100%}.preview[_ngcontent-%COMP%]   .change[_ngcontent-%COMP%]{position:absolute;top:var(--cnp-space-4);left:var(--cnp-space-4)}.preview-square[_ngcontent-%COMP%]{width:320px;height:320px}.preview-wide[_ngcontent-%COMP%]{width:360px;height:176px}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--cnp-space-5)}@media (width <= 700px){.form-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.span-all[_ngcontent-%COMP%]{grid-column:1/-1}.choice[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--cnp-space-2);min-width:0}.choice[_ngcontent-%COMP%] > cnp-callout[_ngcontent-%COMP%]{align-self:stretch}.choice-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--cnp-space-1);font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-semibold);color:var(--cnp-color-text-secondary)}.callout-list[_ngcontent-%COMP%]{padding-inline-start:var(--cnp-space-5);margin:var(--cnp-space-2) 0 0}.form-error[_ngcontent-%COMP%]{display:block;margin-top:var(--cnp-space-5)}"]})}}return i})();function kr(i,c){if(i&1&&S(0,"img",10),i&2){let e=l();u("src",e.formGroup.get("appIcon").value,K)}}function Tr(i,c){i&1&&(r(0,"p",12),p(1,"App icon is required."),a())}function Dr(i,c){if(i&1&&S(0,"img",13),i&2){let e=l();u("src",e.formGroup.get("pushNotificationIcon").value,K)}}
1function Or(i,c){i&1&&(r(0,"p",15),p(1,"Push notification icon is required."),a())}function Pr(i,c){if(i&1&&S(0,"img",17),i&2){let e=l();u("src",e.formGroup.get("appSplashScreen").value,K)}}function Ir(i,c){i&1&&(r(0,"p",19),p(1,"App splash screen is required."),a())}var oi=(()=>{class i{set data(e){this._data=x({appStoreName:"",installedAppName:"",shortDescription:"",fullDescription:"",appStoreDeployment:"canapii",appIcon:"",appSplashScreen:"",pushNotificationIcon:"",iOSiPhoneScreenshots:[],iOSiPadScreenshots:[],androidPhoneScreenshots:[],androidTabletScreenshots:[],androidFeaturedGraphic:"",releaseDate:"",notes:"",status:"active"},e)}get data(){return this._data}get writeActive(){return!!this.isLoading}constructor(e,t,n,o){this.settingService=e,this.eventService=t,this.formBuilder=n,this.modal=o,this.submit=new T,this.closeModal=new T,this.hasSaveError=!1,this.hasError=!1}ngOnInit(){this.formGroup=this.formBuilder.group({appIcon:[this.data.appIcon,[D.required]],appSplashScreen:[this.data.appSplashScreen,[D.required]],pushNotificationIcon:[this.data.pushNotificationIcon,[D.required]]})}assetMissing(e){return!!this.formGroup.get(e)?.hasError("required")}formSubmit(){return b(this,null,function*(){let e=this.formGroup;this.hasError=!e.valid,this.hasError||this.submit.emit({appIcon:e.get("appIcon").value,appSplashScreen:e.get("appSplashScreen").value,pushNotificationIcon:e.get("pushNotificationIcon").value,appStoreName:this.data.appStoreName,installedAppName:this.data.installedAppName,shortDe
1scription:this.data.shortDescription,fullDescription:this.data.fullDescription,appStoreDeployment:this.data.appStoreDeployment,releaseDate:this.data.releaseDate,notes:this.data.notes,status:this.data.status,iOSiPhoneScreenshots:this.data.iOSiPhoneScreenshots,iOSiPadScreenshots:this.data.iOSiPadScreenshots,androidPhoneScreenshots:this.data.androidPhoneScreenshots,androidTabletScreenshots:this.data.androidTabletScreenshots,androidFeaturedGraphic:this.data.androidFeaturedGraphic})})}changePhoto(e,t){return b(this,null,function*(){let n={appIcon:{customAspectRatio:1,customWidth:1024,customHeight:1024},pushNotificationIcon:{customAspectRatio:1,customWidth:1024,customHeight:1024},appSplashScreen:{customAspectRatio:1,customWidth:2732,customHeight:2732}},o=this.modal.open(Hn,{backdrop:"static",keyboard:!1});n[e]&&(o.componentInstance.customAspectRatio=n[e].customAspectRatio,o.componentInstance.customWidth=n[e].customWidth,o.componentInstance.customHeight=n[e].customHeight),o.componentInstance.label=t||e,o.componentInstance.allowedExtensions=[".jpg",".png"],o.componentInstance.uploadFunction=d=>d&&typeof d!="string"&&d.size/1024/1e3>3?new Promise((C,F)=>{C({error:1,message:"File size cannot be larger than 3mb."})}):this.eventService.upload(d,"image","branded-app-assets",!0),o.componentInstance.showCentralizedFilesButton=!0;try{let d=yield o.result;d?.success&&pn(d.data)&&this.formGroup.get(e).setValue(d.data)}catch{}})}close(){this.closeModal.emit()}static{this.\u0275fac=function(t){return new(t||i)(w(W),w(X),w(fe),w(at))}}static{this.\u0275cmp=P({type:i,selectors:[["app-update-icon-splash"]],inputs:{isLoading:"isLoading",eventDetail:"eventDetail",data:"data"},outputs:{submit:"submit",closeModal:"closeModal"},decls:91,vars:25,consts:[["heading","Update app icon and splash screen","size","lg",3,"openChange","open","dismissible","showClose"],[3,"formGroup"],[1,"asset-stack"],[1,"asset-field"],[1,"asset-label"],[1,"asset-body"],[1,"asset-rules"],["target","_blank","rel","noopener noreferrer","href","https://assets.canapii.com/documents/app-icon-guideline.psd"],[1,"preview-label"],[1,"preview","preview-square"],["alt","App icon preview",3,"src"],["variant","secondary","size","sm","ariaLabel","Change app icon",1,"change",3,"click","disabled"],["id","appIconMissing",1,"field-error"],["alt","Push notification icon preview",3,"src"],["variant","secondary","size","sm","ariaLabel","Change push notification icon",1,"change",3,"click","disabled"],["id","pushNotificationIconMissing",1,"field-error"],["target","_blank","rel","noopener noreferrer","href","https://assets.canapii.com/documents/app-splash-guideline.psd"],["alt","App splash screen preview",3,"src"],["variant","secondary","size","sm","ariaLabel","Change app splash screen",1,"change",3,"click","disabled"],["id","appSplashScreenMissing",1,"field-error"],["cnpModalFooter","","variant","secondary",3,"click","disabled"],["cnpModalFooter","","loadingLabel","Saving",3,"click","disabled","loading"]],template:function(t,n){t&1&&(r(0,"cnp-modal",0),h("openChange",function(){return n.close()}),r(1,"form",1)(2,"div",2)(3,"fieldset",3)(4,"legend",4),p(5,"App icon"),a(),r(6,"div",5)(7,"ul",6)(8,"li"),p(9,"Dimension should be 1024x1024 pixels"),a(),r(10,"li"),p(11,"Acceptable image formats are .jpg and .png"),a(),r(12,"li"),p(13,"Should have a background color"),a(),r(14,"li"),p(15,"Background color should not have any transparency"),a(),r(16,"li"),p(17,"No rounded borders or edges"),a(),r(18,"li"),p(19," Company logo or text should be at the center to avoid being cropped (each device OS has different ways to present the app icon, e.g. iOS has rounded edges while some Android OS will be in a circle) "),a(),r(20,"li"),p(21," See "),r(22,"a",7),p(23,"sample icon template"),a(),p(24," for guidelines "),a()(),r(25,"span",8),p(26,"Preview"),a(),r(27,"div",9),f(28,kr,1,1,"img",10),r(29,"cnp-button",11),h("click",function(){return n.changePhoto("appIcon","app icon")}),p(30," Change "),a()(),f(31,Tr,2,0,"p",12),a()(),r(32,"fieldset",3)(33,"legend",4),p(34,"Push notification icon"),a(),r(35,"div",5)(36,"ul",6)(37,"li"),p(38,"iOS will use the icon provided from the App icon section above"),a(),r(39,"li"),p(40," On Android, notification icon is hugely different from other icons that you have in your app. Most notably, the icon asset cannot have any color. "),a(),r(41,"li"),p(42,"Dimension should be 1024x1024 pixels"),a(),r(43,"li"),p(44,"Acceptable image formats are .jpg and .png"),a(),r(45,"li"),p(46,"Backgroun
1d color should be transparent"),a(),r(47,"li"),p(48,"No rounded borders or edges"),a(),r(49,"li"),p(50,"Company logo or text should be at the center and the color should be black or white solid color"),a()(),r(51,"span",8),p(52,"Preview"),a(),r(53,"div",9),f(54,Dr,1,1,"img",13),r(55,"cnp-button",14),h("click",function(){return n.changePhoto("pushNotificationIcon","push notification icon")}),p(56," Change "),a()(),f(57,Or,2,0,"p",15),a()(),r(58,"fieldset",3)(59,"legend",4),p(60,"App splash screen"),a(),r(61,"div",5)(62,"ul",6)(63,"li"),p(64,"Dimension should be 2732x2732 pixels"),a(),r(65,"li"),p(66,"Acceptable image formats are .jpg and .png"),a(),r(67,"li"),p(68,"Should have a background color"),a(),r(69,"li"),p(70,"Background color should not have any transparency"),a(),r(71,"li"),p(72,"No rounded borders or edges"),a(),r(73,"li"),p(74,"Company logo or text should be at the center to avoid being cropped"),a(),r(75,"li"),p(76," See "),r(77,"a",16),p(78,"sample splash screen template"),a(),p(79," for guidelines "),a()(),r(80,"span",8),p(81,"Preview"),a(),r(82,"div",9),f(83,Pr,1,1,"img",17),r(84,"cnp-button",18),h("click",function(){return n.changePhoto("appSplashScreen","app splash screen")}),p(85," Change "),a()(),f(86,Ir,2,0,"p",19),a()()()(),r(87,"cnp-button",20),h("click",function(){return n.close()}),p(88,"Close"),a(),r(89,"cnp-button",21),h("click",function(){return n.formSubmit()}),p(90," Save "),a()()),t&2&&(u("open",!0)("dismissible",!1)("showClose",!n.writeActive),s(),u("formGroup",n.formGroup),s(2),M("aria-describedby",n.assetMissing("appIcon")?"appIconMissing":null),s(24),ne("no-bg",n.formGroup.get("appIcon").value),s(),v(n.formGroup.get("appIcon").value?28:-1),s(),u("disabled",n.isLoading),s(2),v(n.assetMissing("appIcon")?31:-1),s(),M("aria-describedby",n.assetMissing("pushNotificationIcon")?"pushNotificationIconMissing":null),s(21),ne("no-bg",n.formGroup.get("pushNotificationIcon").value),s(),v(n.formGroup.get("pushNotificationIcon").value?54:-1),s(),u("disabled",n.isLoading),s(2),v(n.assetMissing("pushNotificationIcon")?57:-1),s(),M("aria-describedby",n.assetMissing("appSplashScreen")?"appSplashScreenMissing":null),s(24),ne("no-bg",n.formGroup.get("appSplashScreen").value),s(),v(n.formGroup.get("appSplashScreen").value?83:-1),s(),u("disabled",n.isLoading),s(2),v(n.assetMissing("appSplashScreen")?86:-1),s(),u("disabled",n.writeActive),s(2),u("disabled",!n.formGroup.valid)("loading",n.isLoading))},dependencies:[V,Z,L,ae,te,z,re],styles:[".asset-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-6)}.asset-field[_ngcontent-%COMP%]{min-width:0;padding:0;margin:0;border:0}.asset-label[_ngcontent-%COMP%]{float:none;width:auto;padding:0;margin:0 0 var(--cnp-space-2);font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-semibold);line-height:inherit;color:var(--cnp-color-text-secondary)}.asset-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;gap:var(--cnp-space-2);min-width:0}.asset-rules[_ngcontent-%COMP%]{padding-inline-start:var(--cnp-space-5);margin:0;font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.asset-rules[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--cnp-color-link)}.field-error[_ngcontent-%COMP%]{margin:0;font-size:var(--cnp-font-size-label);color:var(--cnp-color-danger-fg)}.preview-label[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.preview[_ngcontent-%COMP%]{position:relative;display:block;max-width:100%;max-height:100%;overflow:hidden;background:url(/assets/image-vertical.jpg) center/cover;border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-container)}.preview.no-bg[_ngcontent-%COMP%]{background:none}.preview[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:block;width:100%}.preview[_ngcontent-%COMP%]   .change[_ngcontent-%COMP%]{position:absolute;top:var(--cnp-space-4);left:var(--cnp-space-4)}.preview-square[_ngcontent-%COMP%]{width:320px;height:320px}.preview-wide[_ngcontent-%COMP%]{width:360px;height:176px}"]})}}return i})();function ai(i,c,e,t){return e||!i?.errors?.minLengthArray||!(i.dirty||i.touched)?e:`${t(c)} ${t("requires at least ").trim()} ${i.errors.min}.`}function un(i,c){return`${i}-${c}-error`}function ri(i,c){let e=["list","dimension"].filter(t=>c[t]).map(t=>un(i,t));return e.length?e.join(" "):null}function si(i,c,e){let t=c+(e==="up"?-1:1);return t>=0&&t<i.length?t:-1}function ht(i,c,e){return`${i}:${c}:${e}`}function Nt(i,c,e,t){let n=e==="up"?"down":"up";setTimeout(()=>{(da(i,ht(c,e,t))??da(i,ht(c,n,t)))?.focus()})}function da(i,c){let e=i.querySelector(`[data-move-id="${CSS.escape(c)}"] button`);return!e||e.disabled||e.getAttribute("aria-disabled")==="true"?null:e}function Vr(i,c){i&1&&(S(0,"cnp-icon",6),p(1," Select files "))}function Lr(i,c){i&1&&(S(0,"cnp-spinner",7),p(1," Uploading... ")),i&2&&u("onAction",!0)}function zr(i,c){if(i&1){let e=y();r(0,"input",1),h("change",function(n){g(e);let o=l();return _(o.droppedFiles(n))})("dragover",function(n){g(e);let o=l();return _(o.addDragOverClass(n))})("dragleave",function(n){g(e);let o=l();return _(o.removeDragOverClass(n))})("dragend",function(n){g(e);let o=l();return _(o.removeDragOverClass(n))})("drop",function(n){g(e);let o=l();return _(o.removeDragOverClass(n))}),a(),r(1,"div",2),S(2,"cnp-icon",3),r(3,"p",4),p(4),a(),r(5,"label",5),f(6,Vr,2,0)(7,Lr,2,1),a()()}if(i&2){let e=l();u("disabled",e.uploading||e.saving),M("id",e.dropRefId)("aria-label",e.dragDropLabel)("aria-describedby",e.describedBy)("accept",e.allowedExtensions),s(4),E(e.dragDropLabel),s(),M("for",e.dropRefId),s(),v(e.uploading?7:6)}}function Br(i,c){if(i&1){let e=y();r(0,"div",11),S(1,"img"),r(2,"div",12)(3,"cnp-button",13),h("click",function(){let n=g(e).$index,o=l(2);return _(o.moveItem(n,"up"))}),S(4,"cnp-icon",14),a(),r(5,"cnp-button",13),h("click",function(){let n=g(e).$index,o=l(2);return _(o.removeItem(n))}),S(6,"cnp-icon",15),a(),r(7,"cnp-button",13),h("click",function(){let n=g(e).$index,o=l(2);return _(o.moveItem(n,"down"))}),S(8,"cnp-icon",16),a()()()}if(i&2){let e=c.$implicit,t=c.$index,n=l(2);an("width",n.previewWidth,"px")("height",n.previewHeight,"px"),u("cdkDragData",e)("cdkDragDisabled",n.busy),s(),M("src",n.itemUrl(e),K)("alt",n.previewAlt(t)),s(2),u("iconOnly",!0)("ariaLabel",n.moveLabel(t,"up"))("disabled",!n.canMove(t,"up")),M("data-move-id",n.moveId("up",e)),s(2),u("iconOnly",!0)("ariaLabel",n.removeLabel(t))("disabled",n.busy),s(2),u("iconOnly",!0)("ariaLabel",n.moveLabel(t,"down"))("disabled",!n.canMove(t,"down")),M("data-move-id",n.moveId("down",e))}}function Nr(i,c){if(i&1&&(r(0,"span"),p(1),a()),i&2){let e=l(2);s(),no("",e.items.length," of ",e.maxUploads," ",e.filesLabel)}}function Rr(i,c){i&1&&(S(0,"cnp-icon",6),p(1," Select more files "))}function Ur(i,c){i&1&&(S(0,"cnp-spinner",19),p(1," Uploading... "))}function Gr(i,c){if(i&1){let e=y();r(0,"input",17),h("change",function(n){g(e);let o=l(2);return _(o.droppedFiles(n))})("dragover",function(n){g(e);let o=l(2);return _(o.addDragOverClass(n))})("dragleave",function(n){g(e);let o=l(2);return _(o.removeDragOverClass(n))})("dragend",function(n){g(e);let o=l(2);return _(o.removeDragOverClass(n))})("drop",function(n){g(e);let o=l(2);return _(o.removeDragOverClass(n))}),a(),r(1,"label",18),f(2,Rr,2,0)(3,Ur,2,0),a()}if(i&2){let e=l(2);u("disabled",e.uploading||e.saving),M("id",e.dropRefId)("aria-describedby",e.describedBy)("accept",e.allowedExtensions),s(),M("for",e.dropRefId),s(),v(e.uploading?3:2)}}function $r(i,c){if(i&1){let e=y();r(0,"div",8),h("cdkDropListDropped",function(n){g(e);let o=l();return _(o.onDroppedSort(n))}),R(1,Br,9,19,"div",9,Fe),a(),r(3,"div",10),f(4,Nr,2,3,"span"),r(5,"span"),p(6,"Drag and drop to sort"),a(),f(7,Gr,4,6),a()}if(i&2){let e=l();u("cdkDropListData",e.items),s(),U(e.items),s(3),v(e.maxUploads?4:-1),s(3),v(e.items.length<e.maxUploads?7:-1)}}var Hr=1100,Rt=(()=>
1{class i{set items(e){this._items=JSON.parse(JSON.stringify(e))}get items(){return this._items}set isUploading(e){this.uploading=e}set isSaving(e){this.saving=e}constructor(e,t,n){this.utilities=e,this.confirmService=t,this.cryptoUtils=n,this.dragDropLabel="Drag and drop files to upload",this.filesLabel="files",this.allowedExtensions="*",this.describedBy=null,this.filesDropped=new T,this.filesSorted=new T,this.fileRemoved=new T,this.uploading=!1,this.saving=!1,this.hostRef=be(wt),this.dropRefId=`dropref-${this.cryptoUtils.secureUniqueId(7)}`}ngOnInit(){}previewAlt(e){return`Item ${e+1} of ${this.items.length}`}removeLabel(e){return`Remove item ${e+1}`}droppedFiles(e){let t=e.target.files,n=this.items.length+t.length;if(this.maxUploads&&n>this.maxUploads){this.utilities.alert({header:"Error",message:`You can only upload a maximum of ${this.maxUploads} ${this.filesLabel}.`}),e.target.value="";return}t.length&&this.filesDropped.emit(e)}get busy(){return this.uploading||this.saving}canMove(e,t){if(this.busy)return!1;let n=this.moveTarget(e,t);return n>=0&&n<this.items.length}moveLabel(e,t){return`Move item ${e+1} ${t==="up"?"earlier":"later"}`}itemUrl(e){return mt(e)}moveId(e,t){return ht(this.dropRefId,e,this.itemUrl(t))}moveItem(e,t){if(!this.canMove(e,t))return;let n=this.items[e];this.reorder(e,this.moveTarget(e,t)),Nt(this.hostRef.nativeElement,this.dropRefId,t,this.itemUrl(n))}onDroppedSort(e){this.reorder(e.previousIndex,e.currentIndex)}reorder(e,t){if(e===t)return;let n=this.items[e];st(this.items,e,t),n&&typeof n=="object"&&(n.previousIndex=e,n.currentIndex=t),this.filesSorted.emit(this.items)}moveTarget(e,t){return t==="up"?e-1:e+1}removeItem(e){return b(this,null,function*(){(yield this.confirmService.ask({heading:"Remove this screenshot?",consequence:"It leaves the list here. The change is stored when you save the card.",confirmWord:"",confirmLabel:"Remove screenshot"}))&&(this.items.splice(e,1),this.fileRemoved.emit(this.items))})}addDragOverClass(e){e.target.parentElement.classList.add("drag-over")}removeDragOverClass(e){e.target.parentElement.classList.remove("drag-over")}static{this.\u0275fac=function(t){return new(t||i)(w(le),w(ke),w(No))}}static{this.\u0275cmp=P({type:i,selectors:[["app-drag-drop-upload-sort"]],inputs:{items:"items",previewWidth:"previewWidth",previewHeight:"previewHeight",dragDropLabel:"dragDropLabel",filesLabel:"filesLabel",maxUploads:"maxUploads",allowedExtensions:"allowedExtensions",isUploading:"isUploading",isSaving:"isSaving",describedBy:"describedBy"},outputs:{filesDropped:"filesDropped",filesSorted:"filesSorted",fileRemoved:"fileRemoved"},features:[Fn([{provide:wo,useValue:{zIndex:Hr}}])],decls:3,vars:3,consts:[[1,"drop-zone"],["type","file","multiple","",1,"drop-input",3,"change","dragover","dragleave","dragend","drop","disabled"],[1,"drop-empty"],["name","upload-stacked"],[1,"drop-label"],[1,"drop-button"],["name","upload-horizontal"],["size","sm","label","Uploading",3,"onAction"],["cdkDropList","","cdkDropListOrientation","horizontal",1,"draggable-items",3,"cdkDropListDropped","cdkDropListData"],["cdkDrag","",1,"draggable-item",3,"cdkDragData","cdkDragDisabled","width","height"],[1,"drop-footer"],["cdkDrag","",1,"draggable-item",3,"cdkDragData","cdkDragDisabled"],[1,"item-actions"],["variant","ghost","size","sm",3,"click","iconOnly","ariaLabel","disabled"],["name","chevron-start"],["name","delete"],["name","chevron-end"],["type","file","multiple","",1,"more-input",3,"change","dragover","dragleave","dragend","drop","disabled"],[1,"more-link"],["size","sm","label","Uploading"]],template:function(t,n){t&1&&(r(0,"div",0),f(1,zr,8,8)(2,$r,8,3),a()),t&2&&(ne("is-busy",n.uploading||n.saving),s(),v(n.items.length?2:1))},dependencies:[Dt,Tt,V,ve,Ot],styles:[".drop-zone[_ngcontent-%COMP%]{position:relative;min-width:0;background:var(--cnp-color-bg-surface);border:1px dashed var(--cnp-color-border);border-radius:var(--cnp-radius-container);transition:border-color var(--cnp-duration-fast) var(--cnp-ease-standard),box-shadow var(--cnp-duration-fast) var(--cnp-ease-standard)}.drop-zone.drag-over[_ngcontent-%COMP%]{border-color:var(--cnp-color-action);box-shadow:0 0 0 3px var(--cnp-color-focus-ring)}.drop-zone.is-busy[_ngcontent-%COMP%]{opacity:.7}.drop-zone[_ngcontent-%COMP%]:has(>.drop-input:focus-visible){outline:2px solid var(--cnp-color-focus-ring);outline-offset:2px}.drop-input[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:2;width:100%;height:100%;opacity:0;cursor:pointer}.drop-input[_ngcontent-%COMP%]:disabled{cursor:not-allowed}.drop-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:var(--cnp-space-3);padding:var(--cnp-space-7) var(--cnp-space-5);color:var(--cnp-color-icon-muted)}.drop-label[_ngcontent-%COMP%]{margin:0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-secondary)}.drop-button[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--cnp-space-2);min-height:var(--cnp-size-control);padding:var(--cnp-space-2) var(--cnp-space-4);font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-medium);color:var(--cnp-color-on-action);background:var(--cnp-color-action);border-radius:var(--cnp-radius-element);transition:background-color var(--cnp-duration-fast) var(--cnp-ease-standard)}.drop-zone[_ngcontent-%COMP%]:hover   .drop-button[_ngcontent-%COMP%]{background:var(--cnp-color-action-hover)}.draggable-items[_ngcontent-%COMP%]{display:flex;gap:var(--cnp-space-4);padding:var(--cnp-space-4);overflow-x:auto}.draggable-item[_ngcontent-%COMP%]{position:relative;flex:none;height:220px;cursor:grab}.draggable-item[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:100%;object-fit:fill;border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-container)}.draggable-item[_ngcontent-%COMP%]   .item-actions[_ngcontent-%COMP%]{position:absolute;bottom:var(--cnp-space-3);left:50%;display:flex;gap:var(--cnp-space-1);padding:var(--cnp-space-1);background:var(--cnp-color-bg-card);border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-element);box-shadow:var(--cnp-shadow-low);transform:translate(-50%);opacity:0;transition:opacity var(--cnp-duration-fast) var(--cnp-ease-standard)}.draggable-item[_ngcontent-%COMP%]:hover   .item-actions[_ngcontent-%COMP%], .draggable-item[_ngcontent-%COMP%]:focus-within   .item-actions[_ngcontent-%COMP%]{opacity:1}.drop-footer[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2) var(--cnp-space-5);padding:var(--cnp-space-3) var(--cnp-space-4);font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-secondary);border-top:1px solid var(--cnp-color-border-subtle)}.more-input[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;border:0;clip-path:inset(50%)}.more-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--cnp-space-1);font-weight:var(--cnp-font-weight-semibold);color:var(--cnp-color-link);cursor:pointer}.more-input[_ngcontent-%COMP%]:focus-visible + .more-link[_ngcontent-%COMP%]{outline:2px solid var(--cnp-color-focus-ring);outline-offset:2px;border-radius:var(--cnp-radius-element)}.more-input[_ngcontent-%COMP%]:disabled + .more-link[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.6}.cdk-drag-preview[_ngcontent-%COMP%]{border-radius:var(--cnp-radius-container);box-shadow:var(--cnp-shadow-high)}.cdk-drag-preview[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:100%;object-fit:fill;border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-container)}.cdk-drag-preview[_ngcontent-%COMP%]   .item-actions[_ngcontent-%COMP%]{display:none}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:var(--cnp-color-bg-card);border:1px dashed var(--cnp-color-border);border-radius:var(--cnp-radius-container);opacity:1}.cdk-drag-placeholder[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{visibility:hidden}"]})}}return i})();function jr(i,c){if(i&1&&(r(0,"p",9),p(1),a()),i&2){let e=l();u("id",e.messageId("iOSiPhoneScreenshots","list")),s(),E(c)}}function qr(i,c){if(i&1&&(r(0,"p",9),p(1),a()),i&2){let e=l();u("id",e.messageId("iOSiPhoneScreenshots","dimension")),s(),Ae(" The dimensions or file size of one or more screenshots are invalid. Screenshot dimension should be ",e.dimensions.iOSiPhoneScreenshots.width,"x",e.dimensions.iOSiPhoneScreenshots.height," pixels and file size cannot be larger than 3mb. ")}}function Wr(i,c){if(i&1&&(r(0,"p",9),p(1),a()),i&2){let e=l();u("id",e.messageId("iOSiPadScreenshots","list")),s(),E(c)}}function Kr(i,c){if(i&1&&(r(0,"p",9),p(1),a()),i&2){let e=l();u("id",e.messageId("iOSiPadScreenshots","dimension")),s(),Ae(" The dimensions or file size of one or more screenshots are invalid. Screenshot dimension should be ",e.dimensions.iOSiPadScreenshots.width,"x",e.dimensions.iOSiPadScreenshots.height," pixels and file size cannot be larger than 3mb. ")}}var li=(()=>
1{class i{set data(e){this._data=x({appStoreName:"",installedAppName:"",shortDescription:"",fullDescription:"",appStoreDeployment:"canapii",appIcon:"",appSplashScreen:"",pushNotificationIcon:"",iOSiPhoneScreenshots:[],iOSiPadScreenshots:[],androidPhoneScreenshots:[],androidTabletScreenshots:[],androidFeaturedGraphic:"",releaseDate:"",notes:"",status:"active"},e)}get data(){return this._data}get writeActive(){return!!this.isLoading||Object.values(this.fileUploading).some(Boolean)}constructor(e,t,n,o){this.settingService=e,this.eventService=t,this.utilities=n,this.formBuilder=o,this.submit=new T,this.closeModal=new T,this.hasSaveError=!1,this.hasError=!1,this.dimensions={iOSiPhoneScreenshots:{width:1320,height:2868},iOSiPadScreenshots:{width:2064,height:2752}},this.hasDimensionError={iOSiPhoneScreenshots:!1,iOSiPadScreenshots:!1},this.fileUploading={iOSiPhoneScreenshots:!1,iOSiPadScreenshots:!1},this.fieldError=be(pt).message,this.translate=be(zn)}ngOnInit(){this.formGroup=this.formBuilder.group({iOSiPhoneScreenshots:[this.deepCopy(this.data.iOSiPhoneScreenshots),[D.required,Vt(3)]],iOSiPadScreenshots:[this.deepCopy(this.data.iOSiPadScreenshots),[D.required,Vt(3)]]})}listError(e,t){let n=this.formGroup.get(e);return ai(n,t,this.fieldError(n,t),o=>this.translate.instant(o))}messageId(e,t){return un(e,t)}listDescribedBy(e,t){return ri(e,{list:!!this.listError(e,t),dimension:this.hasDimensionError[e]})}deepCopy(e){return JSON.parse(JSON.stringify(e))}formSubmit(){return b(this,null,function*(){if(this.writeActive)return;let e=this.formGroup;this.fixSortingAndUpdateForm("iOSiPhoneScreenshots"),this.fixSortingAndUpdateForm("iOSiPadScreenshots"),this.hasError=!e.valid,this.hasError||this.submit.emit({appIcon:this.data.appIcon,appSplashScreen:this.data.appSplashScreen,pushNotificationIcon:this.data.pushNotificationIcon,appStoreName:this.data.appStoreName,installedAppName:this.data.installedAppName,shortDe
1scription:this.data.shortDescription,fullDescription:this.data.fullDescription,appStoreDeployment:this.data.appStoreDeployment,releaseDate:this.data.releaseDate,notes:this.data.notes,status:this.data.status,iOSiPhoneScreenshots:e.get("iOSiPhoneScreenshots").value,iOSiPadScreenshots:e.get("iOSiPadScreenshots").value,androidPhoneScreenshots:this.data.androidPhoneScreenshots,androidTabletScreenshots:this.data.androidTabletScreenshots,androidFeaturedGraphic:this.data.androidFeaturedGraphic})})}uploadScreenshots(e,t){return b(this,null,function*(){let n=Array.from(t.target.files??[]);if(t.target.value="",!n.length)return;let o=this.dimensions[e];this.hasDimensionError[e]=!1;let d=(m,C)=>C.width===o.width&&C.height===o.height&&!ei(m,3);this.fileUploading[e]=!0;try{if(!(yield ti(n,d))){this.hasDimensionError[e]=!0;return}yield ni({busy:this.fileUploading,key:e,control:this.formGroup.get(e),afterStore:()=>this.addSorting(e)},n,this.eventService,this.utilities)}finally{this.fileUploading[e]=!1}})}addSorting(e){let t=this.formGroup.get(e).value;if(t.length){let{sortedList:n,unsortedList:o}=t.reduce((m,C)=>(C!==null&&typeof C!="string"&&typeof C.url<"u"&&typeof C.sort<"u"?m.sortedList.push(C):C!==null&&typeof C=="string"&&m.unsortedList.push(C),m),{sortedList:[],unsortedList:[]}),d=n.reduce((m,C)=>m&&m.sort>C.sort?m:C,0);o.map((m,C)=>{n.push({url:m,sort:d+C+1})}),this.formGroup.get(e).setValue(n)}}fixSortingAndUpdateForm(e){let t=this.formGroup.get(e).value.map((n,o)=>({url:mt(n),sort:o}));this.formGroup.get(e).setValue(t)}onScreenshotsUpdate(e,t){let n=this.formGroup.get(e);n.setValue(t),n.markAsDirty()}close(){this.closeModal.emit()}static{this.\u0275fac=function(t){return new(t||i)(w(W),w(X),w(le),w(fe))}}static{this.\u0275cmp=P({type:i,selectors:[["app-update-apple-appstore"]],inputs:{isLoading:"isLoading",eventDetail:"eventDetail",data:"data"},outputs:{submit:"submit",closeModal:"closeModal"},decls:45,vars:31,consts:[["heading","Update Apple app store assets","size","lg",3,"openChange","open","dismissible","showClose"],[3,"formGroup"],[1,"asset-stack"],[1,"asset-field"],[1,"asset-label"],[1,"asset-body"],[1,"asset-rules"],["target","_blank","rel","noopener noreferrer","href","https://developer.apple.com/help/app-store-connect/reference/screenshot-specifications/"],[3,"filesDropped","filesSorted","fileRemoved","items","filesLabel","dragDropLabel","allowedExtensions","maxUploads","isUploading","isSaving","describedBy"],["role","alert",1,"field-error",3,"id"],["cnpModalFooter","","variant","secondary",3,"click","disabled"],["cnpModalFooter","","loadingLabel","Saving",3,"click","disabled","loading"]],template:function(t,n){if(t&1&&(r(0,"cnp-modal",0),h("openChange",function(){return n.close()}),r(1,"form",1)(2,"div",2)(3,"fieldset",3)(4,"legend",4),p(5,"iPhone 6.9 inch screenshots"),a(),r(6,"div",5)(7,"ul",6)(8,"li"),p(9,"Upload minimum of 3 and maximum of 10 iPhone screenshots"),a(),r(10,"li"),p(11),a(),r(12,"li"),p(13,"Acceptable image formats are .jpg and .png"),a(),r(14,"li"),p(15," See "),r(16,"a",7),p(17,"Apple app store guidelines"),a(),p(18," for more info "),a()(),r(19,"app-drag-drop-upload-sort",8),h("filesDropped",function(d){return n.uploadScreenshots("iOSiPhoneScreenshots",d)})("filesSorted",function(d){return n.onScreenshotsUpdate("iOSiPhoneScreenshots",d)})("fileRemoved",function(d){return n.onScreenshotsUpdate("iOSiPhoneScreenshots",d)}),a(),f(20,jr,2,2,"p",9),f(21,qr,2,3,"p",9),a()(),r(22,"fieldset",3)(23,"legend",4),p(24,"iPad 13 inch screenshots"),a(),r(25,"div",5)(26,"ul",6)(27,"li"),p(28,"Upload minimum of 3 and maximum of 10 iPad screenshots"),a(),r(29,"li"),p(30),a(),r(31,"li"),p(32,"Acceptable image formats are .jpg and .png"),a(),r(33,"li"),p(34," See "),r(35,"a",7),p(36,"Apple app store guidelines"),a(),p(37," for more info "),a()(),r(38,"app-drag-drop-upload-sort",8),h("filesDropped",function(d){return n.uploadScreenshots("iOSiPadScreenshots",d)})("filesSorted",function(d){return n.onScreenshotsUpdate("iOSiPadScreenshots",d)})("fileRemoved",function(d){return n.onScreenshotsUpdate("iOSiPadScreenshots",d)}),a(),f(39,Wr,2,2,"p",9),f(40,Kr,2,3,"p",9),a()()()(),r(41,"cnp-button",10),h("click",function(){return n.close()}),p(42,"Close"),a(),r(43,"cnp-button",11),h("click",function(){return n.formSubmit()}),p(44," Save "),a()()),t&2){let o,d;u("open",!0)("dismissible",!1)("showClose",!n.writeActive),s(),u("formGroup",n.formGroup),s(10),Ae(" Dimension should be ",n.dimensions.iOSiPhoneScreenshots.width,"x",n.dimensions.iOSiPhoneScreenshots.height," pixels "),s(8),u("items",n.formGroup.get("iOSiPhoneScreenshots").value)("filesLabel","screenshots")("dragDropLabel","Drag and drop up to 10 screenshots")("allowedExtensions",".jpg,.png")("maxUploads",10)("isUploading",n.fileUploading.iOSiPhoneScreenshots)("isSaving",n.isLoading)("describedBy",n.listDescribedBy("iOSiPhoneScreenshots","iPhone 6.9 inch screenshots")),s(),v((o=n.listError("iOSiPhoneScreenshots","iPhone 6.9 inch screenshots"))?20:-1,o),s(),v(n.hasDimensionError.iOSiPhoneScreenshots?21:-1),s(9),Ae(" Dimension should be ",n.dimensions.iOSiPadScreenshots.width,"x",n.dimensions.iOSiPadScreenshots.height," pixels "),s(8),u("items",n.formGroup.get("iOSiPadScreenshots").value)("filesLabel","screenshots")("dragDropLabel","Drag and drop up to 10 screenshots")("allowedExtensions",".jpg,.png")("maxUploads",10)("isUploading",n.fileUploading.iOSiPadScreenshots)("isSaving",n.isLoading)("describedBy",n.listDescribedBy("iOSiPadScreenshots","iPad 13 inch screenshots")),s(),v((d=n.listError("iOSiPadScreenshots","iPad 13 inch screenshots"))?39:-1,d),s(),v(n.hasDimensionError.iOSiPadScreenshots?40:-1),s(),u("disabled",n.writeActive),s(2),u("disabled",n.writeActive||!n.formGroup.valid)("loading",n.isLoading)}},dependencies:[V,Z,Rt,L,ae,te,z,re],styles:[".asset-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-6)}.asset-field[_ngcontent-%COMP%]{min-width:0;padding:0;margin:0;border:0}.asset-label[_ngcontent-%COMP%]{float:none;width:auto;padding:0;margin:0 0 var(--cnp-space-2);font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-semibold);line-height:inherit;color:var(--cnp-color-text-secondary)}.asset-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;gap:var(--cnp-space-2);min-width:0}.asset-rules[_ngcontent-%COMP%]{padding-inline-start:var(--cnp-space-5);margin:0;font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.asset-rules[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--cnp-color-link)}.field-error[_ngcontent-%COMP%]{margin:0;font-size:var(--cnp-font-size-label);color:var(--cnp-color-danger-fg)}.preview-label[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.preview[_ngcontent-%COMP%]{position:relative;display:block;max-width:100%;max-height:100%;overflow:hidden;background:url(/assets/image-vertical.jpg) center/cover;border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-container)}.preview.no-bg[_ngcontent-%COMP%]{background:none}.preview[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:block;width:100%}.preview[_ngcontent-%COMP%]   .change[_ngcontent-%COMP%]{position:absolute;top:var(--cnp-space-4);left:var(--cnp-space-4)}.preview-square[_ngcontent-%COMP%]{width:320px;height:320px}.preview-wide[_ngcontent-%COMP%]{width:360px;height:176px}"]})}}return i})();function Qr(i,c){if(i&1&&(r(0,"p",9),p(1),a()),i&2){let e=l();u("id",e.messageId("androidPhoneScreenshots","list")),s(),E(c)}}function Yr(i,c){if(i&1&&(r(0,"p",9),p(1),a()),i&2){let e=l();u("id",e.messageId("androidPhoneScreenshots","dimension")),s(),Fi(" The dimensions or file size of one or more screenshots are invalid. For 9:16 aspect ratio, the minimum width should be ",e.imageSize.min,"px and the maximum height should be ",e.imageSize.max,"px and for 16:9 aspect ratio, the minimum height should be ",e.imageSize.min,"px and the maximum width should be ",e.imageSize.max,"px. File size cannot be larger than 8mb. ")}}function Zr(i,c){if(i&1&&(r(0,"p",9),p(1),a()),i&2){let e=l();u("id",e.messageId("androidTabletScreenshots","list")),s(),E(c)}}function Jr(i,c){if(i&1&&(r(0,"p",9),p(1),a()),i&2){let e=l();u("id",e.messageId("androidTabletScreenshots","dimension")),s(),Fi(" The dimensions or file size of one or more screenshots are invalid. For 9:16 aspect ratio, the minimum width should be ",e.imageSize.min,"px and the maximum height should be ",e.imageSize.max,"px and for 16:9 aspect ratio, the minimum height should be ",e.imageSize.min,"px and the maximum width should be ",e.imageSize.max,"px. File size cannot be larger than 8mb. ")}}function Xr(i,c){if(i&1&&S(0,"img",12),i&2){let e=l();u("src",e.formGroup.get("androidFeaturedGraphic").value,K)}}var ci=(()=>
1{class i{set data(e){this._data=x({appStoreName:"",installedAppName:"",shortDescription:"",fullDescription:"",appStoreDeployment:"canapii",appIcon:"",appSplashScreen:"",pushNotificationIcon:"",iOSiPhoneScreenshots:[],iOSiPadScreenshots:[],androidPhoneScreenshots:[],androidTabletScreenshots:[],androidFeaturedGraphic:"",releaseDate:"",notes:"",status:"active"},e)}get data(){return this._data}get writeActive(){return!!this.isLoading||Object.values(this.fileUploading).some(Boolean)}constructor(e,t,n,o,d){this.settingService=e,this.eventService=t,this.formBuilder=n,this.modal=o,this.utilities=d,this.submit=new T,this.closeModal=new T,this.hasSaveError=!1,this.hasError=!1,this.imageSize={min:1080,max:3840},this.hasDimensionError={androidPhoneScreenshots:!1,androidTabletScreenshots:!1},this.fileUploading={androidPhoneScreenshots:!1,androidTabletScreenshots:!1},this.fieldError=be(pt).message,this.translate=be(zn)}ngOnInit(){this.formGroup=this.formBuilder.group({androidPhoneScreenshots:[this.deepCopy(this.data.androidPhoneScreenshots),[D.required,Vt(2)]],androidTabletScreenshots:[this.deepCopy(this.data.androidTabletScreenshots),[D.required,Vt(2)]],androidFeaturedGraphic:[this.deepCopy(this.data.androidFeaturedGraphic),[D.required]]})}listError(e,t){let n=this.formGroup.get(e);return ai(n,t,this.fieldError(n,t),o=>this.translate.instant(o))}messageId(e,t){return un(e,t)}listDescribedBy(e,t){return ri(e,{list:!!this.listError(e,t),dimension:this.hasDimensionError[e]})}deepCopy(e){return JSON.parse(JSON.stringify(e))}formSubmit(){return b(this,null,function*(){if(this.writeActive)return;let e=this.formGroup;this.fixSortingAndUpdateForm("androidPhoneScreenshots"),this.fixSortingAndUpdateForm("androidTabletScreenshots"),this.hasError=!e.valid,this.hasError||this.submit.emit({appIcon:this.data.appIcon,appSplashScreen:this.data.appSplashScreen,pushNotificationIcon:this.data.pushNotificationIcon,appStoreName:this.data.appStoreName,installedAppName:this.data.installedAppName,shortDe
1scription:this.data.shortDescription,fullDescription:this.data.fullDescription,appStoreDeployment:this.data.appStoreDeployment,releaseDate:this.data.releaseDate,notes:this.data.notes,status:this.data.status,iOSiPhoneScreenshots:this.data.iOSiPhoneScreenshots,iOSiPadScreenshots:this.data.iOSiPadScreenshots,androidPhoneScreenshots:e.get("androidPhoneScreenshots").value,androidTabletScreenshots:e.get("androidTabletScreenshots").value,androidFeaturedGraphic:e.get("androidFeaturedGraphic").value})})}uploadScreenshots(e,t){return b(this,null,function*(){let n=Array.from(t.target.files??[]);if(t.target.value="",!!n.length){this.hasDimensionError[e]=!1,this.fileUploading[e]=!0;try{if(!(yield ti(n,(o,d)=>this.fitsPlayStore(o,d)))){this.hasDimensionError[e]=!0;return}yield ni({busy:this.fileUploading,key:e,control:this.formGroup.get(e),afterStore:()=>this.addSorting(e)},n,this.eventService,this.utilities)}finally{this.fileUploading[e]=!1}}})}fitsPlayStore(e,t){let n="1.778",o=(t.width/t.height).toFixed(3)===n||(t.height/t.width).toFixed(3)===n;return t.width>=this.imageSize.min&&t.width<=this.imageSize.max&&t.height>=this.imageSize.min&&t.height<=this.imageSize.max&&!ei(e,8)&&o}addSorting(e){let t=this.formGroup.get(e).value;if(t.length){let{sortedList:n,unsortedList:o}=t.reduce((m,C)=>(C!==null&&typeof C!="string"&&typeof C.url<"u"&&typeof C.sort<"u"?m.sortedList.push(C):C!==null&&typeof C=="string"&&m.unsortedList.push(C),m),{sortedList:[],unsortedList:[]}),d=n.reduce((m,C)=>m&&m.sort>C.sort?m:C,0);o.map((m,C)=>{n.push({url:m,sort:d+C+1})}),this.formGroup.get(e).setValue(n)}}fixSortingAndUpdateForm(e){let t=this.formGroup.get(e).value.map((n,o)=>({url:mt(n),sort:o}));this.formGroup.get(e).setValue(t)}onScreenshotsUpdate(e,t){let n=this.formGroup.get(e);n.setValue(t),n.markAsDirty()}changePhoto(e,t){return b(this,null,function*(){let n={androidFeaturedGraphic:{customAspectRatio:2.048,customWidth:1024,customHeight:500}},o=this.modal.open(Hn,{backdrop:"static",keyboard:!1});n[e]&&(o.componentInstance.customAspectRatio=n[e].customAspectRatio,o.componentInstance.customWidth=n[e].customWidth,o.componentInstance.customHeight=n[e].customHeight),o.componentInstance.label=t||e,o.componentInstance.allowedExtensions=[".jpg",".png"],o.componentInstance.uploadFunction=d=>d&&typeof d!="string"&&d.size/1024/1e3>15?new Promise((C,F)=>{C({error:1,message:"File size cannot be larger than 15mb."})}):this.eventService.upload(d,"image","branded-app-assets",!0),o.componentInstance.showCentralizedFilesButton=!0;try{let d=yield o.result;d?.success&&pn(d.data)&&this.formGroup.get(e).setValue(d.data)}catch{}})}close(){this.closeModal.emit()}static{this.\u0275fac=function(t){return new(t||i)(w(W),w(X),w(fe),w(at),w(le))}}static{this.\u0275cmp=P({type:i,selectors:[["app-update-google-playstore"]],inputs:{isLoading:"isLoading",eventDetail:"eventDetail",data:"data"},outputs:{submit:"submit",closeModal:"closeModal"},decls:73,vars:39,consts:[["heading","Update Google play store assets","size","lg",3,"openChange","open","dismissible","showClose"],[3,"formGroup"],[1,"asset-stack"],[1,"asset-field"],[1,"asset-label"],[1,"asset-body"],[1,"asset-rules"],["target","_blank","rel","noopener noreferrer","href","https://support.google.com/googleplay/android-developer/answer/9866151"],[3,"filesDropped","filesSorted","fileRemoved","items","filesLabel","dragDropLabel","allowedExtensions","maxUploads","isUploading","isSaving","describedBy"],["role","alert",1,"field-error",3,"id"],[1,"preview-label"],[1,"preview","preview-wide"],["alt","Featured graphic preview",3,"src"],["variant","secondary","size","sm","ariaLabel","Change featured graphic",1,"change",3,"click","disabled"],["cnpModalFooter","","variant","secondary",3,"click","disabled"],["cnpModalFooter","","loadingLabel","Saving",3,"click","disabled","loading"]],template:function(t,n){if(t&1&&(r(0,"cnp-modal",0),h("openChange",function(){return n.close()}),r(1,"form",1)(2,"div",2)(3,"fieldset",3)(4,"legend",4),p(5,"Android phone screenshots"),a(),r(6,"div",5)(7,"ul",6)(8,"li"),p(9,"Upload minimum of 2 and maximum 8 phone screenshots"),a(),r(10,"li"),p(11,"Aspect ratio should be 9:16 or 16:9"),a(),r(12,"li"),p(13),a(),r(14,"li"),p(15),a(),r(16,"li"),p(17,"Acceptable image formats are .jpg and .png"),a(),r(18,"li"),p(19," See "),r(20,"a",7),p(21,"Google play assets guidelines"),a(),p(22," for more info "),a()(),r(23,"app-drag-drop-upload-sort",8),h("files
1Dropped",function(d){return n.uploadScreenshots("androidPhoneScreenshots",d)})("filesSorted",function(d){return n.onScreenshotsUpdate("androidPhoneScreenshots",d)})("fileRemoved",function(d){return n.onScreenshotsUpdate("androidPhoneScreenshots",d)}),a(),f(24,Qr,2,2,"p",9),f(25,Yr,2,5,"p",9),a()(),r(26,"fieldset",3)(27,"legend",4),p(28,"Android tablet screenshots"),a(),r(29,"div",5)(30,"ul",6)(31,"li"),p(32,"Upload minimum of 2 and maximum 8 tablet screenshots"),a(),r(33,"li"),p(34,"Aspect ratio should be 9:16 or 16:9"),a(),r(35,"li"),p(36),a(),r(37,"li"),p(38),a(),r(39,"li"),p(40,"Acceptable image formats are .jpg and .png"),a(),r(41,"li"),p(42," See "),r(43,"a",7),p(44,"Google play assets guidelines"),a(),p(45," for more info "),a()(),r(46,"app-drag-drop-upload-sort",8),h("filesDropped",function(d){return n.uploadScreenshots("androidTabletScreenshots",d)})("filesSorted",function(d){return n.onScreenshotsUpdate("androidTabletScreenshots",d)})("fileRemoved",function(d){return n.onScreenshotsUpdate("androidTabletScreenshots",d)}),a(),f(47,Zr,2,2,"p",9),f(48,Jr,2,5,"p",9),a()(),r(49,"fieldset",3)(50,"legend",4),p(51,"Featured graphic"),a(),r(52,"div",5)(53,"ul",6)(54,"li"),p(55,"Dimension should be 1024x500 pixels"),a(),r(56,"li"),p(57,"Acceptable image formats are .jpg and .png"),a(),r(58,"li"),p(59," See "),r(60,"a",7),p(61,"Google play assets guidelines"),a(),p(62," for more info "),a()(),r(63,"span",10),p(64,"Preview"),a(),r(65,"div",11),f(66,Xr,1,1,"img",12),r(67,"cnp-button",13),h("click",function(){return n.changePhoto("androidFeaturedGraphic","featured graphic")}),p(68," Change "),a()()()()()(),r(69,"cnp-button",14),h("click",function(){return n.close()}),p(70,"Close"),a(),r(71,"cnp-button",15),h("click",function(){return n.formSubmit()}),p(72," Save "),a()()),t&2){let o,d;u("open",!0)("dismissible",!1)("showClose",!n.writeActive),s(),u("formGroup",n.formGroup),s(12),Ae(" For 9:16 aspect ratio, the minimum width should be ",n.imageSize.min,"px and the maximum height should be ",n.imageSize.max,"px "),s(2),Ae(" For 16:9 aspect ratio, the minimum height should be ",n.imageSize.min,"px and the maximum width should be ",n.imageSize.max,"px "),s(8),u("items",n.formGroup.get("androidPhoneScreenshots").value)("filesLabel","screenshots")("dragDropLabel","Drag and drop up to 8 screenshots")("allowedExtensions",".jpg,.png")("maxUploads",8)("isUploading",n.fileUploading.androidPhoneScreenshots)("isSaving",n.isLoading)("describedBy",n.listDescribedBy("androidPhoneScreenshots","Android phone screenshots")),s(),v((o=n.listError("androidPhoneScreenshots","Android phone screenshots"))?24:-1,o),s(),v(n.hasDimensionError.androidPhoneScreenshots?25:-1),s(11),Ae(" For 9:16 aspect ratio, the minimum width should be ",n.imageSize.min,"px and the maximum height should be ",n.imageSize.max,"px "),s(2),Ae(" For 16:9 aspect ratio, the minimum height should be ",n.imageSize.min,"px and the maximum width should be ",n.imageSize.max,"px "),s(8),u("items",n.formGroup.get("androidTabletScreenshots").value)("filesLabel","screenshots")("dragDropLabel","Drag and drop up to 8 screenshots")("allowedExtensions",".jpg,.png")("maxUploads",8)("isUploading",n.fileUploading.androidTabletScreenshots)("isSaving",n.isLoading)("describedBy",n.listDescribedBy("androidTabletScreenshots","Android tablet screenshots")),s(),v((d=n.listError("androidTabletScreenshots","Android tablet screenshots"))?47:-1,d),s(),v(n.hasDimensionError.androidTabletScreenshots?48:-1),s(17),ne("no-bg",n.formGroup.get("androidFeaturedGraphic").value),s(),v(n.formGroup.get("androidFeaturedGraphic").value?66:-1),s(),u("disabled",n.writeActive),s(2),u("disabled",n.writeActive),s(2),u("disabled",n.writeActive||!n.formGroup.valid)("loading",n.isLoading)}},dependencies:[V,Z,Rt,L,ae,te,z,re],styles:[".asset-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-6)}.asset-field[_ngcontent-%COMP%]{min-width:0;padding:0;margin:0;border:0}.asset-label[_ngcontent-%COMP%]{float:none;width:auto;padding:0;margin:0 0 var(--cnp-space-2);font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-semibold);line-height:inherit;color:var(--cnp-color-text-secondary)}.asset-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;gap:var(--cnp-space-2);min-width:0}.asset-rules[_ngcontent-%COMP%]{padding-inline-start:var(--cnp-space-5);margin:0;font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.asset-rules[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--cnp-color-link)}.field-error[_ngcontent-%COMP%]{margin:0;font-size:var(--cnp-font-size-label);color:var(--cnp-color-danger-fg)}.preview-label[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.preview[_ngcontent-%COMP%]{position:relative;display:block;max-width:100%;max-height:100%;overflow:hidden;background:url(/assets/image-vertical.jpg) center/cover;border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-container)}.preview.no-bg[_ngcontent-%COMP%]{background:none}.preview[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:block;width:100%}.preview[_ngcontent-%COMP%]   .change[_ngcontent-%COMP%]{position:absolute;top:var(--cnp-space-4);left:var(--cnp-space-4)}.preview-square[_ngcontent-%COMP%]{width:320px;height:320px}.preview-wide[_ngcontent-%COMP%]{width:360px;height:176px}"]})}}return i})();var di=Se("[Branded-app-assets] Clear error"),Ut=Se("[Branded-app-assets] Load Branded App Assets"),Gt=Se("[Branded-app-assets] Load Branded App Assets Success",Pe()),$t=Se("[Branded-app-assets] Load Branded App Assets Failure",Pe()),Ht=Se("[Branded-app-assets] Update Branded App Assets",Pe()),jt=Se("[Branded-app-assets] Update Branded App Assets Success",Pe()),qt=Se("[Branded-app-assets] Update Branded App Assets Failure",Pe());var Di=On("branded-app-assets"),pa=We(Di,i=>i.brandedAppAssets),ua=We(Di,i=>i.loading),ma=We(Di,i=>i.error);var ha=(()=>{class i{constructor(e){this.store=e,this.loading$=this.store.select(ua),this.error$=this.store.select(ma),this.brandedAppAssets$=this.store.select(pa)}loadBrandedAppAssets(){this.store.dispatch(Ut())}loadBrandedAppAssetsSuccess(e){this.store.dispatch(Gt({brandedAppAssets:e}))}loadBrandedAppAssetsFailure(e){this.store.dispatch($t({error:e}))}updateBrandedAppAssets(e){this.store.dispatch(Ht({brandedAppAssets:e}))}updateBrandedAppAssetsSuccess(e){this.store.dispatch(jt({brandedAppAssets:e}))}updateBrandedAppAssetsFailure(e){this.store.dispatch(qt({error:e}))}clearError(){this.store.dispatch(di())}static{this.\u0275fac=function(t){return new(t||i)(Me(Dn))}}static{this.\u0275prov=Oe({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var is=i=>[i],ft=i=>({$implicit:i});function os(i,c){if(i&1&&p(0),i&2){let e=l().$implicit;je(" ",e," ")}}function as(i,c){i&1&&(r(0,"span",17),p(1,"(Not set)"),a())}function rs(i,c){if(i&1&&f(0,os,1,1)(1,as,2,0,"span",17),i&2){let e=c.$implicit;v(e?0:1)}}function ss(i,c){i&1&&(r(0,"cnp-callout",2),p(1," The deadline for submitting or updating app details has passed. For any questions or concerns, please reach out to your account manager. "),a())}function ls(i,c){if(i&1){let e=y();r(0,"div",6)(1,"cnp-button",24),h("click",function(){g(e);let n=l(2);return _(n.openSectionDialog("detail"))}),S(2,"cnp-icon",25),p(3," Update details "),a()()}}function cs(i,c){if(i&1&&(r(0,"cnp-status-pill",26)(1,"span",10),p(2),a()()),i&2){let e=l(2).$implicit;u("tone",e.status==="locked"?"neutral":"success")("dot",!0),s(2),E(e.status)}}function ds(i,c){i&1&&(r(0,"span",17),p(1,"(Not set)"),a())}function ps(i,c){if(i&1&&(r(0,"div",8)(1,"dt"),p(2,"Status"),a(),r(3,"dd"),f(4,cs,3,3,"cnp-status-pill",26)(5,ds,2,0,"span",17),a()(),r(6,"div",8)(7,"dt"),p(8,"Planned release date"),a(),r(9,"dd"),G(10,9),a()(),r(11,"div",11)(12,"dt"),p(13,"Notes"),a(),r(14,"dd",12),G(15,9),a()()),i&2){let e=l().$implicit,t=A(1);s(4),v(e!=null&&e.status?4:5),s(6),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(5,ft,e==null||e.releaseDate==null?null:e.releaseDate.replace("T00:00:00Z",""))),s(5),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(7,ft,e==null?null:e.notes))}}function us(i,c){if(i&1){let e=y();r(0,"div",6)(1,"cnp-button",24),h("click",function(){g(e);let n=l(2);return _(n.openSectionDialog("iconSplash"))}),S(2,"cnp-icon",25),p(3," Update icon and splash screen "),a()()}}function ms(i,c){if(i&1&&S(0,"img",16),i&2){let e=l().$implicit;u("src",e.appIcon,K)}}function hs(i,c){i&1&&(r(0,"span",17),p(1,"No app icon uploaded yet."),a())}function gs(i,c){if(i&1&&S(0,"img",18),i&2){let e=l().$implicit;u("src",e.pushNotificationIcon,K)}}function _s(i,c){i&1&&(r(0,"span",17),p(1,"No push notification icon uploaded yet."),a())}function fs(i,c){if(i&1&&S(0,"img",19),i&2){let e=l().$implicit;u("src",e.appSplashScreen,K)}}function vs(i,c){i&1&&(r(0,"span",17),p(1,"No app splash screen uploaded yet."),a())}function Cs(i,c){if(i&1){let e=y();r(0,"div",6)(1,"cnp-button",24),h("click",function(){g(e);let n=l(2);return _(n.openSectionDialog("appleAppstore"))}),S(2,"cnp-icon",25),p(3," Update assets "),a()()}}function bs(i,c){if(i&1&&S(0,"img",27),i&2){let e=c.$implicit,t=c.$index,n=l(3);u("alt",rn("iPhone screenshot ",t+1))("src",n.screenshotUrl(e),K)}}function Ss(i,c){if(i&1&&(r(0,"div",21),R(1,bs,1,3,"img",27,et),a()),i&2){let e=l().$implicit;s(),U(e.iOSiPhoneScreenshots)}}function ws(i,c){i&1&&(r(0,"span",17),p(1,"No iPhone screenshots uploaded yet."),a())}function ys(i,c){if(i&1&&S(0,"img",27),i&2){let e=c.$implicit,t=c.$index,n=l(3);u("alt",rn("iPad screenshot ",t+1))("src",n.screenshotUrl(e),K)}}function xs(i,c){if(i&1&&(r(0,"div",21),R(1,ys,1,3,"img",27,et),a()),i&2){let e=l().$implicit;s(),U(e.iOSiPadScreenshots)}}function Ms(i,c){i&1&&(r(0,"span",17),p(1,"No iPad screenshots uploaded yet."),a())}function Fs(i,c){if(i&1){let e=y();r(0,"div",6)(1,"cnp-button",24),h("click",function(){g(e);let n=l(2);return _(n.openSectionDialog("googlePlaystore"))}),S(2,"cnp-icon",25),p(3," Update assets "),a()()}}function As(i,c){if(i&1&&S(0,"img",27),i&2){let e=c.$implicit,t=c.$index,n=l(3);
1u("alt",rn("Android phone screenshot ",t+1))("src",n.screenshotUrl(e),K)}}function Es(i,c){if(i&1&&(r(0,"div",21),R(1,As,1,3,"img",27,et),a()),i&2){let e=l().$implicit;s(),U(e.androidPhoneScreenshots)}}function ks(i,c){i&1&&(r(0,"span",17),p(1,"No android phone screenshots uploaded yet."),a())}function Ts(i,c){if(i&1&&S(0,"img",27),i&2){let e=c.$implicit,t=c.$index,n=l(3);u("alt",rn("Android tablet screenshot ",t+1))("src",n.screenshotUrl(e),K)}}function Ds(i,c){if(i&1&&(r(0,"div",21),R(1,Ts,1,3,"img",27,et),a()),i&2){let e=l().$implicit;s(),U(e.androidTabletScreenshots)}}function Os(i,c){i&1&&(r(0,"span",17),p(1,"No android tablet screenshots uploaded yet."),a())}function Ps(i,c){if(i&1&&S(0,"img",22),i&2){let e=l().$implicit;u("src",e.androidFeaturedGraphic,K)}}function Is(i,c){i&1&&(r(0,"span",17),p(1,"No featured graphic uploaded yet."),a())}function Vs(i,c){if(i&1){let e=y();r(0,"app-update-detail",28),Y(1,"async"),h("submit",function(n){g(e);let o=l(2);return _(o.onUpdateSave(n))})("closeModal",function(){g(e);let n=l(2);return _(n.closeModal())}),a()}if(i&2){let e=l().$implicit,t=l();u("eventDetail",t.event)("data",e)("isLoading",ie(1,3,t.isLoading$))}}function Ls(i,c){if(i&1){let e=y();r(0,"app-update-icon-splash",28),Y(1,"async"),h("submit",function(n){g(e);let o=l(2);return _(o.onUpdateSave(n))})("closeModal",function(){g(e);let n=l(2);return _(n.closeModal())}),a()}if(i&2){let e=l().$implicit,t=l();u("eventDetail",t.event)("data",e)("isLoading",ie(1,3,t.isLoading$))}}function zs(i,c){if(i&1){let e=y();r(0,"app-update-apple-appstore",28),Y(1,"async"),h("submit",function(n){g(e);let o=l(2);return _(o.onUpdateSave(n))})("closeModal",function(){g(e);let n=l(2);return _(n.closeModal())}),a()}if(i&2){let e=l().$implicit,t=l();u("eventDetail",t.event)("data",e)("isLoading",ie(1,3,t.isLoading$))}}function Bs(i,c){if(i&1){let e=y();r(0,"app-update-google-playstore",28),Y(1,"async"),h("submit",function(n){g(e);let o=l(2);return _(o.onUpdateSave(n))})("closeModal",function(){g(e);let n=l(2);return _(n.closeModal())}),a()}if(i&2){let e=l().$implicit,t=l();u("eventDetail",t.event)("data",e)("isLoading",ie(1,3,t.isLoading$))}}function Ns(i,c){if(i&1&&(J(0,rs,2,1,"ng-template",null,0,sn),r(2,"div",1),f(3,ss,2,0,"cnp-callout",2),r(4,"section",3)(5,"div",4)(6,"h3",5),p(7,"App details"),a(),f(8,ls,4,0,"div",6),Y(9,"async"),a(),r(10,"dl",7)(11,"div",8)(12,"dt"),p(13,"App store name"),a(),r(14,"dd"),G(15,9),a()(),r(16,"div",8)(17,"dt"),p(18,"Installed app name"),a(),r(19,"dd"),G(20,9),a()(),r(21,"div",8)(22,"dt"),p(23,"App store deployment"),a(),r(24,"dd",10),G(25,9),a()(),r(26,"div",11)(27,"dt"),p(28,"Short description"),a(),r(29,"dd"),G(30,9),a()(),r(31,"div",11)(32,"dt"),p(33,"Full description"),a(),r(34,"dd",12),G(35,9),a()(),f(36,ps,16,9),a()(),r(37,"section",3)(38,"div",4)(39,"h3",5),p(40,"App icon and splash screen"),a(),f(41,us,4,0,"div",6),Y(42,"async"),a(),r(43,"div",13)(44,"div",14)(45,"span",15),p(46,"App icon"),a(),f(47,ms,1,1,"img",16)(48,hs,2,0,"span",17),a(),r(49,"div",14)(50,"span",15),p(51,"Push notification icon"),a(),f(52,gs,1,1,"img",18)(53,_s,2,0,"span",17),a(),r(54,"div",14)(55,"span",15),p(56,"App splash screen"),a(),f(57,fs,1,1,"img",19)(58,vs,2,0,"span",17),a()()(),r(59,"section",3)(60,"div",4)(61,"h3",5),p(62,"Apple app store assets"),a(),f(63,Cs,4,0,"div",6),Y(64,"async"),a(),r(65,"div",20)(66,"div",14)(67,"span",15),p(68,"iPhone 6.9 inch screenshots"),a(),f(69,Ss,3,0,"div",21)(70,ws,2,0,"span",17),a(),r(71,"div",14)(72,"span",15),p(73,"iPad 13 inch screenshots"),a(),f(74,xs,3,0,"div",21)(75,Ms,2,0,"span",17),a()()(),r(76,"section",3)(77,"div",4)(78,"h3",5),p(79,"Google play store assets"),a(),f(80,Fs,4,0,"div",6),Y(81,"async"),a(),r(82,"div",20)(83,"div",14)(84,"span",15),p(85,"Android phone screenshots"),a(),f(86,Es,3,0,"div",21)(87,ks,2,0,"span",17),a(),r(88,"div",14)(89,"span",15),p(90,"Android tablet screenshots"),a(),f(91,Ds,3,0,"div",21)(92,Os,2,0,"span",17),a(),r(93,"div",14)(94,"span",15),p(95,"Featured graphic"),a(),f(96,Ps,1,1,"img",22)(97,Is,2,0,"span",17),a()()()(),f(98,Vs,2,5,"app-update-detail",23),f(99,Ls,2,5,"app-update-icon-splash",23),f(100,zs,2,5,"app-update-apple-appstore",23),f(101,Bs,2,5,"app-update-google-playstore",23)),i&2){let e=c.$implicit,t=A(1),n=l();s(3),v((e==null?null:e.status)==="locked"?3:-1),s(5),v(n.canUpdate(e,ie(9,28,n.isLoading$))?8:-1),s(7),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(36,ft,e==null?null:e.appStoreName)),s(5),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(38,ft,e==null?null:e.installedAppName)),s(5),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(40,ft,e==null?null:e.appStoreDeployment)),s(5),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(42,ft,e==null?null:e.shortDe
1scription)),s(5),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(44,ft,e==null?null:e.fullDescription)),s(),v(!(n.userService==null||n.userService.profile==null)&&n.userService.profile.superadmin?36:-1),s(5),v(n.canUpdate(e,ie(42,30,n.isLoading$))?41:-1),s(6),v(e!=null&&e.appIcon?47:48),s(5),v(e!=null&&e.pushNotificationIcon?52:53),s(5),v(e!=null&&e.appSplashScreen?57:58),s(6),v(n.canUpdate(e,ie(64,32,n.isLoading$))?63:-1),s(6),v(!(e==null||e.iOSiPhoneScreenshots==null)&&e.iOSiPhoneScreenshots.length?69:70),s(5),v(!(e==null||e.iOSiPadScreenshots==null)&&e.iOSiPadScreenshots.length?74:75),s(6),v(n.canUpdate(e,ie(81,34,n.isLoading$))?80:-1),s(6),v(!(e==null||e.androidPhoneScreenshots==null)&&e.androidPhoneScreenshots.length?86:87),s(5),v(!(e==null||e.androidTabletScreenshots==null)&&e.androidTabletScreenshots.length?91:92),s(5),v(e!=null&&e.androidFeaturedGraphic?96:97),s(2),v(n.openSection==="detail"?98:-1),s(),v(n.openSection==="iconSplash"?99:-1),s(),v(n.openSection==="appleAppstore"?100:-1),s(),v(n.openSection==="googlePlaystore"?101:-1)}}var pi=(()=>{class i{constructor(e,t,n,o,d,m){this.eventService=e,this.settingService=t,this.userService=n,this.brandedAppAssetsFacade=o,this.utilities=d,this.toastService=m,this.subscription$=[],this.brandedAppAssets$=this.brandedAppAssetsFacade.brandedAppAssets$,this.isLoading$=this.brandedAppAssetsFacade.loading$,this.error$=this.brandedAppAssetsFacade.error$,this.openSection=null,this.otherFeatures={brandedAppAssets:!1},this.errorSubscriptions$=null,this.screenshotUrl=mt}ngOnInit(){return b(this,null,function*(){this.settingService.getSetting("other-features").then(e=>b(this,null,function*(){e&&(this.otherFeatures=x(x({},this.otherFeatures),e.data),this.loadBrandedAppAssets())})),this.subscription$.push(this.eventService.eventSubject.subscribe(e=>{this.event=e}))})}ngOnDestroy(){this.subscription$.forEach(e=>e.unsubscribe()),this.errorSubscriptions$?.unsubscribe()}loadBrandedAppAssets(){this.otherFeatures?.brandedAppAssets&&this.brandedAppAssetsFacade.loadBrandedAppAssets()}canUpdate(e,t){return e?.status!=="locked"&&t===!1||!!this.userService?.profile?.superadmin}openSectionDialog(e){this.openSection=e}closeModal(){this.openSection=null}onUpdateSave(e){this.brandedAppAssetsFacade.updateBrandedAppAssets(e),this.errorSubscriptions$&&this.errorSubscriptions$.unsubscribe(),this.errorSubscriptions$=this.error$.pipe(Mn(1),xn(1)).subscribe(t=>{let n="details";switch(this.openSection){case"iconSplash":n="icon and splash screen";break;case"appleAppstore":n="Apple app store assets";break;case"googlePlaystore":n="Google play store assets";break}t?this.utilities.alert({header:"Branded app assets",message:t?t.toString():`Something went wrong while updating the ${n}. Please try again.`}):(this.toastService.showSuccess("Branded app assets",`Successfully updated ${n}.`),this.closeModal())})}static{this.\u0275fac=function(t){return new(t||i)(w(X),w(W),w(kt),w(ha),w(le),w(se))}}static{this.\u0275cmp=P({type:i,selectors:[["app-branded-app"]],decls:3,vars:4,consts:[["valueOrUnset",""],[1,"settings-stack"],["tone","warning","heading","Submission closed"],[1,"section-card"],[1,"section-head"],[1,"section-heading"],[1,"section-actions"],[1,"details-grid"],[1,"detail"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"capitalize"],[1,"detail","span-all"],[1,"pre-line"],[1,"asset-grid"],[1,"asset"],[1,"asset-label"],["alt","App icon",1,"app-icon",3,"src"],[1,"unset"],["alt","Push notification icon",1,"app-icon",3,"src"],["alt","App splash screen",1,"app-splash",3,"src"],[1,"asset-stack"],[1,"screenshots"],["alt","Featured graphic",1,"featured-graphic",3,"src"],[3,"eventDetail","data","isLoading"],["variant","secondary",3,"click"],["name","edit"],[3,"tone","dot"],[3,"src","alt"],[3,"submit","closeModal","eventDetail","data","isLoading"]],template:function(t,n){t&1&&(R(0,Ns,102,46,null,null,et),Y(2,"async")),t&2&&U(Q(2,is,ie(2,0,n.brandedAppAssets$)))},dependencies:[V,ue,ve,Pt,An,ii,oi,li,ci,yt],styles:[".settings-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-6);min-width:0}.status-band[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-4) var(--cnp-space-7);background:var(--cnp-color-bg-card);border-radius:var(--cnp-radius-container);box-shadow:var(--cnp-shadow-low);padding:var(--cnp-space-4) var(--cnp-space-card-padding)}.band-item[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-3);min-width:0}.band-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--cnp-space-2);font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-semibold);color:var(--cnp-color-text-secondary)}.section-card[_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);min-width:0}.section-head[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--cnp-space-3);border-bottom:2px solid var(--cnp-color-rule);padding-bottom:var(--cnp-space-2)}.section-heading[_ngcontent-%COMP%]{margin:0;font-size:var(--cnp-font-size-section);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-heading)}.section-description[_ngcontent-%COMP%]{margin:var(--cnp-space-3) 0 0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-secondary)}.section-actions[_ngcontent-%COMP%]{--cnp-button-min-height: var(--cnp-size-control);display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2)}.section-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-4);margin-top:var(--cnp-space-4);min-width:0}.details-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6);margin:var(--cnp-space-4) 0 0}
1@media (width <= 900px){.details-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width <= 560px){.details-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.detail[_ngcontent-%COMP%]{min-width:0}.detail[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-regular);color:var(--cnp-color-text-muted)}.detail[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:var(--cnp-space-1) 0 0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-body);overflow-wrap:anywhere}.value-row[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2);min-width:0}.unset[_ngcontent-%COMP%]{color:var(--cnp-color-text-muted)}.setting-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0;margin-top:var(--cnp-space-2)}.span-all[_ngcontent-%COMP%]{grid-column:1/-1}.pre-line[_ngcontent-%COMP%]{white-space:pre-line}.capitalize[_ngcontent-%COMP%]{text-transform:capitalize}.capitalize[_ngcontent-%COMP%]   .unset[_ngcontent-%COMP%]{text-transform:none}.asset-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6);margin-top:var(--cnp-space-4)}@media (width <= 900px){.asset-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.asset-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-5);margin-top:var(--cnp-space-4)}.asset[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--cnp-space-2);min-width:0}.asset-label[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.app-icon[_ngcontent-%COMP%], .app-splash[_ngcontent-%COMP%]{display:block;width:100%;max-width:320px;border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-container)}.featured-graphic[_ngcontent-%COMP%]{display:block;width:360px;max-width:100%;height:176px;border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-element)}.screenshots[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:var(--cnp-space-4)}.screenshots[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:320px;max-width:100%;object-fit:fill;border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-container)}"]})}}return i})();var _a=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,yo,Rt]})}}return i})();var va=(()=>{class i{constructor(e){this.http=e,this.apiEndpoint="core"}getBrandedAppAssets(){let e=`${Ke.api}/${this.apiEndpoint}/branded-app-assets`;return Je(this.http.get(e))}updateBrandedAppAssets(e){let t=`${Ke.api}/${this.apiEndpoint}/branded-app-assets`;return Je(this.http.put(t,e))}static{this.\u0275fac=function(t){return new(t||i)(Me(xt))}}static{this.\u0275prov=Oe({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Ca=(()=>{class i{constructor(e,t){this.actions$=e,this.brandedAppAssetsService=t,this.loadBrandedAppAssets$=Ft(()=>this.actions$.pipe(At(Ut),bt(()=>this.brandedAppAssetsService.getBrandedAppAssets().pipe(Xe(n=>{if(!n.success)throw Error(n.message);return Gt({brandedAppAssets:n.data})}),St(n=>Ct($t({error:n.message}))))))),this.updateBrandedAppAssets$=Ft(()=>this.actions$.pipe(At(Ht),bt(n=>this.brandedAppAssetsService.updateBrandedAppAssets(n.brandedAppAssets).pipe(Xe(o=>{if(!o.success)throw Error(o.message);return jt({brandedAppAssets:o.data})}),St(o=>Ct(qt({error:o.message})))))))}static{this.\u0275fac=function(t){return new(t||i)(Me(Vn),Me(va))}}static{this.\u0275prov=Oe({token:i,factory:i.\u0275fac})}}return i})();var Gs={brandedAppAssets:null,loading:!1,error:null},ba=In(Gs,we(di,i=>O(x({},i),{error:null})),we(Ut,i=>O(x({},i),{loading:!0,error:null})),we(Gt,(i,{brandedAppAssets:c})=>O(x({},i),{brandedAppAssets:c,loading:!1,error:""})),we($t,(i,{error:c})=>O(x({},i),{loading:!1,error:c})),we(Ht,(i,{brandedAppAssets:c})=>O(x({},i),{brandedAppAssets:c,loading:!0,error:null})),we(jt,(i,{brandedAppAssets:c})=>O(x({},i),{brandedAppAssets:c,loading:!1,error:""})),we(qt,(i,{error:c})=>O(x({},i),{loading:!1,error:c})));var Sa=(()=>
1{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[Pn.forFeature("branded-app-assets",ba),Ln.forFeature([Ca])]})}}return i})();var wa=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,L,z,_a,Sa,pi,ii,oi,li,ci]})}}return i})();function $s(i,c){if(i&1){let e=y();r(0,"form")(1,"cnp-field",3)(2,"ng-select",4),q("ngModelChange",function(n){g(e);let o=l();return j(o.selectedOwner,n)||(o.selectedOwner=n),_(n)}),h("change",function(){g(e);let n=l();return _(n.changeUser())}),a()()()}if(i&2){let e=l();s(),u("required",!0)("error",e.submitError??""),s(),H("ngModel",e.selectedOwner),u("items",e.users)("virtualScroll",!0)}}var mn=(()=>{class i{get writeActive(){return this.isSubmitting}constructor(e,t,n){this.http=e,this.event=t,this.api=n,this.changed=new T,this.open=!1,this.users=[],this.isSubmitting=!1,this.ownerRequest=0}openWith(e){this.currentOwner=e,this.submitError=null,this.selectedOwner=void 0,this.users=[],this.open=!0,this.initialize(++this.ownerRequest)}close(){this.open=!1}initialize(e){return b(this,null,function*(){let t=yield this.api.get(`/all-users/search?event=${this.event.data.url}`);e===this.ownerRequest&&(t?.success&&(t.data&&typeof t.data=="string"?(this.user$?.unsubscribe(),this.user$=this.http.get(t.data).subscribe(n=>{e===this.ownerRequest&&(this.users=n)})):Array.isArray(t.data)&&(this.users=t.data)),this.selectedOwner=this.currentOwner?.PK)})}ngOnDestroy(){this.user$&&this.user$.unsubscribe(),this.users=[]}compare(e,t){return e.PK.trim().toLowerCase()===t.PK.trim().toLowerCase()}submit(){return b(this,null,function*(){if(!this.isSubmitting)try{if(this.submitError=null,!this.selectedOwner){this.submitError="Event owner is required";return}this.isSubmitting=!0;let e=yield this.event.changeOwner(this.event.data.PK,this.selectedOwner);e?.success?(this.open=!1,this.changed.emit()):this.submitError=e?.message||"An error occurred while changing event owner."}catch(e){this.submitError="An error occurred while changing event owner.",console.log(e)}finally{this.isSubmitting=!1}})}changeUser(){this.selectedOwner?this.submitError=null:this.submitError="Event owner is required"}static{this.\u0275fac=function(t){return new(t||i)(w(xt),w(X),w(bo))}}static{this.\u0275cmp=P({type:i,selectors:[["app-change-owner"]],inputs:{currentOwner:"currentOwner"},outputs:{changed:"changed"},decls:6,vars:7,consts:[["heading","Change event owner",3,"openChange","open","dismissible","showClose"],["cnpModalFooter","","variant","secondary",3,"click","disabled"],["cnpModalFooter","","variant","primary","loadingLabel","Saving",3,"click","disabled","loading"],["label","Event owner","controlId","selectedOwner",3,"required","error"],["labelForId","selectedOwner","bindLabel","fullName","bindValue","PK","name","selectedOwner","appendTo","body",1,"owner-select",3,"ngModelChange","change","ngModel","items","virtualScroll"]],template:function(t,n){t&1&&(r(0,"cnp-modal",0),q("openChange",function(d){return j(n.open,d)||(n.open=d),d}),f(1,$s,3,5,"form"),r(2,"cnp-button",1),h("click",function(){return n.close()}),p(3," Close "),a(),r(4,"cnp-button",2),h("click",function(){return n.submit()}),p(5," Submit "),a()()),t&2&&(H("open",n.open),u("dismissible",!1)("showClose",!n.writeActive),s(),v(n.open?1:-1),s(),u("disabled",n.writeActive),s(2),u("disabled",!n.selectedOwner)("loading",n.isSubmitting))},dependencies:[L,ae,oe,te,Le,po,_o,V,pe,Z],styles:[".owner-select[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}[_nghost-%COMP%]     .owner-select .ng-select-container{min-height:var(--cnp-size-control);color:var(--cnp-color-text-body);background:var(--cnp-color-bg-input);border-color:var(--cnp-color-border);border-radius:var(--cnp-radius-element)}[_nghost-%COMP%]     .owner-select .ng-value-label, [_nghost-%COMP%]     .owner-select input{font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-body)}[_nghost-%COMP%]     .owner-select.ng-select-focused:not(.ng-select-opened)>.ng-select-container{border-color:var(--cnp-color-action);box-shadow:0 0 0 2px var(--cnp-color-focus-ring)}"]})}}return i})();var ya=(()=>
1{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,L,z,rt,mn]})}}return i})();function Hs(i,c){if(i&1){let e=y();r(0,"app-target-attendees",5),h("changed",function(n){let o=g(e).$implicit,d=l(2);return _(d.onTargetAttendeeSourceChange(n,o))}),a()}if(i&2){let e=c.$implicit,t=l(2);u("label",io(t.chatFeaturesLabel[e]))("disabled",t.disabledChatFeature[e])("data",t.chatFeaturesTarget[e])}}function js(i,c){if(i&1&&(r(0,"div",1),R(1,Hs,1,4,"app-target-attendees",4,et),a()),i&2){let e=l();s(),U(e.chatFeatures)}}var hn=(()=>{class i{get writeActive(){return this.isLoading}constructor(e,t){this.settingService=e,this.toastService=t,this.saved=new T,this.open=!1,this.chatFeaturesTarget={homepageChats:[],eventChats:[],personalChats:[],groupChats:[]},this.chatFeatures=["homepageChats","eventChats","personalChats","groupChats"],this.chatFeaturesLabel={homepageChats:"Homepage chats",eventChats:"Event chats",personalChats:"Personal chats",groupChats:"Group chats"},this.isLoading=!1,this.disabledChatFeature={homepageChats:!1,eventChats:!1,personalChats:!1,groupChats:!1}}openWith(e){this.otherFeatures=e,this.chatFeaturesTarget={homepageChats:[],eventChats:[],personalChats:[],groupChats:[]},this.disabledChatFeature={homepageChats:!1,eventChats:!1,personalChats:!1,groupChats:!1},this.readSettings(),this.open=!0}close(){this.open=!1}ngOnInit(){this.readSettings()}readSettings(){this.otherFeatures?.chatFeaturesTarget&&(this.chatFeaturesTarget=x(x({},this.chatFeaturesTarget),this.otherFeatures.chatFeaturesTarget)),this.otherFeatures?.sidebarChat==="disabled"&&(this.disabledChatFeature.homepageChats=!0),this.otherFeatures?.eventChat===!1&&(this.disabledChatFeature.eventChats=!0),this.otherFeatures?.personalChat===!1&&(this.disabledChatFeature.personalChats=!0),this.otherFeatures?.groupChat===!1&&(this.disabledChatFeature.groupChats=!0)}onTargetAttendeeSourceChange(e,t){let n=this.chatFeaturesTarget;n[t]=e}save(){return b(this,null,function*(){try{this.isLoading=!0;let e=yield this.settingService.set("other-features",{chatFeaturesTarget:this.chatFeaturesTarget});if(e?.success)this.toastService.showSuccess("Success","Successfully updated chat target attendees."),this.isLoading=!1;else throw e;this.open=!1,this.saved.emit()}catch(e){this.isLoading=!1,this.toastService.showWarning("Warning","Failed to update chat target attendees."),console.log(e)}})}static{this.\u0275fac=function(t){return new(t||i)(w(W),w(se))}}static{this.\u0275cmp=P({type:i,selectors:[["app-chat-target-attendees"]],inputs:{otherFeatures:"otherFeatures"},outputs:{saved:"saved"},decls:6,vars:7,consts:[["heading","Target attendees",3,"openChange","open","dismissible","showClose"],[1,"audience-list"],["cnpModalFooter","","variant","secondary",3,"click","disabled"],["cnpModalFooter","","variant","primary","loadingLabel","Saving",3,"click","disabled","loading"],[1,"audience-item",3,"disabled","label","data"],[1,"audience-item",3,"changed","disabled","label","data"]],template:function(t,n){t&1&&(r(0,"cnp-modal",0),q("openChange",function(d){return j(n.open,d)||(n.open=d),d}),f(1,js,3,0,"div",1),r(2,"cnp-button",2),h("click",function(){return n.close()}),p(3," Close "),a(),r(4,"cnp-button",3),h("click",function(){return n.save()}),p(5," Save "),a()()),t&2&&(H("open",n.open),u("dismissible",!1)("showClose",!n.writeActive),s(),v(n.open?1:-1),s(),u("disabled",n.isLoading),s(2),u("disabled",n.isLoading)("loading",n.isLoading))},dependencies:[Ie,V,Z],styles:[".audience-list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.audience-item[_ngcontent-%COMP%]{display:block;padding-block:var(--cnp-space-4);border-bottom:1px solid var(--cnp-color-border-subtle)}.audience-item[_ngcontent-%COMP%]:first-child{padding-top:0}.audience-item[_ngcontent-%COMP%]:last-child{padding-bottom:0;border-bottom:0}"]})}}return i})();var Ue=on(sr());function qs(i,c){if(i&1){let e=y();r(0,"cnp-callout",7),p(1," The countdown settings could not be loaded. "),r(2,"cnp-button",9),h("click",function(){g(e);let n=l();return _(n.load())}),p(3," Retry "),a()()}if(i&2){let e=l();s(2),u("loading",e.loading)}}function Ws(i,c){i&1&&(r(0,"cnp-callout",10),p(1," This countdown is not saved yet. Choose a date and time, then select Save. "),a())}function Ks(i,c){if(i&1){let e=y();f(0,Ws,2,0,"cnp-callout",10),r(1,"div",11)(2,"div",12)(3,"cnp-field",13,0)(5,"cnp-combobox",14),h("picked",function(n){g(e);let o=l();return _(o.onTimezonePicked(n))}),a()(),r(6,"cnp-button",15),h("click",function(){g(e);let n=l();return _(n.useEventTimezone())}),p(7," Use event timezone "),a()(),r(8,"div",16)(9,"span",17),p(10,"Counter background"),a(),r(11,"app-color-picker",18),h("saveColor",function(n){g(e);let o=l();return _(o.saveColor(n))})("resetColor",function(){g(e);let n=l();return _(n.resetColor())}),a()(),r(12,"cnp-date-field",19),h("valueChange",function(n){g(e);let o=l();return _(o.onCountdownDatePicked(n))}),a(),r(13,"cnp-field",20,1)(15,"input",21),q("ngModelChange",function(n){g(e);let o=l();return j(o.countdownTime,n)||(o.countdownTime=n),_(n)}),h("change",function(n){g(e);let o=l();return _(o.timeChanged(n))}),a(),r(16,"cnp-dropdown",22),h("select",function(n){g(e);let o=l();return _(o.selectTimeFromDropdown(n))}),S(17,"cnp-icon",23),a()()(),r(18,"div",24)(19,"cnp-button",25),h("click",function(){g(e);let n=l();return _(n.save())}),p(20," Save "),a()()}if(i&2){let e=A(4),t=A(14),n=l();v(n.isUnsavedCountdown?0:-1),s(5),u("options",n.timezoneComboOptions)("value",n.timezoneValue)("describedBy",e.controlAttrs().describedBy),s(),u("disabled",n.timezone===n.eventService.data.timezone),s(5),u("defaultColor",n.defaultBackgroun
1dColor)("selectedColor",n.backgroundColor),s(),u("value",n.countdownDateIso)("min",n.countdownMinIso),s(3),H("ngModel",n.countdownTime),u("showMaskTyped",!0)("leadZeroDateTime",!0)("dropSpecialCharacters",!1),M("aria-describedby",t.controlAttrs().describedBy),s(),u("iconOnly",!0)("items",n.timeMenuItems),s(3),u("disabled",n.saveDisabled)("loading",n.isSaving)}}function Qs(i,c){i&1&&(r(0,"p",8),p(1," Count down to your event with a customizable countdown timer in your homepage. Set a custom time or count down to your event start using the date and time controls. "),a())}var xa="countdown-config",ui=(()=>{class i{constructor(e,t,n,o){this.timezoneService=e,this.eventService=t,this.settingService=n,this.toastService=o,this.timezoneOptions=[],this.timezoneComboOptions=[],this.timeOptions=[],this.timeMenuItems=[],this.defaultBackgroundColor="#222210",this.backgroundColor="#222210",this.countdownTime="00:00:00",this.countdownEnabled=!1,this.countdownMirror=!1,this.isTogglingCountdown=!1,this.summaryChange=new T,this.loading=!1,this.isSaving=!1,this.loadFailed=!1,this.loadRequest=0,this.timezoneValueCache=[],this.countdownDateChecked=!1,this.created=!1;for(let d=0;d<24;d++)for(let m=0;m<60;m+=30){let C=this.pad(d)+":"+this.pad(m);this.timeOptions.push({value:C+":00",label:C})}this.timeMenuItems=this.timeOptions.map(d=>({id:d.value,label:d.label}))}ngOnInit(){this.timezoneOptions=this.timezoneService.getList(),this.timezoneComboOptions=this.timezoneOptions.map(t=>({value:t.name,label:t.name===this.eventService.data.timezone?t.label+" (Event timezone)":t.label,sublabel:[t.name,t.countryName,t.continentName,...t.group??[],t.abbreviation].filter(Boolean).join(" \xB7 ")})),this.timezone=this.eventService.data.timezone;let e=Ue.default.tz(this.eventService.data.startDate,this.timezone).toDate();this.countdownDate={year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()},this.load()}load(){return b(this,null,function*(){let e=++this.loadRequest;this.loading=!0;let t=yield this.settingService.loadBySK(xa);if(e===this.loadRequest){if(this.loadResult=t,this.loadFailed=!t?.success&&!t?.notFound,t?.data?.value){let n=t?.data?.value;this.countdownEnabled=n.enabled;let o=new Date(n.countdownDateTime.replace(" ","T"));this.countdownDate={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},this.countdownTime=this.getTime(n.countdownDateTime),this.backgroundColor=n.backgroundColor,this.timezone=n.timezone}this.countdownMirror=this.countdownEnabled,this.updateDateRanges(),this.summaryChange.emit({stored:this.storedCountdownOf(t?.data?.value),unreadable:this.loadFailed}),this.loading=!1}})}storedCountdownOf(e){return!e?.countdownDateTime||!e.timezone?null:{instant:e.countdownTimeUtc||Ue.default.tz(e.countdownDateTime,e.timezone).toISOString(),timezone:e.timezone,enabled:!!e.enabled}}timezoneChange(e){return b(this,null,function*(){let t=e.id;this.timezone=t,this.updateDateRanges()})}get timezoneValue(){return this.timezoneValueCache[0]!==this.timezone&&(this.timezoneValueCache=this.timezone?[this.timezone]:[]),this.timezoneValueCache}onTimezonePicked(e){let t=e[0];if(!t){this.timezoneValueCache=[...this.timezoneValueCache];return}this.timezoneChange({id:t})}get countdownDateIso(){return ee(this.countdownDate)}get minDateIso(){return ee(this.minDate)}get countdownMinIso(){return Qe(this.countdownDateIso,this.minDateIso,"min",this.countdownDateChecked)}get storedCountdownHasPassed(){let e=this.loadResult?.data?.value?.countdownTimeUtc;return!!e&&Ue.default.utc().isAfter(Ue.default.utc(e))}get isUnsavedCountdown(){return this.loading||this.loadFailed?!1:!this.created&&!this.loadResult?.data?.PK?!0:this.countdownEnabled&&!this.loadResult?.data?.value?.enabled&&this.storedCountdownHasPassed}get saveDisabled(){return this.loading||this.loadFailed}get toggleDisabled(){return this.saveDisabled||this.isSaving}onCountdownDatePicked(e){this.countdownDateChecked=!0,this.countdownDate=De(e),this.dateChanged(this.countdownDate)}useEventTimezone(){this.timezone=this.eventService.data.timezone,this.updateDateRanges()}timeChanged(e){return b(this,null,function*(){let t=e.target.value;t.includes("_")||(this.countdownTime=t)})}
1dateChanged(e){return b(this,null,function*(){typeof this.countdownDate=="object"&&(this.countdownDate=e)})}selectTimeFromDropdown(e){this.countdownTime=e}saveColor(e){return b(this,null,function*(){this.backgroundColor=e})}resetColor(){return b(this,null,function*(){this.backgroundColor=this.defaultBackgroundColor})}onCountdownToggled(e){return b(this,null,function*(){if(this.loadFailed||this.created&&!this.loadResult?.data?.PK){this.countdownMirror=this.countdownEnabled;return}if(!this.loadResult?.data?.PK||e&&this.storedCountdownHasPassed){e&&(this.countdownDateChecked=!0),this.countdownEnabled=e,this.countdownMirror=e;return}let t=this.countdownEnabled;this.isTogglingCountdown=!0;try{(yield this.toggleStatus(e))||(this.countdownEnabled=t)}catch(n){this.countdownEnabled=t,console.error("Failed to save the countdown",n)}finally{this.isTogglingCountdown=!1,this.countdownMirror=this.countdownEnabled}})}toggleStatus(e){return b(this,null,function*(){return this.countdownEnabled=e,this.save()})}save(){return b(this,null,function*(){if(this.loadFailed)return!1;this.isSaving=!0;try{if(!this.countdownDate)return this.toastService.showDanger("Error","Please select a date."),!1;let e=new Date(this.countdownDate.year,this.countdownDate.month-1,this.countdownDate.day),t=this.toISODate(e)+" "+this.countdownTime,n=Ue.default.tz(t,this.timezone).utc().toDate().toISOString(),o={enabled:this.countdownEnabled,timezone:this.timezone,backgroundColor:this.backgroundColor,countdownDateTime:t,countdownTimeUtc:n},d=this.loadResult?.data?.value,m=!!this.loadResult?.data?.PK&&!o.enabled,C=!this.countdownDateChecked&&d?.countdownTimeUtc===o.countdownTimeUtc;if(!m&&(!C||!d?.enabled)&&Ue.default.tz(this.timezone).isAfter(Ue.default.tz(t,this.timezone)))return this.toastService.showDanger("Error","Please select a future date/time."),!1;let Ce;if(this.loadResult?.data?.PK)Ce=yield this.settingService.update(O(x({},this.loadResult.data),{value:o}));else{if(this.created)return this.toastService.showDanger("Error","The countdown was saved, but could not be read back. Please reload the page."),!1;Ce=yield this.settingService.create({settingKey:"#"+xa,name:"Event countdown timer",value:o},!1),this.created=!!Ce?.success}return Ce?.success?(yield this.load(),this.toastService.showSuccess("Success","Branding countdown saved successfully."),!0):(this.toastService.showDanger("Error",Ce?.message||"The countdown could not be saved. Please try again."),!1)}finally{this.isSaving=!1}})}pad(e,t=2){let n=e+"";for(;n.length<t;)n="0"+n;return n}toISODate(e){return e.getFullYear()+"-"+this.pad(e.getMonth()+1)+"-"+this.pad(e.getDate())}getTime(e){if(this.isIsoDate(e)&&this.timezone)return Ue.default.tz(new Date(e),this.timezone).format("HH:mm:00");{let t=new Date(e.replace(" ","T"));return this.pad(t.getHours())+":"+this.pad(t.getMinutes())+":00"}}isIsoDate(e){return/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(e)?new Date(e).toISOString()===e:!1}updateDateRanges(){let e=Ue.default.tz(this.timezone);this.minDate={year:e.year(),month:e.month()+1,day:e.date()}}static{this.\u0275fac=function(t){return new(t||i)(w(zt),w(X),w(W),w(se))}}static{this.\u0275cmp=P({type:i,selectors:[["app-countdown"]],outputs:{summaryChange:"summaryChange"},decls:9,vars:5,consts:[["timezoneField",""],["timeField",""],[1,"section-head"],[1,"section-heading"],[1,"section-actions"],["ariaLabel","Countdown",3,"checkedChange","toggled","checked","saving","disabled"],[1,"section-body"],["tone","danger","live","alert"],[1,"countdown-description"],["cnpCalloutAction","","variant","secondary","loadingLabel","Loading",3,"click","loading"],["tone","info","live","status"],[1,"form-grid"],[1,"field-stack"],["label","Timezone","controlId","countdownTimezone"],["controlId","countdownTimezone","placeholder","Search time zones",3,"picked","options","value","describedBy"],["variant","secondary","size","sm",3,"click","disabled"],["role","group","aria-labelledby","countdownBackgroundLabel",1,"field-block"],["id","countdownBackgroundLabel",1,"field-label"],[3,"saveColor","resetColor","defaultColor","selectedColor"],["label","Date",3,"valueChange","value","min"],["label","Time","controlId","countdownTime"],["cnpInput","","id","countdownTime","mask","Hh:m0",3,"ngModelChange","change","ngModel","showMaskTyped","leadZeroDateTime","dropSpecialCharacters"],["cnpFieldSuffix","","align","end","ariaLabel","Pick a time",1,"field-action",3,"select","iconOnly","items"],["name","clock"],[1,"form-actions"],["variant","primary","loadingLabel","Saving",3,"click","disabled","loading"]],template:function(t,n){t&1&&(r(0,"div",2)(1,"h3",3),p(2,"Countdown"),a(),r(3,"div",4)(4,"cnp-toggle",5),q("checkedChange",function(d){return j(n.countdownMirror,d)||(n.countdownMirror=d),d}),h("toggled",function(d){return n.onCountdownToggled(d)}),a()()(),r(5,"div",6),f(6,qs,4,1,"cnp-callout",7),f(7,Ks,21,18)(8,Qs,2,0,"p",8),a()),t&2&&(s(4),H("checked",n.countdownMirror),u("saving",n.isTogglingCountdown)("disabled",n.toggleDisabled),s(2),v(n.loadFailed?6:-1),s(),v(n.countdownEnabled?7:8))},dependencies:[L,_e,oe,Le,Zn,Co,V,ue,ct,ze,Mo,pe,ve,ce,Be],styles:[".settings-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-6);min-width:0}.status-band[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-4) var(--cnp-space-7);background:var(--cnp-color-bg-card);border-radius:var(--cnp-radius-container);box-shadow:var(--cnp-shadow-low);padding:var(--cnp-space-4) var(--cnp-space-card-padding)}.band-item[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-3);min-width:0}.band-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--cnp-space-2);font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-semibold);color:var(--cnp-color-text-secondary)}.section-card[_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);min-width:0}.section-head[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--cnp-space-3);border-bottom:2px solid var(--cnp-color-rule);padding-bottom:var(--cnp-space-2)}.section-heading[_ngcontent-%COMP%]{margin:0;font-size:var(--cnp-font-size-section);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-heading)}.section-description[_ngcontent-%COMP%]{margin:var(--cnp-space-3) 0 0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-secondary)}.section-actions[_ngcontent-%COMP%]{--cnp-button-min-height: var(--cnp-size-control);display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2)}.section-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-4);margin-top:var(--cnp-space-4);min-width:0}.details-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6);margin:var(--cnp-space-4) 0 0}
1@media (width <= 900px){.details-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width <= 560px){.details-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.detail[_ngcontent-%COMP%]{min-width:0}.detail[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-regular);color:var(--cnp-color-text-muted)}.detail[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:var(--cnp-space-1) 0 0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-body);overflow-wrap:anywhere}.value-row[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2);min-width:0}.unset[_ngcontent-%COMP%]{color:var(--cnp-color-text-muted)}.setting-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0;margin-top:var(--cnp-space-2)}.dialog-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-5)}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6)}@media (width <= 768px){.form-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.span-2[_ngcontent-%COMP%]{grid-column:1/-1}.field-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-1);min-width:0}.field-block[_ngcontent-%COMP%] > cnp-segmented[_ngcontent-%COMP%], .field-block[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{align-self:flex-start}.field-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--cnp-space-1);font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.field-action[_ngcontent-%COMP%]{flex:none;margin-inline-start:var(--cnp-space-2);white-space:nowrap}cnp-combobox[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.theme-preview[_ngcontent-%COMP%]{max-width:100%;margin-top:var(--cnp-space-1);border-radius:var(--cnp-radius-element)}.choice-group[_ngcontent-%COMP%]{min-width:0;margin:0;padding:0;border:0}.choice-legend[_ngcontent-%COMP%]{float:none;width:auto;margin:0 0 var(--cnp-space-1);padding:0;font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.choice-hint[_ngcontent-%COMP%]{margin:0 0 var(--cnp-space-2);font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.choice-hint.is-required[_ngcontent-%COMP%]{color:var(--cnp-color-danger-fg)}.choice-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-3);padding:var(--cnp-space-4);border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-element)}[_nghost-%COMP%]{display:block}.field-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--cnp-space-2);min-width:0}.field-stack[_ngcontent-%COMP%] > cnp-field[_ngcontent-%COMP%]{align-self:stretch}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.countdown-description[_ngcontent-%COMP%]{margin:0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-secondary)}"]})}}return i})();var mi=Se("[Custom-fonts] Clear error"),Wt=Se("[Custom-fonts] Get Custom Fonts"),Kt=Se("[Custom-fonts] Get Custom Fonts Success",Pe()),Qt=Se("[Custom-fonts] Get Custom Fonts Failure",Pe()),Yt=Se("[Custom-fonts] Upload Custom Font",Pe()),Zt=Se("[Custom-fonts] Upload Custom Font Success",Pe()),Jt=Se("[Custom-fonts] Upload Custom Font Failure",Pe());var hi=On("custom-font"),Fa=We(hi,i=>i.customFonts),Aa=We(hi,i=>i.loading),Ea=We(hi,i=>i.uploading),ka=We(hi,i=>i.error);var gi=(()=>{class i{constructor(e){this.store=e,this.loading$=this.store.select(Aa),this.uploading$=this.store.select(Ea),this.error$=this.store.select(ka),this.customFonts$=this.store.select(Fa)}getCustomFonts(){this.store.dispatch(Wt())}getCustomFontsSuccess(e){this.store.dispatch(Kt({customFonts:e}))}getCustomFontsFailure(e){this.store.dispatch(Qt({error:e}))}uploadCustomFont(e){this.store.dispatch(Yt({toUpload:e}))}uploadCustomFontSuccess(e){this.store.dispatch(Zt({customFont:e}))}uploadCustomFontFailure(e){this.store.dispatch(Jt({error:e}))}clearError(){this.store.dispatch(mi())}static{this.\u0275fac=function(t){return new(t||i)(Me(Dn))}}static{this.\u0275prov=Oe({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function Zs(i,c){if(i&1){let e=y();r(0,"cnp-checkbox",3),Y(1,"async"),q("checkedChange",function(n){g(e);let o=l();return j(o.agreeCustomFontTerms,n)||(o.agreeCustomFontTerms=n),_(n)}),a(),r(2,"div",4)(3,"cnp-button",5),Y(4,"async"),Y(5,"async"),h("click",function(){g(e);let n=l();return _(n.uploadCustomFont())}),p(6," Upload font "),a()(),r(7,"cnp-callout",2),p(8," Please be aware that the fonts you choose to upload may be subject to copyright laws and licensing agreements. It is y
1our responsibility to ensure that you have the appropriate rights to use, distribute, or modify any font. "),a()}if(i&2){let e=l();u("disabled",ie(1,4,e.isUploading$)||!e.isPaidUser),H("checked",e.agreeCustomFontTerms),s(3),u("disabled",!e.agreeCustomFontTerms||ie(4,6,e.isUploading$)||!e.isPaidUser)("loading",ie(5,8,e.isUploading$)===!0)}}function Js(i,c){i&1&&(r(0,"cnp-callout",2),p(1,"This feature is only available for paid users."),a())}var Da=[".otf",".ttf"],_i=(()=>{class i{constructor(e,t,n,o,d,m){this.userService=e,this.customFontFacade=t,this.utilities=n,this.confirmService=o,this.toastService=d,this.eventService=m,this.customFonts$=this.customFontFacade.customFonts$,this.isLoading$=this.customFontFacade.loading$,this.isUploading$=this.customFontFacade.uploading$,this.error$=this.customFontFacade.error$,this.errorSubscriptions$=null,this.agreeCustomFontTerms=!1,this.dropzoneFiles=[],this.acceptedFontTypes=Da.join(",")}onFontPicked(e){let t=e?.[0];if(t){if(!Da.some(n=>t.name.toLowerCase().endsWith(n))){this.toastService.showDanger("Custom font","Only .otf and .ttf files are accepted."),this.clearPickedFont();return}this.fontFileToUpload=t}}clearPickedFont(){this.fontFileToUpload=null,this.dropzoneFiles=[],this.agreeCustomFontTerms=!1}uploadCustomFont(){return b(this,null,function*(){if(!this.isPaidUser){(yield this.confirmService.ask({heading:"Upgrade to upload a custom font",consequence:"Custom fonts are part of the paid plans. Contact us to upgrade your subscription.",confirmWord:"",confirmLabel:"Upgrade subscription",cancelLabel:"Not now"}))&&window.open("https://canapii.com/company/contact-us/","_blank","noopener,noreferrer");return}this.fontFileToUpload&&(this.customFontFacade.uploadCustomFont(this.fontFileToUpload),this.errorSubscriptions$&&this.errorSubscriptions$.unsubscribe(),this.errorSubscriptions$=this.error$.pipe(Mn(1),xn(1)).subscribe(e=>{e?this.utilities.alert({header:"Custom font",message:e?e.toString():"Something went wrong while uploading the font. Please try again."}):(this.toastService.showSuccess("Custom font","Font successfully uploaded and set as the default font!"),this.clearPickedFont(),this.eventService.loadEvent("",!0))}))})}static{this.\u0275fac=function(t){return new(t||i)(w(kt),w(gi),w(le),w(ke),w(se),w(X))}}static{this.\u0275cmp=P({type:i,selectors:[["app-custom-font"]],inputs:{isPaidUser:"isPaidUser"},decls:5,vars:9,consts:[[1,"custom-font"],["controlId","fontFile","label","Upload custom font","hint","Only .otf and .ttf files are accepted.",3,"filesChange","picked","removed","accept","disabled","files"],["tone","warning"],["inputId","agreeCustomFontTerms","name","agreeCustomFontTerms","label","I agree to the terms and confirm that I have the legal rights to use the uploaded font.",3,"checkedChange","disabled","checked"],[1,"upload-actions"],["variant","primary","size","sm","loadingLabel","Uploading font",3,"click","disabled","loading"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"cnp-dropzone",1),Y(2,"async"),q("filesChange",function(d){return j(n.dropzoneFiles,d)||(n.dropzoneFiles=d),d}),h("picked",function(d){return n.onFontPicked(d)})("removed",function(){return n.clearPickedFont()}),a(),f(3,Zs,9,10),a(),f(4,Js,2,0,"cnp-callout",2)),t&2&&(ne("free-user",!n.isPaidUser),s(),u("accept",n.acceptedFontTypes)("disabled",ie(2,7,n.isUploading$)===!0||!n.isPaidUser),H("files",n.dropzoneFiles),s(2),v(n.fontFileToUpload?3:-1),s(),v(n.isPaidUser?-1:4))},dependencies:[V,ue,lt,Oo,yt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-3)}.custom-font[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-3)}.free-user[_ngcontent-%COMP%]{opacity:.8}.upload-actions[_ngcontent-%COMP%]{display:flex}"]}
1)}}return i})();var Oa=(()=>{class i{constructor(e,t){this.http=e,this.eventService=t,this.apiEndpoint="core"}getCustomFonts(){let e=`${Ke.api}/${this.apiEndpoint}/custom-font`;return Je(this.http.get(e))}uploadCustomFont(e){return Je(this.eventService.upload(e,"","custom-font",!0)).pipe(Xi(t=>{if(t&&t.success){let n=`${Ke.api}/${this.apiEndpoint}/custom-font`,o={name:e.name,url:t.data};return Je(this.http.post(n,o))}else return Je(new Qi(n=>{n.error("Error uploading file")}))}))}static{this.\u0275fac=function(t){return new(t||i)(Me(xt),Me(X))}}static{this.\u0275prov=Oe({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Pa=(()=>{class i{constructor(e,t){this.actions$=e,this.customFontService=t,this.getCustomFonts$=Ft(()=>this.actions$.pipe(At(Wt),bt(()=>this.customFontService.getCustomFonts().pipe(Xe(n=>{if(!n.success)throw Error(n.message);return Kt({customFonts:n.data})}),St(n=>Ct(Qt({error:n.message}))))))),this.uploadCustomFont$=Ft(()=>this.actions$.pipe(At(Yt),bt(n=>this.customFontService.uploadCustomFont(n.toUpload).pipe(Xe(o=>{if(!o.success)throw Error(o.message);return Zt({customFont:o.data})}),St(o=>Ct(Jt({error:o.message})))))))}static{this.\u0275fac=function(t){return new(t||i)(Me(Vn),Me(Oa))}}static{this.\u0275prov=Oe({token:i,factory:i.\u0275fac})}}return i})();var el={customFonts:[],loading:!1,uploading:!1,error:null},tl=(i,c)=>{let t=i?.findIndex(n=>n.PK===c.PK)!==-1?i:[...i,c];return t.sort((n,o)=>n.name.localeCompare(o.name)),t},Ia=In(el,we(mi,i=>O(x({},i),{error:null})),we(Wt,i=>O(x({},i),{loading:!0,uploading:!1,error:null})),we(Kt,(i,{customFonts:c})=>O(x({},i),{customFonts:c,loading:!1,uploading:!1,error:""})),we(Qt,(i,{error:c})=>O(x({},i),{loading:!1,uploading:!1,error:c})),we(Yt,i=>O(x({},i),{loading:!1,uploading:!0,error:null})),we(Zt,(i,{customFont:c})=>O(x({},i),{customFonts:tl(i.customFonts,c),loading:!1,uploading:!1,error:""})),we(Jt,(i,{error:c})=>O(x({},i),{loading:!1,uploading:!1,error:c})));var fi=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[Pn.forFeature("custom-font",Ia),Ln.forFeature([Pa])]})}}return i})();var Va=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,fi,L,_i]})}}return i})();var Xt=on(Bn());function nl(i,c){if(i&1){let e=y();r(0,"form",9),h("ngSubmit",function(){g(e);let n=l();return _(n.submit())}),r(1,"div",10)(2,"cnp-field",11,0)(4,"input",12),h("keyup",function(n){g(e);let o=l();return _(o.nameChange(n))}),a()(),r(5,"cnp-field",13,1)(7,"span",14),p(8,"https://app.canapii.com/e/"),a(),S(9,"input",15),a(),r(10,"cnp-date-field",16),h("valueChange",function(n){g(e);let o=l();return _(o.onStartDatePicked(n))}),a(),r(11,"cnp-date-field",17),h("valueChange",function(n){g(e);let o=l();return _(o.onEndDatePicked(n))}),a(),r(12,"cnp-field",18,2)(14,"cnp-combobox",19),h("picked",function(n){g(e);let o=l();return _(o.onTimezonePicked(n))}),a()(),r(15,"cnp-field",20,3),S(17,"input",21),a(),r(18,"cnp-field",22,4),S(20,"input",23),a(),r(21,"div",24)(22,"cnp-date-field",25),h("valueChange",function(n){g(e);let o=l();return _(o.onLiveDatePicked(n))}),a(),r(23,"cnp-button",26),h("click",function(){g(e);let n=l();return _(n.onLiveDatePicked(""))}),p(24," Clear "),a()(),r(25,"div",27)(26,"span",28),p(27," Appearance "),S(28,"cnp-help-icon",29),a(),r(29,"cnp-segmented",30),h("valueChange",function(n){g(e);let o=l();return _(o.toggleTheme({value:n}))}),a(),S(30,"img",31),a()()()}if(i&2){let e=A(3),t=A(6),n=A(13),o=A(16),d=A(19),m=l();u("formGroup",m.formGroup),s(2),u("required",!0)("help",m.tooltips.name)("error",m.nameError),s(2),M("aria-describedby",e.controlAttrs().describedBy)("aria-invalid",e.controlAttrs().invalid)("aria-required",e.controlAttrs().required),s(),u("required",!0)("help",m.tooltips.url)("error",m.urlError),s(4),M("aria-describedby",t.controlAttrs().describedBy)("aria-invalid",t.controlAttrs().invalid)("aria-required",t.controlAttrs().required),s(),u("required",!0)("help",m.tooltips.date)("error",m.startDateError)("value",m.startDateIso)("min",m.minDateIso),s(),u("required",!0)("help",m.tooltips.date)("error",m.endD
1ateError)("value",m.endDateIso)("min",m.endDateMinIso)("max",m.endDateMaxIso),s(),u("required",!0)("help",m.tooltips.timezone)("hint",m.timezoneClock),s(2),u("options",m.timezoneComboOptions)("value",m.timezoneValue)("describedBy",n.controlAttrs().describedBy),s(),u("required",!0)("help",m.tooltips.timezone)("error",m.timezoneLabelError),s(2),M("aria-describedby",o.controlAttrs().describedBy)("aria-invalid",o.controlAttrs().invalid)("aria-required",o.controlAttrs().required),s(),u("required",!0)("help",m.tooltips.organization)("error",m.organizationError),s(2),u("ngbTypeahead",m.search),M("aria-describedby",d.controlAttrs().describedBy)("aria-invalid",d.controlAttrs().invalid)("aria-required",d.controlAttrs().required),s(2),u("label","Countdown date ("+(m.data==null?null:m.data.timezoneLabel)+")")("help",m.tooltips.countdownDate)("value",m.liveDateIso),s(6),u("text",m.tooltips.appearance),s(),u("segments",m.themeSegments)("value",m.theme.value),s(),u("src",m.themePreview,K)}}var il=["Canalys","Canapii","HP"],ol=Kn(),gn=(()=>{class i{get writeActive(){return this.isLoading}search(e){return e.pipe(Yi(200),Zi(),Xe(t=>t.length<2?[]:il.filter(n=>n.toLowerCase().indexOf(t.toLowerCase())>-1).slice(0,10)))}constructor(e,t,n,o,d,m,C,F){this.timezoneService=e,this.formBuilder=t,this.event=n,this.utilities=o,this.confirmService=d,this.auth=m,this.subscriptionService=C,this.eventService=F,this.duplicated=new T,this.open=!1,this.now=new Date,this.creatorSubscriptionType="attendee",this.timezoneComboOptions=[],this.isLoading=!1,this.tzparam="",this.themeSegments=[{value:"light",label:"Light"},{value:"dark",label:"Dark"}],this.tooltips={name:"The name of your event. Don\u2019t worry, you can change this later on! However, please keep in mind that although you can edit the event name, the event URL cannot be changed once you go past this step, so choose carefully!",url:"Remember, the URL cannot be edited after you have created your event. Ensure you are happy before moving forward.",date:"Your event dates help us tailor insights, but don\u2019t worry - your access isn\u2019t limited! All Canapii packages include 365-day access, so you can launch registration early, keep content like polls and videos live after the event, and engage your audience year-round. Just enter your live event dates here to improve recommendations and analytics.",timezone:"For ease, the time zone automatically shows the zone where you are based. You can change to a different one here should your event take place in a different time zone to where you are.",organization:"Canapii allows organizers to use the platform for more than one organization. For example, you could be an events agency that hosts events on Canapii for your clients. You can separate them into different organizations at this stage by tagging the right client.",appearance:"This can be changed later in the process too, but we find most organizers already know what would be best for their brand at this early stage!",countdownDate:"Input date here to activate countdown clock on access to event platform"},this.subscription$=[],this.currentTimeZone=null,this.timezoneClock=null,this.timezoneValueCache=[]}openWith(e){this.data=e,this.buildForm(),this.watchTimezone(),this.startClock(),this.open=!0}close(){this.open=!1,this.stopClock()}onOpenChange(e){this.open=e,e||this.stopClock()}startClock(){this.stopClock(),this.convertToTimezone(),this.clock=yn(1e3).subscribe(()=>this.convertToTimezone())}stopClock(){this.clock?.unsubscribe(),this.clock=void 0}ngOnInit(){this.subscription$.push(this.auth.userSubject.subscribe(e=>{this.user=e?e.attributes:null})),this.subscription$.push(this.eventService.eventSubject.subscribe(e=>{e&&e.user&&(this.eventCreator=e.user,this.creatorSubscriptionType=this.subscriptionService.formatSubscriptionType(this.eventCreator.subscriptionType),this.isSuperAdmin=!!this.eventCreator.superadmin)})),this.minDate={year:this.now.getFullYear(),month:this.now.getMonth()+1,day:this.now.getDate()},this.timezoneOptions=this.timezoneService.getList(),this.timezoneComboOptions=this.timezoneOptions.map(e=>({value:e.name,label:e.label,sublabel:[e.name,e.countryName,e.continentName,...e.group??[],e.abbreviation].filter(
1Boolean).join(" \xB7 ")})),this.data&&(this.buildForm(),this.watchTimezone())}buildForm(){this.model={year:new Date(this.event.data.endDate).getFullYear(),month:new Date(this.event.data.endDate).getMonth()+1,day:new Date(this.event.data.endDate).getDate()};let e=Xt.default.utc(this.data.startDate),t=Xt.default.utc(this.data.endDate),n=this.data.name.trim().toLowerCase().replace(/[^0-9a-z]/gi," ").replace(/\s\s+/g," ").replace(/ /g,"-");this.formGroup=this.formBuilder.group({name:[this.data.name,[D.required]],startDate:[{year:e.year(),month:e.month()+1,day:e.date()},[D.required,Re(()=>this.minDate)]],endDate:[{year:t.year(),month:t.month()+1,day:t.date()},[D.required,Re(()=>this.endDateMinDate,()=>this.endDateMaxDate)]],timezone:[this.data.timezone,[D.required]],timezoneLabel:[this.data.timezoneLabel,[D.required]],theme:[this.data.theme,[D.required]],url:[n,[D.required,D.pattern("^[0-9a-z-]*")]],organizationName:[this.data.organizationName,[D.required]],userPlan:[this.creatorSubscriptionType],superAdmin:[this.isSuperAdmin],liveDate:[null]}),this.themePreview=this.data.theme==="light"?"assets/images/Light-mode.jpg":"assets/images/Dark-mode.jpg",this.currentTimeZone=this.data.timezone,this.convertToTimezone(),this.changedate(),this.endDate.setValue(this.model)}watchTimezone(){this.timezoneWatch?.unsubscribe(),this.timezoneWatch=this.formGroup.get("timezone").valueChanges.subscribe(e=>{this.currentTimeZone=e,this.convertToTimezone()})}ngOnDestroy(){this.subscription$.forEach(e=>e.unsubscribe()),this.timezoneWatch?.unsubscribe(),this.stopClock()}toggleTheme(e){this.theme.value!==e.value&&(this.theme.setValue(e.value),this.themePreview="assets/images/Dark-mode.jpg",e.value==="light"&&(this.themePreview="assets/images/Light-mode.jpg"))}changedate(){let e=this.model,n=this.formGroup.value.startDate,o=new Date(n.year,n.month-1,n.day);if(this.endDateMinDate={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},this.isSuperAdmin===!1){let m=2;this.eventCreator?.hostingLimit?m=this.eventCreator.hostingLimit-1:this.creatorSubscriptionType.includes("free")||this.creatorSubscriptionType.includes("motivator")?m=3:this.creatorSubscriptionType.includes("driver")?m=6:this.subscriptionService.isProfessionalSubscriptionWithTerms(this.creatorSubscriptionType)&&(m=this.eventCreator.proEventLength||7);let C=new Date(n.year,n.month-1,n.day+m);this.endDateMaxDate={year:C.getFullYear(),month:C.getMonth()+1,day:C.getDate()}}if(this.endDate.updateValueAndValidity({emitEvent:!1}),!this.model)return;let d=new Date(this.model.year,this.model.month-1,this.model.day);if(o.getTime()>d.getTime()){let m=new Date(n.year,n.month-1,n.day);this.model={year:m.getFullYear(),month:m.getMonth()+1,day:m.getDate()}}else this.endDateMaxDate&&d.getTime()>new Date(this.endDateMaxDate.year,this.endDateMaxDate.month-1,this.endDateMaxDate.day).getTime()&&(this.model={year:this.endDateMaxDate.year,month:this.endDateMaxDate.month,day:this.endDateMaxDate.day});this.model!==e&&this.endDate.setValue(this.model)}submit(){return b(this,null,function*(){if(this.isLoading)return;this.isLoading=!0;let e=this.formGroup.value,t=e.startDate,n=e.endDate,o=e.liveDate,d=t.month<10?"0"+t.month:t.month,m=t.day<10?"0"+t.day:t.day,C=`${t.year}-${d}-${m}T00:00:00Z`,F=n.month<10?"0"+n.month:n.month,Ce=n.day<10?"0"+n.day:n.day,k=`${n.year}-${F}-${Ce}T00:00:00Z`,$e=null;if(o){let He=o.month<10?"0"+o.month:o.month,xi=o.day<10?"0"+o.day:o.day;$e=`${o.year}-${He}-${xi}T00:00:00Z`}if(!(yield this.confirmService.ask({heading:"Duplicate this event?",consequence:"Zoom sessions in the duplicated event revert to the Canapii Web Conferencing Solution. Everything else is copied as it is.",confirmWord:"",confirmLabel:"Duplicate event"}))){this.isLoading=!1;return}try{let He=yield this.event.duplicateEvent(this.data.PK,x(O(x({},e),{startDate:C,endDate:k}),$e&&{liveDate:$e}));He.success?(this.open=!1,this.duplicated.emit(He.data)):(this.utilities.alert({header:"Event duplication failed",message:He.message||"Failed to duplicate event. Please try again later or contact [email protected]"}),this.isLoading=!1)}catch(He){this.isLoading=!1,this.utilities.alert({header:"Error",message:He.message})}})}TzSelected(e){let t=ol.find(o=>o.name===e.id||o.group.includes(e.id)),n="";return t?n=t.abbreviation:n=Xt.default.tz(e.id).zoneAbbr(),this.formGroup?.get("timezoneLabel")&&this.formGroup.get("timezoneLabel").setValue(n),n}get timezoneValue(){let e=this.formGroup?.get("timezone")?.value;return this.timezoneValueCache[0]!==e&&(this.timezoneValueCache=e?[e]:[]),this.timezoneValueCache}onTimezonePicked(e){let t=e[0];if(!t){this.timezoneValueCache=[...this.timezoneValueCache];return}let n=this.formGroup.get("timezone");n.setValue(t),n.markAsDirty(),this.TzSelected({id:t})}get startDateIso(){return ee(this.startDate.value)}get endDateIso(){return ee(this.endDate.value)}get liveDateIso(){return ee(this.liveDate.value)}get minDateIso(){return ee(this.minDate)}get endDateMinIso(){return ee(this.endDateMinDate)}get endDateMaxIso(){return ee(this.endDateMaxDate)}onStartDatePicked(e){let t=De(e);this.writeDate(this.startDate,t),t&&this.changedate()}onEndDatePicked(e){this.model=De(e),this.writeDate(this.endDate,this.model)}onLiveDatePicked(e){this.writeDate(this.liveDate,De(e))}writeDate(e,t){e.setValue(t),e.markAsDirty(),e.markAsTouched()}nameChange(e){let n=this.formGroup.get("name").value.trim().toLowerCase().replace(/[^0-9a-z]/gi," ").replace(/\s\s+/g," ").replace(/ /g,"-");this.formGroup.get("url").setValue(n)}get startDate(){return this.formGroup.get("startDate")}get endDate(){return this.formGroup.get("endDate")}get timezoneLabel(){return this.formGroup.get("timezoneLabel")}get name(){return this.formGroup.get("name")}get url(){return this.formGroup.get("url")}get organizationName(){return this.formGroup.get("organizationName")}get theme(){return this.formGroup.get("theme")}get liveDate(){return this.formGroup.get("liveDate")}
1showsError(e){return e.invalid&&(e.dirty||e.touched)}get nameError(){return this.showsError(this.name)&&this.name.errors?.required?"Name is required.":""}get urlError(){return this.showsError(this.url)?this.url.errors?.required?"URL is required.":this.url.errors?.pattern?"Invalid URL.":"":""}get startDateError(){return this.showsError(this.startDate)&&this.startDate.errors?.required?"Start date is required.":""}get endDateError(){return this.showsError(this.endDate)&&this.endDate.errors?.required?"End date is required.":""}get timezoneLabelError(){return this.showsError(this.timezoneLabel)&&this.timezoneLabel.errors?.required?"Timezone abbreviation is required.":""}get organizationError(){return this.showsError(this.organizationName)&&this.organizationName.errors?.required?"Organization is required.":""}convertToTimezone(){if(!this.currentTimeZone){this.timezoneClock="";return}let e=Xt.default.tz(this.currentTimeZone).format("Z"),t=(0,Xt.default)(new Date).utc().tz(this.currentTimeZone).format("yyyy-MM-DD HH:mm:ss");this.timezoneClock=`${t} (UTC${e})`}static{this.\u0275fac=function(t){return new(t||i)(w(zt),w(fe),w(X),w(le),w(ke),w(Et),w(Lt),w(X))}}static{this.\u0275cmp=P({type:i,selectors:[["app-event-duplicate"]],inputs:{data:"data"},outputs:{duplicated:"duplicated"},decls:6,vars:7,consts:[["nameField",""],["urlField",""],["timezoneField",""],["timezoneLabelField",""],["organizationField",""],["heading","Duplicate event","size","lg",3,"openChange","open","dismissible","showClose"],[3,"formGroup"],["cnpModalFooter","","variant","secondary",3,"click","disabled"],["cnpModalFooter","","variant","primary","loadingLabel","Creating",3,"click","disabled","loading"],[3,"ngSubmit","formGroup"],[1,"form-grid"],["label","Name","controlId","duplicateEventName",3,"required","help","error"],["cnpInput","","id","duplicateEventName","type","text","formControlName","name",3,"keyup"],["label","URL","controlId","duplicateEventUrl",3,"required","help","error"],["cnpFieldPrefix","",1,"url-prefix"],["cnpInput","","id","duplicateEventUrl","type","text","formControlName","url","placeholder","event-name"],["label","Live date: start",3,"valueChange","required","help","error","value","min"],["label","Live date: end",3,"valueChange","required","help","error","value","min","max"],["label","Timezone","controlId","duplicateEventTimezone",3,"required","help","hint"],["controlId","duplicateEventTimezone","placeholder","Search time zones",3,"picked","options","value","describedBy"],["label","Timezone abbreviation","controlId","duplicateEventTimezoneAbbr",3,"required","help","error"],["cnpInput","","id","duplicateEventTimezoneAbbr","formControlName","timezoneLabel","readonly",""],["label","Organization","controlId","duplicateEventOrganization",3,"required","help","error"],["cnpInput","","id","duplicateEventOrganization","type","text","formControlName","organizationName","placeholder","Organization or company name",3,"ngbTypeahead"],[1,"date-with-clear"],[3,"valueChange","label","help","value"],["variant","secondary","ariaLabel","Clear the countdown date",3,"click"],[1,"field-block","span-2"],[1,"field-label"],["label","Appearance",3,"text"],["ariaLabel","Appearance",3,"valueChange","segments","value"],["alt","Theme preview",1,"theme-preview",3,"src"]],template:function(t,n){t&1&&(r(0,"cnp-modal",5),q("openChange",function(d){return j(n.open,d)||(n.open=d),d}),h("openChange",function(d){return n.onOpenChange(d)}),f(1,nl,31,50,"form",6),r(2,"cnp-button",7),h("click",function(){return n.close()}),p(3," Close "),a(),r(4,"cnp-button",8),h("click",function(){return n.submit()}),p(5," Create "),a()()),t&2&&(H("open",n.open),u("dismissible",!1)("showClose",!n.writeActive),s(),v(n.open?1:-1),s(),u("disabled",n.isLoading),s(2),u("disabled",!(n.formGroup!=null&&n.formGroup.valid)||n.isLoading)("loading",n.isLoading))},dependencies:[z,ae,_e,oe,te,re,Ee,ho,V,ct,ze,pe,ye,ce,Z,de],styles:[".dialog-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-5)}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6)}@media (width <= 768px){.form-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.span-2[_ngcontent-%COMP%]{grid-column:1/-1}.field-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-1);min-width:0}.field-block[_ngcontent-%COMP%] > cnp-segmented[_ngcontent-%COMP%], .field-block[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{align-self:flex-start}.field-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--cnp-space-1);font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.field-action[_ngcontent-%COMP%]{flex:none;margin-inline-start:var(--cnp-space-2);white-space:nowrap}cnp-combobox[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.theme-preview[_ngcontent-%COMP%]{max-width:100%;margin-top:var(--cnp-space-1);border-radius:var(--cnp-radius-element)}.choice-group[_ngcontent-%COMP%]{min-width:0;margin:0;padding:0;border:0}.choice-legend[_ngcontent-%COMP%]{float:none;width:auto;margin:0 0 var(--cnp-space-1);padding:0;font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.choice-hint[_ngcontent-%COMP%]{margin:0 0 var(--cnp-space-2);font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.choice-hint.is-required[_ngcontent-%COMP%]{color:var(--cnp-color-danger-fg)}.choice-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-3);padding:var(--cnp-space-4);border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-element)}.url-prefix[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding-inline:var(--cnp-space-3);font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-secondary);white-space:nowrap;background:var(--cnp-color-bg-addon);border-start-start-radius:var(--cnp-radius-element);border-end-start-radius:var(--cnp-radius-element)}.url-prefix[_ngcontent-%COMP%] + [cnpInput][_ngcontent-%COMP%]{border-start-start-radius:0;border-end-start-radius:0}.date-with-clear[_ngcontent-%COMP%]{display:flex;align-items:flex-end;
1gap:var(--cnp-space-2);min-width:0}.date-with-clear[_ngcontent-%COMP%] > cnp-date-field[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}"]})}}return i})();var Ba=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,L,z,go,Tn,rt,gn]})}}return i})();function al(i,c){if(i&1){let e=y();r(0,"app-form",5),h("save",function(n){g(e);let o=l();return _(o.onSave(n))})("canSubmitChange",function(n){g(e);let o=l();return _(o.canSave=n)}),a()}if(i&2){let e=l();u("isLoading",e.isLoading)}}var _n=(()=>{class i{constructor(e,t){this.utilitiesService=e,this.settingService=t,this.created=new T,this.open=!1,this.canSave=!1,this.isLoading=!1}get writeActive(){return this.isLoading}openWith(){this.canSave=!1,this.open=!0}close(){this.open=!1}onOtpVerified(e){this.settleOtp(e)}onOtpDismissed(){this.settleOtp(null)}onSave(e){return b(this,null,function*(){try{this.isLoading=!0;let t=yield this.settingService.createSender(e);if(!t.success)throw new Error(t.message);let n=yield this.settingService.sendOtp(t.data.PK);if(n.success&&!(yield this.awaitOtp(t.data,Date.parse(n.deadline)))){if(!(yield this.settingService.removeSender(t.data).catch(()=>null))?.success)throw yield this.settingService.loadSenders(!0),new Error(Jo);this.isLoading=!1;return}this.isLoading=!1,this.open=!1,this.created.emit(t.data)}catch(t){this.isLoading=!1,this.utilitiesService.alert({header:"Error",message:Xo(t)})}})}awaitOtp(e,t){return new Promise(n=>{this.otpSettled=n,this.otpStep?.openWith(e,t),this.otpStep||this.settleOtp(null)})}settleOtp(e){let t=this.otpSettled;this.otpSettled=void 0,t?.(e)}submitForm(){this.form?.formSubmit()}static{this.\u0275fac=function(t){return new(t||i)(w(le),w(W))}}static{this.\u0275cmp=P({type:i,selectors:[["app-sender-create"]],viewQuery:function(t,n){if(t&1&&(me(Ai,5),me(ln,5)),t&2){let o;he(o=ge())&&(n.form=o.first),he(o=ge())&&(n.otpStep=o.first)}},outputs:{created:"created"},decls:7,vars:7,consts:[["heading","Add sender",3,"openChange","open","dismissible","showClose"],[3,"isLoading"],["cnpModalFooter","","variant","secondary",3,"click","disabled"],["cnpModalFooter","","loadingLabel","Saving",3,"click","disabled","loading"],[3,"verified","dismissed"],[3,"save","canSubmitChange","isLoading"]],template:function(t,n){t&1&&(r(0,"cnp-modal",0),q("openChange",function(d){return j(n.open,d)||(n.open=d),d}),f(1,al,1,1,"app-form",1),r(2,"cnp-button",2),h("click",function(){return n.close()}),p(3," Close "),a(),r(4,"cnp-button",3),h("click",function(){return n.submitForm()}),p(5," Save "),a()(),r(6,"app-otp-verify",4),h("verified",function(d){return n.onOtpVerified(d)}
1)("dismissed",function(){return n.onOtpDismissed()}),a()),t&2&&(H("open",n.open),u("dismissible",!1)("showClose",!n.writeActive),s(),v(n.open?1:-1),s(),u("disabled",n.isLoading),s(2),u("disabled",!n.canSave)("loading",n.isLoading))},dependencies:[V,Z,Ai,ln],encapsulation:2})}}return i})();function rl(i,c){if(i&1){let e=y();r(0,"cnp-callout",6),p(1," The list could not be fetched, so no senders are shown. "),r(2,"cnp-button",8),h("click",function(){g(e);let n=l();return _(n.retry())}),p(3,"Retry"),a()()}if(i&2){let e=l();s(2),u("loading",e.isLoading)}}function sl(i,c){if(i&1){let e=y();r(0,"cnp-button",18),h("click",function(){let n=g(e).$implicit,o=l(2);return _(o.view(n.PK))}),p(1),a()}if(i&2){let e=c.value;s(),E(e)}}function ll(i,c){if(i&1&&(r(0,"cnp-status-pill",19),p(1),a()),i&2){let e=c.$implicit;u("tone",e.emailVerifiedTone)("dot",!0),s(),E(e.emailVerifiedLabel)}}function cl(i,c){if(i&1&&(r(0,"cnp-status-pill",19),p(1),a()),i&2){let e=c.$implicit;u("tone",e.sesVerifiedTone)("dot",!0),s(),E(e.sesVerifiedLabel)}}function dl(i,c){if(i&1&&(r(0,"cnp-status-pill",19),p(1),a()),i&2){let e=c.$implicit;u("tone",e.dkimVerifiedTone)("dot",!0),s(),E(e.dkimVerifiedLabel)}}function pl(i,c){if(i&1&&(r(0,"span",20),p(1),Y(2,"dateFormat"),a()),i&2){let e=c.value;s(),E(tt(2,1,e,!1))}}function ul(i,c){if(i&1&&(r(0,"span",20),p(1),Y(2,"dateFormat"),a()),i&2){let e=c.value;s(),E(tt(2,1,e,!1))}}function ml(i,c){if(i&1){let e=y();r(0,"cnp-button",25),h("click",function(){g(e);let n=l().$implicit,o=l(2);return _(o.setAsDefaultSender(n.source))}),p(1," Set as default "),a()}if(i&2){let e=l().$implicit,t=l(2);u("ariaLabel","Set as default: "+e.email)("disabled",t.defaultLoading)}}function hl(i,c){i&1&&(r(0,"cnp-status-pill",23),p(1,"Default"),a())}function gl(i,c){i&1&&(r(0,"cnp-status-pill",24),p(1,"Not verified"),a()),i&2&&u("dot",!0)}function _l(i,c){if(i&1&&(r(0,"div",21),f(1,ml,2,2,"cnp-button",22),f(2,hl,2,0,"cnp-status-pill",23),f(3,gl,2,1,"cnp-status-pill",24),a()),i&2){let e=c.$implicit;s(),v(!e.isDefault&&e.isSESVerified&&e.isEmailVerified?1:-1),s(),v(e.isDefault&&e.isSESVerified?2:-1),s(),v(!e.isSESVerified||!e.isEmailVerified?3:-1)}}function fl(i,c){if(i&1){let e=y();r(0,"cnp-table",9),h("sortChange",function(n){g(e);let o=l();return _(o.sortBy(n))}),J(1,sl,2,1,"ng-template",10)(2,ll,2,3,"ng-template",11)(3,cl,2,3,"ng-template",12)(4,dl,2,3,"ng-template",13)(5,pl,3,4,"ng-template",14)(6,ul,3,4,"ng-template",15)(7,_l,4,3,"ng-template",16),a(),r(8,"cnp-paginator",17),h("pageChange",function(n){g(e);let o=l();return _(o.goToPage(n))})("pageSizeChange",function(n){g(e);let o=l();return _(o.setPageSize(n))}),a()}if(i&2){let e=l();u("columns",e.columns)("rows",e.rows)("rowKey",e.byId)("loading",e.isLoading)("emptyIcon",e.emptyIcon)("emptyMessage",e.emptyMessage)("sort",e.sort),s(8),u("total",e.total)("page",e.page)("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)}}var Pi="success",Ii="neutral",Vi="Yes",Li="Not yet",vl={emailVerified:"isEmailVerified",sesVerified:"isSESVerified",dkimVerified:"isDKIMVerified"},en=(()=>{class i{constructor(e,t){this.settingService=e,this.confirmService=t,this.columns=[{key:"name",header:"Name",sortable:!0},{key:"email",header:"Email",sortable:!0},{key:"emailVerified",header:"Email verified",sortable:!0},{key:"sesVerified",header:"SES verified",sortable:!0},{key:"dkimVerified",header:"DKIM verified",sortable:!0},{key:"dateCreated",header:"Date created",sortable:!0},{key:"lastUpdate",header:"Date updated",sortable:!0},{key:"action",header:"Action"}],this.pageSizeOptions=[50,100,150,200,300,500],this.isLoading=!0,this.loadFailed=!1,this.defaultLoading=!1,this.rows=[],this.total=0,this.query="",this.page=1,this.pageSize=50,this.sort={key:"name",direction:"asc"},this.senders=[],this.loadToken=0,this.subscription$=[],this.byId=n=>n.PK??n.email}ngOnInit(){this.subscription$.push(this.settingService.onSendersChanged(e=>{this.senders=Array.isArray(e)?e:[],this.refreshRows()})),this.load()}ngOnDestroy(){this.subscription$.forEach(e=>e.unsubscribe())}create(){this.createDialog?.openWith()}onSenderCreated(){return b(this,null,function*(){yield this.refresh()})}refresh(){return b(this,null,function*(){yield this.load()})}
1retry(){this.load()}view(e){this.viewDialog?.openWith(e)}setAsDefaultSender(e){return b(this,null,function*(){if(!(yield this.confirmService.ask({heading:`Set ${e.email} as the default sender?`,consequence:"Event emails are sent from this address instead of the current default.",confirmWord:"",confirmLabel:"Set as default"})))return;let n=this.senders.find(d=>d.isDefault===!0),o=e.isDefault;n&&(n.isDefault=!1,this.refreshRows()),this.defaultLoading=!0;try{yield this.settingService.setDefaultSender(e),this.settingService.loadSenders(!0)}catch{e.isDefault=o,n&&(n.isDefault=!0),this.refreshRows()}finally{this.defaultLoading=!1}})}get resultCount(){return`${this.total} ${this.total===1?"sender":"senders"}`}get emptyIcon(){return this.query.trim()?"no-results":"inbox"}get emptyMessage(){return this.query.trim()?"No senders match your search.":"No records found."}get announcement(){if(this.isLoading||this.loadFailed)return"";let e=this.sort?`, sorted by ${this.headerFor(this.sort.key)}, ${this.sort.direction==="asc"?"ascending":"descending"}`:"";return`${this.resultCount}${e}`}search(e){this.query=e,this.page=1,this.refreshRows()}sortBy(e){this.sort=e,this.refreshRows()}goToPage(e){this.page=e,this.refreshRows()}setPageSize(e){this.pageSize=e,this.page=1,this.refreshRows()}load(){return b(this,null,function*(){let e=++this.loadToken;this.isLoading=!0;let t=null;try{t=yield this.settingService.loadSenders(!0)}catch{t=null}e===this.loadToken&&(this.isLoading=!1,this.loadFailed=!Array.isArray(t),this.loadFailed&&(this.senders=[],this.page=1),this.refreshRows())})}refreshRows(){let e=this.sorted(this.matching(this.senders));this.total=e.length;let t=Math.ceil(this.total/this.pageSize)||1;this.page>t&&(this.page=t);let n=(this.page-1)*this.pageSize;this.rows=e.slice(n,n+this.pageSize).map(o=>Cl(o))}matching(e){let t=this.query.trim().toLowerCase();return t?e.filter(n=>Object.values(n).map(o=>String(o)).join("\u25EC").toLowerCase().includes(t)):[...e]}sorted(e){let t=this.sort;if(!t)return e;let n=t.direction==="asc"?1:-1;return[...e].sort((o,d)=>this.compare(this.valueOf(o,t.key),this.valueOf(d,t.key))*n)}valueOf(e,t){return e[vl[t]??t]}compare(e,t){return e!=null&&t!=null?e>t?1:e<t?-1:0:e!=null?1:t!=null?-1:0}headerFor(e){return this.columns.find(t=>t.key===e)?.header??e}static{this.\u0275fac=function(t){return new(t||i)(w(W),w(ke))}}static{this.\u0275cmp=P({type:i,selectors:[["app-senders-email"]],viewQuery:function(t,n){if(t&1&&(me(_n,5),me(Ei,5)),t&2){let o;he(o=ge())&&(n.createDialog=o.first),he(o=ge())&&(n.viewDialog=o.first)}},decls:12,vars:4,consts:[[1,"senders"],["ariaLabel","Sender list controls",3,"count"],["cnpToolbarStart","",3,"click"],["name","create"],["label","Search senders","placeholder","Search senders...",3,"valueChange","value"],["role","status","cnpVisuallyHidden",""],["tone","danger","heading","Senders could not be loaded",1,"load-error"],[3,"created"],["cnpCalloutAction","","variant","secondary",3,"click","loading"],["ariaLabel","Senders",3,"sortChange","columns","rows","rowKey","loading","emptyIcon","emptyMessage","sort"],["cnpCell","name"],["cnpCell","emailVerified"],["cnpCell","sesVerified"],["cnpCell","dkimVerified"],["cnpCell","dateCreated"],["cnpCell","lastUpdate"],["cnpCell","action"],["noun","senders",3,"pageChange","pageSizeChange","total","page","pageSize","pageSizeOptions"],["variant","link",3,"click"],[3,"tone","dot"],[1,"date"],[1,"row-actions"],["variant","secondary","size","sm",3,"ariaLabel","disabled"],["tone","info"],["tone","neutral",3,"dot"],["variant","secondary","size","sm",3,"click","ariaLabel","disabled"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"cnp-toolbar",1)(2,"cnp-button",2),h("click",function(){return n.create()}),S(3,"cnp-icon",3),p(4," Add sender "),a(),r(5,"cnp-search-field",4),h("valueChange",function(d){return n.search(d)}),a()(),r(6,"span",5),p(7),a(),f(8,rl,4,1,"cnp-callout",6)(9,fl,9,11),a(),r(10,"app-sender-create",7),h("created",function(){return n.onSenderCreated()}),a(),S(11,"app-sender-view")),t&2&&(s(),u("count",n.isLoading||n.loadFailed?"":n.resultCount),s(4),u("value",n.query
1),s(2),E(n.announcement),s(),v(n.loadFailed?8:9))},dependencies:[V,ue,Un,ve,To,xo,Pt,Gn,ko,Rn,_n,Ei,qn],styles:[".senders[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}.date[_ngcontent-%COMP%]{text-transform:capitalize}.row-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2)}.load-error[_ngcontent-%COMP%]{display:block;margin:var(--cnp-space-4) 0}"]})}}return i})();function Cl(i){return O(x({},i),{source:i,emailVerifiedTone:i.isEmailVerified?Pi:Ii,emailVerifiedLabel:i.isEmailVerified?Vi:Li,sesVerifiedTone:i.isSESVerified?Pi:Ii,sesVerifiedLabel:i.isSESVerified?Vi:Li,dkimVerifiedTone:i.isDKIMVerified?Pi:Ii,dkimVerifiedLabel:i.isDKIMVerified?Vi:Li})}var zi=[{value:"on",label:"Enabled"},{value:"off",label:"Disabled"}];function fn(i){return i.every(Boolean)?"on":i.some(Boolean)?"":"off"}var Ge=class{constructor(c=()=>{}){this.render=c,this.held=new Map}value(c,e){let t=this.held.get(c);return t?(t.hasBaseline||(t.baseline=e,t.hasBaseline=!0),t.settled&&(!t.confirmed||e!==t.baseline)?(this.held.delete(c),e):t.picked):e}isBusy(c){let e=this.held.get(c);return!!(e&&!e.written)}hold(c,e,t){let n={picked:e,hasBaseline:!1,written:!1,settled:!1,confirmed:!1};this.held.set(c,n);let o=()=>{n.written=!0,setTimeout(()=>{n.settled=!0,this.render()})};Promise.resolve(t).then(d=>{n.confirmed=d===!0,o()},o)}};var bl=(i,c)=>c.heading,Sl=(i,c)=>c.label,wl=(i,c)=>c.menu;function yl(i,c){if(i&1){let e=y();r(0,"cnp-settings-row",10)(1,"cnp-toggle",11),h("toggled",function(n){let o=g(e),d=l(5);return _(d.chooseSpecialFeature(o,n))}),a()()}if(i&2){let e=c,t=l(3).$implicit,n=l(2);u("label",n.featureLabel(e,t))("help",t.help)("disabled",n.isPlanLocked(e.disabled,e.key))("disabledReason",n.planLockedReason)("saving",n.isSettingSaving(e.key)),s(),u("ariaLabel",n.featureLabel(e,t))("checked",n.echo.value(n.featureControlId(e),!!e.value))("disabled",!!e.disabled)("saving",n.isSettingSaving(e.key))}}function xl(i,c){if(i&1&&f(0,yl,2,9,"cnp-settings-row",10),i&2){let e,t=l(2).$implicit,n=l(2);v((e=n.specialFeature(t))?0:-1,e)}}function Ml(i,c){if(i&1){let e=y();r(0,"cnp-settings-row",9)(1,"cnp-toggle",12),h("toggled",function(n){g(e);let o=l(2).$implicit,d=l(2);return _(d.chooseFlag(o,n))}),a()()}if(i&2){let e=l(2).$implicit,t=l(2);ne("sub-setting",e.sub),u("label",e.label)("help",e.help)("saving",t.isSettingSaving(e.flag)),s(),u("ariaLabel",e.ariaLabel||e.label)("checked",t.echo.value(e.flag,t.flagOn(e)))("saving",t.isSettingSaving(e.flag))}}function Fl(i,c){if(i&1){let e=y();r(0,"cnp-button",15),h("click",function(){g(e);let n=l(5);return _(n.setTargetAttendees())}),S(1,"cnp-icon",16),p(2," Target attendees "),a()}}function Al(i,c){if(i&1){let e=y();r(0,"cnp-settings-row",7),f(1,Fl,3,0,"cnp-button",13),r(2,"cnp-segmented",14),h("valueChange",function(n){g(e);let o=l(2).$implicit,d=l(2);return _(d.chooseAggregate(o,n))}),a()()}if(i&2){let e=l(2).$implicit,t=l(2);u("label",e.label)("help",e.help)("description",t.aggregateDescription(e))("saving",t.isSettingSaving(e.aggregate)),s(),v(e.aggregate==="chatAll"?1:-1),s(),u("ariaLabel",e.label)("segments",t.enabledSegments)("value",t.echo.value(e.aggregate,t.aggregateChoice(e)))("saving",t.isSettingSaving(e.aggregate))}}function El(i,c){if(i&1){let e=y();r(0,"cnp-settings-row",8)(1,"cnp-segmented",14),h("valueChange",function(n){g(e);let o=l(4);return _(o.chooseSidebarChat(n))}),a()()}if(i&2){let e=l(2).$implicit,t=l(2);u("label",e.label)("help",e.help)("saving",t.isSettingSaving("sidebarChat")),s(),u("ariaLabel",e.label)("segments",t.sidebarChatSegments)("value",t.echo.value("sidebarChat",t.sidebarChatChoice()))("saving",t.isSettingSaving("sidebarChat"))}}function kl(i,c){if(i&1){let e=y();r(0,"cnp-settings-row",8)(1,"cnp-segmented",14),h("valueChange",function(n){g(e);let o=l(2).$implicit,d=l(2);return _(d.chooseAgendaTab(o.agenda,n))}),a()()}if(i&2){let e=l(2).$implicit,t=l(2);u("label",e.label)("help",e.help)("saving",t.isSettingSaving(e.agenda)),s(),u("ariaLabel",e.label)("segments",t.agendaTabSegments)("value",t.echo.value(e.agenda,t.agendaTabChoice(e.agenda)))("saving",t.isSettingSaving(e.agenda))}}function Tl(i,c){if(i&1){let e=y();S(0,"cnp-settings-row",17),r(1,"cnp-settings-row",18)(2,"input",19),q("ngModelChange",function(n){g(e);let o=l(4);
1return j(o.highlightBannerSpeed,n)||(o.highlightBannerSpeed=n),_(n)}),h("ngModelChange",function(n){g(e);let o=l(4);return _(o.onHighlightBannerSpeedChange(n))}),a(),r(3,"span",20),p(4,"seconds"),a(),r(5,"cnp-button",21),h("click",function(){g(e);let n=l(4);return _(n.saveBannerSpeed("highlight"))}),p(6," Save "),a()(),r(7,"cnp-settings-row",22)(8,"input",23),q("ngModelChange",function(n){g(e);let o=l(4);return j(o.secondaryBannerSpeed,n)||(o.secondaryBannerSpeed=n),_(n)}),h("ngModelChange",function(n){g(e);let o=l(4);return _(o.onSecondaryBannerSpeedChange(n))}),a(),r(9,"span",20),p(10,"seconds"),a(),r(11,"cnp-button",24),h("click",function(){g(e);let n=l(4);return _(n.saveBannerSpeed("secondary"))}),p(12," Save "),a()()}if(i&2){let e=l(2).$implicit,t=l(2);u("label",e.label)("help",e.help),s(2),H("ngModel",t.highlightBannerSpeed),s(3),u("loading",t.isSettingSaving("highlightBannerSpeed")),s(3),H("ngModel",t.secondaryBannerSpeed),s(3),u("loading",t.isSettingSaving("secondaryBannerSpeed"))}}function Dl(i,c){if(i&1){let e=y();r(0,"cnp-settings-row",9)(1,"cnp-segmented",14),h("valueChange",function(n){g(e);let o=l(4);return _(o.chooseScreenShare(n))}),a()()}if(i&2){let e=l(2).$implicit,t=l(2);u("label",e.label)("help",e.help)("saving",t.isSettingSaving("screenShareSimulcast")),s(),u("ariaLabel",e.label)("segments",t.screenShareSegments)("value",t.echo.value("screenShareSimulcast",t.screenShareChoice()))("saving",t.isSettingSaving("screenShareSimulcast"))}}function Ol(i,c){if(i&1){let e=y();r(0,"cnp-button",26),h("click",function(){g(e);let n=l(2).$implicit,o=l(5);return _(o.updateMenuName(n))}),S(1,"cnp-icon",27),a()}if(i&2){let e=l(2).$implicit,t=l(5);u("iconOnly",!0)("ariaLabel","Edit name: "+t.displayMenuName(e))}}function Pl(i,c){if(i&1){let e=y();r(0,"cnp-settings-row",10),f(1,Ol,2,2,"cnp-button",25),r(2,"cnp-toggle",11),h("toggled",function(n){g(e);let o=l().$implicit,d=l(5);return _(d.chooseMenu(o,n))}),a()()}if(i&2){let e=l().$implicit,t=l(5);u("label",t.displayMenuName(e))("help",t.menuHelp(e))("disabled",t.isPlanLocked(e.disabled,e.menu))("disabledReason",t.planLockedReason)("saving",t.isSettingSaving(e.menu)),s(),v(t.editableMenuKeys.includes(e.menu)?1:-1),s(),u("ariaLabel",t.displayMenuName(e))("checked",t.echo.value(t.menuControlId(e),!!e.visible))("disabled",!!e.disabled)("saving",t.isSettingSaving(e.menu))}}function Il(i,c){if(i&1&&f(0,Pl,3,10,"cnp-settings-row",10),i&2){let e=c.$implicit,t=l(5);v(t.isMenuShown(e)?0:-1)}}function Vl(i,c){if(i&1&&R(0,Il,1,1,null,null,wl),i&2){let e=l(4);U(e.otherSettings)}}function Ll(i,c){i&1&&S(0,"app-senders-email")}function zl(i,c){if(i&1&&f(0,xl,1,1)(1,Ml,2,8,"cnp-settings-row",6)(2,Al,3,9,"cnp-settings-row",7)(3,El,2,7,"cnp-settings-row",8)(4,kl,2,7,"cnp-settings-row",8)(5,Tl,13,6)(6,Dl,2,7,"cnp-settings-row",9)(7,Vl,2,0)(8,Ll,1,0,"app-senders-email"),i&2){let e,t=l().$implicit;v((e=t.kind)==="special"?0:e==="flag"?1:e==="aggregate"?2:e==="sidebarChat"?3:e==="agendaTab"?4:e==="bannerSpeed"?5:e==="screenShare"?6:e==="menus"?7:e==="senders"?8:-1)}}function Bl(i,c){if(i&1&&f(0,zl,9,1),i&2){let e=c.$implicit,t=l(2);v(t.isShown(e)?0:-1)}}function Nl(i,c){if(i&1&&(r(0,"section",1)(1,"div",2)(2,"h2",3),p(3),a()(),r(4,"p",4),p(5),a(),r(6,"div",5),R(7,Bl,1,1,null,null,Sl),a()()),i&2){let e=c.$implicit,t=c.$index,n=l();M("aria-labelledby",n.sectionHeadingId(t)),s(2),u("id",n.sectionHeadingId(t)),s(),E(e.heading),s(2),E(e.description),s(2),U(e.rows)}}var Rl={selfCheckInAll:i=>fn([i?.meetingSelfCheckIn,i?.sessionSelfCheckIn,i?.eventSelfCheckIn]),chatAll:i=>fn([i?.eventChat,i?.personalChat,i?.groupChat,i?.techSupportChat,i?.sidebarChat!=="disabled"]),agendaAll:i=>fn([i?.generalAgenda,i?.myAgenda]),agendaFilters:i=>i?.agendaFilters?fn([i.agendaTypesFilters,i.sessionTracksFilters,i.sessionTagsFilters]):"off"},vi={generalAgenda:"eventAgenda",myAgenda:"myAgenda"},Ul={generalAgenda:"myAgenda",myAgenda:"generalAgenda"},Gl=[{heading:"Content & display",description:"Customize how content appears and displays on your event platform.",rows:[{kind:"special",label:"Custom domain",help:"Set a custom domain for event URL."},{kind:"special",label:"Tabbed contents",help:"Enable information tabs on event homepage."},{kind:"special",label:"Welcome video",help:"Play welcome video for attendees when they view the platform homepage."},{kind:"flag",flag:"clickRedirectOnSessions",label:"Open pages in new tab when session is active",help:"Any URL or platform pages will open in new tab while session is active."},{kind:"flag",flag:"noteTaking",label:"Note taking",help:"Enable/Disable note taking section within a session viewing page."},{kind:"flag",flag:"favorites",label:"Favorites",help:"Enable/Disable favorites on attendee, sponsor and speaker pages."},{kind:"bannerSpeed",label:"Carousel banner auto-play interval",help:"The amount of time a banner stays visible before automatically switching to the next one. Set the duration in seconds."}]},{heading:"On-site & logistics",description:"Manage presence, check-in, and travel logistics.",rows:[{kind:"special",label:"On-site registration",help:"Register and check in your onsite attendees."},{kind:"flag",flag:"venueCheckIn",label:"Venue check-in/out",inPersonOnly:!0,help:"Track live venue occupancy with check-in, check-out, and re-entry at the entrance. When off, scans do a plain event check-in."},{kind:"flag",flag:"sessionCheckout",label:"Session check-in/out",inPersonOnly:!0,help:"When enabled, the session scanner and console show separate check-in and check-out actions and record attendance duration per session."},{kind:"special",label:"Badges",help:"Create badges for your onsite attendees."},{kind:"flag",flag:"appQRscanner",label:"App QR scanner",inPersonOnly:!0,help:"Enable use of QR code scanner in mobile app."},{kind:"flag",flag:"onsiteCheckinEmail",label:"On-site welcome email",inPersonOnly:!0,help:"Enable automated email when users check in onsite."},{kind:"aggregate",aggregate:"selfCheckInAll",label:"Self check-in",inPersonOnly:!0,help:"Enable pop up notifications when a user joins a meeting, session, or event."},{kind:"flag",flag:"meetingSelfCheckIn",label:"Meeting",ariaLabel:"Meeting self check-in",sub:!0,inPersonOnly:!0,help:"Allow receiving self-checkin notification within the meeting."},{kind:"flag",flag:"sessionSelfCheckIn",label:"Session",ariaLabel:"Session self check-in",sub:!0,inPersonOnly:!0,help:"Allow receiving self-checkin notification within the session."},{kind:"flag",flag:"eventSelfCheckIn",label:"Event",ariaLabel:"Event self check-in",sub:!0,inPersonOnly:!0,help:"Allow receiving self-checkin notification within the event."},{kind:"special",label:"Locations",help:"Enable locations management for meetings and sessions."},{kind:"special",label:"Hotels",help:"Create and manage hotel reservations for attendees to select during registration."},{kind:"special",label:"Flights",beta:!0,help:"Enable flights tool to manage flights. Flights can be requested during registration or imported for users."},{kind:"special",label:"Interactive floorplan",beta:!0,help:"Enable interactive floor plan for venue navigation."}]},{heading:"Communication & tools",description:"Configure email campaigns, engagement tools, and integrations.",rows:[{kind:"special",label:"Campaign",help:"Send emails and event communications all from your Canapii console."},{kind:"special",label:"Private RSVP",help:"Create private RSVP c
1ampaigns and mailing lists for exclusive invitations."},{kind:"special",label:"Fero engage",help:"Drive attendee engagement through proactive, personalized notifications."},{kind:"special",label:"Sponsor admins",help:"Give sponsor reps console access to build and manage their sponsor zone and content."},{kind:"special",label:"Canapii provider",help:"Enable Canapii Green Room and Canapii RTMP generation for use in session livestreaming."},{kind:"flag",flag:"liveTranscript",label:"Session live transcript",help:"Enable session live transcription."},{kind:"screenShare",label:"Screen share quality",help:"Applies to sessions and meetings hosted on Canapii web conferencing solution \u2014 Zoom, Teams and Webex are unaffected. Full resolution sends the presenter's screen at up to 1080p. Adaptive also sends a smaller backup stream, so viewers on weak connections can still follow along."}]},{heading:"Networking",description:"Configure chat, agenda, and networking features for attendees.",rows:[{kind:"aggregate",aggregate:"chatAll",label:"Chat",description:"1:1, group, event wide and tech support chat.",help:"Determine which types of attendees can use the different chat options below."},{kind:"sidebarChat",label:"Homepage chats",help:"Homepage sidebar chat panel."},{kind:"flag",flag:"eventChat",label:"Event chats",sub:!0,help:"Event wide homepage chat."},{kind:"flag",flag:"personalChat",label:"Personal chats",sub:!0,help:"Allow private 1:1 chats between attendees."},{kind:"flag",flag:"groupChat",label:"Group chats",sub:!0,help:"Allow attendees to create a group chat (personal chat must be enabled)."},{kind:"flag",flag:"techSupportChat",label:"Tech support",sub:!0,help:"Allow chatting with support team."},{kind:"aggregate",aggregate:"agendaAll",label:"Agenda",help:"Show agenda page within the event."},{kind:"agendaTab",agenda:"generalAgenda",label:"Event agenda",help:"A dedicated page to show full event agenda."},{kind:"agendaTab",agenda:"myAgenda",label:"My agenda",help:"A dedicated page for an attendee's personal agenda."},{kind:"aggregate",aggregate:"agendaFilters",label:"Agenda filters",help:"Show agenda filters within the event."},{kind:"flag",flag:"agendaTypesFilters",label:"Types",ariaLabel:"Types filter",sub:!0,enablesAgendaFilters:!0,help:"Filter agenda by session types."},{kind:"flag",flag:"sessionTracksFilters",label:"Session tracks",ariaLabel:"Session tracks filter",sub:!0,enablesAgendaFilters:!0,help:"Filter agenda by session tracks."},{kind:"flag",flag:"sessionTagsFilters",label:"Session tags",ariaLabel:"Session tags filter",sub:!0,enablesAgendaFilters:!0,help:"Filter agenda by session tags."},{kind:"menus",label:"Menu features"},{kind:"flag",flag:"enableMeetNow",label:"Call",help:"Allow users to directly call each other without booking a meeting."},{kind:"flag",flag:"matchMaking",label:"Matchmaking",help:"Enable attendee matchmaking. Includes matchmaking playlist on homepage and filters in attendee page."},{kind:"flag",flag:"showMatchmakingWidget",label:"Recommended for you widget",help:"Show or hide the 'Recommended for you' matchmaking widget on the event homepage. Does not affect matchmaking filters elsewhere."},{kind:"flag",flag:"showProfileQrCode",label:"Show QR code in profile",help:"Display the QR code on attendee profile in the web app and mobile app."},{kind:"flag",flag:"enableSponsorMeeting",label:"Sponsor meetings",help:"Allow attendees to book meetings with sponsors."}]},{heading:"Sender emails",description:"Configure email sender addresses for your event communications.",rows:[{kind:"senders",label:"Sender emails"}]}],Ci=(()=>{class i{constructor(){this.specialFeatures=[],this.otherSettings=[],this.descriptions={},this.editableMenuKeys=[],this.settingSaving={},this.highlightBannerSpeedChange=new T,this.secondaryBannerSpeedChange=new T,this.sections=Gl,this.enabledSegments=zi,this.sidebarChatSegments=[{value:"defaultOpen",label:"Default opened"},{value:"defaultClosed",label:"Default closed"},{value:"disabled",label:"Disabled"}],this.agendaTabSegments=[{value:"default",label:"Default tab"},...zi],this.screenShareSegments=[{value:"full",label:"Full resolution"},{value:"adaptive",label:"Adaptive"}],this.planLockedReason="Upgrade your plan to enable this feature.",this.echo=new Ge}isSettingSaving(e){return this.settingSaving?.[e]===!0}onHighlightBannerSpeedChange(e){this.highlightBannerSpeedChange.emit(String(e))}onSecondaryBannerSpeedChange(e){this.secondaryBannerSpeedChange.emit(String(e))}static{this.featureDisplayOverrides={"On-site registration":"Presence"}}static{this.flagIsOn={showMatchmakingWidget:e=>e!==!1,showProfileQrCode:e=>e===!0||e===void 0}}displayFeatureName(e){return e?.swapValue?.altName||i.featureDisplayOverrides[e?.name]||e?.name||""}displayMenuName(e){return e?.altName||this.descriptions?.[e?.menu]?.title||e?.name||""}enableSubFilter(e){return this.otherFeatures?.agendaFilters?this.setOthers(e):this.setOthers(O(x({},e),{agendaFilters:!0}))}sectionHeadingId(e){return`features-networking-section-${e}`}isShown(e){return!e.inPersonOnly||this.event?.eventFormat!=="virtual"}isPlanLocked(e,t){return!!e&&!this.isSettingSaving(t)}specialFeature(e){return this.specialFeatures?.find(t=>t.name===e.label)}featureLabel(e,t){let n=this.displayFeatureName(e);return t.beta?`${n} (beta)`:n}featureControlId(e){return`feature:${e.key??e.name}`}chooseSpecialFeature(e,t){this.echo.hold(this.featureControlId(e),t,this.toggleSpecialFeatures2(t,e))}flagOn(e){let t=this.otherFeatures?.[e.flag],n=i.flagIsOn[e.flag];return n?n(t):!!t}chooseFlag(e,t){let n={};n[e.flag]=t;let o=t&&e.enablesAgendaFilters?this.enableSubFilter(n):this.setOthers(n);this.echo.hold(e.flag,t,o)}aggregateChoice(e){return Rl[e.aggregate](this.otherFeatures)}aggregateDescription(e){let t=this.aggregateChoice(e)===""?"Some of the settings below are on.":"";
1return[e.description,t].filter(Boolean).join(" ")}chooseAggregate(e,t){this.echo.hold(e.aggregate,t,this.switchGroup(e.aggregate,t==="on"))}switchGroup(e,t){return{selfCheckInAll:o=>this.toggleAllSelfCheckIn(o),chatAll:o=>this.toggleAllChats(o),agendaAll:o=>this.toggleAllAgendas(o),agendaFilters:o=>this.toggleAllFilters(o)}[e](t)}sidebarChatChoice(){return this.otherFeatures?.sidebarChat||"defaultOpen"}chooseSidebarChat(e){this.echo.hold("sidebarChat",e,this.setOthers({sidebarChat:e}))}agendaTabChoice(e){let t=this.otherFeatures;return t?.[e]?t.eventAgendasDefaultTab===vi[e]?"default":"on":"off"}chooseAgendaTab(e,t){let n=this.otherFeatures,o=Ul[e],d={};t==="off"?(d.eventAgendasDefaultTab=n?.[o]?vi[o]:"",d[e]=!1):(d.eventAgendasDefaultTab=t==="default"?vi[e]:n?.eventAgendasDefaultTab||vi[e],d[e]=!0),this.echo.hold(e,t,this.setOthers(d))}screenShareChoice(){return this.otherFeatures?.screenShareSimulcast?"adaptive":"full"}chooseScreenShare(e){this.echo.hold("screenShareSimulcast",e,this.setOthers({screenShareSimulcast:e==="adaptive"}))}isMenuShown(e){return e.name!=="Custom domain"&&e.menu!=="homeAgenda"}menuHelp(e){return e.name==="Meetings"?"Allow users to book virtual and in-person meetings with each other.":""}menuControlId(e){return`menu:${e.menu}`}chooseMenu(e,t){this.echo.hold(this.menuControlId(e),t,this.toggleMenuStatus(t,e))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=P({type:i,selectors:[["app-features-networking"]],inputs:{otherFeatures:"otherFeatures",specialFeatures:"specialFeatures",otherSettings:"otherSettings",event:"event",highlightBannerSpeed:"highlightBannerSpeed",secondaryBannerSpeed:"secondaryBannerSpeed",descriptions:"descriptions",editableMenuKeys:"editableMenuKeys",settingSaving:"settingSaving",setOthers:"setOthers",toggleSpecialFeatures2:"toggleSpecialFeatures2",toggleAllSelfCheckIn:"toggleAllSelfCheckIn",saveBannerSpeed:"saveBannerSpeed",toggleAllChats:"toggleAllChats",setTargetAttendees:"setTargetAttendees",toggleAllAgendas:"toggleAllAgendas",toggleAllFilters:"toggleAllFilters",toggleMenuStatus:"toggleMenuStatus",updateMenuName:"updateMenuName"},outputs:{highlightBannerSpeedChange:"highlightBannerSpeedChange",secondaryBannerSpeedChange:"secondaryBannerSpeedChange"},decls:3,vars:0,consts:[[1,"settings-stack"],[1,"section-card"],[1,"section-head"],[1,"section-heading",3,"id"],[1,"section-description"],[1,"setting-rows"],[3,"sub-setting","label","help","saving"],[3,"label","help","description","saving"],[1,"sub-setting",3,"label","help","saving"],[3,"label","help","saving"],[3,"label","help","disabled","disabledReason","saving"],[3,"toggled","ariaLabel","checked","disabled","saving"],[3,"toggled","ariaLabel","checked","saving"],["variant","secondary","size","sm"],[3,"valueChange","ariaLabel","segments","value","saving"],["variant","secondary","size","sm",3,"click"],["name","people"],[3,"label","help"],["label","Highlight banner",1,"sub-setting"],["cnpInput","","id","highlight-banner-speed","type","number","min","1","aria-label","Highlight banner interval, in seconds",1,"interval-input",3,"ngModelChange","ngModel"],["aria-hidden","true",1,"interval-unit"],["variant","primary","size","sm","loadingLabel","Saving highlight banner interval",3,"click","loading"],["label","Secondary banner",1,"sub-setting"],["cnpInput","","id","secondary-banner-speed","type","number","min","1","aria-label","Secondary banner interval, in seconds",1,"interval-input",3,"ngModelChange","ngModel"],["variant","primary","size","sm","loadingLabel","Saving secondary banner interval",3,"click","loading"],["variant","ghost","size","sm",3,"iconOnly","ariaLabel"],["variant","ghost","size","sm",3,"click","iconOnly","ariaLabel"],["name","edit"]],template:function(t,n){t&1&&(r(0,"div",0),R(1,Nl,9,4,"section",1,bl),a()),t&2&&(s(),U(n.sections))},dependencies:[L,_e,uo,oe,mo,Le,dt,Be,de,V,ve,ce,en],styles:[".settings-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-6);min-width:0}.status-band[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-4) var(--cnp-space-7);background:var(--cnp-color-bg-card);border-radius:var(--cnp-radius-container);box-shadow:var(--cnp-shadow-low);padding:var(--cnp-space-4) var(--cnp-space-card-padding)}.band-item[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-3);min-width:0}.band-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--cnp-space-2);font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-semibold);color:var(--cnp-color-text-secondary)}.section-card[_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);min-width:0}.section-head[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--cnp-space-3);border-bottom:2px solid var(--cnp-color-rule);padding-bottom:var(--cnp-space-2)}.section-heading[_ngcontent-%COMP%]{margin:0;font-size:var(--cnp-font-size-section);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-heading)}.section-description[_ngcontent-%COMP%]{margin:var(--cnp-space-3) 0 0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-secondary)}.section-actions[_ngcontent-%COMP%]{--cnp-button-min-height: var(--cnp-size-control);display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2)}.section-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-4);margin-top:var(--cnp-space-4);min-width:0}.details-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6);margin:var(--cnp-space-4) 0 0}
1@media (width <= 900px){.details-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width <= 560px){.details-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.detail[_ngcontent-%COMP%]{min-width:0}.detail[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-regular);color:var(--cnp-color-text-muted)}.detail[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:var(--cnp-space-1) 0 0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-body);overflow-wrap:anywhere}.value-row[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2);min-width:0}.unset[_ngcontent-%COMP%]{color:var(--cnp-color-text-muted)}.setting-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0;margin-top:var(--cnp-space-2)}.sub-setting[_ngcontent-%COMP%]{margin-inline-start:var(--cnp-space-5);padding-inline-start:var(--cnp-space-4);border-inline-start:2px solid var(--cnp-color-border-subtle)}.interval-input[_ngcontent-%COMP%]{inline-size:6rem;text-align:end}.interval-unit[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-muted)}"]})}}return i})();function $l(i,c){i&1&&(r(0,"div",1),S(1,"cnp-spinner",6),a())}function Hl(i,c){if(i&1&&(r(0,"span",12),p(1),a()),i&2){let e=l().$implicit,t=l();s(),E(t.descriptions[e.menu].sub)}}function jl(i,c){if(i&1){let e=y();r(0,"cnp-button",14),h("click",function(){g(e);let n=l().$implicit,o=l();return _(o.updateMenuName(n))}),S(1,"cnp-icon",19),a()}if(i&2){let e=l().$implicit,t=l();u("iconOnly",!0)("ariaLabel","Update "+t.itemLabel(e))("disabled",t.isSortingMenuList||t.locked)}}function ql(i,c){if(i&1){let e=y();r(0,"li",7)(1,"span",8),S(2,"cnp-icon",9),a(),r(3,"div",10)(4,"span",11),p(5),a(),f(6,Hl,2,1,"span",12),a(),r(7,"div",13)(8,"cnp-button",14),h("click",function(){let n=g(e).$index,o=l();return _(o.moveItem(n,"up"))}),S(9,"cnp-icon",15),a(),r(10,"cnp-button",14),h("click",function(){let n=g(e).$index,o=l();return _(o.moveItem(n,"down"))}),S(11,"cnp-icon",16),a(),f(12,jl,2,3,"cnp-button",17),r(13,"cnp-button",14),h("click",function(){let n=g(e).$index,o=l();return _(o.removeMenuItem(n))}),S(14,"cnp-icon",18),a()()()}if(i&2){let e=c.$implicit,t=c.$index,n=l();ne("is-busy",n.isSortLoading),u("cdkDragDisabled",n.isDragAndDropDisabled||n.isSortLoading||n.locked),s(5),E(n.itemLabel(e)),s(),v(!(n.descriptions==null||n.descriptions[e.menu]==null)&&n.descriptions[e.menu].sub?6:-1),s(2),u("iconOnly",!0)("ariaLabel","Move "+n.itemLabel(e)+" up")("disabled",!n.canMoveItem(t,"up")),M("data-move-id",n.itemMoveId("up",e)),s(2),u("iconOnly",!0)("ariaLabel","Move "+n.itemLabel(e)+" down")("disabled",!n.canMoveItem(t,"down")),M("data-move-id",n.itemMoveId("down",e)),s(2),v(n.editableMenuKeys!=null&&n.editableMenuKeys.includes(e.menu)||(e==null?null:e.type)==="redirect"?12:-1),s(),u("iconOnly",!0)("ariaLabel","Remove "+n.itemLabel(e))("disabled",n.isSortingMenuList||n.locked)}}function Wl(i,c){i&1&&(r(0,"div",1),S(1,"cnp-spinner",20),a())}function Kl(i,c){i&1&&S(0,"cnp-empty-state",4),i&2&&u("headingLevel",4)}function Ql(i,c){if(i&1){let e=y();r(0,"div",5)(1,"cnp-button",21),h("click",function(){g(e);let n=l();return _(n.onCancelMenuListDrop())}),p(2,"Cancel"),a(),r(3,"cnp-button",22),h("click",function(){g(e);let n=l();return _(n.onSaveMenuListDrop())}),p(4,"Save changes"),a()()}if(i&2){let e=l();s(),u("disabled",e.locked),s(2),u("disabled",e.locked)}}var bi=(()=>{class i{constructor(e,t){this.settingService=e,this.toastService=t,this.locked=!1,this.updatedMenuName=new T,this.removedMenuItem=new T,this.loadMenuItem=new T,this.loadHighlightMenuItem=new T,this.menuItems=[],this.isLoading=!1,this.isSortLoading=!1,this.isDragAndDropDisabled=!1,this.isSortingMenuList=!1,this.tempMenus=[],this.hostRef=be(wt)}ngOnInit(){this.isLoading=!0,this.tempMenus.push(this.menu.items),this.menuItems=[...this.menu.items],this.isLoading=!1,this.isSortLoading=!1,this.isDragAndDropDisabled=!1}itemLabel(e){return ut(e,this.descriptions)}canMoveItem(e,t){return!this.isDragAndDropDisabled&&!this.isSortLoading&&!this.locked&&this.itemMoveTarget(e,t)>=0}moveItem(e,t){if(!this.canMoveItem(e,t))return;let n=this.menuItems[e];this.moveMenuItem(e,this.itemMoveTarget(e,t)),Nt(this.hostRef.nativeElement,"group",t,this.itemKey(n))}itemMoveId(e,t){return ht("group",e,this.itemKey(t))}itemMoveTarget(e,t){return si(this.menuItems,e,t)}itemKey(e){return e?.menu||e?.key||e?.name||""}updateMenuName(e){this.updatedMenuName.emit(O(x({},e),{isGroupChild:!0}))}removeMenuItem(e){this.removedMenuItem.emit({index:e,menu:this.menu})}menuListDrop(e){this.moveMenuItem(e.previousIndex,e.currentIndex)}moveMenuItem(e,t){if(e===t)return;this.isSortingMenuList=!0,this.originalIndexes=this.menuItems.map((m,C)=>O(x({},m),{originalIndex:C}));let n=this.menuItems[e];st(this.menuItems,e,t),n.previousIndex=e,n.currentIndex=t;let o=Math.abs(e-t),d=e;if(e-t>0)for(let m=0;m<o;m++){let C=this.menu.items[d];this.menu.items[d]=this.menu.items[d-1],this.menu.items[d-1]=C,d-=1}else for(let m=0;m<o;m++){let C=this.menu.items[d];this.menu.items[d]=this.menu.items[d+1],this.menu.items[d+1]=C,d+=1}}onSaveMenuListDrop(){return b(this,null,function*(){if(this.locked)return;this.isSortingMenuList=!1,this.isDragAndDropDisabled=!0,this.isSortLoading=!0;let e;try{e=this.type==="highlight"?yield this.settingService.updateHighlightGroupMenu(this.menu):yield this.settingService.updateGroupMenu(this.menu)}finally{this.isSortLoading=!1,this.isDragAndDropDisabled=!1}if(e?.success){this.toastService.showSuccess("Success","Successfully sorted");return}this.toastService.showDanger("Error",e?.message||"The new order could not be saved. Please try again."),this.onCancelMenuListDrop()})}onCancelMenuListDrop(){return b(this,null,function*(){this?.type==="highlight"?this.loadHighlightMenuItem.emit():this.loadMenuItem.emit(),this.isSortingMenuList=!1})}static{this.\u0275fac=function(t){return new(t||i)(w(W),w(se))}}static{this.\u0275cmp=P({type:i,selectors:[["app-group-menu"]],inputs:{menu:"menu",editableMenuKeys:"editableMenuKeys",descriptions:"descriptions",type:"type",locked:"locked"},outputs:{updatedMenuName:"updatedMenuName",removedMenuItem:"removedMenuItem",loadMenuItem:"loadMenuItem",loadHighlightMenuItem:"loadHighlightMenuItem"},decls:8,vars:5,consts:[[1,"group-menu"],[1,"list-status"],["cdkDropList","",1,"menu-list",3,"cdkDropListDropped"],["cdkDrag","","cdkDragBoundary",".menu-list",1,"menu-row",3,"cdkDragDisabled","is-busy"],["icon","inbox","heading","No menu items found",3,"headingLevel"],[1,"sort-actions"],["size","sm","label","Saving the new order"],["cdkDrag","","cdkDragBoundary",".menu-list",1,"menu-row",3,"cdkDragDisabled"],["cdkDragHandle","","aria-hidden","true",1,"drag-handle"],["name","drag"],[1,"menu-item-info"],[1,"menu-item-title"],[1,"menu-item-description"],[1,"row-actions"],["variant","ghost","size","sm",3,"click","iconOnly","ariaLabel","disabled"],["name","chevron-up"],["name","chevron-down"],["variant","ghost","size","sm",3,"iconOnly","ariaLabel","disabled"],["name","delete"],["name","edit"],["size","md","label","Loading menu items"],["variant","secondary","size","sm",3,"click","disabled"],["variant","primary","size","sm",3,"click","disabled"]],template:function(t,n){t&1&&(r(0,"div",0),f(1,$l,2,0,"div",1),r(2,"ul",2),h("cdkDropListDropped",function(d){return n.menuListDrop(d)}),R(3,ql,15,17,"li",3,Fe),a(),f(5,Wl,2,0,"div",1),f(6,Kl,1,1,"cnp-empty-state",4),f(7,Ql,5,2,"div",5),a()),t&2&&(s(),v(n.isSortLoading?1:-1),s(),M("aria-label",((n.menu==null?null:n.menu.name)||"Group")+" menu items"),s(),U(n.menuItems),s(2),v(n.isLoading?5:-1),s(),v(!n.isLoading&&!n.menuItems.length?6:-1),s(),v(n.isSortingMenuList?7:-1))},dependencies:[Dt,Tt,Nn,V,Do,ve,Ot],styles:["[_nghost-%COMP%]{display:block}.list-status[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding-bottom:var(--cnp-space-2)}.menu-list[_ngcontent-%COMP%]{margin:0;padding:0;list-style:none}.menu-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--cnp-space-3);padding:var(--cnp-space-3) var(--cnp-space-2);background:var(--cnp-color-bg-card);border-bottom:1px solid var(--cnp-color-border-subtle)}.menu-row[_ngcontent-%COMP%]:last-child{border-bottom:0}.menu-row.is-busy[_ngcontent-%COMP%]{opacity:.5}.menu-row.cdk-drag-preview[_ngcontent-%COMP%]{padding:var(--cnp-space-3);border-bottom:0;border-radius:var(--cnp-radius-element);box-shadow:var(--cnp-shadow-med)}.menu-row.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:.3}.menu-row.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform var(--cnp-duration-base) var(--cnp-ease-standard)}.menu-list.cdk-drop-list-dragging[_ngcontent-%COMP%]   .menu-row[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform var(--cnp-duration-base) var(--cnp-ease-standard)}.drag-handle[_ngcontent-%COMP%]{display:inline-flex;flex:none;align-items:center;justify-content:center;width:var(--cnp-size-hit);height:var(--cnp-size-hit);color:var(--cnp-color-icon-muted);cursor:grab}.menu-item-info[_ngcontent-%COMP%]{display:flex;flex:1;flex-direction:column;gap:var(--cnp-space-1);min-width:0}.menu-item-title[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-medium);color:var(--cnp-color-text-body)}.menu-item-description[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.row-actions[_ngcontent-%COMP%]{display:flex;flex:none;align-items:center;gap:var(--cnp-space-1)}
1.sort-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:var(--cnp-space-2);margin-top:var(--cnp-space-4)}"]})}}return i})();var Yl=(i,c)=>c.symbol;function Zl(i,c){if(i&1){let e=y();r(0,"cnp-settings-row",7)(1,"cnp-toggle",9),h("toggled",function(n){g(e);let o=l();return _(o.chooseMultipleHeaders(n))}),a()()}if(i&2){let e=l();u("saving",e.isSettingSaving("exportMultipleSelectToMultipleHeaders")),s(),u("checked",e.echo.value("exportMultipleSelectToMultipleHeaders",!!(e.otherFeatures!=null&&e.otherFeatures.exportMultipleSelectToMultipleHeaders)))("saving",e.isSettingSaving("exportMultipleSelectToMultipleHeaders"))}}function Jl(i,c){if(i&1&&(r(0,"option",11),p(1),a()),i&2){let e=c.$implicit;u("value",e.symbol),s(),Ae("",e.name," (",e.symbol,")")}}function Xl(i,c){if(i&1){let e=y();r(0,"cnp-field",8,0)(2,"select",10),q("ngModelChange",function(n){g(e);let o=l();return j(o.selectedDelimiter,n)||(o.selectedDelimiter=n),_(n)}),h("change",function(){g(e);let n=l();return _(n.saveDelimiter())}),R(3,Jl,2,3,"option",11,Yl),a()()}if(i&2){let e=A(1),t=l();s(2),u("disabled",t.isSettingSaving("exportDelimiter")),H("ngModel",t.selectedDelimiter),M("aria-describedby",e.controlAttrs().describedBy),s(),U(t.validDelimiters)}}var Si=(()=>{class i{isSettingSaving(e){return this.settingSaving?.[e]===!0}constructor(e,t){this.settingService=e,this.csvDownloadService=t,this.settingSaving={},this.selectedDelimiter="",this.validDelimiters=[],this.savedDelimiter="",this.exportTypeSegments=[{value:"canapii",label:"Canapii"},{value:"vsef",label:"VSef"}],this.echo=new Ge}ngOnInit(){this.initializeExportDelimiter()}initializeExportDelimiter(){this.validDelimiters=this.csvDownloadService?.validDelimiters??[],this.settingService.getSetting("other-features").then(e=>{e&&(this.otherFeatures=x(x({},this.otherFeatures),e.data),this.otherFeatures.exportDelimiter=this.otherFeatures.exportDelimiter?.toString()||",",this.validDelimiters.some(n=>n.symbol===this.otherFeatures.exportDelimiter)||(this.otherFeatures.exportDelimiter=","),this.selectedDelimiter=this.otherFeatures.exportDelimiter,this.savedDelimiter=this.selectedDelimiter)})}exportTypeChoice(){return this.otherFeatures?.vsefCompliant?"vsef":"canapii"}chooseExportType(e){this.echo.hold("vsefCompliant",e,this.setOthers({vsefCompliant:e==="vsef"}))}chooseMultipleHeaders(e){this.echo.hold("exportMultipleSelectToMultipleHeaders",e,this.setOthers({exportMultipleSelectToMultipleHeaders:e}))}saveDelimiter(){return b(this,null,function*(){(yield this.setOthers({exportDelimiter:this.selectedDelimiter}))===!1?this.selectedDelimiter=this.savedDelimiter:this.savedDelimiter=this.selectedDelimiter})}static{this.\u0275fac=function(t){return new(t||i)(w(W),w(Vo))}}static{this.\u0275cmp=P({type:i,selectors:[["app-reporting-settings"]],inputs:{otherFeatures:"otherFeatures",setOthers:"setOthers",settingSaving:"settingSaving"},decls:9,vars:6,consts:[["delimiterField",""],["aria-labelledby","settings-exports-heading",1,"section-card"],[1,"section-head"],["id","settings-exports-heading",1,"section-heading"],[1,"setting-rows"],["label","Export type","help","Standardize your event data for use in other platforms that utilize a VSef format.",3,"saving"],["ariaLabel","Export type",3,"valueChange","segments","value","saving"],["label","Separate multiple select attributes to multiple headers","help","When enabled, multiple select attributes will be exported as separate columns in the report.",3,"saving"],["label","CSV data delimiter","controlId","validDelimiter","help","Please use comma as the delimiter if event has non-ASCII characters commonly used in non-English language.",1,"delimiter-field"],["ariaLabel","Separate multiple select attributes to multiple headers",3,"toggled","checked","saving"],["cnpInput","","id","validDelimiter",3,"ngModelChange","change","disabled","ngModel"],[3,"value"]],template:function(t,n){t&1&&(r(0,"section",1)(1,"div",2)(2,"h2",3),p(3,"Exports"),a()(),r(4,"div",4)(5,"cnp-settings-row",5)(6,"cnp-segmented",6),h("valueChange",function(d){return n.chooseExportType(d)}),a()(),f(7,Zl,2,3,"cnp-settings-row",7),a(),f(8,Xl,5,3,"cnp-field",8),a()),t&2&&(s(5),u("saving",n.isSettingSaving("vsefCompliant")),s(),u("segments",n.exportTypeSegments)("value",n.echo.value("vsefCompliant",n.exportTypeChoice()))("saving",n.isSettingSaving("vsefCompliant")),s(),v(n.otherFeatures!=null&&n.otherFeatures.vsefCompliant?-1:7),s(),v(n.otherFeatures!=null&&n.otherFeatures.vsefCompliant?-1:8))},dependencies:[L,it,ot,nt,oe,Le,dt,Be,de,pe,ce],styles:[".settings-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-6);min-width:0}.status-band[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-4) var(--cnp-space-7);background:var(--cnp-color-bg-card);border-radius:var(--cnp-radius-container);box-shadow:var(--cnp-shadow-low);padding:var(--cnp-space-4) var(--cnp-space-card-padding)}.band-item[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-3);min-width:0}.band-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--cnp-space-2);font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-semibold);color:var(--cnp-color-text-secondary)}.section-card[_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);min-width:0}.section-head[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--cnp-space-3);border-bottom:2px solid var(--cnp-color-rule);padding-bottom:var(--cnp-space-2)}.section-heading[_ngcontent-%COMP%]{margin:0;font-size:var(--cnp-font-size-section);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-heading)}.section-description[_ngcontent-%COMP%]{margin:var(--cnp-space-3) 0 0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-secondary)}.section-actions[_ngcontent-%COMP%]{--cnp-button-min-height: var(--cnp-size-control);display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2)}.section-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-4);margin-top:var(--cnp-space-4);min-width:0}.details-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6);margin:var(--cnp-space-4) 0 0}
1@media (width <= 900px){.details-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width <= 560px){.details-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.detail[_ngcontent-%COMP%]{min-width:0}.detail[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-regular);color:var(--cnp-color-text-muted)}.detail[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:var(--cnp-space-1) 0 0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-body);overflow-wrap:anywhere}.value-row[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2);min-width:0}.unset[_ngcontent-%COMP%]{color:var(--cnp-color-text-muted)}.setting-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0;margin-top:var(--cnp-space-2)}.delimiter-field[_ngcontent-%COMP%]{display:block;max-width:22rem;margin-top:var(--cnp-space-4)}"]})}}return i})();var Bi=on(Bn());function ec(i,c){if(i&1){let e=y();r(0,"form",1)(1,"cnp-date-field",4),h("valueChange",function(n){g(e);let o=l();return _(o.setRetentionDate(n))}),a(),r(2,"p",5),p(3," Canapii's default retention policy is 18 months (after event's end date). After that, the event owner will be warned, and the event will be deleted in 5 days. "),a(),r(4,"p",5),p(5," By setting this policy, any scheduled deletion for this event will be cancelled, and will be replaced with your new policy. When the custom retention date is reached, the owner will be warned, and the event will be deleted in 5 days. "),a()()}if(i&2){let e=l();u("formGroup",e.formGroup),s(),u("label","Custom retention date ("+e.data.timezoneLabel+")")("required",!0)("value",e.retentionDateIso)("min",e.minDateIso)("error",e.retentionDateError)}}var tc="Custom retention date is required.",vn=(()=>{class i{constructor(e){this.formBuilder=e,this.chosen=new T,this.open=!1,this.minDate=null}openWith(e){this.data=e,this.initialiseForDate(),this.open=!0}close(){this.open=!1}ngOnInit(){this.data&&this.initialiseForDate()}initialiseForDate(){let e,t=(0,Bi.tz)(),n=(0,Bi.tz)(this.data.endDate.replace("Z",""),this.data.timezone);t.isSameOrAfter(n)?this.minDate={year:t.year(),month:t.month()+1,day:t.date()}:this.minDate={year:n.year(),month:n.month()+1,day:n.date()},e=this.data.customRetentionPolicy?O(x({},this.data.customRetentionPolicy),{month:this.data.customRetentionPolicy.month+1}):this.minDate,this.formGroup=this.formBuilder.group({customRetentionPolicy:[{year:e.year,month:e.month,day:e.day},[D.required,Re(()=>this.minDate)]]})}ngOnDestroy(){}get customRetentionPolicy(){return this.formGroup.get("customRetentionPolicy").value}get retentionDateIso(){return ee(this.customRetentionPolicy)}get minDateIso(){return ee(this.minDate)}get retentionDateError(){let e=this.formGroup.get("customRetentionPolicy");return e.hasError("required")&&(e.dirty||e.touched)?tc:""}setRetentionDate(e){let t=this.formGroup.get("customRetentionPolicy");t.setValue(De(e)),t.markAsDirty(),t.markAsTouched()}submit(){this.open=!1,this.chosen.emit({year:this.customRetentionPolicy.year,month:this.customRetentionPolicy.month-1,day:this.customRetentionPolicy.day})}static{this.\u0275fac=function(t){return new(t||i)(w(fe))}}static{this.\u0275cmp=P({type:i,selectors:[["app-retention-policy"]],inputs:{data:"data"},outputs:{chosen:"chosen"},decls:6,vars:4,consts:[["heading","Set custom retention policy","size","md",3,"openChange","open","dismissible"],[3,"formGroup"],["cnpModalFooter","","variant","secondary",3,"click"],["cnpModalFooter","","variant","primary",3,"click","disabled"],[3,"valueChange","label","required","value","min","error"],[1,"dialog-note"]],template:function(t,n){t&1&&(r(0,"cnp-modal",0),q("openChange",function(d){return j(n.open,d)||(n.open=d),d}),f(1,ec,6,6,"form",1),r(2,"cnp-button",2),h("click",function(){return n.close()}),p(3,"Close"),a(),r(4,"cnp-button",3),h("click",function(){return n.submit()}),p(5,"Submit"),a()()),t&2&&(H("open",n.open),u("dismissible",!1),s(),v(n.open?1:-1),s(3),u("disabled",!(n.formGroup!=null&&n.formGroup.valid)))},dependencies:[z,ae,te,re,V,ze,Z],styles:[".dialog-note[_ngcontent-%COMP%]{margin:var(--cnp-space-3) 0 0;font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-secondary)}"]})}}return i})();var Na=(()=>
1{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,L,z,It,rt,vn]})}}return i})();var Ra=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,ea,_n]})}}return i})();var Ua=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,L,z,ln]})}}return i})();var nc=[{path:"",component:en},{path:":id",loadChildren:()=>import("./chunk-3JD3RGAO.js").then(i=>i.ViewModule)}],Ga=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[Mt.forChild(nc),Mt]})}}return i})();var $a=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,Ra,Ga,ta,Ua,Wn,en]})}}return i})();var nn=on(Bn());function ic(i,c){i&1&&S(0,"cnp-icon",27)}function oc(i,c){if(i&1&&(r(0,"output",14)(1,"span",25),p(2,"Preview:"),a(),r(3,"a",26),p(4),a(),f(5,ic,1,0,"cnp-icon",27),a()),i&2){let e=l(2);s(3),u("href",e.urlPreview,K),s(),E(e.urlPreview),s(),v(e.isExternalUrl?5:-1)}}function ac(i,c){if(i&1){let e=y();r(0,"div",18)(1,"span",19),p(2," Show in which menu type "),S(3,"cnp-help-icon",28),a(),r(4,"cnp-segmented",29),h("valueChange",function(n){g(e);let o=l(2);return _(o.onMobileAccessPicked(n))}),a()()}if(i&2){let e,t=l(2);s(4),u("segments",t.mobileAccessSegments)("value",(e=t.form.get("mobileAccess"))==null?null:e.value)}}function rc(i,c){if(i&1&&S(0,"app-target-attendees",30),i&2){let e=l(3);u("data",e.targetAttendees)("showLabel",!1)("withUpdate",!1)("withEdit",!1)}}function sc(i,c){if(i&1&&(f(0,rc,1,4,"app-target-attendees",30),r(1,"cnp-callout",31),p(2," Target attendees must be updated on the "),r(3,"strong"),p(4,"Web"),a(),p(5," and "),r(6,"strong"),p(7,"Mobile"),a(),p(8," configuration tabs separately. "),a()),i&2){let e=l(2);v(e.targetAttendees?0:-1)}}function lc(i,c){if(i&1){let e=y();r(0,"app-target-attendees",32),h("changed",function(n){g(e);let o=l(2);return _(o.onTargetAttendeesChanged(n))}),a()}if(i&2){let e=l(2);u("data",e.targetAttendees)("showLabel",!1)}}function cc(i,c){i&1&&(r(0,"cnp-callout",24),p(1," This link will take users to an external website. Make sure that the URL is correct and uses HTTPS for a secure connection. "),a())}function dc(i,c){if(i&1){let e=y();r(0,"form",7),h("ngSubmit",function(){g(e);let n=l();return _(n.submit())}),r(1,"div",8)(2,"cnp-field",9,0),S(4,"input",10),a(),r(5,"div",11)(6,"cnp-field",12,1)(8,"input",13),h("blur",function(){g(e);let n=l();return _(n.onUrlBlur())}),a()(),f(9,oc,6,3,"output",14),a(),r(10,"cnp-field",15,2)(12,"select",16)(13,"option",17),p(14,"Open in new tab"),a(),r(15,"option",17),p(16,"Open in same tab"),a()()(),r(17,"div",18)(18,"span",19),p(19," Usage "),S(20,"cnp-help-icon",20),a(),r(21,"cnp-segmented",21),h("valueChange",function(n){g(e);let o=l();return _(o.onUsagePicked(n))}),a()(),f(22,ac,5,2,"div",18),r(23,"div",18)(24,"span",19),p(25," Target attendees "),S(26,"cnp-help-icon",22),a(),f(27,sc,9,1)(28,lc,1,2,"app-target-attendees",23),a(),f(29,cc,2,0,"cnp-callout",24),a()()}if(i&2){let e,t=A(3),n=A(7),o=A(11),d=l();u("formGroup",d.form),s(2),u("required",!0)("error",d.nameError),s(2),M("aria-describedby",t.controlAttrs().describedBy)("aria-invalid",t.controlAttrs().invalid)("aria-required",t.controlAttrs().required),s(2),u("required",!0)("error",d.urlError),s(2),M("aria-describedby",n.controlAttrs().describedBy)("aria-invalid",n.controlAttrs().invalid)("aria-required",n.controlAttrs().required),s(),v(d.urlPreview?9:-1),s(3),M("aria-describedby",o.controlAttrs().describedBy),s(),u("ngValue",!0),s(2),u("ngValue",!1),s(5),u("text",d.usageHelp),s(),u("segments",d.usageSegments)("value",(e=d.form.get("usage"))==null?null:e.value),s(),v(d.isMobileContext?22:-1),s(5),v(d.isEditMode?27:28),s(2),v(d.isExternalUrl?29:-1)}}var Ni=(()=>{class i{get writeActive(){return this.isLoading}constructor(e,t,n){this.fb=e,this.settingService=t,this.toastService=n,this.mode="create",this.saved=new T,this.open=!1,this.menuItem=null,this.eventAppUrl="",this.context="web",this.targetAttendees=[],this.urlPreview="",this.isExternalUrl=!1,this.canapiiUrl="",this.isLoading=!1,this.usageOptions=[{value:"both",label:"Both",tooltip:"Show on both web and mobile."},{value:"web",label:"Web",tooltip:"Show on web/desktop only."},{value:"mobile",label:"Mobile",tooltip:"Show on mobile app only."}],this.mobileMenuAccesOptions=[{value:"both",viewValue:"Both"},{value:"highlight",viewValue:"Highlight"},{value:"sidebar",viewValue:"Sidebar"}],this.usageSegments=this.usageOptions.map(o=>({value:o.value,label:o.label})),this.mobileAccessSegments=this.mobileMenuAccesOptions.map(o=>({value:o.value,label:o.viewValue})),this.usageHelp="Select where this menu item should appear: "+this.usageOptions.map(o=>o.tooltip).join(" ")}openWith(e){this.mode=e.mode,this.eventAppUrl=e.eventAppUrl,this.context=e.context,this.menuItem=e.menuItem??null,this.buildForm(),this.open=!0}close(){this.open=!1}ngOnInit(){(this.eventAppUrl||this.menuItem)&&this.buildForm()}buildForm(){this.targetAttendees=[],this.urlPreview="",this.isExternalUrl=!1,this.setCanapiiUrl(),this.form=this.fb.group({name:[this.menuItem?.name||"",[D.required,D.minLength(2),D.maxLength(50)]],url:[this.menuItem?.url||"",[D.required,D.maxLength(2048)]],openInNewTab:[this.menuItem?.openInNewTab??!0],usage:[this.menuItem?.usage||"both",[D.required]],visible:[this.menuItem?.visible??!0],icon:[this.menuItem?.icon||""]}),this.context==="mobile"&&this.form.addControl("mobileAccess",this.fb.control(this.menuItem?.mobileAccess||"both")),this.menuItem?.targetAttendees&&(this.targetAttendees=[...this.menuItem.targetAttendees]),this.form.get("url")?.valueChanges.subscribe(e=>{this.updateUrlPreview(e)}),this.menuItem?.url&&this.updateUrlPreview(this.menuItem.url)}setCanapiiUrl(){this.canapiiUrl="https://app.canapii.com",Ke.stage.toLowerCase()==="dev"?this.canapiiUrl="https://app-dev.canapii.com":Ke.stage.toLowerCase()==="staging"&&(this.canapiiUrl="https://app-staging.canapii.com")}get isEditMode(){return this.mode==="edit"}get modalTitle(){return this.isEditMode?"Update menu item":"Add menu item"}get nameError(){let e=this.form?.get("name");
1return!e?.invalid||!e.touched?"":e.hasError("required")?"Menu item label is required.":e.hasError("minlength")?"Label must be at least 2 characters.":e.hasError("maxlength")?"Label must not exceed 50 characters.":""}get urlError(){let e=this.form?.get("url");return!e?.invalid||!e.touched?"":e.hasError("required")?"Destination URL is required.":e.hasError("maxlength")?"URL must not exceed 2048 characters.":e.hasError("dangerousProtocol")?"This URL protocol is not allowed.":e.hasError("pathTraversal")?"Path traversal (..) is not allowed in URLs.":""}updateUrlPreview(e){if(!e){this.urlPreview="",this.isExternalUrl=!1;return}let t=e.trim();if(this.urlPreview=t,!this.hasHttpScheme(t)){let n=this.eventAppUrl.split("/").at(-1);this.urlPreview=`${this.canapiiUrl}/e/${n}${t}`,this.isExternalUrl=!1;return}try{let n=new URL(t).hostname.toLowerCase();this.isExternalUrl=!this.isInternalHostname(n)}catch{this.isExternalUrl=!1}}isInternalHostname(e){if(new URL(this.canapiiUrl).hostname.toLowerCase()===e)return!0;if(this.eventAppUrl)try{let t=new URL(this.eventAppUrl).hostname.toLowerCase();if(e===t)return!0}catch{}return!1}onUrlBlur(){let e=this.form.get("url"),t=e?.value?.trim()||"",n=this.normalizeUrlScheme(t);n!==e?.value&&e?.setValue(n),this.validateUrl()}normalizeUrlScheme(e){return e.replace(/^(https?):\/\//i,(t,n)=>`${n.toLowerCase()}://`)}hasHttpScheme(e){return/^https?:\/\//i.test(e)}validateUrl(){let e=this.form.get("url"),t=e?.value?.trim()||"";if(!t)return;let n=["javascript:","data:","vbscript:","blob:"],o=t.toLowerCase();for(let d of n)if(o.startsWith(d)){e?.setErrors({dangerousProtocol:!0});return}if(t.includes("..")){e?.setErrors({pathTraversal:!0});return}}onTargetAttendeesChanged(e){this.targetAttendees=e}selectUsage(e){this.form.get("usage")?.setValue(e)}selectMobileAccess(e){this.form.get("mobileAccess")?.setValue(e)}onUsagePicked(e){this.selectUsage(e)}onMobileAccessPicked(e){this.selectMobileAccess(e)}get isMobileContext(){return this.context==="mobile"}submit(){return b(this,null,function*(){if(this.isLoading)return;if(this.form.invalid){this.form.markAllAsTouched();return}if(this.validateUrl(),this.form.get("url")?.errors)return;let e=this.buildMenuItem();this.isLoading=!0;try{if(this.isEditMode&&e.key){let t=yield this.settingService.updateCustomMenuItem(O(x({},e),{key:e.key}));t?.success>0?(this.toastService.showSuccess("Success","Custom menu item updated successfully"),this.open=!1,this.saved.emit(e)):this.toastService.showDanger("Error",t?.message||"Failed to update custom menu item")}else{let t=yield this.settingService.addCustomMenuItem(e);t?.success>0?(this.toastService.showSuccess("Success","Custom menu item added successfully"),this.open=!1,this.saved.emit(e)):this.toastService.showDanger("Error",t?.message||"Failed to add custom menu item")}}catch(t){this.toastService.showDanger("Error","Failed to save custom menu item"),console.debug("Failed to save custom menu item",t)}finally{this.isLoading=!1}})}buildMenuItem(){let e=this.form.value,t={name:e.name.trim(),url:this.normalizeUrlScheme(e.url.trim()),type:"redirect",openInNewTab:e.openInNewTab,usage:e.usage,visible:e.visible,icon:e.icon||void 0};return this.context==="mobile"&&e.mobileAccess&&(t.mobileAccess=e.mobileAccess),this.isEditMode||(t.targetAttendees=this.targetAttendees.length>0?this.targetAttendees:void 0),this.isEditMode&&this.menuItem?.key&&(t.key=this.menuItem.key),t}static{this.\u0275fac=function(t){return new(t||i)(w(kn),w(W),w(se))}}static{this.\u0275cmp=P({type:i,selectors:[["app-custom-menu-item-modal"]],inputs:{mode:"mode",menuItem:"menuItem",eventAppUrl:"eventAppUrl",context:"context"},outputs:{saved:"saved"},decls:6,vars:8,consts:[["nameField",""],["urlField",""],["behaviorField",""],["size","lg",3,"openChange","heading","open","dismissible","showClose"],[3,"formGroup"],["cnpModalFooter","","variant","secondary",3,"click","disabled"],["cnpModalFooter","","variant","primary","loadingLabel","Saving",3,"click","disabled","loading"],[3,"ngSubmit","formGroup"],[1,"dialog-stack"],["label","Menu item label","controlId","menuItemName","help","The text that will appear in the navigation menu.",3,"required","error"],["cnpInput","","id","menuItemName","type","text","formControlName","name","placeholder","Enter menu label"],[1,"url-block"],["label","Destination URL","controlId","menuItemUrl","help","Enter a full URL (https://...) for external sites or a relative path (/page) for internal pages.",3,"required","error"],["cnpInput","","id","menuItemUrl","type","text","formControlName","url","placeholder","https://example.com or /internal-page",3,"blur"],[1,"url-preview"],["label","Link behavior","controlId","menuItemOpenBehavior","help","Choose whether the link opens in a new tab or replaces the current page."],["cnpInput","","id","menuItemOpenBehavior","formControlName","openInNewTab"],[3,"ngValue"],[1,"field-block"],[1,"field-label"],["label","Usage",3,"text"],["ariaLabel","Usage",3,"valueChange","segments","value"],["label","Target attendees","text","Control who can see this menu item."],["label","Select target attendees","buttonLabel","Select target attendees",3,"data","showLabel"],["tone","warning","heading","Security notice","live","alert"],[1,"url-preview-label"],["target","_blank","rel","noopener noreferrer",1,"url-preview-link",3,"href"],["name","open-external","size","sm","label","Opens externally"],["label","Show in which menu type","text","Select which mobile menu type to show this item in."],["ariaLabel","Show in which menu type",3,"valueChange","segments","value"],[3,"data","showLabel","withUpdate","withEdit"],["tone","info"],["label","Select target attendees","buttonLabel","Select target attendees",3,"changed","data","showLabel"]],template:function(t,n){t&1&&(r(0,"cnp-modal",3),q("openChange",function(d){return j(n.open,d)||(n.open=d),d}),f(1,dc,30,21,"form",4),r(2,"cnp-button",5),h("click",function(){return n.close()}),p(3," Cancel "),a(),r(4,"cnp-button",6),h("click",function(){return n.submit()}),p(5," Save changes "),a()()),t&2&&(u("heading",n.modalTitle),H("open",n.open),u("dismissible",!1)("showClose",!n.writeActive),s(),v(n.open?1:-1),s(),u("disabled",n.isLoading),s(2),u("disabled",(n.form==null?null:n.form.invali
1d)||n.isLoading)("loading",n.isLoading))},dependencies:[$,z,ae,it,ot,_e,nt,oe,te,re,Ee,Ie,V,ue,pe,ye,ve,ce,Z,de],styles:[".dialog-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-5)}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6)}@media (width <= 768px){.form-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.span-2[_ngcontent-%COMP%]{grid-column:1/-1}.field-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-1);min-width:0}.field-block[_ngcontent-%COMP%] > cnp-segmented[_ngcontent-%COMP%], .field-block[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{align-self:flex-start}.field-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--cnp-space-1);font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.field-action[_ngcontent-%COMP%]{flex:none;margin-inline-start:var(--cnp-space-2);white-space:nowrap}cnp-combobox[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.theme-preview[_ngcontent-%COMP%]{max-width:100%;margin-top:var(--cnp-space-1);border-radius:var(--cnp-radius-element)}.choice-group[_ngcontent-%COMP%]{min-width:0;margin:0;padding:0;border:0}.choice-legend[_ngcontent-%COMP%]{float:none;width:auto;margin:0 0 var(--cnp-space-1);padding:0;font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.choice-hint[_ngcontent-%COMP%]{margin:0 0 var(--cnp-space-2);font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.choice-hint.is-required[_ngcontent-%COMP%]{color:var(--cnp-color-danger-fg)}.choice-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-3);padding:var(--cnp-space-4);border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-element)}.url-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-2);min-width:0}.url-preview[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--cnp-space-1);min-width:0;padding:var(--cnp-space-2) var(--cnp-space-3);font-size:var(--cnp-font-size-label);background:var(--cnp-color-bg-addon);border-radius:var(--cnp-radius-element)}.url-preview[_ngcontent-%COMP%]   cnp-icon[_ngcontent-%COMP%]{flex:none;color:var(--cnp-color-link)}.url-preview-label[_ngcontent-%COMP%]{flex:none;color:var(--cnp-color-text-muted)}.url-preview-link[_ngcontent-%COMP%]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--cnp-color-link);text-decoration:none}.url-preview-link[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}}return i})();var pc=[{key:"canapiiReview",label:"Enable G2 review email",page:"superadmin",storage:"otherFeatures",risk:"safe",knownIssue:"The scheduled job that sends this email treats a falsy value as enabled, so turning this off currently has no effect. Raised separately against the API."},{key:"centralisedResources",label:"Centralised resources",page:"superadmin",storage:"eventRecord",risk:"destructive",reversible:!1,consequence:"Turning this off removes the assigned asset from every session in this event and in all of its child events, and unlinks the child events. This cannot be undone \u2014 the links and assignments are deleted, not hidden, and re-enabling the setting will not bring them back."},{key:"canapiiSupport",label:"Canapii support",page:"superadmin",storage:"otherFeatures",risk:"safe"},{key:"isNominationsEnabled",label:"Nomination",page:"superadmin",storage:"eventRecord",risk:"destructive",reversible:!0,consequence:"Turning this off hides the nomination module. Nominations already submitted are kept but become unreachable from the console, and nomination fields stop being included in campaign and webhook payloads. Turning it back on restores access."},{key:"useUnifiedRegistration",label:"Unified registration",page:"superadmin",storage:"eventRecord",risk:"destructive",reversible:!0,consequence:"Turning this off takes down the live registration flow. The Unified Registration console module stops loading, its sidebar item disappears and it is removed from global search. The public interest form stays visible on the landing page but rejects every submission. Registrants already captured are kept. Turning it back on restores all of it."},{key:"qrFormat",label:"Scrambled QR codes",page:"superadmin",storage:"eventRecord",risk:"destructive",reversible:!0,confirmOn:"enable",consequence:"Turning this on changes how session and sponsor QR codes are generated for this event. Session and sponsor QR codes already printed or shared stop working straight away, and need replacing with the new ones shown in the console. Attendee badge QR codes are not affected. Turning it back off makes the old codes work again, and codes issued while it was on keep working too."},{key:"virtualBusinessCard",label:"Virtual business card",page:"superadmin",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes the virtual business card from attendee profiles and from exports. Cards attendees have already filled in are kept and reappear if you turn it back on."},{key:"badgeV2",label:"Badge version",page:"superadmin",storage:"otherFeatures",risk:"destructive",reversible:!0,confirmOn:"both",consequence:"This changes the badge data sent to on-site printers. Version 1 badges do not work in the kiosk app. Do not change this while on-site printing is running."},{key:"portals",label:"Portals",page:"superadmin",storage:"otherFeatures",risk:"destructive",reversible:!1,
1confirmOn:"enable",consequence:"Turning this on allocates this event's badge event code. That code is permanent: it cannot be changed or reissued afterwards, and turning this back off does not release it. Portals can be assigned to the event once it is allocated."},{key:"sessionReplyNotification",label:"Session message reply notification",page:"superadmin",storage:"otherFeatures",risk:"safe"},{key:"registeredDate",label:"Registered date",page:"superadmin",storage:"otherFeatures",risk:"safe"},{key:"certification",label:"Certification",page:"superadmin",storage:"specialFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off stops qualification tracking. Attendees part-way through earning a certificate stop accruing progress, and certificates already awarded stop being tracked. Awarded certificates are not deleted."},{key:"chatBot",label:"Fero",page:"superadmin",storage:"otherFeatures",risk:"safe"},{key:"brandedAppAssets",label:"Branded app assets",page:"superadmin",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off hides the branded app asset record used for app store submission. The assets already uploaded are kept and reappear if you turn it back on."},{key:"analyticsBI",label:"Analytics (new)",page:"superadmin",storage:"otherFeatures",risk:"safe"},{key:"analyticsLegacy",label:"Analytics (legacy)",page:"superadmin",storage:"otherFeatures",risk:"safe"},{key:"analyticsAIChat",label:"Analytics AI",page:"superadmin",storage:"otherFeatures",risk:"safe"},{key:"customRetentionPolicy",label:"Retention policy",page:"superadmin",storage:"retention",risk:"destructive",reversible:!1,confirmLabel:"Switch to default",consequence:"Switching back to the default policy discards the custom retention policy configured for this event. The custom values are not kept and would have to be entered again. Retention governs when this event\u2019s data is deleted."},{key:"organizeEvent",label:"Organize an event",page:"superadmin",storage:"otherFeatures",risk:"safe"},{key:"avatarUpload",label:"Avatar upload",page:"superadmin",storage:"otherFeatures",risk:"safe"},{key:"digitalwalletBadges",label:"Digital wallet badge",page:"superadmin",storage:"otherFeatures",risk:"safe"},{key:"bagTag",label:"Bag tag",page:"superadmin",storage:"specialFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off stops attendees downloading their bag tag. Bag tags already generated are kept but can no longer be reached from the app."}],uc=[{key:"customDomain",label:"Custom domain",page:"features-networking",storage:"specialFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off stops the event resolving on its custom domain. Anyone using a link on that domain, including links already sent out, will no longer reach the event."},{key:"homeAgenda",label:"Tabbed contents",page:"features-networking",storage:"specialFeatures",risk:"safe"},{key:"welcomeVideo",label:"Welcome video",page:"features-networking",storage:"specialFeatures",risk:"safe"},{key:"clickRedirectOnSessions",label:"Open pages in new tab when session is active",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"noteTaking",label:"Note taking",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes note taking from the event. Notes attendees have already written are kept but they cannot open them while this is off."},{key:"favorites",label:"Favorites",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"highlightBannerSpeed",label:"Highlight banner speed",page:"features-networking",storage:"eventRecord",risk:"safe"},{key:"secondaryBannerSpeed",label:"Secondary banner speed",page:"features-networking",storage:"eventRecord",risk:"safe"},{key:"onsiteRegistration",label:"Presence",page:"features-networking",storage:"specialFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes on-site registration from the event. Attendees already registered on site are kept, but the on-site desk can no longer register anyone new."},{key:"venueCheckIn",label:"Venue check-in/out",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off stops venue check-in and check-out being recorded. Check-ins already recorded are kept."},{key:"badge",label:"Badges",page:"features-networking",storage:"specialFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes badges from the event, including on-site badge printing. Badge designs and any badges already printed are unaffected."},{key:"appQRscanner",label:"App QR scanner",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"onsiteCheckinEmail",label:"On-site welcome email",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"selfCheckInAll",label:"Self check-in",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"This changes all three self check-in settings \u2014 meeting, session and event \u2014 at once. Turning them off stops scheduled check-in notifications being sent. Check-ins already recorded are kept."},{key:"meetingSelfCheckIn",label:"Meeting self check-in",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off stops meeting check-in notifications being sent. Check-ins already recorded are kept."},{key:"sessionSelfCheckIn",label:"Session self check-in",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off stops session check-in notifications being sent. Check-ins already recorded are kept."},{key:"eventSelfCheckIn",label:"Event self check-in",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off stops event check-in notifications being sent. Check-ins already recorded are kept."},{key:"sessionCheckout",label:"Session check-in/out",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes the separate check-out action from the session scanner and the console, so a session already checked into cannot be checked out and attendance duration stops being recorded. Durations already recorded are kept, and turning it back on resumes recording."},{key:"locations",label:"Locations",page:"features-networking",storage:"specialFeatures",risk:"destructive",reversible:!0,notRendered:!0,knownIssue:'This control never renders. The template matches it by display name against `specialFeatures`, but "Locations" is not one of the 14 entr
1ies seeded from `swpSpecialFeatures`, and `loadSpecialFeatures` only updates existing entries \u2014 it never adds. The underlying feature row does exist and is toggled by the API when the event format changes, so the console is silently out of step with it.',consequence:"Turning this off removes locations from the event. Locations already configured and any bookings against them are kept but cannot be reached while this is off."},{key:"hotels",label:"Hotels",page:"features-networking",storage:"specialFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes the hotels module. Bookings already made are kept but attendees and organisers cannot reach them while this is off."},{key:"flights",label:"Flights (beta)",page:"features-networking",storage:"specialFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes the flights module. Flight details already captured are kept but cannot be reached while this is off."},{key:"interactiveFloorplan",label:"Interactive floorplan (beta)",page:"features-networking",storage:"specialFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes the interactive floorplan from the event. The floorplan you have designed is kept."},{key:"campaign",label:"Campaign",page:"features-networking",storage:"specialFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes the campaign module. Campaigns already built are kept, but scheduled campaigns cannot be managed while this is off."},{key:"privateRsvp",label:"Private RSVP",page:"features-networking",storage:"specialFeatures",risk:"safe"},{key:"feroEngage",label:"Fero engage",page:"features-networking",storage:"specialFeatures",risk:"safe",notRendered:!0,knownIssue:'This control never renders, for the same reason as Locations: the template matches "Fero engage" by display name against `specialFeatures`, which has no such entry.'},{key:"sponsorAdmins",label:"Sponsor admins",page:"features-networking",storage:"specialFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes sponsor admin access. Anyone currently signed in as a sponsor admin loses access to their sponsor area."},{key:"provider",label:"Canapii provider",page:"features-networking",storage:"specialFeatures",risk:"safe"},{key:"liveTranscript",label:"Session live transcript",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"screenShareSimulcast",label:"Screen share quality",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"chatAll",label:"Chat",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"This changes all five chat settings at once. Turning them off removes chat from the event. Conversations already held are kept but attendees cannot open them while chat is off."},{key:"sidebarChat",label:"Homepage chats",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"eventChat",label:"Event chats",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes event chat. Messages already sent are kept but attendees cannot reach them while this is off."},{key:"personalChat",label:"Personal chats",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes personal chat. Conversations already held are kept but attendees cannot reach them while this is off."},{key:"groupChat",label:"Group chats",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes group chat. Conversations already held are kept but attendees cannot reach them while this is off."},{key:"techSupportChat",label:"Tech support",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes the tech support chat channel. Attendees who need help during the event will have no in-app route to it."},{key:"agendaAll",label:"Agenda",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"This changes all three agenda settings at once. Turning them off removes the agenda from the event, including attendees\u2019 personal agendas."},{key:"generalAgenda",label:"Event agenda",page:"features-networking",storage:"otherFeatures",risk:"safe"}
1,{key:"myAgenda",label:"My agenda",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"agendaFilters",label:"Agenda filters",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"agendaTypesFilters",label:"Types filter",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"sessionTracksFilters",label:"Session tracks filter",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"sessionTagsFilters",label:"Session tags filter",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"enableMeetNow",label:"Call",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes calling from the event. Calls in progress are not ended, but attendees cannot start new ones."},{key:"matchMaking",label:"Matchmaking",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes matchmaking. Meetings attendees have already booked through it are kept."},{key:"showMatchmakingWidget",label:"Recommended for you widget",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"showProfileQrCode",label:"Show QR code in profile",page:"features-networking",storage:"otherFeatures",risk:"safe"},{key:"enableSponsorMeeting",label:"Sponsor meetings",page:"features-networking",storage:"otherFeatures",risk:"destructive",reversible:!0,consequence:"Turning this off removes sponsor meetings. Meetings already booked with sponsors are kept but cannot be managed while this is off."},{key:"meetings",label:"Meetings",page:"features-networking",storage:"menu",risk:"destructive",reversible:!0,consequence:"Turning this off withdraws meetings from the event. Attendees can no longer book meetings with each other, and Meetings is removed from the app and the web event. Meetings already booked are kept, and become available again if this is turned back on."},{key:"eventMeetings",label:"Public meetings",page:"features-networking",storage:"menu",risk:"destructive",reversible:!0,consequence:"Turning this off withdraws public meetings, so attendees can no longer see or join the open meetings and roundtables an organiser has published. Meetings already booked are kept, and become available again if this is turned back on."}],mc=[{key:"vsefCompliant",label:"Export type",page:"reporting-settings",storage:"otherFeatures",risk:"destructive",reversible:!0,confirmOn:"both",consequence:"This changes the format of every export from this event. Switching to VSef also hides the multiple-select header and CSV delimiter settings, and anything downstream that reads these exports will receive a different file layout."},{key:"exportMultipleSelectToMultipleHeaders",label:"Separate multiple select attributes to multiple headers",page:"reporting-settings",storage:"otherFeatures",risk:"safe"},{key:"exportDelimiter",label:"CSV data delimiter",page:"reporting-settings",storage:"otherFeatures",risk:"safe"}],Ri=[...pc,...uc,...mc],Cf=Ri.length,bf=Ri.filter(i=>!i.notRendered).length,hc=new Map(Ri.map(i=>[i.key,i]));function vt(i){return hc.get(i)}function Ha(i,c){let e=vt(i);if(!e||e.risk!=="destructive")return!1;let t=e.confirmOn??"disable";return t==="both"?!0:t==="enable"?!!c:!c}function ja(i){let c=vt(i);return c?.risk==="destructive"&&c.reversible===!0}function qa(i,c){let e=vt(i);return e?.confirmLabel?e.confirmLabel:e?.confirmOn==="both"?"Change":c?"Turn on":"Turn off"}var gc=(i,c)=>c.label;function _c(i,c){if(i&1){let e=y();r(0,"cnp-settings-row",4)(1,"cnp-toggle",6),h("toggled",function(n){g(e);let o=l(2).$implicit,d=l();return _(d.chooseOnOff(o,n))}),a()()}if(i&2){let e=l(2).$implicit,t=l();u("label",e.label)("help",e.help)("disabled",!!t.disabledReason(e.key))("disabledReason",t.disabledReason(e.key))("saving",t.isSettingSaving(e.key)),s(),u("ariaLabel",e.label)("checked",t.echo.value(e.key,t.isOn(e)))("disabled",!!t.disabledReason(e.key))("saving",t.isSettingSaving(e.key))}}function fc(i,c){if(i&1){let e=y();r(0,"div",7)(1,"app-target-attendees",8),h("changed",function(n){g(e);let o=l(),d=l(4);return _(d.onBagTagTargetAttendeesChange(o,n))}),a()()}if(i&2){let e=l();s(),u("showLabel",!0)("data",e.targetAttendees)("withUpdate",!1)("withEdit",!0)}}function vc(i,c){if(i&1){let e=y();r(0,"cnp-settings-row",5)(1,"cnp-toggle",6),h("toggled",function(n){let o=g(e),d=l(4);return _(d.chooseSpecialFeature(o,n))}),a()(),f(2,fc,2,4,"div",7)}if(i&2){let e=c,t=l(3).$implicit,n=l();u("label",e.name)("help",t.help)("saving",n.isSettingSaving(e.key)),s(),u("ariaLabel",e.name)("checked",n.echo.value(n.featureControlId(e),!!e.value))("disabled",!!e.disabled)("saving",n.isSettingSaving(e.key)),s(),v(t.withTargeting&&e.value?2:-1)}}function Cc(i,c){if(i&1&&f(0,vc,3,8),i&2){let e,t=l(2).$implicit,n=l();v((e=n.specialFeature(t))?0:-1,e)}}function bc(i,c){if(i&1){let e=y();r(0,"cnp-settings-row",5)(1,"cnp-segmented",9),h("valueChange",function(n){g(e);let o=l(3);return _(o.chooseBadgeVersion(n))}),a()()}if(i&2){let e=l(2).$implicit,t=l();u("label",e.label)("help",e.help)("saving",t.isSettingSaving("badgeV2")),s(),u("ariaLabel",e.label)("segments",t.badgeVersionSegments)("value",t.echo.value("badgeV2",t.badgeVersionChoice()))("saving",t.isSettingSaving("badgeV2"))}}function Sc(i,c){if(i&1){let e=y();r(0,"cnp-button",11),h("click",function(){g(e);let n=l(4);return _(n.useCustomRetention())}),p(1," Change date "),a()}if(i&2){let e=l(4);u("disabled",e.isSettingSaving("customRetentionPolicy"))}}function wc(i,c){if(i&1){let e=y();r(0,"cnp-settings-row",5),f(1,Sc,2,1,"cnp-button",10),r(2,"cnp-segmented",9),h("valueChange",function(n){g(e);let o=l(3);return _(o.chooseRetention(n))}),a()()}if(i&2){let e=l(2).$implicit,t=l();u("label",e.label)("help",t.getRetentionTooltip())("saving",t.isSettingSaving("customRetentionPolicy")),s(),v(t.customRetentionPolicy?1:-1),s(),u("ariaLabel",e.label)("segments",t.retentionSegments)("value",t.echo.value("customRetentionPolicy",t.retentionChoice()))("saving",t.isSettingSaving("customRetentionPolicy"))}}function yc(i,c){if(i&1&&f(0,_c,2,9,"cnp-settings-row",4)(1,Cc,1,1)(2,bc,2,7,"cnp-settings-row",5)(3,wc,3,8,"cnp-settings-row",5),i&2){let e,t=l().$implicit;v((e=t.kind)==="onOff"?0:e==="special"?1:e==="badgeVersion"?2:e==="retention"?3:-1)}}function xc(i,c){if(i&1&&f(0,yc,4,1),i&2){let e=c.$implicit,t=l();v(t.isShown(e)?0:-1)}}var Mc={centralisedResources:!0,isNominationsEnabled:!0,useUnifiedRegistration:!0},Fc=new Set(Object.keys(Mc));function Wa(i){return Fc.has(i)}var Ui="analyticsBI",Ac=[{kind:"onOff",key:"canapiiReview",label:"Enable G2 review email",help:"Send an email prompting attendees to review Canapii on G2. Only attendees who opted in to marketing updates will receive the email. Only free events will receive the email. The email will be sent at the end of the event."},{kind:"onOff",key:"centralisedResources",label:"Centralised resources",help:"Share centralised resources on multiple events. Make this event host of centralised resources."}
1,{kind:"onOff",key:"canapiiSupport",label:"Canapii support",help:"Send tech support emails to Canapii for non-pro events"},{kind:"onOff",key:"isNominationsEnabled",label:"Nomination",help:"Enable nomination feature for this event"},{kind:"onOff",key:"useUnifiedRegistration",label:"Unified registration",help:"Enable the unified registration experience for this event. When disabled, attendees use the legacy registration page."},{kind:"onOff",key:"virtualBusinessCard",label:"Virtual business card",help:"Enables attendees to add VBC icon in their attendee profile to share their contact details with other attendees."},{kind:"badgeVersion",label:"Badge version",help:"Define the version of the badge to be used in the event. Only version 2 can be used in the kiosk app."},{kind:"onOff",key:"sessionReplyNotification",label:"Session message reply notification",help:"Send in-app and email notification to users who receive a reply to their in-session messages."},{kind:"onOff",key:"registeredDate",label:"Registered date",help:"Show registered date in attendee profile."},{kind:"special",label:"Certification"},{kind:"onOff",key:"chatBot",label:"Fero (AI chatbot)",help:"Enable chatbot assistant for the event."},{kind:"onOff",key:"brandedAppAssets",label:"Branded app assets",help:"A dedicated page to upload assets for the branded app"},{kind:"onOff",key:Ui,label:"Analytics (new)",help:"Access the new Power BI report page to view the event data insights and analytics."},{kind:"onOff",key:"analyticsAIChat",label:"Analytics AI",help:"Let organizers ask questions about this event's data in plain English. Answers report counts and trends only \u2014 never individual attendees. Rolling out event by event."},{kind:"onOff",key:"analyticsLegacy",label:"Analytics (legacy)",help:"Show the original Analytics page. Events created before the cutover keep it by default; newer events use Analytics (new) only. Turn this on to give a new event the old page back."},{kind:"retention",label:"Retention policy"},{kind:"onOff",key:"organizeEvent",label:"Organize an event",help:"Enable 'Organize an event' feature to allow attendees to create and manage their own events within the platform."},{kind:"onOff",key:"avatarUpload",label:"Avatar upload",help:"Enable 'Avatar upload' feature to allow attendees to upload custom avatars within the platform."},{kind:"onOff",key:"digitalwalletBadges",label:"Digital wallet badge",hybridOnly:!0,help:"Enable 'Digital wallet badge' feature to allow attendees to add their event badges to digital wallet applications."},{kind:"special",label:"Bag tag",withTargeting:!0,help:"Enable bag tag printing for this event. When enabled, you can target specific attendees for bag tag generation."}],wi=(()=>{class i{constructor(){this.specialFeatures=[],this.customRetentionPolicy=null,this.isAnalyticsNewAvailable=!0,this.settingSaving={},this.setOthersChange=new T,this.toggleCentralisedResourcesChange=new T,this.toggleEventNominationsChange=new T,this.toggleUseUnifiedRegistrationChange=new T,this.toggleSpecialFeatures2Change=new T,this.useDefaultRetentionChange=new T,this.useCustomRetentionChange=new T,this.bagTagTargetAttendeesChange=new T,this.rows=Ac,this.badgeVersionSegments=[{value:"v2",label:"Version 2"},{value:"v1",label:"Version 1"}],this.retentionSegments=[{value:"default",label:"Default"},{value:"custom",label:"Custom"}],this.echo=new Ge,this.eventFieldWriters={centralisedResources:e=>this.toggleCentralisedResources(e),isNominationsEnabled:e=>this.toggleEventNominations(e),useUnifiedRegistration:e=>this.toggleUseUnifiedRegistration(e)}}isSettingSaving(e){return this.settingSaving?.[e]===!0}setOthers(e){this.setOthersChange.emit(e)}toggleCentralisedResources(e){this.toggleCentralisedResourcesChange.emit(e)}toggleEventNominations(e){this.toggleEventNominationsChange.emit(e)}toggleUseUnifiedRegistration(e){this.toggleUseUnifiedRegistrationChange.emit(e)}toggleSpecialFeatures2(e,t){this.toggleSpecialFeatures2Change.emit({value:e,menu:t})}useDefaultRetention(){this.useDefaultRetentionChange.emit()}useCustomRetention(){this.useCustomRetentionChange.emit()}onBagTagTargetAttendeesChange(e,t){this.bagTagTargetAttendeesChange.emit({menu:e,targetAttendees:t})}disabledReason(e){if(e==="centralisedResources"&&this.event?.centralisedResourcesChildEvent){let t=this.event?.centralisedResourcesParentEvent;return t?`This is controlled by the parent event, ${t}. Change it there instead.`:"This is controlled by the parent event. Change it there instead."}return e===Ui&&!this.isAnalyticsNewAvailable?"Not available for events that started before 1 January 2024.":null}getRetentionTooltip(){if(this.customRetentionPolicy){let{year:e,month:t,day:n}=this.customRetentionPolicy;return`Custom retention date: ${e}-${t+1}-${n}. A custom policy has been set for this event. Canapii will retain this event until the set date. After that, your event will be pending deleti
1on in 5 days\u2019 time.`}return"By default, all events in Canapii have an 18-month retention period. After this period passes, your event will be pending deletion in 5 days\u2019 time."}isShown(e){return!e.hybridOnly||this.event?.eventFormat==="hybrid"}isOn(e){let t=e.key;return Wa(t)?!!this.event?.[t]:t===Ui&&!this.isAnalyticsNewAvailable?!1:!!this.otherFeatures?.[t]}chooseOnOff(e,t){let n=e.key;if(this.echo.hold(n,t),Wa(n)){this.eventFieldWriters[n](t);return}let o={};o[n]=t,this.setOthers(o)}specialFeature(e){return this.specialFeatures?.find(t=>t.name===e.label)}featureControlId(e){return`feature:${e.key??e.name}`}chooseSpecialFeature(e,t){this.echo.hold(this.featureControlId(e),t),this.toggleSpecialFeatures2(t,e)}badgeVersionChoice(){return this.otherFeatures?.badgeV2?"v2":"v1"}chooseBadgeVersion(e){this.echo.hold("badgeV2",e),this.setOthers({badgeV2:e==="v2"})}retentionChoice(){return this.customRetentionPolicy?"custom":"default"}chooseRetention(e){this.echo.hold("customRetentionPolicy",e),e==="custom"?this.useCustomRetention():this.useDefaultRetention()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=P({type:i,selectors:[["app-superadmin-settings"]],inputs:{otherFeatures:"otherFeatures",event:"event",specialFeatures:"specialFeatures",customRetentionPolicy:"customRetentionPolicy",isAnalyticsNewAvailable:"isAnalyticsNewAvailable",settingSaving:"settingSaving"},outputs:{setOthersChange:"setOthersChange",toggleCentralisedResourcesChange:"toggleCentralisedResourcesChange",toggleEventNominationsChange:"toggleEventNominationsChange",toggleUseUnifiedRegistrationChange:"toggleUseUnifiedRegistrationChange",toggleSpecialFeatures2Change:"toggleSpecialFeatures2Change",useDefaultRetentionChange:"useDefaultRetentionChange",useCustomRetentionChange:"useCustomRetentionChange",bagTagTargetAttendeesChange:"bagTagTargetAttendeesChange"},decls:7,vars:0,consts:[["aria-labelledby","settings-platform-heading",1,"section-card"],[1,"section-head"],["id","settings-platform-heading",1,"section-heading"],[1,"setting-rows"],[3,"label","help","disabled","disabledReason","saving"],[3,"label","help","saving"],[3,"toggled","ariaLabel","checked","disabled","saving"],[1,"row-detail"],["label","Target attendees","emptyText","All attendees",3,"changed","showLabel","data","withUpdate","withEdit"],[3,"valueChange","ariaLabel","segments","value","saving"],["variant","secondary","size","sm",3,"disabled"],["variant","secondary","size","sm",3,"click","disabled"]],template:function(t,n){t&1&&(r(0,"section",0)(1,"div",1)(2,"h2",2),p(3,"Platform controls"),a()(),r(4,"div",3),R(5,xc,1,1,null,null,gc),a()()),t&2&&(s(5),U(n.rows))},dependencies:[dt,Be,de,V,Ie],styles:[".settings-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-6);min-width:0}.status-band[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-4) var(--cnp-space-7);background:var(--cnp-color-bg-card);border-radius:var(--cnp-radius-container);box-shadow:var(--cnp-shadow-low);padding:var(--cnp-space-4) var(--cnp-space-card-padding)}.band-item[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-3);min-width:0}.band-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--cnp-space-2);font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-semibold);color:var(--cnp-color-text-secondary)}.section-card[_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);min-width:0}.section-head[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--cnp-space-3);border-bottom:2px solid var(--cnp-color-rule);padding-bottom:var(--cnp-space-2)}.section-heading[_ngcontent-%COMP%]{margin:0;font-size:var(--cnp-font-size-section);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-heading)}.section-description[_ngcontent-%COMP%]{margin:var(--cnp-space-3) 0 0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-secondary)}.section-actions[_ngcontent-%COMP%]{--cnp-button-min-height: var(--cnp-size-control);display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2)}.section-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-4);margin-top:var(--cnp-space-4);min-width:0}.details-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6);margin:var(--cnp-space-4) 0 0}
1@media (width <= 900px){.details-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width <= 560px){.details-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.detail[_ngcontent-%COMP%]{min-width:0}.detail[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-regular);color:var(--cnp-color-text-muted)}.detail[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:var(--cnp-space-1) 0 0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-body);overflow-wrap:anywhere}.value-row[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2);min-width:0}.unset[_ngcontent-%COMP%]{color:var(--cnp-color-text-muted)}.setting-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0;margin-top:var(--cnp-space-2)}.row-detail[_ngcontent-%COMP%]{padding-block:var(--cnp-space-2) var(--cnp-space-4);border-block-end:1px solid var(--cnp-color-border-subtle)}"]})}}return i})();var Ze=on(Bn());var Ec=(i,c)=>c.key,kc=(i,c)=>c.control;function Tc(i,c){if(i&1&&(r(0,"option",29),p(1),a()),i&2){let e=c.$implicit;u("value",e),s(),E(e)}}function Dc(i,c){if(i&1&&(r(0,"option",29),p(1),a()),i&2){let e=c.$implicit;u("value",e),s(),E(e)}}function Oc(i,c){if(i&1&&(r(0,"option",29),p(1),a()),i&2){let e=c.$implicit;u("value",e),s(),E(e)}}function Pc(i,c){if(i&1&&(r(0,"option",29),p(1),a()),i&2){let e=c.$implicit;u("value",e.key),s(),E(e.value)}}function Ic(i,c){if(i&1&&(r(0,"option",29),p(1),Y(2,"subscriptionLabel"),a()),i&2){let e=c.$implicit;u("value",e),s(),E(ie(2,2,e))}}function Vc(i,c){if(i&1&&(r(0,"cnp-field",46,9)(2,"select",47),R(3,Ic,3,4,"option",29,Fe),a()(),r(5,"cnp-field",48,10),S(7,"input",49),a()),i&2){let e=A(1),t=A(6),n=l(2);u("required",!0)("error",n.fieldError(n.formGroup.get("eventType"),"Event type")),s(2),M("aria-describedby",e.controlAttrs().describedBy),s(),U(n.eventTypeOptions),s(2),u("error",n.fieldError(n.formGroup.get("contactEmail"),"Contact email")),s(2),M("aria-describedby",t.controlAttrs().describedBy)}}function Lc(i,c){if(i&1&&(r(0,"h5",50),p(1," Firebase configuration "),S(2,"cnp-help-icon",51),a(),r(3,"cnp-field",52,11),S(5,"input",53),a(),r(6,"cnp-field",54,12),S(8,"input",55),a()),i&2){let e=A(4),t=A(7);s(5),M("aria-describedby",e.controlAttrs().describedBy),s(3),M("aria-describedby",t.controlAttrs().describedBy)}}function zc(i,c){if(i&1){let e=y();r(0,"cnp-field",17,0),S(2,"input",18),a(),r(3,"div",19),S(4,"app-reactive-input-location",20),a(),r(5,"cnp-date-field",21),h("valueChange",function(n){g(e);let o=l();return _(o.onStartDatePicked(n))}),a(),r(6,"cnp-date-field",22),h("valueChange",function(n){g(e);let o=l();return _(o.onEndDatePicked(n))}),a(),r(7,"cnp-field",23,1)(9,"cnp-combobox",24),h("picked",function(n){g(e);let o=l();return _(o.onTimezonePicked(n))}),a()(),r(10,"cnp-field",25,2),S(12,"input",26),a(),r(13,"cnp-field",27,3)(15,"select",28),R(16,Tc,2,2,"option",29,Fe),a()(),r(18,"cnp-field",30,4)(20,"select",31),R(21,Dc,2,2,"option",29,Fe),a()(),r(23,"cnp-field",32,5)(25,"select",33),R(26,Oc,2,2,"option",29,Fe),a()(),r(28,"cnp-field",34,6)(30,"select",35),R(31,Pc,2,2,"option",29,Ec),a()(),f(33,Vc,8,5),r(34,"div",36)(35,"span",37),p(36," Platform access "),S(37,"cnp-help-icon",38),a(),r(38,"cnp-segmented",39),h("valueChange",function(n){g(e);let o=l();return _(o.togglePlatformAccess({value:n}))}),a()(),r(39,"div",36)(40,"span",37),p(41,"Appearance"),a(),r(42,"cnp-segmented",40),h("valueChange",function(n){g(e);let o=l();return _(o.toggleTheme({value:n}))}),a(),S(43,"img",41),a(),r(44,"cnp-field",42,7),S(46,"input",43),a(),r(47,"cnp-field",44,8),S(49,"input",45),a(),f(50,Lc,9,2)}if(i&2){let e=A(1),t=A(8),n=A(11),o=A(14),d=A(19),m=A(24),C=A(29),F=A(45),Ce=A(48),k=l();u("required",!0)("error",k.fieldError(k.formGroup.get("name"),"Name")),s(2),M("aria-describedby",e.controlAttrs().describedBy),s(2),u("group",k.formGroup),s(),u("label","Live date: start ("+(k.eventService==null||k.eventService.data==null?null:k.eventService.data.timezoneLabel)+")")("help",k.dateTooltip)("disabled",k.startDateLocked)("value",k.startDateIso)("min",k.startDateMinShown)("error",k.startDateError),s(),u("label","Live date: end ("+(k.eventService==null||k.eventService.data==null?null:k.eventService.data.timezoneLabel)+")")("help",k.dateTooltip)("disabled",k.endDateLocked)("value",k.endDateIso)("min",k.endDateMinShown)("max",k.endDateMaxShown)("error",k.endDateError),s(),u("hint",k.timezoneClock),s(2),u("options",k.timezoneComboOptions)("value",k.timezoneValue)("describedBy",t.controlAttrs().describedBy),s(),u("required",!0)("error",k.fieldError(k.formGroup.get("timezoneLabel"),"Timezone abbreviation")),s(2),M("aria-describedby",n.controlAttrs().describedBy),s(),u("required",!0)("error",k.fieldError(k.formGroup.get("dateformat"),"Date format")),s(2),M("aria-describedby",o.controlAttrs().describedBy),s(),U(k.dateFormatOptions),s(2),u("required",!0)("error",k.fieldError(k.formGroup.get("agendaTimeFormat"),"Agenda time format")),s(2),M("aria-describedby",d.controlAttrs().describedBy),s(),U(k.timeFormatOptions),s(2),u("required",!0)("error",k.fieldError(k.formGroup.get("primaryCurrency"),"Primary currency")),s(2),M("aria-describedby",m.controlAttrs().describedBy),s(),U(k.primaryCurrencyOptions),s(4),M("aria-describedby",C.controlAttrs().describedBy),s(),U(k.languageOptions),s(2),v(k.isSuperAdmin?33:-1),s(5),u("segments",k.platformAccessSegments)("value",k.formGroup.get("platformAccess").value),s(4),u("segments",k.themeSegments)("value",k.formGroup.get("theme").value),s(),u("src",k.themePreview,K),s(3),M("aria-describedby",F.controlAttrs().describedBy),s(3),M("aria-describedby",Ce.controlAttrs().describedBy),s(),v(k.isSuperAdmin?50:-1)}}function Bc(i,c){if(i&1){let e=y();r(0,"cnp-field",56,13),S(2,"input",57),r(3,"cnp-button",58),h("click",function(){let n=g(e).$implicit,o=l(3);return _(o.clearSocial(n.control))}),p(4," Clear "),a()()}if(i&2){let e=c.$implicit,t=A(1);u("label",e.label)("controlId",e.id),s(2),u("id",e.id)("formControlName",e.control)("placeholder",e.placeholder),M("aria-describedby",t.controlAttrs().describedBy),s(),u("ariaLabel","Clear "+e.label)}}function Nc(i,c){if(i&1&&(r(0,"h5",50),p(1,"Input your company or event social media URL"),a(),R(2,Bc,5,7,"cnp-field",56,kc)),i&2){let e=l(2);ne("is-first",e.section),s(2),U(e.socialFields)}}function Rc(i,c){if(i&1&&f(0,Nc,4,2),i&2){let e=l();v(e.isSuperAdmin||!(e.eventService==null||e.eventService.data==null||e.eventService.data.user==null)&&e.eventService.data.user.subscriptionType&&!e.eventService.data.user.subscriptionType.includes("free")?0:-1)}}function Uc(i,c){i&1&&(r(0,"cnp-callout",16),p(1," There are some errors. Please try to fix the errors above and then click Save again. "),a())}var Gc=Kn(),Cn=(()=>
1{class i{set isLoading(e){this.saveInFlight&&!e&&(this.isStartDateEqualEventDate=!1,this.reportCanSubmit()),this.saveInFlight=e}get isLoading(){return this.saveInFlight}constructor(e,t,n,o,d,m,C){this.formBuilder=e,this.eventService=t,this.timezoneService=n,this.accountService=o,this.auth=d,this.confirmService=m,this.subscriptionService=C,this.now=new Date,this.ev={PK:"",SK:"",GSI1:"",logo:"",banner:"",bannerEmail:"",name:"",dateformat:"",startDate:new Date().toISOString(),endDate:new Date().toISOString(),timezone:Ze.default.tz.guess(),timezoneLabel:"",platformAccess:"both",theme:"dark",welcomeBannerText:"dark",eventType:"",linkedinURL:"",facebookURL:"",twitterURL:"",instagramURL:"",wechatURL:"",contactEmail:"",agendaTimeFormat:"",firebaseServerKey:null,tab:"",primaryCurrency:"USD",eventLanguage:"en",location:null},this.section="",this.save=new T,this.hasError=!1,this.saveInFlight=!1,this.timezoneOptions=[],this.timezoneComboOptions=[],this.dateFormatOptions=["MM/DD/YYYY","DD/MM/YYYY","Long format"],this.platformAccessOptions=["web","mobile","both"],this.themeOptions=["dark","light"],this.platformAccessSegments=[{value:"web",label:"Web"},{value:"mobile",label:"Mobile"},{value:"both",label:"Both"}],this.themeSegments=[{value:"light",label:"Light"},{value:"dark",label:"Dark"}],this.socialFields=[{control:"linkedinURL",id:"eventLinkedIn",label:"LinkedIn",placeholder:"https://www.linkedin.com/company/canapii"},{control:"twitterURL",id:"eventTwitter",label:"X",placeholder:"https://x.com/canapiiofficial"},{control:"facebookURL",id:"eventFacebook",label:"Facebook",placeholder:"https://www.facebook.com/pg/canapiiofficial"},{control:"instagramURL",id:"eventInstagram",label:"Instagram",placeholder:"https://www.instagram.com/canapiiofficial/"},{control:"wechatURL",id:"eventWechat",label:"WeChat",placeholder:""}],this.themePreview="assets/images/Dark-mode.jpg",this.creatorSubscriptionType="attendee",this.eventDefaultFormat="hybrid",this.isDisabledStrDt=!1,this.isDisabledEndDt=!1,this.isStartDateEqualEventDate=!1,this.canSubmitChange=new T,this.timeFormatOptions=["12-hour","24-hour"],this.timezoneClock=null,this.primaryCurrencyOptions=["USD","EUR","GBP","AUD","CAD","SGD","SEK"],this.languageOptions=jn,this.eventTypeOptions=[],this.subscription$=[],this.previousStartDateValue={year:0,month:0,day:0},this.timezoneValueCache=[],this.fieldError=be(pt).message,this.dateTooltip="Your event dates help us tailor insights, but don\u2019t worry - your access isn\u2019t limited! All Canapii packages include 365-day access, so you can launch registration early, keep content like polls and videos live after the event, and engage your audience year-round. Just enter your live event dates here to improve recommendations and analytics.",this.submitted=!1;let F=new Date;F.setSeconds(0),F.setMinutes(0),F.setTime(F.getTime()+36e5),this.ev.startDate=F.toISOString(),F.setTime(F.getTime()+36e5),this.ev.endDate=F.toISOString()}ngOnInit(){this.setupSubscriptions(),this.initializeDates(),this.initializeFormGroup(),this.setupPostFormInitialization(),this.currentTimezoneOffset=this.getTimezoneOffset()}setupSubscriptions(){this.setupUserSubscription(),this.setupTimezoneClockUpdate(),this.setupAccountSubscription(),this.setupEventSubscription(),this.accountService.load()}setupUserSubscription(){this.subscription$.push(this.auth.userSubject.subscribe(e=>{this.user=e?e.attributes:null}))}setupTimezoneClockUpdate(){this.convertToTimezone();let e=yn(1e3);this.subscription$.push(e.subscribe(()=>this.convertToTimezone()))}setupAccountSubscription(){this.subscription$.push(this.accountService.onChanged.subscribe(e=>{this.isSuperAdmin=!!e.user.superadmin}))}setupEventSubscription(){this.subscription$.push(this.eventService.eventSubject.subscribe(e=>{e&&e.user&&(this.eventCreator=e.user,this.creatorSubscriptionType=this.subscriptionService.formatSubscriptionType(this.eventCreator.subscriptionType),this.eventTypeOptions=this.subscriptionService.getSubscriptionEventTypes)}))}initializeDates(){let e={year:this.now.getFullYear(),month:this.now.getMonth()+1,day:this.now.getDate()},t=new Date(this.ev.startDate),n={year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()},o=new Date(n.year,n.month-1,n.day),d=new Date(e.year,e.month-1,e.day);o<d?this.minDate=n:this.minDate=e;let m=new Date(this.ev.endDate);this.prevEndDt={year:m.getUTCFullYear(),month:m.getUTCMonth()+1,day:m.getUTCDate()},this.endDateModel=this.prevEndDt}initializeFormGroup(){let e=this.parseDate(this.ev.startDate),t=this.parseDate(this.ev.endDate),{firebaseProjectId:n,firebaseSecretKey:o}=this.extractFirebaseConfig(),d=this.ev.name?"to "+this.ev.name:"";this.formGroup=this.formBuilder.group({name:[this.ev.name,[D.required]],startDate:[{year:e[0],month:e[1],day:e[2]},[D.required,Re(()=>this.minDate)]],endDate:[{year:t[0],month:t[1],day:t[2]},[D.required,Re(()=>this.endDateMinDate,()=>this.endDateMaxDate)]],timezone:[this.ev.timezone,[D.required]],timezoneLabel:[this.ev.timezoneLabel,[D.required]],platformAccess:[this.ev.platformAccess||"both",[D.required]],theme:[this.ev.theme||"dark",[D.required]],dateformat:[this.ev.dateformat||"MM/DD/YYYY",[D.required]],welcomeBannerText:[typeof this.ev.welcomeBannerText<"u"?this.ev.welcomeBannerText:"Welcome "+d],userPlan:[this.creatorSubscriptionType],superAdmin:[this.isSuperAdmin],eventType:[this.ev.eventType?this.ev.eventType:this.subscriptionService.getSubscriptionEventType(this.creatorSubscriptionType)],linkedinURL:[this.ev.linkedinURL,[]],facebookURL:[this.ev.facebookURL,[]],twitterURL:[this.ev.twitterURL,[]],instagramURL:[this.ev.
1instagramURL,[]],wechatURL:[this.ev.wechatURL,[]],contactEmail:[this.ev.contactEmail,[D.email]],agendaTimeFormat:[this.ev.agendaTimeFormat||"12-hour",[D.required]],firebaseProjectId:[n],firebaseSecretKey:[o],tab:[this.ev.tab],primaryCurrency:[this.ev.primaryCurrency||"USD",[D.required]],eventLanguage:[this.ev.eventLanguage||"en"],location:[this.ev.location||null]}),this.subscription$.push(this.formGroup.statusChanges.subscribe(()=>this.reportCanSubmit()))}parseDate(e){return e.split("T")[0].split("-").map(t=>parseInt(t,10))}extractFirebaseConfig(){let e="",t="";return this.ev.firebaseServerKey&&(typeof this.ev.firebaseServerKey=="object"?(e=this.ev.firebaseServerKey.projectId||"",t=this.ev.firebaseServerKey.secretKey||""):typeof this.ev.firebaseServerKey=="string"&&(t=this.ev.firebaseServerKey)),{firebaseProjectId:e,firebaseSecretKey:t}}setupPostFormInitialization(){this.previousStartDateValue=this.formGroup.get("startDate").value,this.setupTimezoneOptions(),this.togglePlatformAccess({value:this.ev.platformAccess||"both"}),this.toggleTheme({value:this.ev.theme},!0),this.setupDateDisablingLogic(),this.applyDateLocks(),this.changedate(),this.formGroup.get("endDate").setValue(this.endDateModel),this.setupStartDateChangeSubscription()}setupTimezoneOptions(){this.timezoneOptions=this.timezoneService.getList(),this.timezoneComboOptions=this.timezoneOptions.map(e=>({value:e.name,label:e.label,sublabel:[e.name,e.countryName,e.continentName,...e.group??[],e.abbreviation].filter(Boolean).join(" \xB7 ")}))}setupDateDisablingLogic(){let e=this.formGroup.getRawValue().startDate,t=new Date(e.year,e.month-1,e.day),n=new Date(this.endDateModel.year,this.endDateModel.month-1,this.endDateModel.day);this.isSuperAdmin||(this.checkAndDisableStartDate(t),this.checkAndDisableEndDate(n),this.checkAndDisableOngoingEventDates(t,n))}checkAndDisableStartDate(e){e.getTime()<this.now.getTime()&&e.getDate()!==this.now.getDate()&&(this.isDisabledStrDt=!0)}
1checkAndDisableEndDate(e){e.getTime()<this.now.getTime()&&e.getDate()!==this.now.getDate()&&(this.isDisabledEndDt=!0)}checkAndDisableOngoingEventDates(e,t){e.getTime()<=this.now.getTime()&&t.getTime()>=this.now.getTime()&&(this.isDisabledStrDt=!0,this.isDisabledEndDt=!0)}applyDateLocks(){let e=[[this.formGroup.get("startDate"),this.isDisabledStrDt],[this.formGroup.get("endDate"),this.isDisabledEndDt]];for(let[t,n]of e)n?t.disable({emitEvent:!1}):t.enable({emitEvent:!1})}setupStartDateChangeSubscription(){this.subscription$.push(this.formGroup.get("startDate").valueChanges.pipe(Ji()).subscribe(([e])=>this.previousStartDateValue=e))}changedate(){let e=this.endDateModel,n=this.formGroup.getRawValue().startDate,o=new Date(n.year,n.month-1,n.day);if(this.endDateMinDate={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},this.isSuperAdmin===!1){let C=2;this.eventCreator?.hostingLimit?C=this.eventCreator.hostingLimit-1:this.creatorSubscriptionType.includes("free")||this.creatorSubscriptionType.includes("motivator")?C=3:this.creatorSubscriptionType.includes("driver")?C=6:this.subscriptionService.isProfessionalSubscriptionWithTerms(this.creatorSubscriptionType)&&(C=this.eventCreator.proEventLength||7);let F=new Date(n.year,n.month-1,n.day+C);this.endDateMaxDate={year:F.getFullYear(),month:F.getMonth()+1,day:F.getDate()}}if(this.formGroup.get("endDate").updateValueAndValidity({emitEvent:!1}),!this.endDateModel)return;let d=new Date(this.endDateModel.year,this.endDateModel.month-1,this.endDateModel.day),m=0;if(o.getTime()>=d.getTime()){if(this.previousStartDateValue.year&&this.previousStartDateValue.month&&this.previousStartDateValue.day){let F=new Date(this.previousStartDateValue.year,this.previousStartDateValue.month-1,this.previousStartDateValue.day);m=Ze.default.duration((0,Ze.default)(d).diff((0,Ze.default)(F))).asDays()}let C=new Date(n.year,n.month-1,n.day);C.setDate(C.getDate()+m),this.endDateModel={year:C.getFullYear(),month:C.getMonth()+1,day:C.getDate()}}else this.endDateMaxDate&&d.getTime()>new Date(this.endDateMaxDate.year,this.endDateMaxDate.month-1,this.endDateMaxDate.day).getTime()&&(this.endDateModel={year:this.endDateMaxDate.year,month:this.endDateMaxDate.month,day:this.endDateMaxDate.day});this.endDateModel!==e&&this.formGroup.get("endDate").setValue(this.endDateModel)}ngAfterViewInit(){Promise.resolve().then(()=>this.reportCanSubmit())}reportCanSubmit(){this.canSubmitChange.emit(!!this.formGroup?.valid&&!this.isStartDateEqualEventDate)}ngOnDestroy(){this.subscription$.forEach(e=>e.unsubscribe())}formSubmit(){return b(this,null,function*(){if(this.isLoading)return;this.submitted=!0;let e=this.extractFormDates();if(this.validateForm(e.startDate),!this.canSubmitForm()||!(yield this.handleTimezoneConfirmation()))return;let t=this.buildFirebaseServerKey(),n=this.buildEventData(e,t);this.save.emit(n)})}extractFormDates(){let e=this.formGroup.get("startDate").value,t=this.formGroup.get("endDate").value;return{startDate:new Date(e.year,e.month-1,e.day),endDate:new Date(t.year,t.month-1,t.day)}}validateForm(e){this.hasError=!this.formGroup.valid,this.toISODate(e)+"T00:00:00Z"===this.ev.startDate&&(this.isStartDateEqualEventDate=!0),this.reportCanSubmit()}canSubmitForm(){return!this.hasError||this.isStartDateEqualEventDate}handleTimezoneConfirmation(){return b(this,null,function*(){return!this.formGroup.controls.timezone.dirty||this.currentTimezoneOffset===this.getTimezoneOffset()?!0:this.confirmService.ask({heading:"Update the event timezone?",consequence:"This affects your existing meetings, their locations and your agenda. Re-create the meetings and the agenda afterwards.",confirmWord:"",confirmLabel:"Update timezone"})})}buildFirebaseServerKey(){let e=this.formGroup.get("firebaseProjectId").value,t=this.formGroup.get("firebaseSecretKey").value;return!e&&!t?null:{projectId:e||"",secretKey:t||""}}buildEventData(e,t){let n=this.formGroup;return{PK:this.ev.PK,SK:this.ev.SK,GSI1:this.ev.GSI1,name:n.get("name").value.trim(),startDate:this.toISODate(e.startDate)+"T00:00:00Z",endDate:this.toISODate(e.endDate)+"T00:00:00Z",timezone:n.get("timezone").value,timezoneLabel:n.get("timezoneLabel").value,timezoneOffset:this.getTimezoneOffset(),platformAccess:n.get("platformAccess").value,theme:n.get("theme").value,dateformat:n.get("dateformat").value,welcomeBannerText:n.get("welcomeBannerText").value,userPlan:this.creatorSubscriptionType,superAdmin:this.isSuperAdmin,liveDate:null,liveDateDisplay:null,eventType:n.get("eventType").value,linkedinURL:n.get("linkedinURL").value,facebookURL:n.get("facebookURL").value,twitterURL:n.get("twitterURL").value,instagramURL:n.get("instagramURL").value,wechatURL:n.get("wechatURL").value,contactEmail:(n.get("contactEmail").value||"").trim()||null,agendaTimeFormat:n.get("agendaTimeFormat").value,firebaseServerKey:t,tab:n.get("tab").value,primaryCurrency:n.get("primaryCurrency").value,eventLanguage:n.get("eventLanguage").value,location:n.get("location").value}}pad(e,t=2){let n=e+"";for(;n.length<t;)n="0"+n;return n}getTime(e){let t=new Date(e.replace(" ","T"));return this.pad(t.getHours())+":"+this.pad(t.getMinutes())+":00"}toISODate(e){return e.getFullYear()+"-"+this.pad(e.getMonth()+1)+"-"+this.pad(e.getDate())}isDateFormatAMPM(){let e=new Date,t=e.toLocaleTimeString(),n=/am|pm/i;return n.exec(t)||n.exec(e.toString())}isGroupSelected(e){return this.formGroup.get("groups").value.indexOf(e.value)!==-1}toggleGroup(e){let t=this.formGroup.get("groups").value;if(this.isGroupSelected(e)){let n=this.formGroup.get("groups").value.indexOf(e.value);t.splice(n,1),this.formGroup.get("groups").setValue(t)}else t.push(e.value),this.formGroup.get("groups").setValue(t)}getTimezoneOffset(){return this.formGroup.get("timezone").value?Ze.default.tz(this.formGroup.get("timezone").value).format("Z"):"+00:00"}capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}togglePlatformAccess(e){this.formGroup.get("platformAccess").setValue(e.value)}clearSocial(e){let t=this.formGroup.get(e);t?.setValue(null),t?.markAsDirty()}toggleTheme(e,t=!1){t||this.formGroup.get("theme").setValue(e.value),this.themePreview="assets/images/Dark-mode.jpg",e.value==="light"&&(this.themePreview="assets/images/Light-mode.jpg")}convertToTimezone(){let e=Ze.default.tz(this.ev.timezone).format("Z"),t=(0,Ze.default)(new Date).utc().tz(this.ev.timezone).format("yyyy-MM-DD HH:mm:ss");this.timezoneClock=`${t} (UTC${e})`}timezoneChange(e){let t=e.id,n=Gc.find(d=>d.name===t||d.group.includes(t)),o="";return n?o=n.abbreviation:o=Ze.default.tz(t).zoneAbbr(),this.formGroup?.get("timezoneLabel")&&this.formGroup.get("timezoneLabel").setValue(o),this.ev.timezone=t,this.convertToTimezone(),o}get timezoneValue(){let e=this.formGroup?.get("timezone")?.value;return this.timezoneValueCache[0]!==e&&(this.timezoneValueCache=e?[e]:[]),this.timezoneValueCache}onTimezonePicked(e){let t=e[0];if(!t){this.timezoneValueCache=[...this.timezoneValueCache];return}let n=this.formGroup.get("timezone");n.setValue(t),n.markAsDirty(),this.timezoneChange({id:t})}get startDateIso(){return ee(this.formGroup.get("startDate").value)}get endDateIso(){return ee(this.formGroup.get("endDate").value)}get minDateIso(){return ee(this.minDate)}get endDateMinIso(){return ee(this.endDateMinDate)}get endDateMaxIso(){return ee(this.endDateMaxDate)}get startDateMinShown(){return Qe(this.startDateIso,this.minDateIso,"min",this.formGroup.get("startDate").enabled)}get endDateMinShown(){return Qe(this.endDateIso,this.endDateMinIso,"min",this.formGroup.get("endDate").enabled)}get endDateMaxShown(){return Qe(this.endDateIso,this.endDateMaxIso,"max",this.formGroup.get("endDate").enabled)}dateChecked(e){return e.enabled&&(this.submitted||e.dirty||e.touched)}get startDateLocked(){return this.formGroup.get("startDate").disabled}get endDateLocked(){return this.formGroup.get("endDate").disabled}get startDateError(){return this.dateRequiredError(this.formGroup.get("startDate"),"Start date is required.")}get endDateError(){return this.dateRequiredError(this.formGroup.get("endDate"),"End date is required.")}dateRequiredError(e,t){return e.hasError("required")&&this.dateChecked(e)?t:""}onStartDatePicked(e){let t=De(e);this.writeDate(this.formGroup.get("startDate"),t),this.isStartDateEqualEventDate=!1,this.reportCanSubmit(),t&&this.changedate()}onEndDatePicked(e){this.endDateModel=De(e),this.writeDate(this.formGroup.get("endDate"),this.endDateModel)}writeDate(e,t){e.setValue(t),e.markAsDirty(),e.markAsTouched()}static{this.\u0275fac=function(t){return new(t||i)(w(fe),w(X),w(zt),w($n),w(Et),w(ke),w(Lt))}}static{this.\u0275cmp=P({type:i,selectors:[["app-form-detail"]],inputs:{ev:"ev",section:"section",isLoading:"isLoading"},outputs:{save:"save",canSubmitChange:"canSubmitChange"}
1,decls:5,vars:4,consts:[["nameField",""],["timezoneField",""],["timezoneLabelField",""],["dateFormatField",""],["timeFormatField",""],["currencyField",""],["languageField",""],["welcomeField",""],["tabPrefixField",""],["eventTypeField",""],["contactEmailField",""],["firebaseProjectField",""],["firebaseSecretField",""],["socialField",""],[3,"ngSubmit","formGroup"],[1,"form-grid"],["tone","danger",1,"span-2"],["label","Name","controlId","eventName",1,"span-2",3,"required","error"],["cnpInput","","id","eventName","formControlName","name","required",""],[1,"span-2"],["name","location","label","Location","placeholder","Search for a city or country","help","The city and/or country where the event will be held",3,"group"],[3,"valueChange","label","help","disabled","value","min","error"],[3,"valueChange","label","help","disabled","value","min","max","error"],["label","Timezone","controlId","eventTimezone",3,"hint"],["controlId","eventTimezone","placeholder","Search time zones",3,"picked","options","value","describedBy"],["label","Timezone abbreviation","controlId","eventTimezoneAbbr",3,"required","error"],["cnpInput","","id","eventTimezoneAbbr","placeholder","","type","text","formControlName","timezoneLabel","required","","readonly",""],["label","Date format","controlId","eventDateFmt",3,"required","error"],["cnpInput","","id","eventDateFmt","formControlName","dateformat","required",""],[3,"value"],["label","Agenda time format","controlId","agendaTimeFmt",3,"required","error"],["cnpInput","","id","agendaTimeFmt","formControlName","agendaTimeFormat","required",""],["label","Primary currency","controlId","eventPrimaryCurrency",3,"required","error"],["cnpInput","","id","eventPrimaryCurrency","formControlName","primaryCurrency","required",""],["label","Event language","controlId","eventLanguage","help","Set the default language for your event."],["cnpInput","","id","eventLanguage","formControlName","eventLanguage"],[1,"field-block"],[1,"field-label"],["label","Platform access","text","Select the platforms where your event will be accessible."],["ariaLabel","Platform access",3,"valueChange","segments","value"],["ariaLabel","Appearance",3,"valueChange","segments","value"],["alt","Theme preview",1,"theme-preview",3,"src"],["label","Welcome banner text","controlId","eventWelcomeBannerText","help","Welcome your attendees with a message displayed over your default event banner on the homepage. Only visible if no session highlight is shown.",1,"span-2"],["cnpInput","","id","eventWelcomeBannerText","formControlName","welcomeBannerText"],["label","Browser tab prefix","controlId","eventTabPrefix","help","Added before the event name in the browser tab title (e.g. 'MyPrefix - Event Name'). Leave empty to show only the event name.",1,"span-2"],["cnpInput","","id","eventTabPrefix","formControlName","tab"],["label","Event type","controlId","eventType",3,"required","error"],["cnpInput","","id","eventType","formControlName","eventType","required",""],["label","Contact email","controlId","eventContactEmail",3,"error"],["cnpInput","","id","eventContactEmail","formControlName","contactEmail"],[1,"form-subheading","span-2"],["label","Firebase configuration","text","Required configuration in order to send native push notifications. Super admin only visible field."],["label","Project ID","controlId","eventFirebaseProjectId"],["cnpInput","","id","eventFirebaseProjectId","formControlName","firebaseProjectId","placeholder",""],["label","Secret key","controlId","eventFirebaseSecretKey"],["cnpInput","","id","eventFirebaseSecretKey","formControlName","firebaseSecretKey","placeholder",""],[3,"label","controlId"],["cnpInput","",3,"id","formControlName","placeholder"],["cnpFieldSuffix","","variant","secondary",1,"field-action",3,"click","ariaLabel"]],template:function(t,n){t&1&&(r(0,"form",14),h("ngSubmit",function(){return n.formSubmit()}),r(1,"div",15),f(2,zc,51,43),f(3,Rc,1,1),f(4,Uc,2,0,"cnp-callout",16),a()()),t&2&&(u("formGroup",n.formGroup),s(2),v(n.section?-1:2),s(),v(!n.section||n.section==="socialMedia"?3:-1),s(),v(n.hasError&&!n.isStartDateEqualEventDate?4:-1))},dependencies:[z,ae,it,ot,_e,nt,oe,te,En,re,Ee,Lo,V,ue,ct,ze,pe,ye,ce,de,Yn],styles:[".dialog-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-5)}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6)}@media (width <= 768px){.form-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.span-2[_ngcontent-%COMP%]{grid-column:1/-1}.field-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-1);min-width:0}.field-block[_ngcontent-%COMP%] > cnp-segmented[_ngcontent-%COMP%], .field-block[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{align-self:flex-start}.field-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--cnp-space-1);font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.field-action[_ngcontent-%COMP%]{flex:none;margin-inline-start:var(--cnp-space-2);white-space:nowrap}cnp-combobox[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.theme-preview[_ngcontent-%COMP%]{max-width:100%;margin-top:var(--cnp-space-1);border-radius:var(--cnp-radius-element)}.choice-group[_ngcontent-%COMP%]{min-width:0;margin:0;padding:0;border:0}.choice-legend[_ngcontent-%COMP%]{float:none;width:auto;margin:0 0 var(--cnp-space-1);padding:0;font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.choice-hint[_ngcontent-%COMP%]{margin:0 0 var(--cnp-space-2);font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.choice-hint.is-required[_ngcontent-%COMP%]{color:var(--cnp-color-danger-fg)}.choice-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-3);padding:var(--cnp-space-4);border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-element)}.form-subheading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--cnp-space-1);margin:var(--cnp-space-3) 0 0;padding-bottom:var(--cnp-space-2);font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-heading);border-bottom:1px solid var(--cnp-color-border-subtle)}.form-subheading.is-first[_ngcontent-%COMP%]{margin-top:0}"]})}}return i})();function $c(i,c){if(i&1){let e=y();r(0,"app-form-detail",4),h("save",function(n){g(e);let o=l();return _(o.onSave(n))})("canSubmitChange",function(n){g(e);let o=l();return _(o.canSave=n)}),a()}if(i&2){let e=l();u("ev",e.data)("section",e.section)("isLoading",e.isLoading)}}var bn=(()=>{class i{get heading(){return this.section==="socialMedia"?"Update social media":"Update details"}openWith(e,t=""){this.data=e,this.section=t,this.hasSaveError=!1,this.canSave=!1,this.open=!0}close(){this.open=!1}get writeActive(){return this.isLoading}constructor(e,t,n){this.settingService=e,this.eventService=t,this.utilities=n,this.data=null,this.section="",this.saved=new T,this.open=!1,this.canSave=!1,this.hasSaveError=!1,this.isLoading=!1}onSave(e){return b(this,null,function*(){if(this.isLoading)return;this.isLoading=!0;let t;try{t=yield this.eventService.update(x(x({},this.data),e))}catch(n){console.debug("Failed to update event details",n),t=null}finally{this.isLoading=!1}t?.success?(this.hasSaveError=!1,this.open=!1,this.saved.emit(t.data)):(this.hasSaveError=!0,this.utilities.alert({header:"Error",message:t?.message||"Failed to update event details."}))})}
1submitForm(){this.form?.formSubmit()}static{this.\u0275fac=function(t){return new(t||i)(w(W),w(X),w(le))}}static{this.\u0275cmp=P({type:i,selectors:[["app-update-detail"]],viewQuery:function(t,n){if(t&1&&me(Cn,5),t&2){let o;he(o=ge())&&(n.form=o.first)}},inputs:{data:"data",section:"section"},outputs:{saved:"saved"},decls:6,vars:8,consts:[["size","lg",3,"openChange","heading","open","dismissible","showClose"],[3,"ev","section","isLoading"],["cnpModalFooter","","variant","secondary",3,"click","disabled"],["cnpModalFooter","","variant","primary","loadingLabel","Saving",3,"click","disabled","loading"],[3,"save","canSubmitChange","ev","section","isLoading"]],template:function(t,n){t&1&&(r(0,"cnp-modal",0),q("openChange",function(d){return j(n.open,d)||(n.open=d),d}),f(1,$c,1,3,"app-form-detail",1),r(2,"cnp-button",2),h("click",function(){return n.close()}),p(3," Close "),a(),r(4,"cnp-button",3),h("click",function(){return n.submitForm()}),p(5," Save "),a()()),t&2&&(u("heading",n.heading),H("open",n.open),u("dismissible",!1)("showClose",!n.writeActive),s(),v(n.open?1:-1),s(),u("disabled",n.isLoading),s(2),u("disabled",!n.canSave)("loading",n.isLoading))},dependencies:[V,Z,Cn],encapsulation:2})}}return i})();function Hc(i,c){if(i&1&&(r(0,"option",13),p(1),a()),i&2){let e=c.$implicit;u("value",e),s(),E(e)}}function jc(i,c){if(i&1&&(r(0,"cnp-field",8,0)(2,"select",12),R(3,Hc,2,2,"option",13,Fe),a()()),i&2){let e=A(1),t=l(2);s(2),M("aria-describedby",e.controlAttrs().describedBy),s(),U(t.suggestedValues[t.menu.key])}}function qc(i,c){if(i&1&&(r(0,"cnp-field",9,1),S(2,"input",14),a()),i&2){let e=A(1);s(2),M("aria-describedby",e.controlAttrs().describedBy)}}function Wc(i,c){if(i&1){let e=y();r(0,"div",10)(1,"span",15),p(2,"Default event agenda view"),a(),r(3,"cnp-segmented",16),h("valueChange",function(n){g(e);let o=l(2);return _(o.onAgendaDefaultViewPicked(n))}),a()()}if(i&2){let e=l(2);s(3),u("segments",e.agendaViewSegments)("value",e.agendaViewMirror)("saving",e.isSavingAgendaView)}}function Kc(i,c){if(i&1){let e=y();r(0,"div",10)(1,"span",15),p(2," Usage "),S(3,"cnp-help-icon",17),a(),r(4,"cnp-segmented",18),h("valueChange",function(n){g(e);let o=l(2);return _(o.onMobileAccessPicked(n))}),a()()}if(i&2){let e=l(2);s(4),u("segments",e.mobileAccessSegments)("value",e.mobileAccessValue)}}function Qc(i,c){if(i&1){let e=y();r(0,"div",10)(1,"span",15),p(2," Target attendees "),S(3,"cnp-help-icon",19),a(),r(4,"app-target-attendees",20),h("changed",function(n){g(e);let o=l(2);return _(o.onTargetAttendeesChanged(n))}),a()()}if(i&2){let e=l(2);s(4),u("data",e.targetAttendees)("showLabel",!1)("withUpdate",!1)("withEdit",!0)}}function Yc(i,c){i&1&&(r(0,"cnp-callout",11),p(1," There are some errors. Please try to fix the errors above and then click Save again. "),a())}function Zc(i,c){if(i&1){let e=y();r(0,"form",6),h("ngSubmit",function(){g(e);let n=l();return _(n.formSubmit())}),r(1,"div",7),f(2,jc,5,1,"cnp-field",8)(3,qc,3,1,"cnp-field",9),f(4,Wc,4,3,"div",10),f(5,Kc,5,2,"div",10),f(6,Qc,5,4,"div",10),f(7,Yc,2,0,"cnp-callout",11),a()()}if(i&2){let e=l();u("formGroup",e.formGroup),s(2),v(e.suggestedValues[e.menu.key]?2:3),s(2),v(e.menu.key==="generalAgenda"?4:-1),s(),v(e.type==="highlight"&&!e.isGroupChild?5:-1),s(),v(e.isGroupChild?-1:6),s(),v(e.hasError?7:-1)}}var Ka="The default agenda view could not be saved. Please try again.",Qa="Failed to update menu item.",Sn=(()=>{class i{get writeActive(){return this.isLoading||this.isSavingAgendaView}constructor(e,t,n,o){this.formBuilder=e,this.settingService=t,this.util=n,this.toastService=o,this.saved=new T,this.open=!1,this.isGroupChild=!1,this.hasError=!1,this.isLoading=!1,this.suggestedValues={},this.otherFeatures={agendaDefaultView:"list"},this.targetAttendees=[],this.mobileMenuAccesOptions=[{value:"both",viewValue:"Both"},{value:"highlight",viewValue:"Highlight"},{value:"sidebar",viewValue:"Sidebar"}],this.mobileAccessSegments=this.mobileMenuAccesOptions.map(d=>({value:d.value,label:d.viewValue})),this.agendaViewSegments=[{value:"list",label:"List"},{value:"calendar",label:"Calendar"}],this.agendaViewMirror=this.otherFeatures.agendaDefaultView,this.isSavingAgendaView=!1,this.loadRequest=0}openWith(e){this.menu=e.menu,this.isGroupChild=e.isGroupChild,this.type=e.type,this.targetAttendees=[],this.hasError=!1,this.buildForm(),this.open=!0}close(){this.open=!1}ngOnInit(){this.menu&&this.buildForm()}
1buildForm(){this.formGroup=this.formBuilder.group({altName:[this.menu.value.altName?this.menu.value.altName:this.menu.value.name==="Home Agenda"?"Home Tab":this.menu.value.name,[]]}),this.type==="highlight"&&this.formGroup.addControl("mobileAccess",this.formBuilder.control(this.menu.value?.mobileAccess||"both")),this.menu.value?.targetAttendees&&(this.targetAttendees=[...this.menu.value.targetAttendees]),this.loadOthers()}formSubmit(){return b(this,null,function*(){if(this.writeActive)return;let e=this.formGroup;if(this.hasError=!e.valid,!this.hasError){this.isLoading=!0;try{let t={name:this.menu.key,altName:e.get("altName").value};if(this.type){t.type="highlight";let o=this.mobileAccessControl;o&&(t.mobileAccess=o.value)}this.targetAttendees&&(t.targetAttendees=this.targetAttendees);let n=yield this.settingService.setMenu(t);if(!n?.success){this.toastService.showDanger("Error",n?.message||Qa);return}this.toastService.showSuccess("Success","Menu item successfully updated."),this.open=!1,this.saved.emit()}catch(t){this.toastService.showDanger("Error",Qa),console.debug("Failed to update menu item",t)}finally{this.isLoading=!1}}})}setOthers(e){return b(this,null,function*(){let t=yield this.settingService.set("other-features",e);t?.success?(this.otherFeatures=x(x({},this.otherFeatures),e),yield this.loadOthers()):this.util.alert({header:"Error",message:t?.message||Ka})})}onAgendaDefaultViewPicked(e){return b(this,null,function*(){this.agendaViewMirror=e,this.isSavingAgendaView=!0;try{yield this.setOthers({agendaDefaultView:e})}catch(t){this.util.alert({header:"Error",message:Ka}),console.debug("Failed to save the default agenda view",t)}finally{this.isSavingAgendaView=!1,this.agendaViewMirror=this.otherFeatures.agendaDefaultView}})}onTargetAttendeesChanged(e){this.targetAttendees=e}get mobileAccessControl(){return this.formGroup?.get("mobileAccess")}get mobileAccessValue(){return this.mobileAccessControl?.value}onMobileAccessPicked(e){let t=this.mobileAccessControl;t?.setValue(e),t?.markAsDirty()}loadOthers(){let e=++this.loadRequest;return this.settingService.getSetting("other-features").then(t=>{e!==this.loadRequest||!t?.data||(this.otherFeatures=x(x({},this.otherFeatures),t.data),this.isSavingAgendaView||(this.agendaViewMirror=this.otherFeatures.agendaDefaultView))})}static{this.\u0275fac=function(t){return new(t||i)(w(fe),w(W),w(le),w(se))}}static{this.\u0275cmp=P({type:i,selectors:[["app-update-menu"]],inputs:{menu:"menu",type:"type",isGroupChild:"isGroupChild"},outputs:{saved:"saved"},features:[Fn([ro])],decls:6,vars:7,consts:[["altNameSelectField",""],["altNameInputField",""],["heading","Update menu item",3,"openChange","open","dismissible","showClose"],[3,"formGroup"],["cnpModalFooter","","variant","secondary",3,"click","disabled"],["cnpModalFooter","","variant","primary","loadingLabel","Saving",3,"click","disabled","loading"],[3,"ngSubmit","formGroup"],[1,"dialog-stack"],["label","Custom label","controlId","altNameSelect","help","The text that will appear in the navigation menu."],["label","Custom label","controlId","altNameInput","help","The text that will appear in the navigation menu."],[1,"field-block"],["tone","danger"],["cnpInput","","id","altNameSelect","formControlName","altName"],[3,"value"],["cnpInput","","id","altNameInput","type","text","formControlName","altName"],[1,"field-label"],["ariaLabel","Default event agenda view",3,"valueChange","segments","value","saving"],["label","Usage","text","Show in which menu type"],["ariaLabel","Menu usage type",3,"valueChange","segments","value"],["label","Target attendees","text","Control who can see this menu item."],[3,"changed","data","showLabel","withUpdate","withEdit"]],template:function(t,n){t&1&&(r(0,"cnp-modal",2),q("openChange",function(d){return j(n.open,d)||(n.open=d),d}),f(1,Zc,8,6,"form",3),r(2,"cnp-button",4),h("click",function(){return n.close()}),p(3," Close "),a(),r(4,"cnp-button",5),h("click",function(){return n.formSubmit()}),p(5," Save "),a()()),t&2&&(H("open",n.open),u("dismissible",!1)("showClose",!n.writeActive),s(),v(n.open?1:-1),s(),u("disabled",n.writeActive),s(2),u("disabled",n.writeActive||!(n.formGroup!=null&&n.formGroup.valid))("loading",n.isLoading))},dependencies:[V,ue,pe,ye,ce,Z,de,$,L,ae,it,ot,_e,nt,oe,te,z,re,Ee,Ie],styles:[".dialog-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-5)}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6)}@media (width <= 768px){.form-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.span-2[_ngcontent-%COMP%]{grid-column:1/-1}.field-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-1);min-width:0}.field-block[_ngcontent-%COMP%] > cnp-segmented[_ngcontent-%COMP%], .field-block[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{align-self:flex-start}.field-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--cnp-space-1);font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.field-action[_ngcontent-%COMP%]{flex:none;margin-inline-start:var(--cnp-space-2);white-space:nowrap}cnp-combobox[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.theme-preview[_ngcontent-%COMP%]{max-width:100%;margin-top:var(--cnp-space-1);border-radius:var(--cnp-radius-element)}.choice-group[_ngcontent-%COMP%]{min-width:0;margin:0;padding:0;border:0}.choice-legend[_ngcontent-%COMP%]{float:none;width:auto;margin:0 0 var(--cnp-space-1);padding:0;font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-secondary)}.choice-hint[_ngcontent-%COMP%]{margin:0 0 var(--cnp-space-2);font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.choice-hint.is-required[_ngcontent-%COMP%]{color:var(--cnp-color-danger-fg)}.choice-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-3);padding:var(--cnp-space-4);border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-element)}"]})}}return i})();var Jc=["customFooterEditor"],Xc=i=>({label:"Name",value:i}),ed=i=>({label:"Event type",value:i}),td=i=>({label:"Platform access",value:i}),nd=i=>({label:"Welcome banner text",value:i}),id=i=>({label:"Browser tab prefix",value:i}),od=i=>({label:"Location",value:i}),ad=i=>({label:"Live date: start",value:i}),rd=i=>({label:"Timezone",value:i}),sd=i=>({label:"Date format",value:i}),ld=i=>({label:"Agenda time-format",value:i}),cd=i=>({label:"Live date: end",value:i}),dd=i=>({label:"Timezone abbreviation",value:i}),pd=i=>({label:"Primary currency",value:i}),ud=i=>({label:"Contact email",value:i}),md=i=>({label:"Event language",value:i}),hd=(i,c)=>[i,!0,!0,"",c],gd=i=>({label:"LinkedIn",value:i}),_d=i=>({label:"X",value:i}),fd=i=>({label:"Facebook",value:i}),vd=i=>({label:"Instagram",value:i}),Cd=i=>({label:"WeChat URL",value:i}),bd=()=>({breaks:!0}),Sd=i=>({markedOptions:i}),ji=(i,c)=>({list:"web",menu:i,index:c}),qi=(i,c)=>({list:"mobile",menu:i,index:c}),wd=(i,c)=>({list:"app",menu:i,index:c}),yd=(i,c)=>c.key;function xd(i,c){if(i&1){let e=y();r(0,"div",16)(1,"span",17),p(2," Event status "),S(3,"cnp-help-icon",20),a(),r(4,"cnp-segmented",21),h("valueChange",function(n){g(e);let o=l(2);return _(o.pickControl("eventStatus",n,o.toggleEventStatus(null,n)))}),a()()}if(i&2){let e=l(2);s(4),u("segments",e.eventStatusSegments)("disabled",e.liveBtnDisabled||e.isControlBusy("eventStatus"))("value",e.controlValue("eventStatus",e.eventStatusValue))}}function Md(i,c){if(i&1){let e=y();r(0,"cnp-button",26),h("click",function(){g(e);let n=l(3);return _(n.duplicateEvent())}),S(1,"cnp-icon",37),p(2," Duplicate event "),a()}}function Fd(i,c){i&1&&p(0),i&2&&je(" ",c," ")}function Ad(i,c){i&1&&(r(0,"span",35),p(1,"(Not set)"),a())}function Ed(i,c){if(i&1&&(r(0,"div",33)(1,"dt"),p(2),a(),r(3,"dd"),f(4,Fd,1,1)(5,Ad,2,0,"span",35),a()()),i&2){let e,t=c.label,n=c.value,o=l(3);s(2),E(t),s(2),v((e=o.detailValue(n))?4:5,e)}}function kd(i,c){i&1&&G(0)}function Td(i,c){if(i&1){let e=y();r(0,"span",34)(1,"span"),p(2),a(),r(3,"cnp-button",38),h("click",function(){g(e);let n=l(3);return _(n.copyEventId())}),S(4,"cnp-icon",37),a()()}i&2&&(s(2),E(c),s(),u("iconOnly",!0))}function Dd(i,c){i&1&&(r(0,"span",35),p(1,"(Not set)"),a())}function Od(i,c){i&1&&G(0)}function Pd(i,c){i&1&&G(0)}function Id(i,c){i&1&&G(0)}function Vd(i,c){i&1&&G(0)}function Ld(i,c){i&1&&G(0)}function zd(i,c){i&1&&G(0)}function Bd(i,c){i&1&&G(0)}function Nd(i,c){i&1&&G(0)}function Rd(i,c){i&1&&G(0)}function Ud(i,c){i&1&&G(0)}function Gd(i,c){i&1&&G(0)}function $d(i,c){if(i&1&&(p(0),Y(1,"dateFormat")),i&2){let e=c;je(" ",ao(1,1,qe(7,hd,e.instant,e.timezone))," ")}}function Hd(i,c){i&1&&(r(0,"span",35),p(1,"Could not be loaded"),a())}
1function jd(i,c){i&1&&(r(0,"span",35),p(1,"(Not set)"),a())}function qd(i,c){if(i&1&&(r(0,"div",33)(1,"dt"),p(2,"Countdown date"),a(),r(3,"dd"),f(4,$d,2,10)(5,Hd,2,0,"span",35)(6,jd,2,0,"span",35),a()()),i&2){let e,t=l(3);s(4),v((e=t.countdownSummary==null?null:t.countdownSummary.stored)?4:t.countdownSummary!=null&&t.countdownSummary.unreadable?5:6,e)}}function Wd(i,c){i&1&&G(0)}function Kd(i,c){if(i&1){let e=y();r(0,"div",40)(1,"cnp-button",41),h("click",function(){g(e);let n=l(4);return _(n.changeOwner())}),p(2,"Change owner"),a(),r(3,"a",42),p(4),Y(5,"registrationCredit"),S(6,"cnp-icon",27),a()()}if(i&2){let e=l(4);s(3),u("href","/account/admin/users/"+e.event.user.PK+"?update=1",K),s(),je(" ",ie(5,2,e.event.user.credits!==void 0?e.event.user.credits:125)," ")}}function Qd(i,c){if(i&1&&(r(0,"div",33)(1,"dt"),p(2,"Owner"),a(),r(3,"dd")(4,"div",39)(5,"span"),p(6),a(),f(7,Kd,7,4,"div",40),a()()()),i&2){let e=l(3);s(6),Ae("",e.event.user.firstName," ",e.event.user.lastName),s(),v(e.userService.profile.superadmin?7:-1)}}function Yd(i,c){i&1&&G(0)}function Zd(i,c){i&1&&G(0)}function Jd(i,c){i&1&&G(0)}function Xd(i,c){i&1&&G(0)}function ep(i,c){i&1&&G(0)}function tp(i,c){i&1&&G(0)}function np(i,c){i&1&&G(0)}function ip(i,c){if(i&1){let e=y();r(0,"section",43)(1,"div",23)(2,"h2",44),p(3,"Social media"),a(),r(4,"div",25)(5,"cnp-button",26),h("click",function(){g(e);let n=l(3);return _(n.updateDetail("socialMedia"))}),S(6,"cnp-icon",27),p(7," Update social media "),a()()(),r(8,"div",30)(9,"dl",31),J(10,Jd,1,0,"ng-container",32)(11,Xd,1,0,"ng-container",32),a(),r(12,"dl",31),J(13,ep,1,0,"ng-container",32)(14,tp,1,0,"ng-container",32),a(),r(15,"dl",31),J(16,np,1,0,"ng-container",32),a()()(),r(17,"app-countdown",45),h("summaryChange",function(n){g(e);let o=l(3);return _(o.countdownSummary=n)}),a()}if(i&2){l();let e=A(14),t=l(2);s(10),u("ngTemplateOutlet",e)("ngTemplateOutletContext",Q(10,gd,t.event.linkedinURL)),s(),u("ngTemplateOutlet",e)("ngTemplateOutletContext",Q(12,_d,t.event.twitterURL)),s(2),u("ngTemplateOutlet",e)("ngTemplateOutletContext",Q(14,fd,t.event.facebookURL)),s(),u("ngTemplateOutlet",e)("ngTemplateOutletContext",Q(16,vd,t.event.instagramURL)),s(2),u("ngTemplateOutlet",e)("ngTemplateOutletContext",Q(18,Cd,t.event.wechatURL))}}function op(i,c){if(i&1){let e=y();r(0,"section",22)(1,"div",23)(2,"h2",24),p(3,"Details"),a(),r(4,"div",25)(5,"cnp-button",26),h("click",function(){g(e);let n=l(2);return _(n.updateDetail())}),S(6,"cnp-icon",27),p(7," Update details "),a(),f(8,Md,3,0,"cnp-button",28),a()(),r(9,"p",29),p(10,"Review the key details of your event"),a(),r(11,"div",30)(12,"dl",31),J(13,Ed,6,2,"ng-template",null,2,sn)(15,kd,1,0,"ng-container",32),r(16,"div",33)(17,"dt"),p(18,"Event ID"),a(),r(19,"dd"),f(20,Td,5,2,"span",34)(21,Dd,2,0,"span",35),a()()(),r(22,"dl",31),J(23,Od,1,0,"ng-container",32),Y(24,"subscriptionLabel"),J(25,Pd,1,0,"ng-container",32),a(),r(26,"dl",31),J(27,Id,1,0,"ng-container",32)(28,Vd,1,0,"ng-container",32),a()(),r(29,"div",36)(30,"dl",31),J(31,Ld,1,0,"ng-container",32)(32,zd,1,0,"ng-container",32),Y(33,"dateFormat"),J(34,Bd,1,0,"ng-container",32)(35,Nd,1,0,"ng-container",32)(36,Rd,1,0,"ng-container",32),a(),r(37,"dl",31),J(38,Ud,1,0,"ng-container",32),Y(39,"dateFormat"),J(40,Gd,1,0,"ng-container",32),Y(41,"timezoneAbbrev"),f(42,qd,7,1,"div",33),J(43,Wd,1,0,"ng-container",32),a(),r(44,"dl",31),f(45,Qd,8,3,"div",33),J(46,Yd,1,0,"ng-container",32)(47,Zd,1,0,"ng-container",32),a()()(),f(48,ip,18,20)}if(i&2){let e,t=A(14),n=l(2);s(8),v((n.event==null?null:n.event.url)!=="canapii-playground-demo"&&!n.event.isDemoEvent?8:-1),s(7),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(46,Xc,n.event.name)),s(5),v((e=n.detailValue(n.event.url))?20:21,e),s(3),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(48,ed,ie(24,35,n.event==null?null:n.event.eventType))),s(2),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(50,td,n.platformAccessLabel(n.event==null?null:n.event.platformAccess))),s(2),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(52,nd,(n.event==null?null:n.event.welcomeBannerText)!==null?n.event==null?null:n.event.welcomeBannerText:"Welcome "+(n.event!=null&&n.event.name?"to "+(n.event==null?null:n.event.name):""))),s(),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(54,id,n.event==null?null:n.event.tab)),s(3),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(56,od,n.event==null||n.event.location==null?null:n.event.location.formattedLocation)),s(),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(58,ad,tt(33,37,n.event.startDateDisplay,n.event.dateformat))),s(2),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(60,rd,n.event.timezone)),s(),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(62,sd,n.event.dateformat)),s(),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(64,ld,n.event.agendaTimeFormat)),s(2),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(66,cd,tt(39,40,n.event.endD
1ateDisplay,n.event.dateformat))),s(2),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(68,dd,tt(41,43,n.event.timezone,n.event.startDateDisplay))),s(2),v(n.hasPaidEventFeatures?42:-1),s(),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(70,pd,n.event.primaryCurrency||"USD")),s(2),v(n.event!=null&&n.event.user?45:-1),s(),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(72,ud,n.event.contactEmail)),s(),u("ngTemplateOutlet",t)("ngTemplateOutletContext",Q(74,md,n.getPreferredLanguageDisplay())),s(),v(n.hasPaidEventFeatures?48:-1)}}function ap(i,c){if(i&1){let e=y();r(0,"div",9)(1,"div",15),f(2,xd,5,3,"div",16),r(3,"div",16)(4,"span",17),p(5," Mode "),S(6,"cnp-help-icon",18),a(),r(7,"cnp-segmented",19),h("valueChange",function(n){g(e);let o=l();return _(o.pickControl("eventFormat",n,o.toggleEventFormat(n)))}),a()()(),f(8,op,49,76),a()}if(i&2){let e=l(),t=A(3);u("id",t.panelId("event-settings"))("hidden",e.activeNavId!=="event-settings"),M("aria-labelledby",t.tabId("event-settings")),s(2),v(e.event?2:-1),s(5),u("segments",e.eventModeSegments)("disabled",e.isControlBusy("eventFormat"))("value",e.controlValue("eventFormat",(e.event==null?null:e.event.eventFormat)??"")),s(),v(e.event?8:-1)}}function rp(i,c){if(i&1){let e=y();r(0,"cnp-settings-row",49)(1,"cnp-segmented",101),h("valueChange",function(n){g(e);let o=l(2);return _(o.pickControl("theme",n,o.toggleTheme(n)))}),a()()}if(i&2){let e=l(2);s(),u("segments",e.appearanceSegments)("disabled",e.isControlBusy("theme"))("value",e.controlValue("theme",(e.event==null?null:e.event.theme)??""))}}function sp(i,c){if(i&1&&(r(0,"dl",71)(1,"div",102)(2,"dt"),p(3,"Regular"),a(),r(4,"dd",103),p(5),a()(),r(6,"div",102)(7,"dt"),p(8,"Bold"),a(),r(9,"dd",104),p(10),a()(),r(11,"div",102)(12,"dt"),p(13,"Italic"),a(),r(14,"dd",105),p(15),a()(),r(16,"div",102)(17,"dt"),p(18,"Bold italic"),a(),r(19,"dd",106),p(20),a()()()),i&2){let e=l(2);s(5),E(e.previewText),s(5),E(e.previewText),s(5),E(e.previewText),s(5),E(e.previewText)}}function lp(i,c){if(i&1){let e=y();r(0,"div",72)(1,"cnp-button",26),h("click",function(){g(e);let n=l(2);return _(n.onCancelFontSelect())}),p(2,"Cancel"),a(),r(3,"cnp-button",107),h("click",function(){g(e);let n=l(2);return _(n.onSaveFontSelect())}),p(4,"Save changes"),a()()}}function cp(i,c){if(i&1&&S(0,"img",120),i&2){let e=l(3);u("src",e.event.logo,K)}}function dp(i,c){i&1&&S(0,"cnp-icon",121)}function pp(i,c){if(i&1&&S(0,"img",124),i&2){let e=l(3);u("src",e.event.meetingLogo,K)}}function up(i,c){i&1&&S(0,"cnp-icon",121)}function mp(i,c){if(i&1&&S(0,"img",127),i&2){let e=l(3);u("src",e.otherFeatures.backgroundImage,K)}}function hp(i,c){i&1&&S(0,"cnp-icon",121)}function gp(i,c){if(i&1&&S(0,"img",130),i&2){let e=l(3);u("src",e.event.bannerEmail,K)}}function _p(i,c){i&1&&S(0,"cnp-icon",121)}function fp(i,c){if(i&1&&S(0,"img",133),i&2){let e=l(3);u("src",e.event.banner,K)}}function vp(i,c){i&1&&S(0,"cnp-icon",121)}function Cp(i,c){if(i&1){let e=y();r(0,"div",76)(1,"div",108)(2,"div",109),S(3,"img",110),a(),r(4,"div",111)(5,"span",112),p(6,"Favicon"),a(),r(7,"span",113),p(8,"32 x 32"),a()(),r(9,"div",114),S(10,"cnp-help-icon",115),r(11,"cnp-button",116),h("click",function(){g(e);let n=l(2);return _(n.changePhoto("favicon"))}),S(12,"cnp-icon",117),p(13," Upload "),a(),r(14,"cnp-button",118),h("click",function(){g(e);let n=l(2);return _(n.deleteImage(n.event,"favicon"))}),S(15,"cnp-icon",119),a()()(),r(16,"div",108)(17,"div",109),f(18,cp,1,1,"img",120)(19,dp,1,0,"cnp-icon",121),a(),r(20,"div",111)(21,"span",112),p(22,"Logo"),a(),r(23,"span",113),p(24,"194 x 48"),a()(),r(25,"div",114),S(26,"cnp-help-icon",122),r(27,"cnp-button",116),h("click",function(){g(e);let n=l(2);return _(n.changePhoto("logo"))}),S(28,"cnp-icon",117),p(29," Upload "),a(),r(30,"cnp-button",123),h("click",function(){g(e);let n=l(2);return _(n.deleteImage(n.event,"logo"))}),S(31,"cnp-icon",119),a()()(),r(32,"div",108)(33,"div",109),f(34,pp,1,1,"img",124)(35,up,1,0,"cnp-icon",121),a(),r(36,"div",111)(37,"span",112),p(38,"Meeting logo"),a(),r(39,"span",113),p(40,"256 x 256"),a()(),r(41,"div",114),S(42,"cnp-help-icon",125),r(43,"cnp-button",116),h("click",function(){g(e);let n=l(2);return _(n.changePhoto("meetingLogo","meeting logo"))}),S(44,"cnp-icon",117),p(45," Upload "),a(),r(46,"cnp-button",126),h("click",function(){g(e);let n=l(2);return _(n.deleteImage(n.event,"meetingLogo"))}),S(47,"cnp-icon",119),a()()(),r(48,"div",108)(49,"div",109),f(50,mp,1,1,"img",127)(51,hp,1,0,"cnp-icon",121),a(),r(52,"div",111)(53,"span",112),p(54,"Backgroun
1d image"),a(),r(55,"span",113),p(56,"1920 x 1080"),a()(),r(57,"div",114),S(58,"cnp-help-icon",128),r(59,"cnp-button",116),h("click",function(){g(e);let n=l(2);return _(n.changePhoto("backgroundImage","background image"))}),S(60,"cnp-icon",117),p(61," Upload "),a(),r(62,"cnp-button",129),h("click",function(){g(e);let n=l(2);return _(n.deleteImage(n.event,"other-features"))}),S(63,"cnp-icon",119),a()()(),r(64,"div",108)(65,"div",109),f(66,gp,1,1,"img",130)(67,_p,1,0,"cnp-icon",121),a(),r(68,"div",111)(69,"span",112),p(70,"Email banner"),a(),r(71,"span",113),p(72,"750 x 120"),a()(),r(73,"div",114),S(74,"cnp-help-icon",131),r(75,"cnp-button",116),h("click",function(){g(e);let n=l(2);return _(n.changePhoto("bannerEmail","email banner"))}),S(76,"cnp-icon",117),p(77," Upload "),a(),r(78,"cnp-button",132),h("click",function(){g(e);let n=l(2);return _(n.deleteImage(n.event,"bannerEmail"))}),S(79,"cnp-icon",119),a()()(),S(80,"app-login-banner"),r(81,"div",108)(82,"div",109),f(83,fp,1,1,"img",133)(84,vp,1,0,"cnp-icon",121),a(),r(85,"div",111)(86,"span",112),p(87,"Event banner"),a(),r(88,"span",113),p(89,"1942 x 538"),a()(),r(90,"div",114),S(91,"cnp-help-icon",134),r(92,"cnp-button",116),h("click",function(){g(e);let n=l(2);return _(n.changePhoto("banner"))}),S(93,"cnp-icon",117),p(94," Upload "),a(),r(95,"cnp-button",135),h("click",function(){g(e);let n=l(2);return _(n.deleteImage(n.event,"banner"))}),S(96,"cnp-icon",119),a()(),r(97,"div",136)(98,"span",137),p(99,"Display the banner on the home page."),a(),r(100,"cnp-toggle",138),h("toggled",function(n){g(e);let o=l(2);return _(o.pickControl("enableBanner",n,o.updateBannerVisibility(n)))}),a()()()()}if(i&2){let e=l(2);s(3),u("src",(e.event==null?null:e.event.favicon)||"favicon.ico",K),s(11),u("iconOnly",!0)("disabled",!(e.event!=null&&e.event.favicon)),s(4),v(e.event!=null&&e.event.logo?18:19),s(12),u("iconOnly",!0)("disabled",!(e.event!=null&&e.event.logo)),s(4),v(e.event!=null&&e.event.meetingLogo?34:35),s(12),u("iconOnly",!0)("disabled",!(e.event!=null&&e.event.meetingLogo)),s(4),v(e.otherFeatures!=null&&e.otherFeatures.backgroundImage?50:51),s(12),u("iconOnly",!0)("disabled",!(e.otherFeatures!=null&&e.otherFeatures.backgroundImage)),s(4),v(e.event!=null&&e.event.bannerEmail?66:67),s(12),u("iconOnly",!0)("disabled",!(e.event!=null&&e.event.bannerEmail)||(e.event==null?null:e.event.bannerEmail)===e.defaultImages.bannerEmail),s(5),v(e.event!=null&&e.event.banner?83:84),s(12),u("iconOnly",!0)("disabled",!(e.event!=null&&e.event.banner)||(e.event==null?null:e.event.banner)===e.defaultImages.banner),s(5),u("checked",e.controlValue("enableBanner",!!(e.event!=null&&e.event.enableBanner)))("saving",e.isEnableBannerLoading)("disabled",e.isEnableBannerLoading)}}function bp(i,c){if(i&1){let e=y();r(0,"li",80)(1,"span",139),p(2),a(),r(3,"cnp-toggle",140),h("toggled",function(n){let o=g(e).$implicit,d=l(2);return _(d.pickControl("about:"+o.key,n,d.toggleStatus(n,o.key)))}),a(),r(4,"cnp-button",41),h("click",function(){let n=g(e).$implicit,o=l(2);return _(o.updateAboutPrivacy(n))}),S(5,"cnp-icon",27),p(6," Update "),a()()}if(i&2){let e=c.$implicit,t=l(2);s(2),E(e.value.name),s(),u("ariaLabel","Show "+e.value.name)("checked",t.controlValue("about:"+e.key,!!e.value.visible))("saving",t.isControlBusy("about:"+e.key))("disabled",t.isControlBusy("about:"+e.key))}}function Sp(i,c){if(i&1){let e=y();r(0,"app-color-picker",141),h("saveColor",function(n){g(e);let o=l(2);return _(o.onCustomFooterColor("bgColor",n))})("resetColor",function(){g(e);let n=l(2);return _(n.onCustomFooterColor("bgColor",""))}),a()}if(i&2){let e=l(2);u("defaultColor","")("selectedColor",e.customFooterBgColor)("enableReset",!0)}}function wp(i,c){if(i&1){let e=y();r(0,"app-color-picker",141),h("saveColor",function(n){g(e);let o=l(2);return _(o.onCustomFooterColor("fontColor",n))})("resetColor",function(){g(e);let n=l(2);return _(n.onCustomFooterColor("fontColor",""))}),a()}if(i&2){let e=l(2);u("defaultColor","")("selectedColor",e.customFooterFontColor)("enableReset",!0)}}function yp(i,c){if(i&1){let e=y();r(0,"div",9)(1,"section",46)(2,"div",23)(3,"h2",47),p(4,"Theme"),a()(),r(5,"div",48),f(6,rp,2,3,"cnp-settings-row",49),r(7,"cnp-settings-row",50)(8,"cnp-toggle",51),h("toggled",function(n){g(e);let o=l();return _(o.pickControl("allowAttendeeThemeToggle",n,o.setOthers({allowAttendeeThemeToggle:n},"Theme toggle")))}),a()()(),r(9,"h3",52),p(10,"Colors"),a(),r(11,"div",48)(12,"cnp-settings-row",53)(13,"div",54)(14,"app-color-picker",55),h("saveColor",function(n){g(e);let o=l();return _(o.saveCustomColor(n,"primary"))})("resetColor",function(){g(e);let n=l();return _(n.resetBrandingColor("primary"))}),a()()(),r(15,"cnp-settings-row",56)(16,"div",57)(17,"app-color-picker",55),h("saveColor",function(n){g(e);let o=l();return _(o.saveCustomColor(n,"secondary"))})("resetColor",function(){g(e);let n=l();return _(n.resetBrandingColor("secondary"))}),a()()()(),r(18,"h3",52),p(19,"Navigation bar"),a(),r(20,"div",48)(21,"cnp-settings-row",58)(22,"div",59)(23,"app-color-picker",55),h("saveColor",function(n){g(e);let o=l();
1return _(o.saveCustomNavbarColor(n,"navbar"))})("resetColor",function(){g(e);let n=l();return _(n.resetNavbarColor("navbar"))}),a()()(),r(24,"cnp-settings-row",60)(25,"div",61)(26,"app-color-picker",55),h("saveColor",function(n){g(e);let o=l();return _(o.saveCustomNavbarColor(n,"navbarText"))})("resetColor",function(){g(e);let n=l();return _(n.resetNavbarColor("navbarText"))}),a()()(),r(27,"cnp-settings-row",62)(28,"cnp-toggle",63),h("toggled",function(n){g(e);let o=l();return _(o.pickControl("enableBackground",n,o.setOthers({enableBackground:n},"Interactive tab background")))}),a()()()(),r(29,"section",64)(30,"div",23)(31,"h2",65),p(32,"Font"),a()(),r(33,"div",66)(34,"div",48)(35,"cnp-field",67,3)(37,"cnp-combobox",68),h("picked",function(n){g(e);let o=l();return _(o.onFontPicked(n))}),a()(),r(38,"cnp-field",69,4)(40,"input",70),q("ngModelChange",function(n){g(e);let o=l();return j(o.previewText,n)||(o.previewText=n),_(n)}),a()(),f(41,sp,21,4,"dl",71),f(42,lp,5,0,"div",72),a(),S(43,"app-custom-font",73),a()(),r(44,"section",74)(45,"div",23)(46,"h2",75),p(47,"Images"),a()(),f(48,Cp,101,21,"div",76),a(),r(49,"section",77)(50,"div",23)(51,"h2",78),p(52,"About us & privacy notice"),a()(),r(53,"ul",79),R(54,bp,7,5,"li",80,yd),Y(56,"keyvalue"),a()(),r(57,"section",81)(58,"div",23)(59,"h2",82),p(60,"Custom footer"),a()(),r(61,"p",29),p(62,"Optional footer rendered on selected attendee pages."),a(),r(63,"div",48)(64,"div",83)(65,"span",84),p(66,"Footer text"),a(),S(67,"app-markdown-editor",85,5),a(),r(69,"div",66)(70,"fieldset",86)(71,"legend",87),p(72,"Pages"),a(),r(73,"cnp-checkbox",88),h("changed",function(n){g(e);let o=l();return _(o.setCustomFooterPage("all",n))}),a(),r(74,"cnp-checkbox",89),h("changed",function(n){g(e);let o=l();return _(o.setCustomFooterPage("home",n))}),a(),r(75,"cnp-checkbox",90),h("changed",function(n){g(e);let o=l();return _(o.setCustomFooterPage("sponsors",n))}),a()(),r(76,"div",48)(77,"div",91)(78,"span",92),p(79,"Background color"),a(),f(80,Sp,1,3,"app-color-picker",93),a(),r(81,"div",94)(82,"span",95),p(83,"Font color"),a(),f(84,wp,1,3,"app-color-picker",93),a()()(),r(85,"div",96)(86,"app-font-size-slider",97),h("updateSize",function(n){g(e);let o=l();return _(o.onCustomFooterFontSize(n))}),a()(),r(87,"div",98)(88,"span",87),p(89,"Preview"),a(),S(90,"div",99),Y(91,"markdown"),Y(92,"async"),a(),r(93,"div",72)(94,"cnp-button",100),h("click",function(){g(e);let n=l();return _(n.saveCustomFooter())}),p(95," Save footer "),a()()()()()}if(i&2){let e=A(36),t=A(39),n=l(),o=A(3);u("id",o.panelId("branding"))("hidden",n.activeNavId!=="branding"),M("aria-labelledby",o.tabId("branding")),s(6),v(n.event?6:-1),s(2),u("checked",n.controlValue("allowAttendeeThemeToggle",!!(n.otherFeatures!=null&&n.otherFeatures.allowAttendeeThemeToggle)))("saving",n.isSettingSaving("allowAttendeeThemeToggle"))("disabled",n.isSettingSaving("allowAttendeeThemeToggle")),s(6),u("defaultColor",n.defaultPrimaryColor)("selectedColor",n.primaryColor),s(3),u("defaultColor",n.defaultSecondaryColor)("selectedColor",n.secondaryColor),s(6),u("defaultColor",n.defaultNavbarColor)("selectedColor",n.navbarC
1olor),s(3),u("defaultColor",n.defaultNavbarTextColor)("selectedColor",n.navbarTextColor),s(2),u("checked",n.controlValue("enableBackground",!!(n.otherFeatures!=null&&n.otherFeatures.enableBackground)))("saving",n.isSettingSaving("enableBackground"))("disabled",n.isSettingSaving("enableBackground")),s(9),u("options",n.fontOptions)("value",n.selectedFontValue)("describedBy",e.controlAttrs().describedBy),s(3),H("ngModel",n.previewText),M("aria-describedby",t.controlAttrs().describedBy),s(),v(n.previewText?41:-1),s(),v(n.onSelectingFont?42:-1),s(),u("isPaidUser",n.isPaidUser),s(5),v(n.event?48:-1),s(6),U(ie(56,51,n.aboutPrivacyMenu)),s(3),u("formGroup",n.customFooterForm),s(10),u("editorId","customFooterEditor")("editorOptions",n.customFooterEditorOptions),s(6),u("checked",n.customFooterPage("all").value)("disabled",n.customFooterPage("all").disabled),s(),u("checked",n.customFooterPage("home").value)("disabled",n.customFooterPage("home").disabled),s(),u("checked",n.customFooterPage("sponsors").value)("disabled",n.customFooterPage("sponsors").disabled),s(5),v(n.customFooterLoaded?80:-1),s(4),v(n.customFooterLoaded?84:-1),s(2),u("label","Font size")("min","10")("max","32")("size",n.customFooterForm.get("fontSize").value),s(4),an("background-color",n.customFooterForm.get("bgColor").value||null)("color",n.customFooterForm.get("fontColor").value||null)("font-size",n.customFooterForm.get("fontSize").value||null,"px"),u("innerHTML",ie(92,56,tt(91,53,n.customFooterForm.get("text").value,Q(59,Sd,oo(58,bd)))),eo),s(4),u("loading",n.customFooterSaving)("disabled",n.customFooterForm.pristine||n.customFooterSaving)}}function xp(i,c){if(i&1&&(r(0,"span",154),p(1),a()),i&2){let e=l().$implicit,t=l(3);s(),E(t.descriptions[e.menu]==null?null:t.descriptions[e.menu].sub)}}function Mp(i,c){if(i&1&&(r(0,"span",153)(1,"span"),p(2),a(),f(3,xp,2,1,"span",154),a()),i&2){let e=c.$implicit,t=l(3);s(2),E((t.descriptions[e.menu]==null?null:t.descriptions[e.menu].title)||e.name||e.altName),s(),v(t.descriptions[e.menu]!=null&&t.descriptions[e.menu].sub?3:-1)}}function Fp(i,c){if(i&1){let e=y();r(0,"span",155)(1,"cnp-button",157),h("click",function(){g(e);let n=l().$implicit,o=l(3);return _(o.openCustomMenuItemModal("edit",n))}),S(2,"cnp-icon",27),a(),r(3,"cnp-button",157),h("click",function(){g(e);let n=l().$implicit,o=l(3);return _(o.removeCustomMenuItem(n))}),S(4,"cnp-icon",119),a()()}if(i&2){let e=l().$implicit,t=l(3);s(),u("iconOnly",!0)("ariaLabel","Edit "+e.name)("disabled",t.isRemoving("custom")),s(2),u("iconOnly",!0)("ariaLabel","Remove "+e.name)("disabled",t.isRemoving("custom"))}}function Ap(i,c){i&1&&(r(0,"span",156),p(1,"\u2014"),a())}function Ep(i,c){if(i&1&&f(0,Fp,5,6,"span",155)(1,Ap,2,0,"span",156),i&2){let e=c.$implicit;v(e._isCustom?0:1)}}function kp(i,c){if(i&1){let e=y();r(0,"cnp-toggle",140),h("toggled",function(n){let o=g(e).$implicit,d=l(3);return _(d.pickControl("web:"+d.menuKey(o),n,d.onDesktopToggle(o)))}),a()}if(i&2){let e=c.$implicit,t=l(3);u("ariaLabel","Web access for "+((t.descriptions[e.menu]==null?null:t.descriptions[e.menu].title)||e.name||e.altName))("checked",t.controlValue("web:"+t.menuKey(e),t.isDesktopOn(e)))("saving",t.isControlBusy("web:"+t.menuKey(e)))("disabled",t.isDesktopToggleDisabled(e)||t.isControlBusy("web:"+t.menuKey(e)))}}function Tp(i,c){if(i&1){let e=y();r(0,"cnp-toggle",140),h("toggled",function(n){let o=g(e).$implicit,d=l(3);return _(d.pickControl("mobile:"+d.menuKey(o),n,d.onMobileToggle(o)))}),a()}if(i&2){let e=c.$implicit,t=l(3);u("ariaLabel","Mobile access for "+((t.descriptions[e.menu]==null?null:t.descriptions[e.menu].title)||e.name||e.altName))("checked",t.controlValue("mobile:"+t.menuKey(e),t.isMobileOn(e)))("saving",t.isControlBusy("mobile:"+t.menuKey(e)))("disabled",t.isMobileToggleDisabled(e)||t.isControlBusy("mobile:"+t.menuKey(e)))}}function Dp(i,c){if(i&1){let e=y();r(0,"div",146)(1,"p",29),p(2," Web and Mobile control whether attendees can open each page on that app. A page hidden from the menu can still be opened via direct link while its access is on. "),a(),r(3,"cnp-button",107),h("click",function(){g(e);let n=l(2);return _(n.openCustomMenuItemModal("create"))}),S(4,"cnp-icon",147),p(5," Add menu item "),a()(),r(6,"cnp-table",148),J(7,Mp,4,2,"ng-template",149)(8,Ep,2,1,"ng-template",150)(9,kp,1,4,"ng-template",151)(10,Tp,1,4,"ng-template",152),a()}if(i&2){let e=l(2);s(6),u("columns",e.accessColumns)("rows",e.accessRows)("rowKey",e.menuKey)("loading",e.isLoadingAccess)}}function Op(i,c){i&1&&S(0,"cnp-spinner",164)}
1function Pp(i,c){i&1&&(r(0,"span",174),S(1,"cnp-icon",175),a())}function Ip(i,c){i&1&&G(0)}function Vp(i,c){if(i&1&&J(0,Ip,1,0,"ng-container",32),i&2){let e=l(2),t=e.$implicit,n=e.$index;l(4);let o=A(12);u("ngTemplateOutlet",o)("ngTemplateOutletContext",qe(2,ji,t,n))}}function Lp(i,c){if(i&1){let e=y();r(0,"td")(1,"span",153)(2,"span"),p(3),a(),r(4,"span",154),p(5),a()()(),r(6,"td")(7,"cnp-toggle",140),h("toggled",function(n){g(e);let o=l().$implicit,d=l(4);return _(d.pickControl("webvis:"+d.menuKey(o),n,d.toggleCustomMenuItemVisibility(o,n)))}),a()(),r(8,"td"),p(9),a(),r(10,"td")(11,"app-target-attendees",176),h("changed",function(n){g(e);let o=l().$implicit,d=l(4);return _(d.onCustomItemTargetAttendeesChanged(n,o,"web"))}),a()(),r(12,"td",177)(13,"span",155),f(14,Vp,1,5,"ng-container"),r(15,"cnp-button",178),h("click",function(){g(e);let n=l().$implicit,o=l(4);return _(o.updateMenu(n))}),S(16,"cnp-icon",27),a()()()}if(i&2){let e=l().$implicit,t=l(4);s(3),E(e.name),s(2),E(e.url),s(2),u("ariaLabel","Show "+e.name+" in the web menu")("checked",t.controlValue("webvis:"+t.menuKey(e),!!e.visible))("saving",t.isControlBusy("webvis:"+t.menuKey(e)))("disabled",t.isControlBusy("webvis:"+t.menuKey(e))),s(2),E((e==null?null:e.altName)||(e==null?null:e.name)||""),s(2),u("showLabel",!1)("data",e.targetAttendees)("withUpdate",!1)("withEdit",!1),s(3),v(e.visible?14:-1),s(),u("iconOnly",!0)("ariaLabel","Edit "+e.name)}}function zp(i,c){if(i&1&&(r(0,"span",154),p(1),a()),i&2){let e=l(2).$implicit,t=l(4);s(),E(t.descriptions[e.menu].sub)}}function Bp(i,c){i&1&&G(0)}function Np(i,c){if(i&1&&J(0,Bp,1,0,"ng-container",32),i&2){let e=l(2),t=e.$implicit,n=e.$index;l(4);let o=A(12);u("ngTemplateOutlet",o)("ngTemplateOutletContext",qe(2,ji,t,n))}}function Rp(i,c){if(i&1){let e=y();r(0,"td")(1,"span",153)(2,"span"),p(3),a(),f(4,zp,2,1,"span",154),a()(),r(5,"td")(6,"cnp-toggle",140),h("toggled",function(n){g(e);let o=l().$implicit,d=l(4);return _(d.pickControl("webvis:"+d.menuKey(o),n,d.toggleMenuItemVisibility(o,n)))}),a()(),r(7,"td"),p(8),a(),r(9,"td")(10,"app-target-attendees",176),h("changed",function(n){g(e);let o=l().$implicit,d=l(4);return _(d.updateTargetAttendees(n,o.menu))}),a()(),r(11,"td",177)(12,"span",155),f(13,Np,1,5,"ng-container"),r(14,"cnp-button",178),h("click",function(){g(e);let n=l().$implicit,o=l(4);return _(o.updateMenu(n))}),S(15,"cnp-icon",27),a()()()}if(i&2){let e=l().$implicit,t=l(4);s(3),E((t.descriptions[e.menu]==null?null:t.descriptions[e.menu].title)||e.name),s(),v(t.descriptions[e.menu]!=null&&t.descriptions[e.menu].sub?4:-1),s(2),u("ariaLabel","Show "+((t.descriptions[e.menu]==null?null:t.descriptions[e.menu].title)||e.name)+" in the web menu")("checked",t.controlValue("webvis:"+t.menuKey(e),!!e.visible))("saving",t.isControlBusy("webvis:"+t.menuKey(e)))("disabled",t.isControlBusy("webvis:"+t.menuKey(e))),s(2),je(" ",e.altName?e.altName:t.descriptions[e.menu]?t.descriptions[e.menu].title:e.name," "),s(2),u("showLabel",!1)("data",e==null?null:e.targetAttendees)("withUpdate",!1)("withEdit",!1),s(3),v(e.visible?13:-1),s(),u("iconOnly",!0)("ariaLabel","Edit "+((t.descriptions[e.menu]==null?null:t.descriptions[e.menu].title)||e.name))}}function Up(i,c){if(i&1&&(r(0,"span",154),p(1),a()),i&2){let e=l(2).$implicit;s(),E(e.description)}}function Gp(i,c){i&1&&G(0)}function $p(i,c){if(i&1&&J(0,Gp,1,0,"ng-container",32),i&2){let e=l(2),t=e.$implicit,n=e.$index;l(4);let o=A(12);u("ngTemplateOutlet",o)("ngTemplateOutletContext",qe(2,ji,t,n))}}function Hp(i,c){if(i&1){let e=y();r(0,"td",179)(1,"div",180)(2,"span",153)(3,"span"),p(4),a(),f(5,Up,2,1,"span",154),a(),r(6,"span",181)(7,"app-target-attendees",176),h("changed",function(n){g(e);let o=l().$implicit,d=l(4);return _(d.updateGroupMenuTargetAttendees(n,o))}),a()(),r(8,"cnp-button",182),h("click",function(){g(e);let n=l().$implicit,o=l(4);return _(o.toggleGroup("web",n))}),S(9,"cnp-icon",183),a()(),r(10,"div",184)(11,"app-group-menu",185),h("updatedMenuName",function(n){g(e);let o=l(5);return _(o.updateMenu(n))})("removedMenuItem",function(n){g(e);let o=l(5);return _(o.removeMenuItem(n))})("loadMenuItem",function(){g(e);let n=l(5);return _(n.loadMenu())}),a()()(),r(12,"td",177)(13,"span",155),f(14,$p,1,5,"ng-container"),r(15,"cnp-button",157),h("click",function(){g(e);let n=l().$implicit,o=l(4);return _(o.addMenu(n))}),S(16,"cnp-icon",147),a(),r(17,"cnp-button",157),h("click",function(){g(e);let n=l().$implicit,o=l(4);return _(o.updateGroupMenu(n))}),S(18,"cnp-icon",27),a(),r(19,"cnp-button",157),h("click",function(){g(e);let n=l().$implicit,o=l(4);return _(o.removeGroupMenu(n))}),S(20,"cnp-icon",119),a()()()}if(i&2){let e=l(),t=e.$implicit,n=e.$index,o=l(4);s(4),E(t.name),s(),v(t.description?5:-1),s(2),u("showLabel",!1)("data",t==null?null:t.targetAttendees)("withUpdate",!1)("withEdit",!1),s(),u("iconOnly",!0)("ariaLabel",(o.isGroupExpanded("web",t)?"Collapse ":"Expand ")+t.name)("ariaExpanded",o.isGroupExpanded("web",t))("ariaControl
1s","settings-web-group-"+n),s(),u("name",o.isGroupExpanded("web",t)?"chevron-up":"chevron-down"),s(),u("id","settings-web-group-"+n)("hidden",!o.isGroupExpanded("web",t)),s(),u("menu",t)("editableMenuKeys",o.editableMenuKeys)("descriptions",o.descriptions)("locked",o.isMenuListHeld("web")),s(3),v(t.visible?14:-1),s(),u("iconOnly",!0)("ariaLabel","Add menu to "+t.name)("disabled",o.isMenuListHeld("web")),s(2),u("iconOnly",!0)("ariaLabel","Edit "+t.name)("disabled",o.isMenuListHeld("web")),s(2),u("iconOnly",!0)("ariaLabel","Remove "+t.name)("disabled",o.isMenuListHeld("web"))}}function jp(i,c){if(i&1&&(r(0,"tr",172)(1,"td",173),f(2,Pp,2,0,"span",174),a(),f(3,Lp,17,14)(4,Rp,16,14)(5,Hp,21,27),a()),i&2){let e=c.$implicit,t=l(4);ne("is-busy",t.isEventMenuSortLoading),u("cdkDragDisabled",t.isEventMenuDragAndDropDisabled||t.isEventMenuSortLoading||t.isRemoving("web")),s(2),v(e.visible?2:-1),s(),v(e._isCustom?3:t.isPaidEligible(e)&&!e.items?4:e.items?5:-1)}}function qp(i,c){if(i&1){let e=y();r(0,"div",72)(1,"cnp-button",26),h("click",function(){g(e);let n=l(4);return _(n.onCancelEventMenuListDrop())}),p(2,"Cancel"),a(),r(3,"cnp-button",107),h("click",function(){g(e);let n=l(4);return _(n.onSaveEventMenuListDrop())}),p(4,"Save changes"),a()()}}function Wp(i,c){if(i&1){let e=y();r(0,"div",158)(1,"cnp-button",159),h("click",function(){g(e);let n=l(3);return _(n.addGroupMenu("add"))}),S(2,"cnp-icon",147),p(3," Create a group menu "),a()(),r(4,"div",160)(5,"table",161)(6,"thead")(7,"tr")(8,"th",162)(9,"span",163),p(10,"Reorder"),a(),f(11,Op,1,0,"cnp-spinner",164),a(),r(12,"th",165),p(13,"Default label"),a(),r(14,"th",165)(15,"span",166),p(16," Visibility "),S(17,"cnp-help-icon",167),a()(),r(18,"th",165),p(19,"Custom label"),a(),r(20,"th",165)(21,"span",166),p(22," Target attendees "),S(23,"cnp-help-icon",168),a()(),r(24,"th",169),p(25,"Actions"),a()()(),r(26,"tbody",170),h("cdkDropListDropped",function(n){g(e);let o=l(3);return _(o.onEventMenuListDrop(n))}),R(27,jp,6,5,"tr",171,Fe),a()()(),f(29,qp,5,0,"div",72)}if(i&2){let e=l(3);s(),u("disabled",e.isMenuListHeld("web")),s(10),v(e.isEventMenuSortLoading?11:-1),s(15),u("cdkDropListData",e.shownMenuRows("web")),s(),U(e.shownMenuRows("web")),s(2),v(e.isSortingEventMenuList?29:-1)}}function Kp(i,c){if(i&1&&f(0,Wp,30,4),i&2){let e=l(2);v(e.eventMenu?0:-1)}}function Qp(i,c){i&1&&S(0,"cnp-spinner",164)}function Yp(i,c){i&1&&(r(0,"span",174),S(1,"cnp-icon",175),a())}function Zp(i,c){i&1&&G(0)}function Jp(i,c){if(i&1&&J(0,Zp,1,0,"ng-container",32),i&2){let e=l(2),t=e.$implicit,n=e.$index;l(4);let o=A(12);u("ngTemplateOutlet",o)("ngTemplateOutletContext",qe(2,qi,t,n))}}function Xp(i,c){if(i&1){let e=y();r(0,"td")(1,"span",153)(2,"span"),p(3),a(),r(4,"span",154),p(5),a()()(),r(6,"td")(7,"cnp-toggle",140),h("toggled",function(n){g(e);let o=l().$implicit,d=l(4);return _(d.pickControl("mobilevis:"+d.menuKey(o),n,d.toggleCustomMenuItemVisibility(o,n,!0)))}),a()(),r(8,"td"),p(9),a(),r(10,"td")(11,"app-target-attendees",176),h("changed",function(n){g(e);let o=l().$implicit,d=l(4);return _(d.onCustomItemTargetAttendeesChanged(n,o,"mobile"))}),a()(),r(12,"td"),p(13),a(),r(14,"td",177)(15,"span",155),f(16,Jp,1,5,"ng-container"),r(17,"cnp-button",178),h("click",function(){g(e);let n=l().$implicit,o=l(4);return _(o.updateMenu(n,!0))}),S(18,"cnp-icon",27),a()()()}if(i&2){let e=l().$implicit,t=l(4);s(3),E(e.name),s(2),E(e.url),s(2),u("ariaLabel","Show "+e.name+" in the mobile app menu")("checked",t.controlValue("mobilevis:"+t.menuKey(e),!!e.visible))("saving",t.isControlBusy("mobilevis:"+t.menuKey(e)))("disabled",t.isControlBusy("mobilevis:"+t.menuKey(e))),s(2),E((e==null?null:e.altName)||(e==null?null:e.name)||""),s(2),u("showLabel",!1)("data",e.targetAttendees)("withUpdate",!1)("withEdit",!1),s(2),E(t.getMobileMenuAccessLabel(e.mobileAccess)),s(3),v(e.visible?16:-1),s(),u("iconOnly",!0)("ariaLabel","Edit "+e.name)}}function eu(i,c){if(i&1&&(r(0,"span",154),p(1),a()),i&2){let e=l(2).$implicit,t=l(4);s(),E(t.descriptions[e.menu]==null?null:t.descriptions[e.menu].sub)}}function tu(i,c){i&1&&G(0)}function nu(i,c){if(i&1&&J(0,tu,1,0,"ng-container",32),i&2){let e=l(2),t=e.$implicit,n=e.$index;l(4);let o=A(12);u("ngTemplateOutlet",o)("ngTemplateOutletContext",qe(2,qi,t,n))}}function iu(i,c){if(i&1){let e=y();r(0,"td")(1,"span",153)(2,"span"),p(3),a(),f(4,eu,2,1,"span",154),a()(),r(5,"td")(6,"cnp-toggle",140),h("toggled",function(n){g(e);let o=l().$implicit,d=l(4);return _(d.pickControl("mobilevis:"+d.menuKey(o),n,d.toggleMenuItemVisibility(o,n,!0)))}),a()(),r(7,"td"),p(8),a(),r(9,"td")(10,"app-target-attendees",176),h("changed",function(n){g(e);let o=l().$implicit,d=l(4);return _(d.updateHighlightTargetAttendees(n,o.menu))}),a()(),r(11,"td"),p(12),a(),r(13,"td",177)(14,"span",155),f(15,nu,1,5,"ng-container"),r(16,"cnp-button",178),h("click",function(){g(e);let n=l().$implicit,o=l(4);return _(o.updateMenu(n,!0))}),S(17,"cnp-icon",27),a()()()}if(i&2){let e=l().$implicit,t=l(4);s(3),E((t.descriptions[e.menu]==null?null:t.descriptions[e.menu].title)||e.name),s(),v(t.descriptions[e.menu]!=null&&t.descriptions[e.menu].sub?4:-1),s(2),u("ariaLabel","Show "+((t.descriptions[e.menu]==null?null:t.descriptions[e.menu].title)||e.name)+" in the mobile app menu")("checked",t.controlValue("mobilevis:"+t.menuKey(e),!!e.visible))("saving",t.isControlBusy("mobilevis:"+t.menuKey(e)))("disabled",t.isControlBusy("mobilevis:"+t.menuKey(e))),s(2),je(" ",e.altName?e.altName:t.descriptions[e.menu]?t.descriptions[e.menu]==null?null:t.descriptions[e.menu].title:e.name," "),s(2),u("showLabel",!1)("data",e==null?null:e.targetAttendees)("withUpdate",!1)("withEdit",!1),s(2),E(t.getMobileMenuAccessLabel(e.mobileAccess)),s(3),v(e.visible?15:-1),s(),u("iconOnly",!0)("ariaLabel","Edit "+((t.descriptions[e.menu]==null?null:t.descriptions[e.menu].title)||e.name))}}function ou(i,c){if(i&1&&(r(0,"span",154),p(1),a()),i&2){let e=l(2).$implicit;s(),E(e.description)}}function au(i,c){i&1&&G(0)}function ru(i,c){if(i&1&&J(0,au,1,0,"ng-container",32),i&2){let e=l(2),t=e.$implicit,n=e.$index;l(4);let o=A(12);u("ngTemplateOutlet",o)("ngTemplateOutletContext",qe(2,qi,t,n))}}function su(i,c){if(i&1){let e=y();r(0,"td",199)(1,"div",180)(2,"span",153)(3,"span"),p(4),a(),f(5,ou,2,1,"span",154),a(),r(6,"span",181)(7,"app-target-attendees",176),h("changed",function(n){g(e);let o=l().$implicit,d=l(4);return _(d.updateHighlightGroupMenuTargetAttendees(n,o))}),a()(),r(8,"cnp-button",182),h("click",function(){g(e);let n=l().$implicit,o=l(4);return _(o.toggleGroup("mobile",n))}),S(9,"cnp-icon",183),a()(),r(10,"div",184)(11,"app-group-menu",200),h("updatedMenuName",function(n){g(e);let o=l(5);return _(o.updateMenu(n,!0))})("removedMenuItem",function(n){g(e);let o=l(5);return _(o.removeHighlightMenuItem(n))})("loadHighlightMenuItem",function(){g(e);let n=l(5);return _(n.loadHighlightMenu())}),a()()(),r(12,"td",177)(13,"span",155),f(14,ru,1,5,"ng-container"),r(15,"cnp-button",157),h("click",function(){g(e);let n=l().$implicit,o=l(4);return _(o.addMenu(n,!0))}),S(16,"cnp-icon",147),a(),r(17,"cnp-button",157),h("click",function(){g(e);let n=l().$implicit,o=l(4);return _(o.updateGroupMenu(n,!0))}),S(18,"cnp-icon",27),a(),r(19,"cnp-button",157),h("click",function(){g(e);let n=l().$implicit,o=l(4);return _(o.removeGroupHighlightMenu(n))}),S(20,"cnp-icon",119),a()()()}if(i&2){let e=l(),t=e.$implicit,n=e.$index,o=l(4);s(4),E(t.name),s(),v(t.description?5:-1),s(2),u("showLabel",!1)("data",t==null?null:t.targetAttendees)("withUpdate",!1)("withEdit",!1),s(),u("iconOnly",!0)("ariaLabel",(o.isGroupExpanded("mobile",t)?"Collapse ":"Expand ")+t.name)("ariaExpanded",o.isGroupExpanded("mobile",t))("ariaControl
1s","settings-mobile-group-"+n),s(),u("name",o.isGroupExpanded("mobile",t)?"chevron-up":"chevron-down"),s(),u("id","settings-mobile-group-"+n)("hidden",!o.isGroupExpanded("mobile",t)),s(),u("menu",t)("type","highlight")("editableMenuKeys",o.editableMenuKeys)("descriptions",o.descriptions)("locked",o.isMenuListHeld("mobile")),s(3),v(t.visible?14:-1),s(),u("iconOnly",!0)("ariaLabel","Add menu to "+t.name)("disabled",o.isMenuListHeld("mobile")),s(2),u("iconOnly",!0)("ariaLabel","Edit "+t.name)("disabled",o.isMenuListHeld("mobile")),s(2),u("iconOnly",!0)("ariaLabel","Remove "+t.name)("disabled",o.isMenuListHeld("mobile"))}}function lu(i,c){if(i&1&&(r(0,"tr",172)(1,"td",173),f(2,Yp,2,0,"span",174),a(),f(3,Xp,19,15)(4,iu,18,15)(5,su,21,28),a()),i&2){let e=c.$implicit,t=l(4);ne("is-busy",t.isEventHighlightMenuSortLoading),u("cdkDragDisabled",t.isEventHighlightMenuDragAndDropDisabled||t.isEventHighlightMenuSortLoading||t.isRemoving("mobile")),s(2),v(e.visible?2:-1),s(),v(e._isCustom?3:t.isPaidEligible(e)&&!e.items?4:e.items?5:-1)}}function cu(i,c){if(i&1){let e=y();r(0,"div",72)(1,"cnp-button",26),h("click",function(){g(e);let n=l(4);return _(n.onCancelHighlightMenuListDrop())}),p(2,"Cancel"),a(),r(3,"cnp-button",107),h("click",function(){g(e);let n=l(4);return _(n.onSaveHighlightMenuListDrop())}),p(4,"Save changes"),a()()}}function du(i,c){if(i&1){let e=y();r(0,"div",158)(1,"cnp-button",159),h("click",function(){g(e);let n=l(3);return _(n.addHighlightGroupMenu("add"))}),S(2,"cnp-icon",147),p(3," Create a group menu "),a()(),r(4,"div",160)(5,"table",197)(6,"thead")(7,"tr")(8,"th",162)(9,"span",163),p(10,"Reorder"),a(),f(11,Qp,1,0,"cnp-spinner",164),a(),r(12,"th",165),p(13,"Default label"),a(),r(14,"th",165)(15,"span",166),p(16," Visibility "),S(17,"cnp-help-icon",167),a()(),r(18,"th",165),p(19,"Custom label"),a(),r(20,"th",165)(21,"span",166),p(22," Target attendees "),S(23,"cnp-help-icon",168),a()(),r(24,"th",165)(25,"span",166),p(26," Usage "),S(27,"cnp-help-icon",198),a()(),r(28,"th",169),p(29,"Actions"),a()()(),r(30,"tbody",170),h("cdkDropListDropped",function(n){g(e);let o=l(3);return _(o.onEventHighlightMenuListDropChanges(n))}),R(31,lu,6,5,"tr",171,Fe),a()()(),f(33,cu,5,0,"div",72)}if(i&2){let e=l(3);s(),u("disabled",e.isMenuListHeld("mobile")),s(10),v(e.isEventHighlightMenuSortLoading?11:-1),s(19),u("cdkDropListData",e.shownMenuRows("mobile")),s(),U(e.shownMenuRows("mobile")),s(2),v(e.isSortingHighlightMenuList?33:-1)}}function pu(i,c){i&1&&S(0,"cnp-spinner",164)}function uu(i,c){i&1&&(r(0,"span",174),S(1,"cnp-icon",175),a())}function mu(i,c){if(i&1&&(r(0,"span",154),p(1),a()),i&2){let e=l().$implicit,t=l(4);s(),E(t.descriptions[e.menu]==null?null:t.descriptions[e.menu].sub)}}function hu(i,c){i&1&&G(0)}function gu(i,c){if(i&1){let e=y();r(0,"span",155),J(1,hu,1,0,"ng-container",32),r(2,"cnp-button",205),h("click",function(){g(e);let n=l().$implicit,o=l(4);return _(o.removeMenu(n))}),p(3," Remove "),a()()}if(i&2){let e=l(),t=e.$implicit,n=e.$index,o=l(4),d=A(12);s(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",qe(3,wd,t,n)),s(),u("disabled",o.isMenuListHeld("app"))}}function _u(i,c){i&1&&(r(0,"cnp-status-pill",204),p(1,"Always enabled"),a()),i&2&&u("dot",!0)}function fu(i,c){if(i&1&&(r(0,"tr",172)(1,"td",173),f(2,uu,2,0,"span",174),a(),r(3,"td")(4,"span",153)(5,"span"),p(6),a(),f(7,mu,2,1,"span",154),a()(),r(8,"td",177),f(9,gu,4,6,"span",155)(10,_u,2,1,"cnp-status-pill",204),a()()),i&2){let e=c.$implicit,t=l(4);ne("is-busy",t.isEventAppMenuSortLoading),u("cdkDragDisabled",t.isEventAppMenuDragAndDropDisabled||t.isEventAppMenuSortLoading||t.isRemoving("app")||e.menu==="home"||e.menu==="hamburgermenu"),s(2),v(e.menu!=="home"&&e.menu!=="hamburgermenu"?2:-1),s(4),je(" ",e.altName?e.altName:t.descriptions[e.menu]?t.descriptions[e.menu]==null?null:t.descriptions[e.menu].title:e.name," "),s(),v(t.descriptions[e.menu]&&(t.descriptions[e.menu]!=null&&t.descriptions[e.menu].sub)?7:-1),s(2),v(t.isMenuRowMovable("app",e)?9:10)}}function vu(i,c){if(i&1){let e=y();r(0,"div",72)(1,"cnp-button",26),h("click",function(){g(e);let n=l(4);return _(n.onCancelEventAppMenuListDrop())}),p(2,"Cancel"),a(),r(3,"cnp-button",107),h("click",function(){g(e);let n=l(4);return _(n.onSaveEventAppMenuListDrop())}),p(4,"Save changes"),a()()}}function Cu(i,c){if(i&1){let e=y();r(0,"section",186)(1,"div",23)(2,"h3",201),p(3,"App menu"),a(),r(4,"div",25)(5,"cnp-button",159),h("click",function(){g(e);let n=l(3);return _(n.addAppMenu("add"))}),S(6,"cnp-icon",27),p(7," Update menu "),a()()(),r(8,"div",48)(9,"cnp-callout",202),p(10," Home and menu will always be enabled. Tailor your event with additional app menu options. "),a(),r(11,"div",160)(12,"table",203)(13,"thead")(14,"tr")(15,"th",162)(16,"span",163),p(17,"Reorder"),a(),f(18,pu,1,0,"cnp-spinner",164),a(),r(19,"th",165),p(20,"Menu"),a(),r(21,"th",169),p(22,"Action"),a()()(),r(23,"tbody",170),h("cdkDropListDropped",function(n){g(e);let o=l(3);return _(o.onEventAppMenuListDropChanges(n))}),R(24,fu,11,7,"tr",171,Fe),a()()(),f(26,vu,5,0,"div",72),a()()}if(i&2){let e=l(3);s(5),u("disabled",(e.eventAppMenu==null?null:e.eventAppMenu.length)>=5||e.isMenuListHeld("app")),s(13),v(e.isEventAppMenuSortLoading?18:-1),s(5),u("cdkDropListData",e.shownMenuRows("app")),s(),U(e.shownMenuRows("app")),s(2),v(e.isSortingAppMenuList?26:-1)}}function bu(i,c){if(i&1){let e=y();f(0,du,34,4),r(1,"div",66),f(2,Cu,27,4,"section",186),r(3,"section",187)(4,"div",23)(5,"h3",188),p(6,"Highlight button branding"),a()(),r(7,"div",189)(8,"div",48)(9,"cnp-settings-row",190)(10,"div",191)(11,"app-color-picker",55),h("saveColor",function(n){g(e);let o=l(2);return _(o.saveCustomHighlightColor(n,"button"))})("resetColor",function(){g(e);let n=l(2);return _(n.resetHighlightColor("button"))}),a()()(),r(12,"cnp-settings-row",192)(13,"div",193)(14,"app-color-picker",55),h("saveColor",function(n){g(e);let o=l(2);return _(o.saveCustomHighlightColor(n,"icon"))})("resetColor",function(){g(e);let n=l(2);return _(n.resetHighlightColor("icon"))}),a()()()(),r(15,"div",194)(16,"span",87),p(17,"Example"),a(),r(18,"span",195),S(19,"cnp-icon",196),a()()()()()}if(i&2){let e=l(2);v(e.eventMenu?0:-1),s(2),v(e.eventMenu?2:-1),s(9),u("defaultColor",e.defaultHighlightBtnColor)("selectedColor",e.highlightBtnColor?e.highlightBtnColor:e.defaultHighlightBtnColor),s(3),u("defaultColor",e.defaultHighlightIconColor)("selectedColor",e.highlightIconColor?e.highlightIconColor:e.defaultHighlightIconColor),s(4),an("background",e.highlightBtnColor?e.highlightBtnColor:e.defaultHighlightBtnColor)("color",e.highlightIconColor?e.highlightIconColor:e.defaultHighlightIconColor)}}function Su(i,c){if(i&1){let e=y();r(0,"div",9)(1,"cnp-callout",142),p(2," Access controls whether attendees can open each page on the web and mobile apps. The menu configuration tabs control whether a page appears in the navigation \u2014 a page hidden from the menu can still be opened via direct link while its access is on. Custom menu items with redirect links can be added to enhance navigation. "),a(),r(3,"section",143)(4,"cnp-tabs",144,6),h("activeIdChange",function(n){g(e);let o=l();return _(o.onPagesTabChange(n))}),a(),r(6,"div",145),f(7,Dp,11,4)(8,Kp,1,1)(9,bu,20,10),a()()()}if(i&2){let e,t=A(5),n=l(),o=A(3);u("id",o.panelId("pages"))("hidden",n.activeNavId!=="pages"),M("aria-labelledby",o.tabId("pages")),s(4),u("tabs",n.pagesTabs)("activeId",n.contentNav),s(2),u("id",t.panelId(n.contentNav)),M("aria-labelledby",t.tabId(n.contentNav)),s(),v((e=n.contentNav)==="general"?7:e==="webApp"?8:e==="mobile"?9:-1)}}function wu(i,c){if(i&1&&(r(0,"div",9),S(1,"app-branded-app"),a()),i&2){let e=l(),t=A(3);u("id",t.panelId("branded-app"))("hidden",e.activeNavId!=="branded-app"),M("aria-labelledby",t.tabId("branded-app"))}}function yu(i,c){if(i&1){let e=y();r(0,"div",9)(1,"cnp-callout",206),p(2," Enable or disable features for your event platform. Most changes save as soon as you make them; the ones that are hard to reverse explain what they will do and ask you to confirm first. "),a(),r(3,"app-features-networking",207),h("highlightBannerSpeedChange",function(n){g(e);let o=l();return _(o.highlightBannerSpeed=n)})("secondaryBannerSpeedChange",function(n){g(e);let o=l();return _(o.secondaryBannerSpeed=n)}),a()()}if(i&2){let e=l(),t=A(3);u("id",t.panelId("features-networking"))("hidden",e.activeNavId!=="features-networking"),M("aria-labelledby",t.tabId("features-networking")),s(3),u("otherFeatures",e.otherFeatures)("settingSaving",e.settingSaving)("specialFeatures",e.specialFeatures)("otherSettings",e.otherSettings)("event",e.event)("highlightBannerSpeed",e.highlightBannerSpeed)("secondaryBannerSpeed",e.secondaryBannerSpeed)("descriptions",e.descriptions)("editableMenuKeys",e.editableMenuKeys)("setOthers",e.setOthers.bind(e))("toggleSpecialFeatures2",e.toggleSpecialFeatures2.bind(e))("toggleAllSelfCheckIn",e.toggleAllSelfCheckIn.bind(e))("saveBannerSpeed",e.saveBannerSpeed.bind(e))("toggleAllChats",e.toggleAllChats.bind(e))("setTargetAttendees",e.setTargetAttendees.bind(e))("toggleAllAgendas",e.toggleAllAgendas.bind(e))("toggleAllFilters",e.toggleAllFilters.bind(e))("toggleMenuStatus",e.toggleMenuStatus.bind(e))("updateMenuName",e.updateMenu.bind(e))}}function xu(i,c){if(i&1&&(r(0,"div",9)(1,"cnp-callout",208),p(2," Configure export formats and data reporting options for your event. "),a(),S(3,"app-reporting-settings",209),a()),i&2){let e=l(),t=A(3);u("id",t.panelId("reporting-settings"))("hidden",e.activeNavId!=="reporting-settings"),M("aria-labelledby",t.tabId("reporting-settings")),s(3),u("otherFeatures",e.otherFeatures)("setOthers",e.setOthers)("settingSaving",e.settingSaving)}}function Mu(i,c){if(i&1){let e=y();r(0,"div",9)(1,"cnp-callout",210),p(2," Advanced settings for platform administrators. These features affect core platform functionality. "),a(),r(3,"app-superadmin-settings",211),h("setOthersChange",function(n){g(e);let o=l();return _(o.setOthers(n))})("toggleCentralisedResourcesChange",function(n){g(e);let o=l();return _(o.toggleCentralisedResources(n))})("toggleEventNominationsChange",function(n){g(e);let o=l();return _(o.toggleEventNominations(n))})("toggleUseUnifiedRegistrationChange",function(n){g(e);let o=l();return _(o.toggleUseUnifiedRegistration(n))})("toggleSpecialFeatures2Change",function(n){g(e);let o=l();
1return _(o.toggleSpecialFeatures2(n.value,n.menu))})("useDefaultRetentionChange",function(){g(e);let n=l();return _(n.useDefaultRetention())})("useCustomRetentionChange",function(){g(e);let n=l();return _(n.useCustomRetention())})("bagTagTargetAttendeesChange",function(n){g(e);let o=l();return _(o.updateBagTagTargetAttendees(n))}),a()()}if(i&2){let e=l(),t=A(3);u("id",t.panelId("superadmin"))("hidden",e.activeNavId!=="superadmin"),M("aria-labelledby",t.tabId("superadmin")),s(3),u("otherFeatures",e.otherFeatures)("settingSaving",e.settingSaving)("event",e.event)("specialFeatures",e.specialFeatures)("customRetentionPolicy",e.customRetentionPolicy)("isAnalyticsNewAvailable",e.isAnalyticsNewAvailable)}}function Fu(i,c){if(i&1){let e=y();r(0,"cnp-button",157),h("click",function(){let n=g(e),o=n.list,d=n.index,m=l();return _(m.moveMenuRow(o,d,"up"))}),S(1,"cnp-icon",212),a(),r(2,"cnp-button",157),h("click",function(){let n=g(e),o=n.list,d=n.index,m=l();return _(m.moveMenuRow(o,d,"down"))}),S(3,"cnp-icon",213),a()}if(i&2){let e=c.list,t=c.menu,n=c.index,o=l();u("iconOnly",!0)("ariaLabel","Move "+o.menuRowName(e,t)+" up")("disabled",!o.canMoveMenuRow(e,n,"up")),M("data-move-id",o.menuMoveId(e,"up",t)),s(2),u("iconOnly",!0)("ariaLabel","Move "+o.menuRowName(e,t)+" down")("disabled",!o.canMoveMenuRow(e,n,"down")),M("data-move-id",o.menuMoveId(e,"down",t))}}var Gi="login-disable";function Au(i){let c=i.replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim().toLowerCase();return c?c.charAt(0).toUpperCase()+c.slice(1):i}var Eu={windowClass:"cnp-dialog"},ku=[{id:"general",label:"Access"},{id:"webApp",label:"Web menu configuration"},{id:"mobile",label:"Mobile app menu configuration"}],wn="event-settings",$i="The change could not be saved. Please try again.",Tu="The group could not be removed. Please try again.",Du="The menu could not be removed from its group. Please try again.",Hi="Failed to remove custom menu item",tn=class{constructor(c=[]){this.data=c}},yi=(()=>{class i{get isAnalyticsNewAvailable(){return this.otherFeatures?.anal
1yticsLegacy===!1||!this.event?.startDate?!0:nn.tz(this.event.startDate,this.event.timezone).isSameOrAfter(nn.utc("2024-01-01"))}constructor(e,t,n,o,d,m,C,F,Ce,k,$e,Wi,He,xi,er,tr,nr,ir){this.eventService=e,this.activatedRoute=t,this.modal=n,this.settingService=o,this.utilities=d,this.confirmService=m,this.userService=C,this.auth=F,this.toastService=Ce,this.gamifyService=k,this.dashboard=$e,this.router=Wi,this.bespoke=He,this.renderer=xi,this.aboutPrivacy=er,this.customFontFacade=tr,this.subscriptionService=nr,this.fb=ir,this.defaultImages={favicon:"favicon.ico",banner:"https://assets.canapii.com/canapii-test-event/test-event-banner2.jpg",bannerEmail:"https://assets.canapii.com/canapii-test-event/canapii-email-banner-header.png"},this.menuAccesOptions=[{value:"web",viewValue:"Web"},{value:"mobile",viewValue:"Mobile"},{value:"both",viewValue:"Both"},{value:"disabled",viewValue:"Disabled"}],this.mobileOnlyMenuAccessOption=[{value:"mobile",viewValue:"Mobile"},{value:"web",viewValue:"Web"},{value:"both",viewValue:"Both"}],this.sessionPageAccessOption=[{value:"mobile",viewValue:"Mobile"},{value:"disabled",viewValue:"Disabled"}],this.chatbotPageAccessOption=[{value:"mobile",viewValue:"Mobile"},{value:"disabled",viewValue:"Disabled"}],this.mobileMenuAccesOptions=[{value:"highlight",viewValue:"Highlight"},{value:"sidebar",viewValue:"Sidebar"},{value:"both",viewValue:"Both"}],this.hyHyveMenuAccessOptions=[{value:"web",viewValue:"Web"},{value:"disabled",viewValue:"Disabled"}],this.isLoadingAccess=!0,this.contentNav="general",this.activeNavId=wn,this.fragmentToNavIdMap={[wn]:wn,branding:"branding",pages:"pages",access:"pages","web-app":"pages","mobile-app":"pages","branded-app":"branded-app","features-networking":"features-networking","reporting-settings":"reporting-settings",superadmin:"superadmin"},this.subNavFragmentMap={access:"general","web-app":"webApp","mobile-app":"mobile"},this.customFooterBgColor="",this.customFooterFontColor="",this.customFooterLoaded=!1,this.customFooterSaving=!1,this.customFooterEditorOptions={height:"240px",initialEditType:"wysiwyg",previewStyle:"vertical",plugins:[],toolbarItems:[["bold","italic","strike"],["hr","quote"],["ul","ol","task","indent","outdent"],["link"],["scrollSync"]]},this.highlightBannerSpeed="",this.secondaryBannerSpeed="",this.highlightMenuListSortArrayNew=[],this.isSortingHighlightMenuList=!1,this.isSortingAppMenuList=!1,this.removing=new Set,this.tempMenu=[],this.isSortingEventMenuList=!1,this.isSortLoading=!1,this.groupMenus=[],this.subscription$=[],this.menusToRemove=["home","campaign","privateRsvp","provider","expert","certification"],this.isPaidUser=!1,this.isSocialMedia=!0,this.otherSettings=[],this.proPlans=["professional_one_off_plan","professional_monthly_plan","enterprise-plan","essential-plan","professional-plan"],this.tailorEventOrdering=["faqs","attendees","eventMeetings","generalAgenda","vod","polls","resourceCenter","run","forum","projects","speakers","supporters","homeAgenda","customDomain","sponsorAdmins","badges","onsiteRegistration","locations","hotels","flights"],this.eventFeatures=[{title:"Sessions",sub:"(live stream, on demand, breakouts)",key:"sessions"},{title:"Homepage",sub:"(Netflix style boxes and banners displaying your content)",key:"homepage"},{title:"FAQs",sub:"(add your own or use Canapii\u2019s ready made questions)",key:"faqs"},{title:"Notifications",sub:"",key:"notifications"}],this.specialFeatures=[{name:"Campaign",description:"(send emails to your contacts)",value:!1,key:"campaign"},{name:"Private RSVP",description:"(enable private RSVP campaigns and mailing lists)",value:!1,key:"privateRsvp"},{name:"Custom domain",description:"Set custom domain for event",value:!1,key:"customDomain"},{name:"Badges",description:"Create badges for your event",value:!1,key:"badge"},{name:"Sponsor admins",description:"Enable sponsor admins",value:!1,key:"sponsorAdmins"},{name:"Canapii provider",description:"(enables Canapii Green Room and RTMP link in session live stream options)",value:!1,key:"provider"},{name:"On-site registration",description:"Enable on-site registration",value:!1,key:"onsiteRegistration"},{name:"Tabbed contents",description:"a dedicated page use to manage home tab",value:!1,key:"homeAgenda"},{name:"Hotels",description:"Enable hotels",value:!1,key:"hotels"},{name:"Flights",description:"Enable flights",value:!1,key:"flights"}
1,{name:"Welcome video",description:"setup a welcome video for your home page",value:!1,key:"welcomeVideo"},{name:"Certification",description:"Enable certification feature",value:!1,key:"certification"},{name:"Interactive floorplan",description:"Enable interactive floor plan for venue navigation",value:!1,key:"interactiveFloorplan"},{name:"Bag tag",description:"Enable bag tag printing for this event",value:!1,key:"bagTag"}],this.swpSpecialFeatures=[...this.specialFeatures],this.gamification={name:"Gamification",description:"(award points for engagement)",value:!1,key:"gamification",swapValue:void 0},this.loginDisabled=!1,this.brandingSpecMsg={logo:{},banner:{},bannerEmail:{},backgroundImage:{},meetingLogo:{}},this.mobileHomepageViewOptions=["standard","highlight"],this.otherFeatures={homeNow:!1,clickRedirectOnSessions:!0,sidebarChat:"defaultOpen",sponsorsSidebarChat:!1,resourceSidebarChat:!1,projectSidebarChat:!1,communityGallerySidebarChat:!1,personalChat:!0,groupChat:!0,eventChat:!0,techSupportChat:!1,translation:!0,sessionRating:"Inline",virtualBusinessCard:!1,registeredDate:!1,vsefCompliant:!1,canapiiSupport:!1,backgroundImage:null,sessionReminder:!0,allowAttendeeThemeToggle:!1,agendaDefaultView:"list",canapiiReview:!0,chatBot:!0,sessionReplyNotification:!0,enableBackground:!1,eventAgendas:!0,eventAgendasDefaultTab:"eventAgenda",appQRscanner:!0,matchMaking:!0,liveTranscript:!1,screenShareSimulcast:!1,eventSelfCheckIn:!0,meetingSelfCheckIn:!0,sessionSelfCheckIn:!0,onsiteCheckinEmail:!1,noteTaking:!1,enableMeetNow:!0,slowModeCounter:0,favorites:!0,enableSponsorMeeting:!1,addVideoLink:!0,generalAgenda:!0,myAgend
1a:!0,badgeV2:!1,brandedAppAssets:!1,agendaFilters:!0,agendaTypesFilters:!0,sessionTagsFilters:!0,sessionTracksFilters:!0,analyticsBI:!1,analyticsAIChat:!1,analyticsLegacy:!0,organizeEvent:!0},this.defaultHighlightBtnColor="#4A545E",this.defaultHighlightIconColor="#ffffff",this.highlightBtnColor="",this.highlightIconColor="",this.selCustomHighlightBtnColor="",this.selCustomHighlightIconColor="",this.defaultPrimaryColor="#00AFFF",this.primaryColor="#00AFFF",this.selCustomPrimaryColor="",this.defaultSecondaryColor="#3DC2FF",this.secondaryColor="#3DC2FF",this.selCustomSecondaryColor="",this.defaultDateFormat="MM/DD/YYYY",this.defaultNavbarColor="#1B1E29",this.defaultNavbarTextColor="#1B1E29",this.navbarColor="#1B1E29",this.navbarTextColor="#1B1E29",this.selCustomNavbarColor="",this.selCustomNavbarTextColor="",this.editableMenuKeys=["supporters","run","meetings","generalAgenda","myAgenda","resourceCenter","polls","speakers","attendees","faqs","gamification","forum","projects","vod","homeAgenda","venue","venueMap","interactiveFloorplan","demo"],this.editableHighlightMenuKeys=["allagenda","allchat","attendees","eventMeetings","faqs","flights","forum","gamification","homeAgenda","hotel","playlists","polls","projects","resourceCenter","run","socialWall","speakers","supporters","venue","venueMap","interactiveFloorplan","vod","demo","bookMeeting"],this.customRetentionPolicy=null,this.countdownSummary=null,this.isSipri=!1,this.origMenu={},this.origHighlightMenu={},this.origAppMenu={},this.liveBtnDisabled=!1,this.groupMenu=[],this.groupHighlightMenu=[],this.eventAppMenuDS=new tn,this.allMenuDS=new tn,this.isEventAppMenuLoading=!1,this.isEventAppMenuSortLoading=!1,this.isEventAppMenuDragAndDropDisabled=!1,this.eventMenuDS=new tn,this.isEventMenuLoading=!1,this.isEventMenuSortLoading=!1,this.isEventMenuDragAndDropDisabled=!1,this.eventHighlightMenuDS=new tn,this.isEventHighlightMenuLoading=!1,this.isEventHighlightMenuSortLoading=!1,this.isEventHighlightMenuDragAndDropDisabled=!1,this.isOnsiteOnlyFeature=["onsiteRegistration","badge","locations","hotels","flights","interactiveFloorplan"],this.defaultContactEmail="[email protected]",this.eventMeetingMenu={visible:!1,disabled:!1},this.isVirtualSubscription=!1,this.isSocialWall=!1,this.isFlightsEnable=!1,this.isTabbedContentsEnable=!1,this.isHotelsEnable=!1,this.isSavingSlowModeCounter=!1,this.isInteractiveFloorplanEnable=!1,this.isLenovoGlobalKickOff=!1,this.fontList=[],this.selectedFont={label:"Nunito"},this.onSelectingFont=!1,this.isEnableBannerLoading=!1,this.mobileOnlyMenu=["hotel","flights","playlists","allchat","allagenda","homeAgenda","noteTaking","favorites","chatbot"],this.menuAccess={},this.customMenuItems=[],this.isLoadingCustomMenuItems=!1,this.customFonts$=this.customFontFacade.customFonts$,this.descriptions=_t,this.pagesTabs=ku,this.appearanceSegments=[{value:"light",label:"Light"},{value:"dark",label:"Dark"}],this.eventStatusSegments=[{value:"draft",label:"Draft"},{value:"live",label:"Live"}],this.accessColumns=[{key:"menu",header:"Menu"},{key:"actions",header:"",ariaLabel:"Actions",width:"96px"},{key:"desktop",header:"Web",width:"96px"},{key:"mobile",header:"Mobile",width:"96px"}],this.tabItemsCache=null,this.modeSegmentsCache=null,this.accessRowsCache=null,this.fontOptionsCache=null,this.fontValueCache=null,this.controlEcho=new Ge,this.expandedGroups=new Set,this.hostRef=be(wt),this.clipboard=be(zo),this.menuKey=gt=>gt?.key||gt?.menu||gt?.name||"",this.groupDialogIsHighlight=!1,this.groupDialogCreates=!1,this.updateMenuIsHighlight=!1,this.settingSaving={},this.setOthers=(gt,or)=>b(this,null,function*(){let Mi=Object.keys(gt),Ki=Mi.find(rr=>vt(rr))??Mi[0],ar=this.snapshotOtherFeatures(Mi);return this.writeSetting({key:Ki,nextValue:gt[Ki],write:()=>this.putOtherFeatures(gt),undo:()=>this.putOtherFeatures(ar),label:or})}),this.menuVisibilityWrites=new Set}get tabItems(){let e=!!this.otherFeatures?.brandedAppAssets,t=!!this.userService?.profile?.superadmin,n=this.tabItemsCache;if(n?.brandedApp!==e||n?.superadmin!==t){let o=[{id:wn,label:"Event settings"},{id:"branding",label:"Branding"},{id:"pages",label:"Pages"}];e&&o.push({id:"branded-app",label:"Branded app"}),o.push({id:"features-networking",label:"Features & networking"},{id:"reporting-settings",label:"Reporting settings"}),t&&o.push({id:"superadmin",label:"Superadmin"}),this.tabItemsCache={brandedApp:e,superadmin:t,tabs:o}}return this.tabItemsCache.tabs}isTabRendered(e){return this.tabItems.some(t=>t.id===e)}showTab(e){this.activeNavId=e}onTabChange(e){this.showTab(e),this.router.navigate([],{relativeTo:this.activatedRoute,fragment:e})}onPagesTabChange(e){this.contentNav=e,this.router.navigate([],{relativeTo:this.activatedRoute,fragment:this.pagesSubTabFragment(e)})}pagesSubTabFragment(e){return Object.keys(this.subNavFragmentMap).find(t=>this.subNavFragmentMap[t]===e)??"access"}detailValue(e){return e==null||e===""?null:e==="null"?"(not set)":String(e)}copyEventId(){this.clipboard.copy(this.event?.url),this.toastService.showSuccess("Success","Copied!")}get eventModeSegments(){let e=!!this.isVirtualSubscription;return this.modeSegmentsCache?.virtualOnly!==e&&(this.modeSegmentsCache={virtualOnly:e,segments:[{value:"hybrid",label:"In-person",disabled:e},{value:"virtual",label:"Virtual"}]}),this.modeSegmentsCache.segments}get eventStatusValue(){let e=this.event?.status;return e==="draft"?"draft":!e||e==="live"?"live":""}controlValue(e,t){return this.controlEcho.value(e,t)}pickControl(e,t,n){return this.controlEcho.hold(e,t,n),Promise.resolve(n).then(()=>{})}isControlBusy(e){return this.controlEcho.isBusy(e)}get accessRows(){let e=this.allMenuDS.data,t=!!this.isPaidUser,n=this.accessRowsCache;return(n?.source!==e||n?.paid!==t||n?.sipri!==this.isSipri)&&(this.accessRowsCache={source:e,paid:t,sipri:this.isSipri,rows:e.filter(o=>this.isPaidEligible(o)&&!o.items)}),this.accessRowsCache.rows}get hasPaidEventFeatures(){let e=this.eventService?.data?.user?.subscriptionType;return!!(this.isSuperAdmin||e&&!e.includes("free"))}
1isPaidEligible(e){return!!e&&(!e.paidOnly||!!this.isPaidUser||this.isSipri)}isMenuRowListed(e){return!!(e?._isCustom||e?.items)||this.isPaidEligible(e)}isMenuRowShown(e,t){return e==="web"?t?.generalAccess!=="mobile"&&this.isMenuRowListed(t):e==="mobile"?this.isMenuRowListed(t):this.isPaidEligible(t)&&!t?.items}shownMenuRows(e){return this.menuRows(e).filter(t=>this.isMenuRowShown(e,t))}dataIndexOfShownRow(e,t){let n=this.shownMenuRows(e)[t];return n===void 0?-1:this.menuRows(e).indexOf(n)}isMenuRowMovable(e,t){return e==="app"?t?.menu!=="home"&&t?.menu!=="hamburgermenu":!!t?.visible}menuRowName(e,t){return e==="app"?ut(t,this.descriptions):t?._isCustom||t?.items?t?.name:this.descriptions[t?.menu]?.title||t?.name}menuMoveId(e,t,n){return ht(e,t,this.menuKey(n))}canMoveMenuRow(e,t,n){return!this.isMenuListLocked(e)&&this.isMenuRowMovable(e,this.shownMenuRows(e)[t])&&this.menuMoveTarget(e,t,n)>=0}moveMenuRow(e,t,n){if(!this.canMoveMenuRow(e,t,n))return;let o=this.shownMenuRows(e)[t],d=this.menuMoveTarget(e,t,n);e==="web"?this.moveEventMenuItem(t,d):e==="mobile"?this.moveHighlightMenuItem(t,d):this.moveAppMenuItem(t,d),Nt(this.hostRef.nativeElement,e,n,this.menuKey(o))}menuRows(e){return e==="web"?this.eventMenuDS.data:e==="mobile"?this.eventHighlightMenuDS.data:this.eventAppMenuDS.data}isRemoving(e){return this.removing.has(e)}removeOnce(e,t){return b(this,null,function*(){if(!this.removing.has(e)){this.removing.add(e);try{yield t()}finally{this.removing.delete(e)}}})}isMenuListLocked(e){return this.isRemoving(e)?!0:e==="web"?this.isEventMenuDragAndDropDisabled||this.isEventMenuSortLoading:e==="mobile"?this.isEventHighlightMenuDragAndDropDisabled||this.isEventHighlightMenuSortLoading:this.isEventAppMenuDragAndDropDisabled||this.isEventAppMenuSortLoading}isMenuListHeld(e){return{web:this.isSortingEventMenuList,mobile:this.isSortingHighlightMenuList,app:this.isSortingAppMenuList}[e]||this.isMenuListLocked(e)}menuMoveTarget(e,t,n){let o=this.shownMenuRows(e),d=si(o,t,n);return e==="app"&&(d===0||d===o.length-1)?-1:d}isGroupExpanded(e,t){return this.expandedGroups.has(`${e}:${this.menuKey(t)}`)}toggleGroup(e,t){let n=`${e}:${this.menuKey(t)}`;this.expandedGroups.has(n)?this.expandedGroups.delete(n):this.expandedGroups.add(n)}customFooterPage(e){return this.customFooterForm.get(["pages",e])}setCustomFooterPage(e,t){let n=this.customFooterPage(e);n.setValue(t),n.markAsDirty()}get fontOptions(){let e=this.fontList,t=this.fontOptionsCache;return(t?.source!==e||t?.length!==e.length)&&(this.fontOptionsCache={source:e,length:e.length,options:e.map(n=>({value:n.label,label:n.label==="Nunito"?"Nunito (default)":n.label}))}),this.fontOptionsCache.options}get selectedFontValue(){let e=this.selectedFont?.label;return(!this.fontValueCache||this.fontValueCache.label!==e)&&(this.fontValueCache={label:e,value:e?[e]:[]}),this.fontValueCache.value}onFontPicked(e){let t=e[0];this.selectedFont=this.fontList.find(n=>n.label===t)??{label:"Nunito"},this.prepareFontForPreview(!0)}ngOnInit(){this.initCustomFooterForm(),this.init()}ngAfterViewInit(){let e=this.customFooterForm?.get("text")?.value;e&&this.customFooterEditor&&this.customFooterEditor.setEditorValue(e)}initCustomFooterForm(){this.customFooterForm=this.fb.group({text:[""],pages:this.fb.group({all:[!1],home:[!1],sponsors:[!1]}),bgColor:[""],fontColor:[""],fontSize:["14"]});let e=this.customFooterForm.get("pages.all");if(e){let t=e.valueChanges.subscribe(n=>{let o=this.customFooterForm.get("pages");n?(o.get("home").setValue(!1,{emitEvent:!1}),o.get("sponsors").setValue(!1,{emitEvent:!1}),o.get("home").disable({emitEvent:!1}),o.get("sponsors").disable({emitEvent:!1})):(o.get("home").enable({emitEvent:!1}),o.get("sponsors").enable({emitEvent:!1}))});this.subscription$.push(t)}}init(){return b(this,null,function*(){yield this.initUser(),yield this.initEvent(),this.subscribeToEventSubject(),this.subscribeToFragmentChanges();let e=yield this.settingService.loadBySK("walls-access");this.isSocialWall=e?.data?.value==="new-menu-item",this.loadDashboard(!0),this.loadSpecialFeatures(),this.loadOthers(),yield this.loadMenu(),yield this.loadHighlightMenu(),this.loadAllMenu(),this.loadCustomMenuItems(),this.loadAppMenu(),this.loadDisableLogin(),this.loadBrandingColors(),this.loadNavbarColor(),this.loadHighlightColor(),this.loadFonts(),this.loadAboutPrivacy(),this.isSipri=globalThis.location.pathname.includes("sipri-stockholm-forum")})}initUser(){return b(this,null,function*(){let e=this.auth.userSubject.subscribe(t=>{let n=this.userService.profile;this.userProfile=this.userService.profile,this.isSuperAdmin=n?.superadmin;let o=n?.email?.toLowerCase()||t?.attributes?.email?.toLowerCase();this.isPaidUser=this.isSuperAdmin||o.indexOf("canalys.com")>=0||o.indexOf("canapii.com")>
1=0||this.userService.profile?.isPaid||t?.attributes?.isPaid||this.subscriptionService.isPaidSubscription(n.subscriptionType),this.userService.loadUser(t?.attributes.email).then(d=>b(this,null,function*(){this.userAccess=d.data}))});this.subscription$.push(e)})}initEvent(){return b(this,null,function*(){let e=this.activatedRoute.params.subscribe(t=>{this.eventSlug=t.event,this.loadEvent(!0)});this.subscription$.push(e)})}subscribeToEventSubject(){this.subscription$.push(this.eventService.eventSubject.subscribe(e=>{this.event=e,this.setDefaultFont(),this.prepareFontForPreview()}))}subscribeToFragmentChanges(){this.subscription$.push(this.activatedRoute.fragment.subscribe(e=>{e&&this.fragmentToNavIdMap[e]?(this.showTab(this.fragmentToNavIdMap[e]),this.subNavFragmentMap[e]?this.contentNav=this.subNavFragmentMap[e]:e==="pages"&&(this.contentNav="general")):(this.showTab(wn),this.contentNav="general")}))}loadFonts(){return b(this,null,function*(){this.subscription$.push(this.settingService.getFonts(e=>{e.items?.forEach(t=>{this.fontList?.find(n=>n.label===t.family)||(this.fontList=[...this.fontList,{label:t.family}])}),this.bespoke.isHPEvent&&[{label:"Forma DJR Display"},{label:"Forma DJR Micro"}].forEach(t=>{this.fontList?.find(n=>n.label===t.label)||(this.fontList=[...this.fontList,t])}),this.fontList?.sort((t,n)=>t.label.localeCompare(n.label))})),this.settingService.loadFonts(),this.customFontFacade.getCustomFonts(),this.subscription$.push(this.customFonts$.subscribe(e=>{e&&e.length>0&&(e.forEach(t=>{let n=t.name.split(".")[0];this.fontList?.find(o=>o.label===n)||(this.fontList=[...this.fontList,O(x({},t),{label:n})])}),this.fontList?.sort((t,n)=>t.label.localeCompare(n.label)))}))})}prepareFontForPreview(e=!1){this.selectedFont||(this.selectedFont={label:"Nunito"});let t=this.selectedFont.label;["forma djr micro","forma djr display"].includes(t?.toLowerCase())?(t=t.replace(/\s+/g,"-").toLowerCase(),this.removeGoogleFontsScript(),this.removeCustomFontFace()):this.selectedFont?.url?(this.removeGoogleFontsScript(),this.createCustomFontFace()):(this.removeCustomFontFace(),this.loadFont(t)),!this.event?.eventFont&&e||this.event?.eventFont&&t!==this.event?.eventFont||this.event?.eventCustomFont&&t!==this.event?.eventCustomFont?.name?this.onSelectingFont=!0:this.onSelectingFont=!1,document.querySelectorAll(".preview-font").forEach(o=>{this.renderer.setStyle(o,"font-family",`'${t}', sans-serif`)})}createCustomFontFace(){this.removeCustomFontFace();let e=this.selectedFont.label,n=(this.selectedFont?.type||this.selectedFont?.name.split(".").pop())?.toLowerCase()==="otf"?"opentype":"truetype",o=this.selectedFont.url,d=this.renderer.createElement("style");d.id="custom-font-face",d.appendChild(document.createTextNode(`@font-face {
2          font-family: '${e}';
3          src: url('${o}') format('${n}');
4        }`)),this.renderer.appendChild(document.head,d)}removeCustomFontFace(){let e=document.getElementById("custom-font-face");e&&e?.remove()}loadFont(e){let t=document.getElementById("google-fonts");if(t)t.setAttribute("href",`https://fonts.googleapis.com/css?family=${e.replace(" ","+")}:300,400,700`);else{let n=this.renderer.createElement("link");n.id="google-fonts",n.rel="stylesheet",n.href=`https://fonts.googleapis.com/css?family=${e.replace(" ","+")}:300,400,700`,this.renderer.appendChild(document.head,n)}}removeGoogleFontsScript(){let e=document.getElementById("google-fonts");e&&e?.remove()}setDefaultFont(){this.event?.eventFont?this.selectedFont={label:this.event?.eventFont}:this.event?.eventCustomFont?this.selectedFont=O(x({},this.event?.eventCustomFont),{label:this.event?.eventCustomFont.name}):this.selectedFont={label:"Nunito"},this.previewText&&this.prepareFontForPreview()}onCancelFontSelect(){this.onSelectingFont=!1,this.setDefaultFont()}onSaveFontSelect(){return b(this,null,function*(){this.onSelectingFont=!1;let e=this.selectedFont?.url?{eventCustomFont:{name:this.selectedFont.label,type:this.selectedFont?.type||this.selectedFont?.name.split(".").pop(),url:this.selectedFont.url},eventFont:null}:{eventFont:this.selectedFont.label,eventCustomFont:null},t=yield this.eventService.update(x({PK:this.event.PK,SK:this.event.SK},e));t?.success?(this.event=x(x({},this.event),e),this.setDefaultFont(),this.toastService.showSuccess("Success","Font successfully updated")):t&&!t.success&&this.utilities.alert({header:"Error",message:t.message||"Failed to change font"})})}loadEvent(e=!1){return b(this,null,function*(){this.event=yield this.eventService.loadEvent(this.eventSlug,e),this.highlightBannerSpeed=this.event.highlightBannerSpeed?this.event.highlightBannerSpeed:5,this.secondaryBannerSpeed=this.event.secondaryBannerSpeed?this.event.secondaryBannerSpeed:5,this.customRetentionPolicy=this.event.customRetentionPolicy||null,this.event.contactEmail||(this.event.contactEmail=this.defaultContactEmail),this.event.dateformat===void 0&&(this.event.dateformat=this.defaultDateFormat),this.event.startDateDisplay=nn.tz(this.event.startDate.replace("T"," ").replace("Z",""),this.event.timezone).toISOString(),this.event.endD
4ateDisplay=nn.tz(this.event.endDate.replace("T"," ").replace("Z",""),this.event.timezone).add(1,"day").subtract(1,"minute").toISOString(),this.resolveBannerUrls(),this.checkBrandingSpec(this.event.logo,"logo"),this.checkBrandingSpec(this.event.banner,"banner"),this.checkBrandingSpec(this.event.bannerEmail,"bannerEmail"),this.checkBrandingSpec(this.event.meetingLogo,"meetingLogo"),this.checkBrandingSpec(this.event.favicon,"favicon"),this.loadSpecialFeatures(),this.event.agendaTimeFormat===void 0&&(this.event.agendaTimeFormat="12-hour"),this.liveBtnDisabled=this.event?.user?.proStatus==="disabled",this.event?.user?.subscriptionType===Io.PROFESSIONAL_VIRTUAL&&(this.isVirtualSubscription=!0),this.event.enableBanner=this.event.enableBanner===void 0?!0:this.event.enableBanner})}resolveBannerUrls(){let e="https://assets.canapii.com/canapii-test-event/test-event-banner2.jpg",t="https://assets.canapii.com/canapii-test-event/canapii-email-banner-header.png";this.event.banner=this.event.banner.includes("canapii-test-event/test-event-banner2.jpg")?e:this.event.banner,this.event.bannerEmail=this.event.bannerEmail.includes("canapii-test-event/canapii-email-banner-header.png")||this.event.bannerEmail.includes("test-event-banner-email2")?t:this.event.bannerEmail}loadDashboard(e=!1){return b(this,null,function*(){try{yield this.dashboard.load(e)}catch(t){console.error(t)}})}loadSpecialFeatures(){this.settingService.getSettings("specialFeatures").then(e=>{if(e?.success){this.specialFeatures=[...this.swpSpecialFeatures],this.specialFeatures.forEach((m,C)=>{let F=e.data.find(Ce=>Ce.name===m.name);F&&(F.description=this.specialFeatures[C].description,F.key=this.specialFeatures[C].key,this.specialFeatures[C]=F)});let t=e.data.find(m=>m.name==="Tabbed contents");t&&(this.isTabbedContentsEnable=t.value);let n=e.data.find(m=>m.name==="Flights");n&&(this.isFlightsEnable=n.value);let o=e.data.find(m=>m.name==="Hotels");o&&(this.isHotelsEnable=o.value);let d=e.data.find(m=>m.name===this.gamification.name);d&&(d.description=this.gamification.description,d.key=this.gamification.key,this.gamification=d),this.updateInteractiveFloorplanStatus(e),this.event?.eventFormat==="virtual"&&(this.specialFeatures=this.specialFeatures.filter(m=>!this.isOnsiteOnlyFeature.includes(m.key))),!this.isSuperAdmin&&(this.event?.isDemoEvent||this.event?.url==="canapii-playground-demo")&&(this.specialFeatures=this.specialFeatures.filter(m=>m.key!=="provider")),this.disableMenuByPlan(),this.disableMenuByEventType(),this.loadHighlightMenu(),this.loadAllMenu()}})}ngOnDestroy(){this.subscription$.forEach(e=>e.unsubscribe())}capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}updateDetail(e=""){this.updateDetailDialog?.openWith(this.event,e)}onDetailSaved(e){return b(this,null,function*(){try{yield this.disableFeatureByEventFormat(e)}catch(t){console.debug("Failed to disable onsite-only features for the new event format",t)}yield this.loadEvent(!0)})}disableFeatureByEventFormat(e){return b(this,null,function*(){if(e?.eventFormat==="virtual"){let t=this.isOnsiteOnlyFeature;yield Promise.all(t.map(n=>b(this,null,function*(){let o=this.specialFeatures.find(d=>d.key===n);o&&(o.value=!1,yield this.settingService.update(o))})))}})}duplicateEvent(){this.duplicateDialog?.openWith(O(x({},this.event),{name:"Duplicate of "+this.event.name}))}onEventDuplicated(){setTimeout(()=>{this.loadEvent(!0)},500)}useDefaultRetention(){return b(this,null,function*(){this.event.customRetentionPolicy!==null&&(yield this.writeSetting({key:"customRetentionPolicy",nextValue:null,write:()=>this.putEventField("customRetentionPolicy",null)}))})}useCustomRetention(){this.retentionDialog?.openWith({customRetentionPolicy:this.event.customRetentionPolicy,timezoneLabel:this.event.timezoneLabel,timezone:this.event.timezone,endDate:this.event.endDate,PK:this.event.PK})}onRetentionChosen(e){return b(this,null,function*(){yield this.writeSetting({key:"customRetentionPolicy",nextValue:e,write:()=>this.putEventField("customRetentionPolicy",e)})})}loadAllMenu(){return b(this,null,function*(){if(Object.keys(this.origMenu).length&&Object.keys(this.origHighlightMenu).length){let e=new Set([...Object.keys(this.origMenu),...Object.keys(this.origHighlightMenu)]);this.menuAccess={},e.forEach(t=>{let n=this.origMenu[t]||{},o=this.origHighlightMenu[t]||{};this.menuAccess[t]=O(x(x({},n),o),{access:this.getAccess(n,o)})}),delete this.menuAccess.home,this.allMenuAccess=this.includeAllAccess(this.menuAccess),this.allMenuDS.data=this.allMenuAccess,this.isLoadingAccess=!1}})}effectiveAccess(e){return e?e.access??e.visible??!1:!1}
4static{this.AGENDA_MENUS=["generalAgenda","myAgenda"]}isAgendaMenu(e){return i.AGENDA_MENUS.includes(e)}isAgendaMenuActive(e){return!!(e?.visible&&(e.generalAccess==="mobile"||e.generalAccess==="both"))}deriveEventAgendas(e,t){return!!e&&this.isAgendaMenuActive(this.origMenu?.generalAgenda)||!!t&&this.isAgendaMenuActive(this.origMenu?.myAgenda)}getAccess(e,t){let n=typeof e.visible<"u",o=this.effectiveAccess(e),d=this.effectiveAccess(t),m=(o||e.generalAccess==="web"||t.generalAccess==="web")&&e.generalAccess!=="mobile",C=d||e.generalAccess==="mobile";return o&&d||e.generalAccess==="both"||!n&&t.generalAccess==="both"?"both":m?"web":C?"mobile":"disabled"}includeAllAccess(e){let t=Object.keys(e),n=[],o=[];t.forEach(C=>{if(!(C==="allagenda"||C==="meetings"||C==="eventMeetings")&&(C!=="gamification"&&C!=="projects"||C==="gamification"&&(e[C].visible||this.isSuperAdmin||this.userAccess?.isGamificationAccess||typeof this.userAccess?.isGamificationAccess>"u")||C==="projects"&&(e[C].visible||this.isSuperAdmin||this.userAccess?.isProjectAccess||typeof this.userAccess?.isProjectAccess>"u"))){let F={menu:C,activeIcon:e[C].activeIcon,altName:e[C].altName,icon:e[C].icon,name:e[C].name,route:e[C].route,sort:e[C].sort,visible:e[C].visible,targetAttendees:e[C]?.targetAttendees,access:e[C].access};if(e[C].type==="redirect")F.type=e[C].type,F._isCustom=!0,F.key=e[C].key||C,F.usage=e[C].usage,F.url=e[C].url,F.openInNewTab=e[C].openInNewTab;else if(C.startsWith("custom"))return;n.push(F)}}),this.checkAllChatOption(n),this.otherFeatures.myAgenda===!1&&this.findAndRemove(n,"myAgenda"),this.otherFeatures.generalAgenda===!1&&this.findAndRemove(n,"generalAgenda"),this.isFlightsEnable||this.findAndRemove(n,"flights"),this.isHotelsEnable||this.findAndRemove(n,"hotel"),this.isTabbedContentsEnable||this.findAndRemove(n,"homeAgenda"),this.isInteractiveFloorplanEnable||this.findAndRemove(n,"interactiveFloorplan"),this.checkHyhyveOption(n),this.checkSocialWallOption(n),this.checkFavoritesOption(n),typeof this.otherFeatures.noteTaking<"u"&&(this.otherFeatures.noteTaking||this.findAndRemove(n,"noteTaking"));let d=n.filter(C=>!C._isCustom),m=n.filter(C=>C._isCustom);return d.sort((C,F)=>(parseInt(C.sort,10)||0)-(parseInt(F.sort,10)||0)),m.sort((C,F)=>(parseInt(C.sort,10)||0)-(parseInt(F.sort,10)||0)),o=[...d,...m],o}checkAllChatOption(e){typeof this.otherFeatures.personalChat<"u"&&typeof this.otherFeatures.eventChat<"u"&&typeof this.otherFeatures.techSupportChat<"u"&&this.otherFeatures.personalChat===!1&&this.otherFeatures.eventChat===!1&&this.otherFeatures.techSupportChat===!1&&this.findAndRemove(e,"allchat")}checkHyhyveOption(e){if(typeof this.isHyhyve?.active<"u")if(!this.isHyhyve.active)this.findAndRemove(e,"hyhyve");else{let t=e.findIndex(n=>n.menu==="hyhyve");e[t].altName=this.isHyhyve.pageName,e[t].name=e[t].name||this.isHyhyve.pageName||"HyHyve"}else this.findAndRemove(e,"hyhyve")}checkSocialWallOption(e){typeof this.isSocialWall<"u"?this.isSocialWall||this.findAndRemove(e,"socialWall"):this.findAndRemove(e,"socialWall")}checkFavoritesOption(e){typeof this.otherFeatures.favorites<"u"&&(this.otherFeatures.favorites||this.findAndRemove(e,"favorites"))}findAndRemove(e,t){let n=e.findIndex(o=>o.menu===t);n!==-1&&e.splice(n,1)}loadAppMenu(){return b(this,null,function*(){this.isEventMenuLoading=!0;let e=yield this.settingService.get("appmenu");if(e?.data){this.origAppMenu=x({},e.data);let t=e.data,n=Object.keys(t),o=[],d=[];n.forEach(m=>{o.push({menu:m,activeIcon:t[m].activeIcon,altName:t[m].altName,icon:t[m].icon,name:t[m].name,route:t[m].route,sort:t[m].sort,visible:t[m].visible,targetAttendees:t[m]?.targetAttendees})}),o.sort((m,C)=>m.sort?C.sort?parseInt(m.sort,10)-parseInt(C.sort,10):-1:0),d=o,this.eventAppMenu=[...d],this.eventAppMenuDS.data=this.eventAppMenu,this.isSortingAppMenuList=!1,this.appMenuListSortArrayNew=void 0}})}loadMenu(){return b(this,null,function*(){this.isEventMenuLoading=!0;let e=yield this.settingService.get("menu");if(e?.data){this.origMenu=x({},e.data);let t=this.checkPaidMenus(e);
4this.groupMenu=t[0].group,this.eventMenu=this.removeOtherMenus(t[0].data),this.disableMenuByPlan(),this.disableMenuByEventType(),this.allMenus=this.includeAll(this.eventMenu),this.eventMenu=this.includeAll(this.eventMenu,this.groupMenu),this.event?.eventFormat==="virtual"&&(this.eventMenu=this.eventMenu.filter(n=>n.menu!=="venueMap")),this.eventMenuDS.data=[...this.eventMenu],this.isSortingEventMenuList=!1,this.eventMenuListSortArrayNew=void 0}this.isEventMenuLoading=!1})}loadHighlightMenu(){return b(this,null,function*(){this.isEventHighlightMenuLoading=!0;let e=yield this.settingService.loadBySK("hyhyve-config");this.isHyhyve=e.data?.value;let t=yield this.settingService.get("menu","highlight");if(t?.data){this.origHighlightMenu=x({},t.data);let n=this.checkPaidMenus(t);this.groupHighlightMenu=n[0].group,this.eventHighlightMenu=this.removeOtherMenus(n[0].data),this.allHighlightMenus=this.includeAllHighlights(this.eventHighlightMenu),this.eventHighlightMenu=this.includeAllHighlights(this.eventHighlightMenu,this.groupHighlightMenu),this.eventHighlightMenu.filter(d=>d.menu==="eventMeetings").length&&(this.eventHighlightMenu=this.eventHighlightMenu.filter(d=>d.menu!=="eventMeetings")),this.eventHighlightMenuDS.data=[...this.eventHighlightMenu],this.isSortingHighlightMenuList=!1,this.highlightMenuListSortArrayNew=[]}this.isEventHighlightMenuLoading=!1})}checkPaidMenus(e){let t=[];return t.push(e),t.forEach(n=>{n.data.polls&&(this.isSuperAdmin===void 0||this.isSuperAdmin===0)&&(n.data.polls.paidOnly=!1),n.data.run&&(n.data.run.paidOnly=!1),n.data.projects&&(this.isSuperAdmin===void 0||this.isSuperAdmin===0)&&(n.data.polls.paidOnly=!1)}),t}includeAllHighlights(e,t=null){(this.origMenu.myAgenda?.generalAccess==="disabled"&&this.origMenu.generalAgenda?.generalAccess==="disabled"||this.origMenu.myAgenda?.generalAccess==="web"&&this.origMenu.generalAgenda?.generalAccess==="web"||this.origMenu.myAgenda?.generalAccess==="disabled"&&this.origMenu.generalAgenda?.generalAccess==="web"||this.origMenu.myAgenda?.generalAccess==="web"&&this.origMenu.generalAgenda?.generalAccess==="disabled"||this.otherFeatures.generalAgenda===!1&&this.otherFeatures.myAgenda===!1)&&(e.allagenda.visible=!1);let n=Object.keys(e),o=[],d=[];for(let m of n){let C={menu:m,activeIcon:e[m].activeIcon,altName:e[m].altName,icon:e[m].icon,name:e[m].name,route:e[m].route,sort:e[m].sort,visible:e[m].visible&&e[m].generalAccess!=="disabled"&&e[m].generalAccess!=="web",targetAttendees:e[m]?.targetAttendees,mobileAccess:e[m]?.mobileAccess??"both"};e[m].type==="redirect"&&(C.type=e[m].type,C.url=e[m].url,C.openInNewTab=e[m].openInNewTab,C.usage=e[m].usage,C.key=e[m].key||m,C._isCustom=!0),!(m.startsWith("custom")&&!C._isCustom)&&o.push(C)}if(this.checkAllChatOption(o),this.isFlightsEnable||this.findAndRemove(o,"flights"),this.checkFavoritesOption(o),this.isHotelsEnable||this.findAndRemove(o,"hotel"),this.isTabbedContentsEnable||this.findAndRemove(o,"homeAgenda"),this.isInteractiveFloorplanEnable||this.findAndRemove(o,"interactiveFloorplan"),this.checkSocialWallOption(o),this.checkFavoritesOption(o),t){let m=Object.keys(t),C=[];m.forEach(F=>{C=[],t[F].items.forEach(Ce=>{let k=o.findIndex($e=>$e.menu===Ce);k>=0&&o[k].visible&&o[k].generalAccess!=="web"&&o[k].generalAccess!=="disabled"&&(C.push(o[k]),o.splice(k,1))}),o.push({menu:F,name:t[F].name,description:t[F].description,items:C,sort:t[F].sort,visible:t[F].visible,targetAttendees:t[F]?.targetAttendees,mobileAccess:t[F].mobileAccess})})}return o.sort((m,C)=>m.sort?C.sort?parseInt(m.sort,10)-parseInt(C.sort,10):-1:0),d=o,d}includeAll(e,t=null){this.otherSettings=[];let n=Object.keys(e),o=[],d=[];if(n.forEach(m=>{if(m==="meetings"||m==="eventMeetings")this.otherSettings.push({menu:m,activeIcon:e[m].activeIcon,altName:e[m].altName,icon:e[m].icon,name:e[m].name,route:e[m].route,sort:e[m].sort,visible:e[m].visible,targetAttendees:e[m]?.targetAttendees});else if(m!=="gamification"&&m!=="projects"||m==="gamification"&&(e[m].visible||this.isSuperAdmin||this.userAccess?.isGamificationAccess||typeof this.userAccess?.isGamificationAccess>"u")||m==="projects"&&(e[m].visible||this.isSuperAdmin||this.userAccess?.isProjectAccess||typeof this.userAccess?.isProjectAccess>"u")){let C={menu:m,activeIcon:e[m].activeIcon,altName:e[m].altName,icon:e[m].icon,name:e[m].name,route:e[m].route,sort:e[m].sort,visible:e[m].visible,targetAttendees:e[m]?.targetAttendees,generalAccess:e[m]?.generalAccess};if(e[m].type==="redirect"&&(C.type=e[m].type,C.url=e[m].url,C.openInNewTab=e[m].openInNewTab,C.usage=e[m].usage,C.key=e[m].key||m,C._isCustom=!0),m.startsWith("custom")&&!C._isCustom)return;o.push(C)}}),typeof this.isSocialWall<"u"){if(!this.isSocialWall){let m=o.findIndex(C=>C.menu==="socialWall");o.splice(m,1)}}else{let m=o.findIndex(C=>C.menu==="socialWall");o.splice(m,1)}
4if(this.otherFeatures.myAgenda===!1){let m=o.findIndex(C=>C.menu==="myAgenda");m!==-1&&o.splice(m,1)}if(this.otherFeatures.generalAgenda===!1){let m=o.findIndex(C=>C.menu==="generalAgenda");m!==-1&&o.splice(m,1)}if(this.isInteractiveFloorplanEnable||this.findAndRemove(o,"interactiveFloorplan"),t){let m=Object.keys(t),C=[];m.forEach(F=>{C=[],t[F].items?.length>0&&t[F].items.forEach(Ce=>{let k=o.findIndex($e=>$e.menu===Ce);k>=0&&o[k].visible&&o[k].generalAccess!=="mobile"&&o[k].generalAccess!=="disabled"&&(this.tempMenu.push(o[k]),C.push(o[k]),o.splice(k,1))}),o.push({menu:F,name:t[F].name,description:t[F].description,items:C,sort:t[F].sort,visible:t[F].visible,targetAttendees:t[F]?.targetAttendees})})}return this.otherSettings.sort((m,C)=>m.sort-C.sort),o.sort((m,C)=>m.sort?C.sort?parseInt(m.sort,10)-parseInt(C.sort,10):-1:0),d=o,d}toggleSpecialFeaturesAccess(e,t){return this.settingService.setMenu({name:t.menu,access:e!=="disabled",generalAccess:e,type:"highlight"}).then(n=>{n?.data&&(this.loadHighlightMenu(),this.loadAppMenu(),this.toastService.showSuccess("Success","Status successfully updated."))})}toggleMenuAccess(e,t){return b(this,null,function*(){try{e==="mobile"?yield this.toggleMobile(e,t):e==="web"?yield this.toggleWeb(e,t):e==="both"?yield this.toggleBoth(e,t):e==="disabled"&&(yield this.toggleDisabled(e,t))}catch{yield this.resyncAccessCaches()}})}resyncAccessCaches(){return b(this,null,function*(){yield this.loadMenu(),yield this.loadHighlightMenu(),this.loadAllMenu()})}toggleMobile(e,t){return b(this,null,function*(){let n=!this.effectiveAccess(this.origHighlightMenu[t.menu]);this.mobileOnlyMenu.includes(t.menu)||(yield this.toggleMenuStatus(!1,t,e)),this.isAgendaMenu(t.menu)||n&&(yield this.setHighlightMenuAccessOnToggle(t.menu||t.key,!0))})}toggleWeb(e,t){return b(this,null,function*(){yield this.toggleMenuStatus(!0,t,e),this.isAgendaMenu(t.menu)||(yield this.setHighlightMenuAccessOnToggle(t.menu||t.key,!1))})}toggleBoth(e,t){return b(this,null,function*(){yield this.toggleMenuStatus(!0,t,e),this.isAgendaMenu(t.menu)||(yield this.setHighlightMenuAccessOnToggle(t.menu||t.key,!0))})}toggleDisabled(e,t){return b(this,null,function*(){this.mobileOnlyMenu.includes(t.menu)||(yield this.toggleMenuStatus(!1,t,e)),this.isAgendaMenu(t.menu)||(yield this.setHighlightMenuAccessOnToggle(t.menu||t.key,!1))})}toggleMenuStatus(e,t,n=null){let o=t.menu||t.key,d=typeof e=="boolean"?e:JSON.parse(e.target.value);if(!n){let m=t.visible;return this.writeSetting({key:o,nextValue:d,label:t.altName||t.name||void 0,write:()=>this.putMenuStatus(t,o,d,null),undo:()=>this.putMenuStatus(t,o,m,null)}).then(()=>{})}return this.putMenuStatus(t,o,d,n).then(()=>{this.toastService.showSuccess("Success","Status successfully updated.")}).catch(m=>{throw this.toastService.showDanger("Not saved",m?.message||"Please try again."),m})}putMenuStatus(e,t,n,o){return b(this,null,function*(){let d=e.disabled;e.disabled=!0;let m=o?{name:t,access:n,generalAccess:o}:{name:t,visible:n};o||this.setSettingSaving(t,!0);try{if(!(yield this.settingService.setMenu(m))?.data)throw new Error(`${e?.name??t} could not be updated. Please try again.`);if(this.applyMenuStateLocally(t,n,o),yield this.loadMenu(),o&&(yield this.loadHighlightMenu()),this.loadAllMenu(),!this.isAgendaMenu(t))return;let F=this.deriveEventAgendas(this.otherFeatures.generalAgenda,this.otherFeatures.myAgenda);yield this.setOtherFeaturesOnToggle({eventAgendas:F,eventAgendasDefaultTab:F?this.otherFeatures.eventAgendasDefaultTab||(t==="generalAgenda"?"eventAgenda":"myAgenda"):""})}finally{o||this.setSettingSaving(t,!1),e.disabled=d}})}applyMenuStateLocally(e,t,n){if(n){this.origMenu[e]&&(this.origMenu[e].access=t);return}this.origMenu[e]&&(this.origMenu[e].visible=t),this.menuAccess[e]&&(this.menuAccess[e].visible=t)}setOtherFeaturesOnToggle(e){return b(this,null,function*(){let t=yield this.settingService.set("other-features",e);if(!t?.success)throw new Error(t?.message||$i);this.loadOthers()})}toggleMobileAccess(e,t){this.settingService.setMenu({name:t.menu,mobileAccess:e,type:"highlight"}).then(n=>
4{n?.data&&(this.origHighlightMenu[t.menu].mobileAccess=e,this.toastService.showSuccess("Success","Status successfully updated."),this.loadHighlightMenu())})}toggleMobileMenuGroupAccess(e,t){t.mobileAccess=e,t.type="group",this.settingService.setMenu(t).then(n=>{n?.data&&(this.toastService.showSuccess("Success","Status successfully updated."),this.loadHighlightMenu(),this.loadAppMenu())})}getMobileMenuAccessLabel(e){return this.mobileMenuAccesOptions.find(n=>n.value===e)?.viewValue||"Both"}setHighlightMenuAccessOnToggle(e,t){return b(this,null,function*(){if(!(yield this.settingService.setMenu({name:e,access:t,type:"highlight"}))?.data){let o=`${e} could not be updated. Please try again.`;throw this.toastService.showDanger("Not saved",o),new Error(o)}this.origHighlightMenu[e]=this.origHighlightMenu[e]||{},this.origHighlightMenu[e].access=t,this.toastService.showSuccess("Success","Status successfully updated."),yield this.loadHighlightMenu()})}removeOtherMenus(e){return this.menusToRemove.forEach(t=>{e[t]&&delete e[t]}),e}loadDisableLogin(){return b(this,null,function*(){let e=yield this.settingService.loadBySK(Gi);e?.success?this.loginDisabled=e.data.value:this.loginDisabled=!1})}disableLogin(e){return b(this,null,function*(){let t=yield this.settingService.loadBySK(Gi);t?.success?yield this.settingService.update(O(x({},t.data),{value:e})):yield this.settingService.create({settingKey:"#"+Gi,name:"Disable login",value:e}),this.loginDisabled=e})}changePhoto(e,t){return b(this,null,function*(){let n={banner:{customAspectRatio:3.84,resizeWidth:1920,resizeHeight:500,isResize:!1},bannerEmail:{customAspectRatio:6.25,resizeWidth:750,resizeHeight:120,isResize:!1},logo:{customAspectRatio:3.6666666666666665,resizeWidth:110,resizeHeight:30,isResize:!1},backgroundImage:{customAspectRatio:1.7777777777777777,resizeWidth:2560,resizeHeight:1440,isResize:!1},favicon:{customAspectRatio:1,resizeWidth:96,resizeHeight:96,isResize:!1},meetingLogo:{customAspectRatio:2,resizeWidth:400,resizeHeight:200,isResize:!1}},o=this.modal.open(Qn,{backdrop:"static",keyboard:!1});n[e]&&(o.componentInstance.customAspectRatio=n[e].customAspectRatio,o.componentInstance.resizeWidth=n[e].resizeWidth,o.componentInstance.resizeHeight=n[e].resizeHeight,o.componentInstance.isResize=n[e].isResize,o.componentInstance.cropBoxResizable=!1),o.componentInstance.label=t||e,o.componentInstance.optional=e==="favicon",e==="favicon"&&(o.componentInstance.allowedExtensions=[".png",".ico"]),o.componentInstance.uploadFunction=d=>e==="backgroundImage"?this.setBackgroundImage(d):this.eventService.update(O(x({},this.event),{image:d,imageKey:e})),o.componentInstance.showCentralizedFilesButton=!0;try{yield o.result,this.loadEvent(!0)}catch(d){console.debug(d)}})}toggleEventStatus(e,t){return b(this,null,function*(){if(this.event.status===t)return;if(t==="live"&&this.dashboard.data?.warnlive){this.router.navigate([`emp/${this.event.url}/dashboard`],{queryParams:{warnlive:1}});return}let n=yield this.eventService.update({PK:this.event.PK,SK:this.event.SK,status:t});n?.success?this.event.status=n.data.status:n&&!n.success&&this.utilities.alert({header:"Error",message:n.message||"Failed to change event status"})})}checkBrandingSpec(e,t){this.brandingSpecMsg[t]={};let n=new Image,o={goodQuality:"Good quality image.",notInLandscape:"Incorrect image orientation. Upload a new image in landscape mode.",tooLarge:"Image size too large. Upload a new image with the correct dimension.",tooSmall:"Image size too small. Upload a new image with the correct dimension.",uneven:"Image should have equal width and height."};n.onload=()=>{this.brandingSpecMsg[t]={good:o.goodQuality}},n.src=e}toggleSpecialFeatures(e,t){return b(this,null,function*(){let n=!1,o=!0,d,m=x({},e);delete m.description,m=O(x({},m),{value:!m.value,settingKey:"specialFeatures"}),t!==void 0&&(m.value=t==="true");let C;m.PK?C=yield this.settingService.update(m):C=yield this.settingService.create(m),C?.success&&(n=!0,this.loadSpecialFeatures()),e.name==="Gamification"&&(d=yield this.gamifyService.setSettingsGamify({key:"gamifySettingsPage",value:t}),d?.success||(o=!1)),!n&&!o&&this.utilities.alert({header:"Error",message:C?.message||d?.message||"The feature could not be updated. Please try again."})})}toggleSpecialFeatures2(e,t){return b(this,null,function*(){let n=t.key,o;if(typeof e=="boolean")o=e;else{let d=e?.target?.value;o=d===void 0?!t.value:d==="true"}return t.value===o?!1:this.writeSetting({key:n,nextValue:o,label:t?.swapValue?.altName||t.name,write:()=>this.putSpecialFeature(t,o),undo:()=>this.putSpecialFeature(t,!o)})})}putSpecialFeature(e,t){return b(this,null,function*(){let n=e.key,o=O(x({},e),{value:t,settingKey:"specialFeatures"});delete o.description,delete o.disabled;let d=e.disabled;e.disabled=!0;try{let m=o.PK?yield this.settingService.update(o):yield this.settingService.create(o);if(!m?.success){let F=m?.message?m.message:"Failed to update this setting.";throw new Error(F)}this.loadSpecialFeatures(),(yield this.settingService.setMenu({name:n,visible:t}))?.data&&(!t&&this.origAppMenu[n]&&(yield this.settingService.removeAppMenu(n))?.success&&this.loadAppMenu(),this.loadMenu(),this.loadAllMenu())}finally{e.disabled=d}})}updateBagTagTargetAttendees(n){return b(this,arguments,function*({menu:e,targetAttendees:t}){let o=x({},e);delete o.description,o=O(x({},o),{targetAttendees:t,settingKey:"specialFeatures"});let d;o.PK?d=yield this.settingService.update(o):d=yield this.settingService.create(o),d?.success&&(this.loadSpecialFeatures(),this.toastService.showSuccess("Success","Bag tag targeting updated."))})}
4withAgendaMasterSync(e){if(!("generalAgenda"in e)&&!("myAgenda"in e))return e;let t="generalAgenda"in e?e.generalAgenda:this.otherFeatures?.generalAgenda,n="myAgenda"in e?e.myAgenda:this.otherFeatures?.myAgenda;return O(x({},e),{eventAgendas:this.deriveEventAgendas(t,n)})}static{this.UNDO_TOAST_MS=1e4}static{this.MIN_BANNER_SPEED_SECONDS=1}isSettingSaving(e){return this.settingSaving[e]===!0}setSettingSaving(e,t){this.settingSaving=O(x({},this.settingSaving),{[e]:t})}writeSetting(e){return b(this,null,function*(){let{key:t,nextValue:n,write:o,undo:d}=e,m=vt(t),C=e.label??m?.label??Au(t);if(m&&Ha(t,n))return this.confirmService.ask({heading:`Change ${C}?`,consequence:m.consequence??"",confirmWord:"",confirmLabel:qa(t,n),run:()=>this.performSettingWrite(t,C,o,d)});try{return yield this.performSettingWrite(t,C,o,d),!0}catch{return!1}})}performSettingWrite(e,t,n,o){return b(this,null,function*(){this.setSettingSaving(e,!0);try{yield n(),o&&ja(e)?this.toastService.showSuccess("Saved",`${t} updated.`,"toast-setting-saved",i.UNDO_TOAST_MS,{label:"Undo",run:()=>this.undoSettingWrite(e,t,o)}):this.toastService.showSuccess("Saved",`${t} updated.`,"toast-setting-saved")}catch(d){let m=d instanceof Error?d.message:"Please try again.";throw this.toastService.showDanger("Not saved",`${t} could not be updated. ${m}`),d}finally{this.setSettingSaving(e,!1)}})}undoSettingWrite(e,t,n){return b(this,null,function*(){this.setSettingSaving(e,!0);try{yield n(),this.setSettingSaving(e,!1),this.toastService.showSuccess("Reverted",`${t} has been put back.`)}catch{this.setSettingSaving(e,!1),this.toastService.showDanger("Error",`Could not undo the change to ${t}. Please set it back manually.`)}})}putOtherFeatures(e){return b(this,null,function*(){let t=yield this.settingService.set("other-features",this.withAgendaMasterSync(e));if(!t?.success){let o=t?.message||$i;throw new Error(o)}let n=!1;for(let o of Object.keys(e)){if(e[o]||!this.origAppMenu[o])continue;let d=yield this.settingService.removeAppMenu(o);n=n||!!d?.success}n&&this.loadAppMenu(),this.loadOthers(),this.loadAllMenu()})}loadOthers(){this.settingService.getSetting("other-features").then(e=>b(this,null,function*(){e&&(this.otherFeatures=x(x({},this.otherFeatures),e.data),this.populateCustomFooterForm(e.data?.customFooter),yield this.loadAppMenu(),yield this.loadHighlightMenu(),this.loadAllMenu(),this.otherFeatures.backgroundImage&&this.checkBrandingSpec(this.otherFeatures.backgroundImage,"backgroundImage"),["eventSelfCheckIn","meetingSelfCheckIn","sessionSelfCheckIn"].forEach(n=>n in this.otherFeatures?this.otherFeatures[n]:this.otherFeatures[n]===!0),e.data&&!("liveTranscript"in e.data)&&this.event?.eventFormat==="hybrid"&&(yield this.setOthers({liveTranscript:!0})))}))}loadBrandingColors(){let e={},t=this.eventService.data?.brandingColors||[];t.length&&t.split("__--__").forEach(n=>{let o=n.split(":");e[o[0]]=o[1]}),this.primaryColor=e["--ion-color-primary"]||this.primaryColor,this.secondaryColor=e["--ion-color-secondary"]||this.secondaryColor}loadNavbarColor(){let e=this.eventService.data?.navbarColor||[],t=this.eventService.data?.navbarTextColor||[];this.defaultNavbarColor=this.eventService.data.theme==="light"?"#FFFFFF":"#1B1E29",this.defaultNavbarTextColor=this.eventService.data.theme==="light"?"#1B1E29":"#FFFFFF",this.navbarColor=e.length?e:this.defaultNavbarColor,this.navbarTextColor=t.length?t:this.defaultNavbarTextColor}loadHighlightColor(){let e=this.eventService.data?.highlightBtnColor||"",t=this.eventService.data?.highlightIconColor||"";this.highlightBtnColor=e,this.highlightIconColor=t}saveCustomColor(e,t){return b(this,null,function*(){t==="primary"?this.selCustomPrimaryColor=e:t==="secondary"&&(this.selCustomSecondaryColor=e),yield this.updateBrandingColor()})}updateBrandingColor(){return b(this,null,function*(){if(this.selCustomPrimaryColor&&this.primaryColor!==this.selCustomPrimaryColor||this.selCustomSecondaryColor&&this.secondaryColor!==this.selCustomSecondaryColor){let e=this.selCustomPrimaryColor?"Primary":"Secondary";this.primaryColor=this.selCustomPrimaryColor||this.primaryColor,this.secondaryColor=this.selCustomSecondaryColor||this.secondaryColor,this.selCustomPrimaryColor="",this.selCustomSecondaryColor="";let t=Go({primaryColor:this.primaryColor,secondaryColor:this.secondaryColor,defaultPrimaryColor:this.defaultPrimaryColor,defaultSecondaryColor:this.defaultSecondaryColor}),n=yield this.eventService.update({PK:this.event.PK,SK:this.event.SK,brandingColors:t});n?.success?(this.event.brandingColors=t,this.toastService.showSuccess("Success",e+" color has been updated successfully.")):n&&!n.success&&this.utilities.alert({header:"Error",message:n.message||"Failed to update branding colors. Please refresh the page and try again."})}})}saveCustomHighlightColor(e,t){return b(this,null,function*(){t==="button"?(this.selCustomHighlightBtnColor=e,this.updateHighlightBtnColor()):t==="icon"&&(this.selCustomHighlightIconColor=e,this.updateHighlightIconColor())})}updateHighlightBtnColor(){return b(this,null,function*(){if(this.highlightBtnColor!==this.selCustomHighlightBtnColor){this.highlightBtnColor=this.selCustomHighlightBtnColor,this.selCustomHighlightBtnColor="";let e=this.highlightBtnColor,t=yield this.eventService.update({PK:this.event.PK,SK:this.event.SK,highlightBtnColor:e});t?.success?(this.event.highlightBtnColor=this.highlightBtnColor,this.toastService.showSuccess("Success","Highlight button color has been updated successfully.")):t&&!t.success&&this.utilities.alert({header:"Error",message:t.message||"Failed to update branding colors. Please refresh the page and try again."})}})}updateHighlightIconColor(){return b(this,null,function*(){if(this.highlightIconColor!==this.selCustomHighlightIconColor){this.highlightIconColor=this.selCustomHighlightIconColor,this.selCustomHighlightIconColor="";let e=this.highlightIconColor,t=yield this.eventService.update({PK:this.event.PK,SK:this.event.SK,highlightIconColor:e});t?.success?(this.event.highlightIconColor=this.highlightIconColor,this.toastService.showSuccess("Success","Highlight icon color has been updated successfully.")):t&&!t.success&&this.utilities.alert({header:"Error",message:t.message||"Failed to update branding colors. Please refresh the page and try again."})}})}saveCustomNavbarColor(e,t){return b(this,null,function*(){t==="navbar"?(this.selCustomNavbarColor=e,this.updateNavbarC
4olor()):t==="navbarText"&&(this.selCustomNavbarTextColor=e,this.updateNavbarTextColor())})}updateNavbarColor(){return b(this,null,function*(){if(this.selCustomNavbarColor&&this.navbarColor!==this.selCustomNavbarColor){this.navbarColor=this.selCustomNavbarColor||this.navbarColor,this.selCustomNavbarColor="";let e=this.navbarColor,t=yield this.eventService.update({PK:this.event.PK,SK:this.event.SK,navbarColor:e});t?.success?(this.event.navbarColor=this.navbarColor,this.toastService.showSuccess("Success","Navigation bar background color has been updated successfully.")):t&&!t.success&&this.utilities.alert({header:"Error",message:t.message||"Failed to update branding colors. Please refresh the page and try again."})}})}updateNavbarTextColor(){return b(this,null,function*(){if(this.selCustomNavbarTextColor&&this.navbarTextColor!==this.selCustomNavbarTextColor){this.navbarTextColor=this.selCustomNavbarTextColor||this.navbarTextColor,this.selCustomNavbarTextColor="";let e=this.navbarTextColor,t=yield this.eventService.update({PK:this.event.PK,SK:this.event.SK,navbarTextColor:e});t?.success?(this.event.navbarTextColor=this.navbarTextColor,this.toastService.showSuccess("Success","Navigation bar text color has been updated successfully.")):t&&!t.success&&this.utilities.alert({header:"Error",message:t.message||"Failed to update branding colors. Please refresh the page and try again."})}})}populateCustomFooterForm(e){if(!e){this.customFooterForm.reset({text:"",pages:{all:!1,home:!1,sponsors:!1},bgColor:"",fontColor:"",fontSize:"14"}),this.customFooterBgColor="",this.customFooterFontColor="",this.customFooterEditor&&this.customFooterEditor.setEditorValue(""),this.customFooterLoaded=!0;return}let t=e.pages||[],n=t.includes("all");this.customFooterForm.reset({text:e.text||"",pages:{all:n,home:!n&&t.includes("home"),sponsors:!n&&t.includes("sponsors")},bgColor:e.bgColor||"",fontColor:e.fontColor||"",fontSize:e.fontSize||"14"}),this.customFooterBgColor=e.bgColor||"",this.customFooterFontColor=e.fontColor||"";let o=this.customFooterForm.get("pages");n?(o.get("home").disable({emitEvent:!1}),o.get("sponsors").disable({emitEvent:!1})):(o.get("home").enable({emitEvent:!1}),o.get("sponsors").enable({emitEvent:!1})),this.customFooterEditor&&this.customFooterEditor.setEditorValue(e?.text??""),this.customFooterLoaded=!0}saveCustomFooter(){return b(this,null,function*(){let e=this.customFooterForm.getRawValue(),t=e.pages.all?["all"]:[...e.pages.home?["home"]:[],...e.pages.sponsors?["sponsors"]:[]],n={text:this.stripStyleAttributes(e.text||""),pages:t,bgColor:e.bgColor||"",fontColor:e.fontColor||"",fontSize:e.fontSize||"14"};this.customFooterSaving=!0;try{(yield this.settingService.set("other-features",{customFooter:n}))?.success?(this.otherFeatures=O(x({},this.otherFeatures),{customFooter:n}),this.toastService.showSuccess("Success","Custom footer has been updated successfully."),this.customFooterForm.markAsPristine()):this.toastService.showDanger("Failed","Failed to save custom footer. Please try again.")}finally{this.customFooterSaving=!1}})}stripStyleAttributes(e){return e.replace(/\s+style\s*=\s*"[^"]*"/gi,"").replace(/\s+style\s*=\s*'[^']*'/gi,"")}onCustomFooterColor(e,t){this.customFooterForm.get(e).setValue(t),this.customFooterForm.markAsDirty(),e==="bgColor"?this.customFooterBgColor=t:this.customFooterFontColor=t}onCustomFooterFontSize(e){this.customFooterForm.get("fontSize").setValue(e),this.customFooterForm.markAsDirty()}confirmColorReset(e){return this.confirmService.ask({heading:`Reset the ${e} color?`,consequence:`The ${e} color goes back to the Canapii default. Your chosen color is not kept.`,confirmWord:"",confirmLabel:"Reset color"})}resetBrandingColor(e=""){return b(this,null,function*(){(yield this.confirmColorReset(e==="secondary"?"secondary":"primary"))&&(e==="primary"?this.selCustomPrimaryColor=this.defaultPrimaryColor:e==="secondary"&&(this.selCustomSecondaryColor=this.defaultSecondaryColor),yield this.updateBrandingColor(),this.loadBrandingColors())})}resetHighlightColor(e=""){return b(this,null,function*(){(yield this.confirmColorReset(e==="icon"?"highlight icon":"highlight button"))&&(e==="button"?(this.selCustomHighlightBtnColor="",yield this.updateHighlightBtnColor()):e==="icon"&&(this.selCustomHighlightIconColor="",yield this.updateHighlightIconColor()),this.loadHighlightColor())})}resetNavbarColor(e=""){return b(this,null,function*(){(yield this.confirmColorReset(e==="navbarText"?"n
4avigation bar text":"navigation bar background"))&&(e==="navbar"?(this.selCustomNavbarColor=this.defaultNavbarColor,yield this.updateNavbarColor()):e==="navbarText"&&(this.selCustomNavbarTextColor=this.defaultNavbarTextColor,yield this.updateNavbarTextColor()),this.loadNavbarColor())})}updateMenu(e,t=!1){let n=e.menu;this.updateMenuIsHighlight=t,this.updateMenuDialog?.openWith({menu:{key:n,value:t?this.origHighlightMenu[n]:this.origMenu[n]},isGroupChild:e.isGroupChild??!1,type:t?"highlight":void 0})}onMenuItemSaved(){this.updateMenuIsHighlight?this.loadHighlightMenu():this.loadMenu(),this.loadAppMenu()}hideMenuItem(e,t=!1){return b(this,null,function*(){let n=this.descriptions[e.menu]?.title||e.name;if(!(yield this.confirmService.ask({heading:`Remove ${n} from the menu?`,consequence:"Attendees stop seeing it. You can show it again from this table whenever you want it back.",confirmWord:"",confirmLabel:"Remove from menu"})))return;let d=yield this.trackVisibilityWrite(b(this,null,function*(){let m=yield this.settingService.setMenu({name:e.menu,visible:!1});return m?.data&&(t?yield this.loadHighlightMenu():yield this.loadMenu()),m}));d?.data?(this.toastService.showSuccess("Success",`${n} menu is now hidden.`),this.loadAppMenu()):this.toastService.showDanger("Error",d?.message||`${n} could not be removed from the menu.`)})}toggleMenuItemVisibility(e,t,n=!1){return b(this,null,function*(){let o={name:e.menu,visible:t};n&&(o.type="highlight"),(yield this.trackVisibilityWrite(b(this,null,function*(){let m=yield this.settingService.setMenu(o);return m?.data&&(n?yield this.loadHighlightMenu():yield this.loadMenu()),m})))?.data&&this.loadAppMenu()})}toggleCustomMenuItemVisibility(e,t,n=!1){return b(this,null,function*(){let o=e.key||e.menu;if(!o)return;(yield this.trackVisibilityWrite(b(this,null,function*(){let m=yield this.settingService.updateCustomMenuItem({key:o,visible:t});return m?.success>0&&(n?yield this.loadHighlightMenu():yield this.loadMenu()),m})))?.success>0&&this.loadAppMenu()})}changeOwner(){this.changeOwnerDialog?.openWith(this.event.user)}onOwnerChanged(){this.loadEvent(!0)}putOtherFeaturesGroup(e,t){return b(this,null,function*(){let n=yield this.settingService.set("other-features",this.withAgendaMasterSync(e));if(!n?.success){let o=n?.message||$i;throw new Error(o)}t()})}reloadMenusAndFeatures(){this.loadOthers(),this.loadMenu(),this.loadHighlightMenu(),this.loadAppMenu(),this.loadAllMenu()}snapshotOtherFeatures(e){return e.reduce((t,n)=>{let o=this.otherFeatures?.[n];return O(x({},t),{[n]:o===void 0?null:o})},{})}toggleAllChats(e){return b(this,null,function*(){let t={sidebarChat:e?"defaultOpen":"disabled",eventChat:e,personalChat:e,groupChat:e,techSupportChat:e},n=this.snapshotOtherFeatures(Object.keys(t)),o=()=>{this.loadOthers(),this.loadAppMenu()};return this.writeSetting({key:"chatAll",nextValue:e,write:()=>this.putOtherFeaturesGroup(t,o),undo:()=>this.putOtherFeaturesGroup(n,o)})})}toggleAllSelfCheckIn(e){return b(this,null,function*(){let t={meetingSelfCheckIn:e,sessionSelfCheckIn:e,eventSelfCheckIn:e},n=this.snapshotOtherFeatures(Object.keys(t)),o=()=>{this.loadOthers(),this.loadAppMenu()};return this.writeSetting({key:"selfCheckInAll",nextValue:e,write:()=>this.putOtherFeaturesGroup(t,o),undo:()=>this.putOtherFeaturesGroup(n,o)})})}toggleAllAgendas(e){return b(this,null,function*(){let t={eventAgendasDefaultTab:e?"eventAgenda":"",generalAgenda:e,myAgenda:e},n=this.snapshotOtherFeatures(Object.keys(t)),o=()=>this.reloadMenusAndFeatures();return this.writeSetting({key:"agendaAll",nextValue:e,write:()=>this.putOtherFeaturesGroup(t,o),undo:()=>this.putOtherFeaturesGroup(n,o)})})}toggleAllFilters(e){return b(this,null,function*(){let t={agendaFilters:e,agendaTypesFilters:e,sessionTagsFilters:e,sessionTracksFilters:e},n=()=>this.reloadMenusAndFeatures();return this.writeSetting({key:"agendaFilters",nextValue:e,write:()=>this.putOtherFeaturesGroup(t,n)})})}loadAdditionalSpecialFeaturesField(){this.specialFeatures.forEach(e=>e.swapValue=this.origMenu[e.key]),this.gamification.swapValue=this.origMenu[this.gamification.key]}
4setBackgroundImage(e){return b(this,null,function*(){let t=yield this.eventService.upload(e);if(t?.success){let n=t.data;return yield this.setOthers({backgroundImage:n}),{success:1}}else return t})}toggleGroupMenuStatus(e,t){return b(this,null,function*(){t.disabled=!0,t.visible=JSON.parse(e.target.value),this.settingService.updateGroupMenu(t).then(n=>{this.toastService.showSuccess("Success","Status updated successfully"),this.loadMenu()})})}toggleGroupHighlightMenuStatus(e,t){return b(this,null,function*(){t.disabled=!0,t.visible=JSON.parse(e.target.value),this.settingService.updateHighlightGroupMenu(t).then(n=>{this.toastService.showSuccess("Success","Status updated successfully"),this.loadHighlightMenu()})})}removeGroupMenu(e){return this.removeGroup("web",e,"Are you sure you want to remove this group?",()=>this.settingService.removeGroupMenu(e),()=>this.loadMenu())}removeGroupHighlightMenu(e){return this.removeGroup("mobile",e,"Are you sure you want to remove this group? The menus inside will be moved back to the main list.",()=>this.settingService.removeGroupHighlightMenu(e),()=>this.loadHighlightMenu())}removeMenuItem({index:e,menu:t}){return this.removeGroupItem("web",e,t,()=>this.settingService.updateGroupMenu(t),()=>this.loadMenu())}removeHighlightMenuItem({index:e,menu:t}){return this.removeGroupItem("mobile",e,t,()=>this.settingService.updateHighlightGroupMenu(t),()=>this.loadHighlightMenu())}removeGroup(e,t,n,o,d){return this.removeOnce(e,()=>b(this,null,function*(){(yield this.confirmService.ask({heading:`Remove ${t.name}?`,consequence:n,confirmWord:"remove",confirmLabel:"Remove group"}))&&(yield this.menuWriteLanded(o,Tu))&&(this.toastService.showSuccess("Success","Group removed successfully."),yield d())}))}removeGroupItem(e,t,n,o,d){return this.removeOnce(e,()=>b(this,null,function*(){let m=[...n.items];if(yield this.removeItem({index:t,menu:n})){if(!(yield this.menuWriteLanded(o,Du))){n.items.splice(0,n.items.length,...m);return}this.toastService.showSuccess("Successful","Menu successfully removed."),yield d()}}))}menuWriteLanded(e,t){return b(this,null,function*(){let n;try{n=yield e()}catch(o){console.debug(t,o),n=null}return n?.success?!0:(this.toastService.showDanger("Error",n?.message||t),!1)})}removeItem(n){return b(this,arguments,function*({index:e,menu:t}){let o=!1;return t.items.length===2?(this.toastService.showDanger("Unable to remove","Unable to remove. Group menu should have at least two (2) menus."),o):(o=yield this.confirmService.ask({heading:`Remove ${t.items[e].name} from ${t.name}?`,consequence:"The menu leaves this group and goes back to the main list. The change is stored when you save.",confirmWord:"",confirmLabel:"Remove from group"}),o&&(t.items.splice(e,1),o))})}updateGroupMenu(e,t=!1){this.openGroupDialog({key:"updateGroup",value:t?this.eventHighlightMenu:this.eventMenu,group:e},t)}addMenu(e,t=!1){this.openGroupDialog({key:"addMenu",value:t?this.eventHighlightMenu:this.eventMenu,group:e},t)}deleteImage(e,t){return b(this,null,function*(){if(!t)return;let n="",o="The image is removed from this event. You can upload another one at any time.";if(["banner","bannerEmail"].includes(t)&&(n=this.defaultImages[t],o="The default banner image is used instead. You can upload another one at any time."),!!(yield this.confirmService.ask({heading:"Remove this image?",consequence:o,confirmWord:"",confirmLabel:"Remove image"})))try{let m=yield this.processDeleteImage(t,n);m?.success?(t==="other-features"?this.loadOthers():(this.event[t]=n,this.checkBrandingSpec(this.event[t],t)),this.toastService.showSuccess("Success","Image removed successfully.")):this.utilities.alert({message:m?.message||"Failed to remove image. Please refresh the page and try again."})}catch(m){this.utilities.alert({header:"Error",message:m.message?m.message:"Failed to remove image. Please refresh the page and try again."})}})}processDeleteImage(e,t){return b(this,null,function*(){let n;if(e==="other-features"){let o=O(x({},this.otherFeatures),{backgroundImage:t});n=yield this.settingService.deleteImage(o,e,"backgroundImage")}else{let o={PK:this.event.PK,SK:this.event.SK};o[e]=t,n=yield this.eventService.update(o)}return n})}nextSortValue(e){let t=e?.length?e[e.length-1]:null;return Number(t?.sort??0)+1}addGroupMenu(e){this.openGroupDialog({key:e,value:this.eventMenu,lastSortValue:this.nextSortValue(this.eventMenu)},!1)}addHighlightGroupMenu(e){this.openGroupDialog({key:e,value:this.eventHighlightMenu,lastSortValue:this.nextSortValue(this.eventHighlightMenu)},!0)}openGroupDialog(e,t){this.groupDialogIsHighlight=t,this.groupDialogCreates=e.key!=="updateGroup"&&e.key!=="addMenu",this.groupDialog?.openWith({menu:e,type:t?"highlight":void 0})}onGroupSaved(e){e&&this.groupDialogCreates&&this.groupMenus.push(e),this.groupDialogIsHighlight?this.loadHighlightMenu():this.loadMenu()}addAppMenu(e){this.addAppMenuDialog?.openWith({menu:{key:e,value:this.allHighlightMenus,lastSortValue:this.nextSortValue(this.eventHighlightMenu)},otherFeatures:this.otherFeatures,appmenulength:this.eventAppMenu?.length??0,appmenu:this.eventAppMenu,defappmenu:[]})}onAppMenuAdded(){this.loadAppMenu()}removeMenu(e){return this.removeOnce("app",()=>b(this,null,function*(){(yield this.settingService.removeAppMenu(e.menu))?.success?(this.toastService.showSuccess("Successful","Menu successfully removed"),yield this.loadAppMenu()):this.toastService.showDanger("Failed","Failed to remove menu")}))}disableMenuByPlan(){let e=["customDomain","sponsorAdmins","onsiteRegistration","locations","badge"],t={free_events:[...e,"gamification","campaign","privateRsvp","provider","isSocialMedia"],free_events_dev:[...e,"gamification","campaign","privateRsvp","provider","isSocialMedia"],free_attendee:[...e,"gamification","campaign","privateRsvp","provider","isSocialMedia"],free:[...e,"gamification","campaign","privateRsvp","provider","isSocialMedia"],motivator_plan:[...e],motivator_plan_dev:[...e],driver_plan:[...e],driver_plan_dev:[...e],"essential-plan":["customDomain"],"enterprise-plan":[],"professional-plan":[]},n=this.eventService.data.user;this.otherSettings=this.otherSettings.map(o=>(t[n.subscriptionType]?.includes(o.menu)&&!n.superadmin&&!this.isSuperAdmin&&!this.proPlans.includes(this.eventService.data?.user?.subscriptionType)&&(o.disabled=!0),o)),this.specialFeatures=this.specialFeatures.map(o=>(t[n.subscriptionType]?.includes(o.key)&&!n.superadmin&&!this.isSuperAdmin&&(!this.proPlans.includes(n?.subscriptionType)||this.userProfile!==n?.PK&&this.proPlans.includes(this.userProfile?.subscriptionType))&&(o.disabled=!o?.value),o))}disableMenuByEventType(){let e=this.isOnsiteOnlyFeature;this.eventService.data.eventFormat==="virtual"&&(this.otherSettings=this.otherSettings.map(n=>(e.includes(n.menu)&&(n.disabled=!0),n)),this.specialFeatures=this.specialFeatures.map(n=>(e.includes(n.key)&&(n.disabled=!n?.value),n)))}onEventAppMenuListDropChanges(e){this.moveAppMenuItem(e.previousIndex,e.currentIndex)}moveAppMenuItem(e,t){let n=this.shownMenuRows("app"),o=this.dataIndexOfShownRow("app",e),d=this.dataIndexOfShownRow("app",t);if(o<0||d<0||o===d||t<=0||t>=n.length-1){this.isEventAppMenuDragAndDropDisabled=!1,this.isEventAppMenuSortLoading=!1;return}this.isSortingAppMenuList=!0;let m=this.eventAppMenuDS.data[o];st(this.eventAppMenuDS.data,o,d),m.previousIndex=o,m.currentIndex=d,this.eventAppMenuDS.data=[...this.eventAppMenuDS.data],this.appMenuListSortArrayNew=this.eventAppMenuDS.data}onCancelEventAppMenuListDrop(){return b(this,null,function*(){yield this.loadAppMenu(),this.isEventAppMenuSortLoading=!1,this.isEventAppMenuDragAndDropDisabled=!1,this.isSortingAppMenuList=!1})}onSaveEventAppMenuListDrop(){return b(this,null,function*(){this.isEventAppMenuSortLoading=!0,this.isEventAppMenuDragAndDropDisabled=!0;let e={};
4this.appMenuListSortArrayNew.forEach((n,o)=>{e[n.menu]={activeIcon:n.activeIcon,icon:n.icon,name:n.name,route:n.route,sort:n.menu==="hamburgermenu"?9999:o+1,visible:n.visible,key:n.menu,targetAttendees:n.targetAttendees,altName:n.altName}});let t=yield this.settingService.sortAppMenu(e);this.isEventAppMenuSortLoading=!1,this.isEventAppMenuDragAndDropDisabled=!1,t?.data?(this.isSortingAppMenuList=!1,this.toastService.showSuccess("Success","Successfully sorted"),this.loadAppMenu()):this.toastService.showDanger("Failed","Failed to sort. The order on screen has not been saved.")})}onEventMenuListDrop(e){this.moveEventMenuItem(e.previousIndex,e.currentIndex)}moveEventMenuItem(e,t){let n=this.dataIndexOfShownRow("web",e),o=this.dataIndexOfShownRow("web",t);if(n<0||o<0||n===o){this.isEventMenuDragAndDropDisabled=!1,this.isEventMenuSortLoading=!1;return}this.isSortingEventMenuList=!0;let d=this.eventMenuDS.data[n];st(this.eventMenuDS.data,n,o),d.previousIndex=n,d.currentIndex=o,this.eventMenuDS.data=[...this.eventMenuDS.data],this.eventMenuListSortArrayNew=this.eventMenuDS.data;let m=this.eventMenuListSortArrayNew.findIndex(C=>C.menu===d.menu);m>=0&&this.shiftSortValues(this.eventMenuListSortArrayNew,d,m,n)}onSaveEventMenuListDrop(){return b(this,null,function*(){this.isEventMenuSortLoading=!0,this.isEventMenuDragAndDropDisabled=!0;let e=this.hasPendingOrder("web");if(yield this.settleVisibilityWrites(),e&&!this.hasPendingOrder("web")){this.isEventMenuSortLoading=!1,this.isEventMenuDragAndDropDisabled=!1,this.isSortingEventMenuList=!1,this.reportReorderDropped();return}let t=this.eventMenuListSortArrayNew||this.eventMenuDS.data,n=this.menuRowsToSave("web",t,this.groupMenu);if(!n.length){this.isEventMenuSortLoading=!1,this.isEventMenuDragAndDropDisabled=!1,this.isSortingEventMenuList=!1,this.reportReorderDropped();return}let o=yield this.settingService.sortMenu(n);this.isEventMenuSortLoading=!1,this.isEventMenuDragAndDropDisabled=!1,o?.data?(this.isSortingEventMenuList=!1,this.toastService.showSuccess("Success","Successfully sorted"),yield this.loadMenu(),this.loadAllMenu()):this.toastService.showDanger("Failed","Failed to sort. The order on screen has not been saved.")})}onCancelEventMenuListDrop(){return b(this,null,function*(){yield this.loadMenu(),this.isEventMenuSortLoading=!1,this.isEventMenuDragAndDropDisabled=!1,this.isSortingEventMenuList=!1})}onEventHighlightMenuListDropChanges(e){this.moveHighlightMenuItem(e.previousIndex,e.currentIndex)}moveHighlightMenuItem(e,t){let n=this.dataIndexOfShownRow("mobile",e),o=this.dataIndexOfShownRow("mobile",t);if(n<0||o<0||n===o){this.isEventHighlightMenuDragAndDropDisabled=!1,this.isEventHighlightMenuSortLoading=!1;return}this.isSortingHighlightMenuList=!0;let d=this.eventHighlightMenuDS.data[n];st(this.eventHighlightMenuDS.data,n,o),d.previousIndex=n,d.currentIndex=o,this.eventHighlightMenuDS.data=[...this.eventHighlightMenuDS.data],this.highlightMenuListSortArrayNew=this.eventHighlightMenuDS.data;let m=this.highlightMenuListSortArrayNew.findIndex(C=>C.menu===d.menu);m>=0&&this.shiftSortValues(this.highlightMenuListSortArrayNew,d,m,n)}menuRowsToSave(e,t,n){let o=t.filter(d=>d&&(e!=="web"||d.generalAccess!=="mobile")&&(this.isMenuRowShown(e,d)||!!d.visible));return o.forEach((d,m)=>{d.sort=m+1}),o.map(d=>{let m=d.items?O(x({},d),{items:this.storedGroupMembers(n,d)}):x({},d);return O(x({},m),{visible:this.storedVisibility(e,d)})})}storedVisibility(e,t){let o=(e==="web"?this.origMenu:this.origHighlightMenu)?.[t?.menu]?.visible;return typeof o=="boolean"?o:!!t?.visible}trackVisibilityWrite(e){return this.menuVisibilityWrites.add(e),e.catch(()=>{}).finally(()=>this.menuVisibilityWrites.delete(e)),e}settleVisibilityWrites(){return b(this,null,function*(){for(;this.menuVisibilityWrites.size;)yield Promise.allSettled([...this.menuVisibilityWrites])})}hasPendingOrder(e){let t=e==="web"?this.eventMenuListSortArrayNew:this.highlightMenuListSortArrayNew;return Array.isArray(t)?t.length>0:!!t}reportReorderDropped(){this.toastService.showWarning("Not saved","The menu reloaded while saving, so the new order was not saved. Move the rows again.")}storedGroupMembers(e,t){let n=e?.[t.menu]?.items;return(Array.isArray(n)?n:(t.items??[]).map(d=>d?.menu)).filter(d=>
4typeof d=="string"&&d.length>0).map(d=>({menu:d}))}shiftSortValues(e,t,n,o){let d=t.sort;if(t.previousIndex-t.currentIndex>0)for(let m=n;m<=t.previousIndex-1;m++)e[m].sort=e[m+1].sort;else for(let m=n;m>o;m--)e[m].sort=e[m-1].sort;e[o].sort=d}onSaveHighlightMenuListDrop(){return b(this,null,function*(){this.isEventHighlightMenuDragAndDropDisabled=!0,this.isEventHighlightMenuSortLoading=!0;let e=this.hasPendingOrder("mobile");if(yield this.settleVisibilityWrites(),e&&!this.hasPendingOrder("mobile")){this.isEventHighlightMenuDragAndDropDisabled=!1,this.isEventHighlightMenuSortLoading=!1,this.isSortingHighlightMenuList=!1,this.reportReorderDropped();return}let t=this.hasPendingOrder("mobile")?this.highlightMenuListSortArrayNew:this.eventHighlightMenuDS.data,n=this.menuRowsToSave("mobile",t,this.groupHighlightMenu);if(!n.length){this.isEventHighlightMenuDragAndDropDisabled=!1,this.isEventHighlightMenuSortLoading=!1,this.isSortingHighlightMenuList=!1,this.reportReorderDropped();return}(yield this.settingService.sortHighlightMenu(n))?.data?(this.isSortingHighlightMenuList=!1,this.toastService.showSuccess("Success","Successfully sorted"),yield this.loadHighlightMenu(),this.loadAllMenu()):this.toastService.showDanger("Failed","Failed to sort. The order on screen has not been saved."),this.isEventHighlightMenuDragAndDropDisabled=!1,this.isEventHighlightMenuSortLoading=!1})}onCancelHighlightMenuListDrop(){return b(this,null,function*(){yield this.loadHighlightMenu(),this.isEventHighlightMenuSortLoading=!1,this.isEventHighlightMenuDragAndDropDisabled=!1,this.isSortingHighlightMenuList=!1})}updateTargetAttendees(e,t){return b(this,null,function*(){try{yield this.settingService.setMenu({name:this.origMenu[t].key,targetAttendees:e}),yield this.loadMenu(),this.toastService.showSuccess("Success","Successfully updated target attendees")}catch(n){console.debug(n),this.toastService.showDanger("failed","Failed to update target attendees")}})}updateHighlightTargetAttendees(e,t){return b(this,null,function*(){try{yield this.settingService.setMenu({name:this.origHighlightMenu[t].key,targetAttendees:e,type:"highlight"}),yield this.loadHighlightMenu(),this.toastService.showSuccess("Success","Successfully updated target attendees")}catch(n){console.debug(n),this.toastService.showDanger("failed","Failed to update target attendees")}})}updateGroupMenuTargetAttendees(e,t){return b(this,null,function*(){try{yield this.settingService.updateGroupMenu(O(x({},t),{targetAttendees:e})),yield this.loadMenu(),this.toastService.showSuccess("Success","Successfully updated target attendees")}catch(n){console.debug(n),this.toastService.showDanger("failed","Failed to update target attendees")}})}updateHighlightGroupMenuTargetAttendees(e,t){return b(this,null,function*(){try{yield this.settingService.updateHighlightGroupMenu(O(x({},t),{targetAttendees:e})),yield this.loadHighlightMenu(),this.toastService.showSuccess("Success","Successfully updated target attendees")}catch(n){console.debug(n),this.toastService.showDanger("failed","Failed to update target attendees")}})}toggleEventFormat(e){return b(this,null,function*(){this.event.eventFormat!==e&&(yield this.confirmService.ask({heading:"Change the event mode?",consequence:"This updates your session settings and the attendee experience.",confirmWord:"",confirmLabel:"Change event mode",run:()=>b(this,null,function*(){let t=yield this.eventService.update({PK:this.event.PK,SK:this.event.SK,eventFormat:e});if(t?.success){this.event.eventFormat=t.data.eventFormat,yield this.disableFeatureByEventFormat(t.data),e==="hybrid"&&(yield this.setOthers({liveTranscript:!0})),yield this.loadMenu(),this.toastService.showSuccess("Success","Event mode updated");return}let n=t?.message||"Failed to change event mode";throw this.toastService.showDanger("Not changed",n),new Error(n)})}))})}toggleTheme(e){return b(this,null,function*(){let t=yield this.eventService.update({PK:this.event.PK,SK:this.event.SK,theme:e});t?.success?(this.event.theme=t.data.theme,this.toastService.showSuccess("Success","Theme appearance updated")):t&&!t.success&&this.utilities.alert({header:"Error",message:t.message||"Failed to change theme appearance"})})}toggleCentralisedResources(e){return b(this,null,function*(){this.event.centralisedResources===e||!this.event.centralisedResources&&!e||(yield this.writeSetting({key:"centralisedResources",nextValue:e,write:()=>b(this,null,function*(){let t=yield this.eventService.update({PK:this.event.PK,SK:this.event.SK,centralisedResources:e});if(!t?.success){let n=t?.message||"Failed to change settings on centralised resources";throw new Error(n)}this.event.centralisedResources=t.data.centralisedResources})}))})}setMobileHomeView(e){return b(this,null,function*(){yield this.confirmService.ask({heading:"Set the mobile homepage view?",consequence:`The mobile homepage layout uses the "${e}" view from now on. You can set it back at any time.`,confirmWord:"",confirmLabel:"Set view",run:()=>b(this,null,function*(){let t=yield this.eventService.update({PK:this.event.PK,SK:this.event.SK,mobileHomeView:e});if(t?.success){this.event.mobileHomeView=t.data.mobileHomeView,this.toastService.showSuccess("Success","Mobile homepage view updated");return}let n=t?.message||"Failed to change mobile homepage view. Please refresh the page and try again.";throw this.toastService.showDanger("Not changed",n),new Error(n)})})})}setTargetAttendees(){this.chatTargetDialog?.openWith(this.otherFeatures)}onChatTargetsSaved(){this.loadOthers()}putEventField(e,t){return b(this,null,function*(){let n=yield this.eventService.update({PK:this.event.PK,SK:this.event.SK,[e]:t});if(!n?.data){let o=n?.message?n.message:`Could not update ${e}.`;throw new Error(o)}this.loadEvent(!0)})}toggleEventNominations(e){return b(this,null,function*(){if(this.event?.isNominationsEnabled===e)return;let t=this.event?.isNominationsEnabled;yield this.writeSetting({key:"isNominationsEnabled",nextValue:e,write:()=>this.putEventField("isNominationsEnabled",e),undo:()=>this.putEventField("isNominationsEnabled",t)})})}toggleUseUnifiedRegistration(e){return b(this,null,function*(){if(this.event?.useUnifiedRegistration===e)return;let t=this.event?.useUnifiedRegistration;yield this.writeSetting({key:"useUnifiedRegistration",nextValue:e,write:()=>this.putEventField("useUnifiedRegistration",e),undo:()=>this.putEventField("useUnifiedRegistration",t)})})}updateSlowModeCounter(){return b(this,null,function*(){if(this.otherFeatures.slowModeCounter<0){this.toastService.showDanger("Error","Invalid slow mode value!");return}this.isSavingSlowModeCounter=!0;try{yield this.setOthers({slowModeCounter:this.otherFeatures.slowModeCounter},"Slow mode value")}finally{this.isSavingSlowModeCounter=!1}})}saveBannerSpeed(e){return b(this,null,function*(){let t=e==="highlight"?"highlightBannerSpeed":"secondaryBannerSpeed",n=e==="highlight"?this.highlightBannerSpeed:this.secondaryBannerSpeed,o=Number(n);if(!Number.isFinite(o)||o<i.MIN_BANNER_SPEED_SECONDS){let d=vt(t)?.label??t;this.toastService.showDanger("Not saved",`${d} must be at least ${i.MIN_BANNER_SPEED_SECONDS} second.`);return}yield this.writeSetting({key:t,nextValue:n,write:()=>this.putEventField(t,n)})})}loadAboutPrivacy(){return this.aboutPrivacy.get("about-privacy-app").then(e=>{e?.data&&(this.aboutPrivacyMenu=e.data)})}
4toggleStatus(e,t){return this.aboutPrivacy.setApp({key:t,visible:e}).then(n=>b(this,null,function*(){n?.data&&(yield this.loadAboutPrivacy())}))}updateAboutPrivacy(e){return b(this,null,function*(){let t=this.modal.open(na,O(x({},Eu),{centered:!0,size:"lg",backdrop:"static"}));t.componentInstance.data=e,t.componentInstance.type="app";try{yield t.result,this.loadAboutPrivacy()}catch(n){console.debug(n)}})}updateBannerVisibility(e){return b(this,null,function*(){if(this.event.enableBanner!==e){try{this.isEnableBannerLoading=!0;let t=yield this.eventService.update({PK:this.event.PK,SK:this.event.SK,enableBanner:e});t?.success?(this.event.enableBanner=t.data.enableBanner,this.toastService.showSuccess("Success","Banner visibility updated.")):t&&!t.success&&this.utilities.alert({header:"Error",message:t.message||"Failed to change font"})}catch(t){console.debug(t),this.toastService.showDanger("Error","Failed to update banner visibility.")}this.isEnableBannerLoading=!1}})}getMenuAccessOptions(e,t){return t==="hyhyve"?e.filter(n=>n.value!=="mobile"&&n.value!=="both"):e}getPreferredLanguageDisplay(){let e=this.event?.eventLanguage;if(!e)return"English";let t=jn.find(n=>n.key===e);return t?t.value:e}updateInteractiveFloorplanStatus(e){let t=e.data.find(n=>n.name==="Interactive floorplan");t&&(this.isInteractiveFloorplanEnable=t.value)}platformAccessLabel(e){switch(e){case"web":return"Web app only";case"mobile":return"Mobile app only";default:return"Both the web and mobile apps"}}isDesktopOn(e){return e.access==="web"||e.access==="both"}isMobileOn(e){return e.access==="mobile"||e.access==="both"}isDesktopToggleDisabled(e){return e.menu==="chatbot"||e.menu==="playlists"}isMobileToggleDisabled(e){return e.menu==="hyhyve"}onDesktopToggle(e){let t=this.computeAccessFromToggles(!this.isDesktopOn(e),this.isMobileOn(e),e);return e.access=t,this.applyAccessChange(t,e)}onMobileToggle(e){let t=this.computeAccessFromToggles(this.isDesktopOn(e),!this.isMobileOn(e),e);return e.access=t,this.applyAccessChange(t,e)}computeAccessFromToggles(e,t,n){return e&&t?"both":e?"web":t||this.mobileOnlyMenu.includes(n.menu)&&n.menu!=="playlists"&&n.menu!=="chatbot"?"mobile":"disabled"}applyAccessChange(e,t){return t._isCustom?this.applyCustomItemAccessChange(e,t):this.mobileOnlyMenu.includes(t.menu)&&t.menu!=="playlists"&&t.menu!=="chatbot"?this.toggleSpecialFeaturesAccess(e,t):this.toggleMenuAccess(e,t)}applyCustomItemAccessChange(e,t){return b(this,null,function*(){let n=t.key||t.menu;if(n)try{let o={key:n};e==="web"||e==="mobile"||e==="both"?(o.usage=e,o.access=!0):o.access=!1;let d=yield this.settingService.updateCustomMenuItem(o);d?.success>0?this.toastService.showSuccess("Success","Status successfully updated."):this.toastService.showDanger("Error",d?.message||"Failed to update menu item")}catch(o){this.toastService.showDanger("Error","Failed to update menu item"),console.debug("Failed to update custom menu item access",o)}finally{yield Promise.all([this.loadMenu(),this.loadHighlightMenu()]),this.loadAllMenu()}})}usageIcon(e){switch(e){case"web":return"bi-display";case"mobile":return"bi-phone";default:return"bi-phone"}}onCustomItemTargetAttendeesChanged(e,t,n="web"){return b(this,null,function*(){if(t?.key)try{yield this.settingService.updateCustomMenuItem(O(x({},t),{targetAttendees:e,key:t.key,updateMenuType:n})),t.targetAttendees=e,this.toastService.showSuccess("Success","Target attendees updated"),yield Promise.all([this.loadMenu(),this.loadHighlightMenu()]),this.loadAllMenu()}catch(o){this.toastService.showDanger("Error","Failed to update target attendees"),console.debug("Failed to update custom menu item target attendees",o)}})}loadCustomMenuItems(){return b(this,null,function*(){this.isLoadingCustomMenuItems=!0;try{let e=yield this.settingService.getCustomMenuItems();this.customMenuItems=e?.data||[]}catch(e){console.debug("Failed to load custom menu items",e),this.customMenuItems=[]}this.isLoadingCustomMenuItems=!1})}openCustomMenuItemModal(e="create",t,n="web"){this.customMenuItemDialog?.openWith({mode:e,eventAppUrl:this.event?.appUrl||"",context:n,menuItem:t})}onCustomMenuItemSaved(){return b(this,null,function*(){yield Promise.all([this.loadCustomMenuItems(),this.loadMenu(),this.loadHighlightMenu()]),this.loadAllMenu()})}removeCustomMenuItem(e){return b(this,null,function*(){e?.key&&(yield this.removeOnce("custom",()=>this.confirmRemoveCustomMenuItem(e)))})}confirmRemoveCustomMenuItem(e){return b(this,null,function*(){if(yield this.confirmService.ask({heading:`Remove "${e.name}"?`,consequence:"The custom menu item is deleted from this event. This cannot be undone.",confirmWord:"remove",confirmLabel:"Remove custom menu"}))try{let n=yield this.settingService.removeCustomMenuItem(e.key);n?.success>0?(this.toastService.showSuccess("Success","Custom menu item removed"),yield Promise.all([this.loadCustomMenuItems(),this.loadMenu(),this.loadHighlightMenu()]),this.loadAllMenu()):this.toastService.showDanger("Error",n?.message||Hi)}catch(n){this.toastService.showDanger("Error",Hi),console.debug(Hi,n)}})}static{this.\u0275fac=function(t){return new(t||i)(w(X),w(lo),w(at),w(W),w(le),w(ke),w(kt),w(Et),w(se),w(Ko),w(jo),w(co),w(So),w(to),w(Ho),w(gi),w(Lt),w(kn))}}static{this.\u0275cmp=P({type:i,selectors:[["ng-component"]],viewQuery:function(t,n){if(t&1&&(me(Jc,5),me(bn,5),me(mn,5),me(vn,5),me(hn,5),me(cn,5),me(Sn,5),me(gn,5),me(Ni,5),me(dn,5)),t&2){let o;he(o=ge())&&(n.customFooterEditor=o.first),he(o=ge())&&(n.updateDetailDialog=o.first),he(o=ge())&&(n.changeOwnerDialog=o.first),he(o=ge())&&(n.retentionDialog=o.first),he(o=ge())&&(n.chatTargetDialog=o.first),he(o=ge())&&(n.addAppMenuDialog=o.first),he(o=ge())&&(n.updateMenuDialog=o.first),he(o=ge())&&(n.duplicateDialog=o.first),he(o=ge())&&(n.customMenuItemDialog=o.first),he(o=ge())&&(n.groupDialog=o.first)}},decls:22,vars:9,consts:[["tabList",""],["moveButtons",""],["detailRow",""],["fontField",""],["previewField",""],["customFooterEditor",""],["pagesTabList",""],["heading","General settings","de
4scription","You can always come back and update settings to a published event after you\u2019ve published it. Once you\u2019ve made changes to a published event, simply refresh the event page to see the updates."],["cnpPageHeaderRail","","idPrefix","settings","ariaLabel","Settings sections",3,"activeIdChange","tabs","activeId"],["role","tabpanel",1,"settings-panel",3,"id","hidden"],[3,"saved"],[3,"changed"],[3,"chosen"],[3,"added"],[3,"duplicated"],[1,"status-band"],[1,"band-item"],[1,"band-label"],["label","Mode","text","In-person and virtual mode events offer different tools that you can leverage for your event. If your event is hybrid, select in-person."],["ariaLabel","Mode",3,"valueChange","segments","disabled","value"],["label","Event status","text","Attendees can only access live events. Keep your event in draft mode until you are ready for attendees to access your event."],["ariaLabel","Event status",3,"valueChange","segments","disabled","value"],["aria-labelledby","settings-details-heading",1,"section-card"],[1,"section-head"],["id","settings-details-heading",1,"section-heading"],[1,"section-actions"],["variant","secondary",3,"click"],["name","edit"],["variant","secondary"],[1,"section-description"],[1,"details-grid"],[1,"detail-column"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"detail"],[1,"value-row"],[1,"unset"],[1,"details-grid","is-ruled"],["name","copy"],["variant","ghost","size","sm","ariaLabel","Copy event ID",3,"click","iconOnly"],[1,"detail-value"],[1,"owner-actions"],["variant","secondary","size","sm",3,"click"],[1,"owner-credits",3,"href"],["aria-labelledby","settings-social-heading",1,"section-card"],["id","settings-social-heading",1,"section-heading"],[1,"section-card",3,"summaryChange"],["aria-labelledby","settings-theme-heading",1,"section-card"],["id","settings-theme-heading",1,"section-heading"],[1,"section-body"],["label","Appearance"],["label","Theme toggle","help","Allow attendees to switch between light and dark themes."],["ariaLabel","Theme toggle",3,"toggled","checked","saving","disabled"],[1,"subsection-heading"],["label","Primary","help","Applied to registration buttons, app navigation, chat icons and links."],["role","group","aria-label","Primary color"],[3,"saveColor","resetColor","defaultColor","selectedColor"],["label","Secondary","help","Applied to registration left hand side box and secondary buttons."],["role","group","aria-label","Secondary color"],["label","Background","help","Applied as background color to the top navigation bar, attendee tile in Attendees page and event sidebar."],["role","group","aria-label","Navigation bar background color"],["label","Text","help","Applied to the top navigation bar text color."],["role","group","aria-label","Navigation bar text color"],["label","Use for interactive tab background"],["ariaLabel","Use for interactive tab background",3,"toggled","checked","saving","disabled"],["aria-labelledby","settings-font-heading",1,"section-card"],["id","settings-font-heading",1,"section-heading"],[1,"two-column"],["label","Font family","controlId","settings-font-family"],["controlId","settings-font-family","placeholder","Search fonts","emptyText","No fonts match.",3,"picked","options","value","describedBy"],["label","Preview","controlId","settings-font-preview"],["cnpInput","","id","settings-font-preview","type","text","placeholder","Type here to preview text",3,"ngModelChange","ngModel"],[1,"font-preview"],[1,"form-actions"],[3,"isPaidUser"],["aria-labelledby","settings-images-heading",1,"section-card"],["id","settings-images-heading",1,"section-heading"],[1,"image-grid"],["aria-labelledby","settings-about-heading",1,"section-card"],["id","settings-about-heading",1,"section-heading"],[1,"row-list"],[1,"row-list-item"],["aria-labelledby","settings-footer-heading",1,"section-card",3,"formGroup"],["id","settings-footer-heading",1,"section-heading"],["role","group","aria-labelledby","settings-footer-text-label",1,"field-block","custom-footer-editor-wrapper"],["id","settings-footer-text-label",1,"field-label"],["formControlName","text",3,"editorId","editorOptions"],[1,"checkbox-set"],[1,"field-label"],["label","All","inputId","customFooterPagesAll",3,"changed","checked","disabled"],["label","Home","inputId","customFooterPagesHome",3,"changed","checked","disabled"],["label","Sponsors","inputId","customFooterPagesSponsors",3,"changed","checked","disabled"],["role","group","aria-labelledby","settings-footer-bg-label",1,"field-block"],["id","settings-footer-bg-label",1,"field-label"],[3,"defaultColor","selectedColor","enableReset"],["role","group","aria-labelledby","settings-footer-font-label",1,"field-block"],["id","settings-footer-font-label",1,"field-label"],["role","group","aria-label","Footer font size",1,"custom-footer-font-size"],[3,"updateSize","label","min","max","size"],[1,"field-block"],[1,"custom-footer-preview",3,"innerHTML"],["loadingLabel","Saving",3,"click","loading","disabled"],["ariaLabel","Appearance",3,"valueChange","segments","disabled","value"],[1,"font-sample"],[1,"preview-font"],[1,"preview-font","is-bold"],[1,"preview-font","is-italic"],[1,"preview-font","is-bold","is-italic"],[3,"click"],[1,"image-card"],[1,"image-preview"],["alt","Favicon",3,"src"],[1,"image-info"],[1,"image-label"],[1,"image-size"],[1,"image-actions"],["label","Favicon","text","This will appear as the page's icon. Dimensions: 16x16 to 96x96."],["variant","secondary","size","sm",1,"image-upload",3,"click"],["name","upload-horizontal"],["variant","ghost","size","sm","ariaLabel","Remove favicon",3,"click","iconOnly","disabled"],["name","delete"],["alt","Logo",3,"src"],["name","image",1,"image-placeholder"],["label","Logo","text","This will appear in the top left hand corner of the platform."],["variant","ghost","size","sm","ariaLabel","Remove logo",3,"click","iconOnly","disabled"],["alt","Meeting logo",3,"src"],["label","Meeting logo","text","This will appear in the upper-left hand corner during meetings. Dimension: 200x100 to 400x200."],["variant","ghost","size","sm","ariaLabel","Remove meeting logo",3,"click","iconOnly","disabled"],["alt","Backgroun
4d",3,"src"],["label","Background image","text","Optional - most layouts will not require this. Used as background for all pages (excluding login, forgot password and registration). Will be center aligned and cover the whole screen. Dimension: 1920x1080 to 2560x1440."],["variant","ghost","size","sm","ariaLabel","Remove background image",3,"click","iconOnly","disabled"],["alt","Email banner",3,"src"],["label","Email banner","text","Used on all email notifications about your event from Canapii."],["variant","ghost","size","sm","ariaLabel","Remove email banner",3,"click","iconOnly","disabled"],["alt","Event banner",3,"src"],["label","Event banner","text","Used on registration pages and the default home page banner. Ideally, the image should be dark and abstract, and should not contain any text."],["variant","ghost","size","sm","ariaLabel","Remove event banner",3,"click","iconOnly","disabled"],[1,"image-toggle"],[1,"toggle-description"],["ariaLabel","Display the banner on the home page",3,"toggled","checked","saving","disabled"],[1,"row-list-label"],[3,"toggled","ariaLabel","checked","saving","disabled"],[3,"saveColor","resetColor","defaultColor","selectedColor","enableReset"],["tone","info","heading","Page access & menu configuration"],[1,"section-card"],["idPrefix","settings-pages","ariaLabel","Page access and menu configuration",3,"activeIdChange","tabs","activeId"],["role","tabpanel",1,"pages-panel",3,"id"],[1,"panel-toolbar"],["name","create"],["ariaLabel","Page access","emptyMessage","No pages to configure.",3,"columns","rows","rowKey","loading"],["cnpCell","menu"],["cnpCell","actions"],["cnpCell","desktop"],["cnpCell","mobile"],[1,"menu-label"],[1,"menu-sub"],[1,"row-actions"],[1,"cell-empty"],["variant","ghost","size","sm",3,"click","iconOnly","ariaLabel","disabled"],[1,"panel-toolbar","is-end"],[3,"click","disabled"],[1,"table-scroll"],["aria-label","Web menu configuration",1,"menu-table"],["scope","col",1,"col-drag"],["cnpVisuallyHidden",""],["size","sm","label","Saving the menu order"],["scope","col"],[1,"th-with-help"],["label","Visibility","text","Controls whether the page appears in the navigation. A hidden page can still be opened via direct link while its access is on."],["label","Target attendees","text","Choose who can see these menu items based on custom attributes/attendee types. Leave blank if you want all your attendees to see these menu features."],["scope","col",1,"col-actions"],["cdkDropList","",3,"cdkDropListDropped","cdkDropListData"],["cdkDrag","","cdkDragPreviewContainer","parent",3,"cdkDragDisabled","is-busy"],["cdkDrag","","cdkDragPreviewContainer","parent",3,"cdkDragDisabled"],[1,"col-drag"],["cdkDragHandle","",1,"drag-handle"],["name","drag"],[3,"changed","showLabel","data","withUpdate","withEdit"],[1,"col-actions"],["variant","ghost","size","sm",3,"click","iconOnly","ariaLabel"],["colspan","4",1,"group-cell"],[1,"group-head"],[1,"group-targets"],["variant","ghost","size","sm",3,"click","iconOnly","ariaLabel","ariaExpanded","ariaControls"],[3,"name"],[1,"group-body",3,"id","hidden"],[3,"updatedMenuName","removedMenuItem","loadMenuItem","menu","editableMenuKeys","descriptions","locked"],["aria-labelledby","settings-app-menu-heading",1,"section-card","is-nested"],["aria-labelledby","settings-highlight-heading",1,"section-card","is-nested"],["id","settings-highlight-heading",1,"section-heading"],[1,"highlight-branding"],["label","Button color"],["role","group","aria-label","Highlight button color"],["label","Icon color"],["role","group","aria-label","Highlight icon color"],[1,"highlight-example"],["role","img","aria-label","Example highlight button",1,"highlight-example-button"],["name","notifications"],["aria-label","Mobile app menu configuration",1,"menu-table"],["label","Usage","text","Which app to show this menu item in."],["colspan","5",1,"group-cell"],[3,"updatedMenuName","removedMenuItem","loadHighlightMenuItem","menu","type","editableMenuKeys","descriptions","locked"],["id","settings-app-menu-heading",1,"section-heading"],["tone","info","heading","Organize your mobile app menu items."],["aria-label","App menu",1,"menu-table"],["tone","success",3,"dot"],["variant","danger","size","sm",3,"click","disabled"],["tone","info","heading","Feature configuration"],[3,"highlightBannerSpeedChange","secondaryBannerSpeedChange","otherFeatures","settingSaving","specialFeatures","otherSettings","event","highlightBannerSpeed","secondaryBannerSpeed","descriptions","editableMenuKeys","
4setOthers","toggleSpecialFeatures2","toggleAllSelfCheckIn","saveBannerSpeed","toggleAllChats","setTargetAttendees","toggleAllAgendas","toggleAllFilters","toggleMenuStatus","updateMenuName"],["tone","info","heading","Export configuration"],[3,"otherFeatures","setOthers","settingSaving"],["tone","info","heading","Superadmin configuration"],[3,"setOthersChange","toggleCentralisedResourcesChange","toggleEventNominationsChange","toggleUseUnifiedRegistrationChange","toggleSpecialFeatures2Change","useDefaultRetentionChange","useCustomRetentionChange","bagTagTargetAttendeesChange","otherFeatures","settingSaving","event","specialFeatures","customRetentionPolicy","isAnalyticsNewAvailable"],["name","chevron-up"],["name","chevron-down"]],template:function(t,n){if(t&1){let o=y();r(0,"cnp-page-sections")(1,"cnp-page-header",7)(2,"cnp-tabs",8,0),h("activeIdChange",function(m){return g(o),_(n.onTabChange(m))}),a()(),f(4,ap,9,8,"div",9),f(5,yp,96,61,"div",9),f(6,Su,10,8,"div",9),f(7,wu,2,3,"div",9),f(8,yu,4,22,"div",9),f(9,xu,4,6,"div",9),f(10,Mu,4,9,"div",9),a(),J(11,Fu,4,8,"ng-template",null,1,sn),r(13,"app-update-detail",10),h("saved",function(m){return g(o),_(n.onDetailSaved(m))}),a(),r(14,"app-change-owner",11),h("changed",function(){return g(o),_(n.onOwnerChanged())}),a(),r(15,"app-retention-policy",12),h("chosen",function(m){return g(o),_(n.onRetentionChosen(m))}),a(),r(16,"app-chat-target-attendees",10),h("saved",function(){return g(o),_(n.onChatTargetsSaved())}),a(),r(17,"app-add-app-menu",13),h("added",function(){return g(o),_(n.onAppMenuAdded())}),a(),r(18,"app-update-menu",10),h("saved",function(){return g(o),_(n.onMenuItemSaved())}),a(),r(19,"app-event-duplicate",14),h("duplicated",function(){return g(o),_(n.onEventDuplicated())}),a(),r(20,"app-custom-menu-item-modal",10),h("saved",function(){return g(o),_(n.onCustomMenuItemSaved())}),a(),r(21,"app-add-update-group-menu",10),h("saved",function(m){return g(o),_(n.onGroupSaved(m))}),a()}t&2&&(s(2),u("tabs",n.tabItems)("activeId",n.activeNavId),s(2),v(n.isTabRendered("event-settings")?4:-1),s(),v(n.isTabRendered("branding")?5:-1),s(),v(n.isTabRendered("pages")?6:-1),s(),v(n.otherFeatures!=null&&n.otherFeatures.brandedAppAssets&&n.isTabRendered("branded-app")?7:-1),s(),v(n.isTabRendered("features-networking")?8:-1),s(),v(n.isTabRendered("reporting-settings")?9:-1),s(),v(!(n.userService==null||n.userService.profile==null)&&n.userService.profile.superadmin&&n.isTabRendered("superadmin")?10:-1))},dependencies:[Ao,Fo,Eo,ye,de,V,ve,dt,Be,pe,ct,ce,lt,ue,Gn,Un,Ot,Pt,Rn,ui,bn,mn,vn,hn,cn,Sn,gn,Ni,dn,Zn,Yo,Ro,L,_e,oe,te,Le,z,re,Ee,_i,Xn,Dt,Tt,Nn,An,Ie,bi,pi,Ci,Si,wi,yt,so,qn,Wo,Bo,Yn,fo],styles:[".settings-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-6);min-width:0}.status-band[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-4) var(--cnp-space-7);background:var(--cnp-color-bg-card);border-radius:var(--cnp-radius-container);box-shadow:var(--cnp-shadow-low);padding:var(--cnp-space-4) var(--cnp-space-card-padding)}.band-item[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-3);min-width:0}.band-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--cnp-space-2);font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-semibold);color:var(--cnp-color-text-secondary)}.section-card[_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);min-width:0}.section-head[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--cnp-space-3);border-bottom:2px solid var(--cnp-color-rule);padding-bottom:var(--cnp-space-2)}.section-heading[_ngcontent-%COMP%]{margin:0;font-size:var(--cnp-font-size-section);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-heading)}.section-description[_ngcontent-%COMP%]{margin:var(--cnp-space-3) 0 0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-secondary)}.section-actions[_ngcontent-%COMP%]{--cnp-button-min-height: var(--cnp-size-control);display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2)}.section-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-4);margin-top:var(--cnp-space-4);min-width:0}.details-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--cnp-space-5) var(--cnp-space-6);margin:var(--cnp-space-4) 0 0}
4@media (width <= 900px){.details-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width <= 560px){.details-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.detail[_ngcontent-%COMP%]{min-width:0}.detail[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-regular);color:var(--cnp-color-text-muted)}.detail[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:var(--cnp-space-1) 0 0;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-body);overflow-wrap:anywhere}.value-row[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-2);min-width:0}.unset[_ngcontent-%COMP%]{color:var(--cnp-color-text-muted)}.setting-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0;margin-top:var(--cnp-space-2)}[_nghost-%COMP%]{display:block}.settings-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-card-gap);min-width:0}.settings-panel[hidden][_ngcontent-%COMP%]{display:none}app-countdown[_ngcontent-%COMP%], app-custom-font[_ngcontent-%COMP%], app-login-banner[_ngcontent-%COMP%]{display:block;min-width:0}.section-card.is-nested[_ngcontent-%COMP%]{border:1px solid var(--cnp-color-border-subtle);box-shadow:none;padding:var(--cnp-space-4) var(--cnp-space-5)}.subsection-heading[_ngcontent-%COMP%]{margin:var(--cnp-space-6) 0 0;font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-bold);color:var(--cnp-color-text-heading)}.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:var(--cnp-space-6);margin-top:var(--cnp-space-4)}.two-column[_ngcontent-%COMP%] > .section-body[_ngcontent-%COMP%]{margin-top:0}@media (width <= 900px){.two-column[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.form-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--cnp-space-2)}.field-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-2);min-width:0}.field-label[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-semibold);color:var(--cnp-color-text-secondary)}.details-grid.is-ruled[_ngcontent-%COMP%]{margin-top:var(--cnp-space-5);padding-top:var(--cnp-space-5);border-top:1px solid var(--cnp-color-border-subtle)}.detail-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-5);min-width:0;margin:0}.detail-value[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-2);font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-body);overflow-wrap:anywhere}.owner-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-3)}.owner-credits[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--cnp-space-1);color:var(--cnp-color-link)}.font-preview[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:0}.font-sample[_ngcontent-%COMP%]{padding-block:var(--cnp-space-3);border-bottom:1px solid var(--cnp-color-border-subtle)}.font-sample[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-regular);color:var(--cnp-color-text-muted)}.font-sample[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:var(--cnp-space-1) 0 0;font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-regular);color:var(--cnp-color-text-body);overflow-wrap:anywhere}.preview-font.is-bold[_ngcontent-%COMP%]{font-weight:var(--cnp-font-weight-bold)}.preview-font.is-italic[_ngcontent-%COMP%]{font-style:italic}.image-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(220px,100%),1fr));gap:var(--cnp-space-5);margin-top:var(--cnp-space-4)}.image-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-3);min-width:0;padding:var(--cnp-space-4);background:var(--cnp-color-bg-card);border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-container)}.image-preview[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:140px;overflow:hidden;background:var(--cnp-color-bg-surface);border:1px dashed var(--cnp-color-border);border-radius:var(--cnp-radius-element)}.image-preview[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%;max-height:100%;object-fit:contain}.image-placeholder[_ngcontent-%COMP%]{color:var(--cnp-color-icon-muted)}.image-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:var(--cnp-space-1);text-align:center}.image-label[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-body);font-weight:var(--cnp-font-weight-semibold);color:var(--cnp-color-text-heading)}.image-size[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted)}.image-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--cnp-space-2)}.image-upload[_ngcontent-%COMP%]{flex:1}.image-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:var(--cnp-space-3);padding-top:var(--cnp-space-3);border-top:1px solid var(--cnp-color-border-subtle)}.toggle-description[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-secondary)}.row-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:var(--cnp-space-4) 0 0;padding:0;list-style:none}.row-list-item[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:var(--cnp-space-4);padding-block:var(--cnp-space-3);border-bottom:1px solid var(--cnp-color-border-subtle)}.row-list-item[_ngcontent-%COMP%]:last-child{border-bottom:0}.row-list-label[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-body);overflow-wrap:anywhere}.checkbox-set[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-3);min-width:0;margin:0;padding:0;border:0}.checkbox-set[_ngcontent-%COMP%]   legend[_ngcontent-%COMP%]{float:none;width:auto;margin:0 0 var(--cnp-space-1);padding:0}.custom-footer-font-size[_ngcontent-%COMP%]{max-width:400px}.custom-footer-preview[_ngcontent-%COMP%]{min-height:60px;padding:var(--cnp-space-4);border:1px solid var(--cnp-color-border);border-radius:var(--cnp-radius-element)}.custom-footer-editor-wrapper[_ngcontent-%COMP%]   app-markdown-editor[_ng
4content-%COMP%]{display:block;height:240px;overflow:hidden}.custom-footer-editor-wrapper[_ngcontent-%COMP%]     .toastui-editor-defaultUI{height:240px!important}.custom-footer-editor-wrapper[_ngcontent-%COMP%]     .toastui-editor-main{height:164px!important}.pages-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-4);min-width:0;margin-top:var(--cnp-space-5)}.panel-toolbar[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--cnp-space-4)}.panel-toolbar.is-end[_ngcontent-%COMP%]{justify-content:flex-end}.panel-toolbar[_ngcontent-%COMP%]   .section-description[_ngcontent-%COMP%]{flex:1 1 320px;margin:0}.menu-label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-1);min-width:0}.menu-sub[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label);color:var(--cnp-color-text-muted);overflow-wrap:anywhere}.row-actions[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--cnp-space-1)}.cell-empty[_ngcontent-%COMP%]{color:var(--cnp-color-text-muted)}.table-scroll[_ngcontent-%COMP%]{overflow-x:auto;border:1px solid var(--cnp-color-border-subtle);border-radius:var(--cnp-radius-container)}.menu-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:var(--cnp-font-size-body);color:var(--cnp-color-text-body)}.menu-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{padding:var(--cnp-space-3) var(--cnp-space-4);background:var(--cnp-color-bg-surface);border-bottom:1px solid var(--cnp-color-border-subtle);font-size:var(--cnp-font-size-label);font-weight:var(--cnp-font-weight-semibold);color:var(--cnp-color-text-secondary);text-align:start;white-space:nowrap}.menu-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:var(--cnp-space-3) var(--cnp-space-4);border-bottom:1px solid var(--cnp-color-border-subtle);vertical-align:middle;overflow-wrap:anywhere}.menu-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:last-child   td[_ngcontent-%COMP%]{border-bottom:0}.menu-table[_ngcontent-%COMP%]   tr.is-busy[_ngcontent-%COMP%]{opacity:.5}.col-drag[_ngcontent-%COMP%]{width:var(--cnp-size-hit)}.col-actions[_ngcontent-%COMP%]{width:1%;white-space:nowrap;text-align:end}.th-with-help[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--cnp-space-1)}.drag-handle[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:var(--cnp-size-hit);min-height:var(--cnp-size-hit);color:var(--cnp-color-icon-muted);cursor:grab}.drag-handle[_ngcontent-%COMP%]:hover{color:var(--cnp-color-action)}.drag-handle[_ngcontent-%COMP%]:active{cursor:grabbing}.group-head[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--cnp-space-4)}.group-head[_ngcontent-%COMP%]   .menu-label[_ngcontent-%COMP%]{flex:1 1 200px}.group-targets[_ngcontent-%COMP%]{flex:0 1 auto;min-width:0}.group-body[_ngcontent-%COMP%]{margin-top:var(--cnp-space-3);padding-top:var(--cnp-space-3);border-top:1px solid var(--cnp-color-border-subtle)}.group-body[hidden][_ngcontent-%COMP%]{display:none}.cdk-drag-preview[_ngcontent-%COMP%]{display:table;background:var(--cnp-color-bg-card);border-radius:var(--cnp-radius-element);box-shadow:var(--cnp-shadow-high)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:.3}.cdk-drag-animating[_ngcontent-%COMP%], .cdk-drop-list-dragging[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform var(--cnp-duration-base) var(--cnp-ease-standard)}.highlight-branding[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);align-items:center;gap:var(--cnp-space-5)}.highlight-branding[_ngcontent-%COMP%] > .section-body[_ngcontent-%COMP%]{margin-top:0}@media (width <= 560px){.highlight-branding[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}}.highlight-example[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:var(--cnp-space-2)}.highlight-example-button[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:var(--cnp-space-4) var(--cnp-space-6);border-radius:var(--cnp-radius-element)}"]})}}return i})();var Ou=[{path:"",component:yi}],Ya=(()=>
4{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[Mt.forChild(Ou),Mt]})}}return i})();var Za=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,L,z,It,rt,Tn,Cn]})}}return i})();var Ja=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,Za,bn]})}}return i})();var Xa=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({imports:[$,L,z,It,Sn]})}}return i})();var db=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=N({type:i})}static{this.\u0275inj=B({providers:[vo()],imports:[$,Ja,Wn,Ya,Qo,oa,Jn,Xa,ya,Ba,sa,Na,Uo,Zo,qo,ra,Po,L,z,$a,wa,fi,Va,wi,yi,Xn,bi,hn,ui,Si,Ci]})}}return i})();export{db as SettingsModule};

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.