1import{$a as si,$c as Sl,Ab as al,Ad as hl,Ae as zl,Ba as Kr,Bc as _l,Bd as El,C as ft,Cd as Al,E as Ur,Fb as pi,Gb as rl,Gd as Nl,H as vr,Hb as ll,Hd as Il,I as at,Ib as En,Ic as ml,Jb as sl,Jd as yl,Kb as cl,Kd as Ll,Lb as An,Mb as Oe,Md as Ol,Nd as bl,Od as $l,Pd as Rl,Q as Gr,Qd as Ml,Rc as dl,Rd as mo,Sc as ui,Uc as Cl,Vc as gl,Wd as _i,Yb as pl,Zb as Nn,_a as li,ab as ci,ad as Tl,ba as Wr,bb as Yr,ca as Dr,cb as Le,ce as Co,da as ro,de as xl,e as Sn,ea as rt,ee as Mn,fa as kr,fe as Pl,ga as zr,ge as Bl,ha as lo,he as Fl,i as Tn,ia as so,j as fn,ja as co,jd as In,je as mi,k as ii,kd as yn,ke as go,l as wn,la as Vr,le as Ul,m as ni,md as Ln,me as xn,nd as On,ne as vl,ob as $t,od as bn,oe as Gl,p as oi,pa as Xr,pb as qr,pd as $n,pe as Wl,qa as De,qb as Qr,qd as Ai,r as ai,ra as ke,rb as po,s as Pr,sb as uo,t as Br,ta as hn,tb as Jr,td as fl,u as Xe,ub as Zr,ud as _o,vb as el,vc as ul,w as ot,wb as tl,x as Fr,xa as Hr,xb as il,xd as wl,xe as Dl,y as ri,yb as nl,yd as Rn,ye as ue,za as jr,zb as ol,ze as kl}from"./chunk-6QDVQ5WV.js";import{$a as S,$b as fe,$i as Wa,$o as cr,$u as Or,Aa as aa,Ac as ma,Aj as za,An as Zt,Ay as Cn,B as He,Ba as L,Bb as Wi,Bc as Dt,Bn as ae,Bp as tt,By as gn,Ca as U,Cc as ce,Cd as Ea,Cn as K,Cp as eo,D as Pt,Db as ze,De as Kn,Dl as Ne,Dm as gt,Eb as Me,Ec as da,Ed as Xt,Em as Ki,En as er,Fc as Ca,Fl as Kt,H as Zo,Ha as T,Hc as j,Hl as Ot,Ia as Bt,Ib as d,Ja as f,Jb as g,Jj as Va,Jn as tr,Kb as Ve,Kd as Aa,Km as Yi,Kn as nn,Ko as or,Ku as pn,La as be,Lc as ga,Ld as Vi,Lk as mt,Lm as qa,Lp as ei,M as je,Ma as ne,Mb as me,Mh as Ti,Mm as qi,N as ie,Na as oe,Nc as Sa,Nf as $a,Ni as va,Nn as ir,Np as st,Nu as Nr,O as H,Oa as p,Of as Ra,On as nr,Ou as ao,Pa as r,Pc as Ue,Pe as Yn,Po as ar,Pu as ye,Qa as a,Qc as kt,Qe as Ia,Qo as rr,Qq as io,Qu as Ir,Ra as w,Re as ya,Ro as lr,Ru as yr,S as Gi,Sb as Di,Sc as ve,Sl as z,Sn as Ie,Sp as mr,Sq as no,Su as Lr,Tb as sa,Tf as Ma,Ti as Ga,Tl as ja,Tp as an,Tq as Cr,Um as Qi,Up as rn,Uq as gr,Uv as br,V as re,Va as Nt,Ve as La,Vl as Ka,Vm as Ji,Vp as to,Vr as Sr,Vt as V,Vv as _n,W as Pe,Wa as It,Wb as M,We as Oa,Wm as Zn,Wr as oo,X as ea,Xa as ut,Xb as Fe,Xr as sn,Xt as fr,Ya as $,Yb as ca,Yh as Fa,Ym as Qa,Yt as cn,Yw as $r,Z as c,Za as Ee,Zh as Ua,Zo as wi,_a as Ae,_b as Wt,_l as dt,_o as sr,aa as At,ab as ra,ac as Ce,ad as Ta,am as Ya,ap as pr,aq as ln,b as Yo,bb as $e,bp as ur,bt as Tr,bv as it,c as Te,ca as O,cb as Re,cg as xa,cm as Je,cn as pe,da as b,db as la,df as ba,dm as Ze,du as wr,dv as un,ea as pt,eb as N,ed as fa,eg as Pa,eu as hr,ev as Z,fb as m,fm as Yt,ga as ta,gc as pa,gd as wa,gj as Hi,gl as B,gq as dr,gv as nt,he as Lt,hl as Ht,i as J,in as Zi,iw as Ei,jb as Ft,jl as Ye,jn as en,k as E,ka as ia,kb as Ut,kq as D,l as u,la as k,lb as vt,ln as fi,m as R,ma as na,md as jn,me as Xi,mk as Qn,mn as Ja,mu as hi,nd as _t,ng as Ba,nl as C,nu as Er,nv as Tt,o as qo,ob as _e,oc as ua,od as zt,on as St,oy as Rr,pa as oa,pm as We,py as mn,qb as Gt,qd as ha,qe as Na,qj as Da,qp as on,qu as Ar,qy as Mr,rc as te,rd as Vt,rm as et,ry as xr,sa as l,sl as jt,sm as bt,sn as Za,t as vi,tb as P,tc as se,tj as ka,tl as qe,tm as Jn,ub as le,uc as _a,um as Ct,up as _r,uy as dn,v as Qo,vb as Q,vc as X,vf as qn,vj as ji,w as Jo,wd as Ge,wn as tn,xb as yt,xg as Ke,xk as Xa,xn as qt,xu as ti,y as Hn,ya as A,yb as Si,yc as y,yd as ki,yk as Ha,yn as Qt,yp as we,za as Be,zb as de,zd as zi,zl as Qe,zn as Jt}from"./chunk-6VDOBKBI.js";import"./chunk-UNNH6OJB.js";import{a as v,b as q,f as gi,h as W}from"./chunk-HE2D45TV.js";var Vl=(()=>{class t extends Rn{constructor(){super(...arguments),this.defaultFeatureEnabledConfig={permissions:["accounts.update"]}}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275prov=re({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Xl=(()=>{class t extends dn{constructor(){super(...arguments),this.nullableLocationId$=J(null)}getCurrentNullableLocation(){return J(null)}subscribe(){this.nullableLocation=null,this.nullableLocationId=null}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275prov=re({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Hl=(()=>{class t extends Cn{constructor(){super(...arguments),this.locationArgs$=this.coreUserRx.getCurrentUser(["accountId","language"]).pipe(u(e=>({accountId:e.accountId,locationId:null,userLanguage:e.language}))),this.currentLocationResources$=J([]),this.currentUnlocalizedLocationResources$=J([]),this.currentLocationResourcesById$=J({}),this.currentUnlocalizedLocationResourcesById$=J({})}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275prov=re({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var jl=(()=>{class t extends gn{constructor(){super(...arguments),this.locationArgs$=this.coreUserRx.getCurrentUser(["accountId","language"]).pipe(u(e=>({accountId:e.accountId,locationId:null,userLanguage:e.language}))),this.currentLocationServices$=J([]),this.currentUnlocalizedLocationServices$=J([]),this.currentLocationServicesById$=J({}),this.currentUnlocalizedLocationServicesById$=J({})}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275prov=re({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Kl=(()=>{class t extends Mn{constructor(){super(...arguments),this.homeName=$localize`Account settings`,this.homeRoute="/account/settings",this.homeBreadcrumb={name:this.homeName,routerLink:this.homeRoute}}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275prov=re({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Yl=(()=>{class t extends xn{constructor(){super(...arguments),this.homeName=$localize`Account settings`,this.homeRoute="/account/settings",this.homeBreadcrumb={name:this.homeName,routerLink:this.homeRoute}}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275prov=re({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ql={permissions:["api-keys.show"],accountFeatures:["enableApiKeys"]},Ql={accountFeatures:["enablePaidMessageCreditIncrement"],permissions:["accounts.update","plan.show"],rx:t=>t.get(hi).withBilling$},Rt={permissions:["accounts.update","plan.show"]},Mt={permissions:["accounts.update","plan.show"],rx:t=>t.get(hi).withBilling$},So={permissions:["accounts.update","users.assign-role"]},Ni={permissions:["webhooks.show"],accountFeatures:["enableWebhooks"]};function Ys(t,s){if(t&1&&(r(0,"ww-dialog-layout-title"),P(1),a()),t&2){let e=m();l(),Q(" ",e.options.title," ")}}
1function qs(t,s){if(t&1&&w(0,"ww-copy-to-clipboard-button",5),t&2){let e=m();p("content",e.options.key)}}var fo=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-api-created-modal"]],hostAttrs:[1,"ww-account-api-created-modal"],inputs:{options:"options"},standalone:!1,decls:12,vars:8,consts:[["suffixTmpl",""],[1,"flex","flex-col","gap-y-4"],[3,"readonly","label","value","suffixComponent"],[1,"flex","justify-end",3,"hideCancel"],["wwButton","","matDialogClose",""],[3,"content"]],template:function(i,n){if(i&1&&(r(0,"ww-dialog-layout"),T(1,Ys,2,1,"ww-dialog-layout-title"),r(2,"ww-dialog-layout-content")(3,"div",1)(4,"ww-info-bubble"),P(5),a(),w(6,"ww-input",2),U(7,qs,1,1,"ng-template",null,0,me),a()(),r(9,"ww-dialog-layout-actions",3)(10,"button",4),P(11),a()()()),i&2){let o=_e(8);l(),f(n.options.title?1:-1),l(4),Q(" ",n.options.message," "),l(),p("readonly",!0)("label",n.options.subtitle)("value",n.options.key)("suffixComponent",o),l(3),p("hideCancel",!0),l(2),Q(" ",n.options.buttonLabel," ")}},dependencies:[Nn,tn,z,qt,Qt,Jt,Zt,ae,Ct],encapsulation:2,changeDetection:0})}}return t})();var wo="account-api-call-out-closed";var ec=["apiKeysActionsTmpl"],tc=()=>["api-keys.create"],ic=t=>({permissions:t}),nc=t=>({enabledConfig:t});function oc(t,s){if(t&1){let e=$();r(0,"button",13),N("click",function(){O(e);let n=m();return b(n.createApiKey())}),S(1,3),a()}}function ac(t,s){if(t&1){let e=$();r(0,"ww-call-out",11),d(1,"async"),r(2,"ww-call-out-title"),S(3,4),a(),r(4,"ww-call-out-close",14),N("closed",function(){O(e);let n=m();return b(n.closeCallOut())}),a(),r(5,"ww-call-out-content"),S(6,5),a(),r(7,"ww-call-out-actions")(8,"a",15),S(9,6),a(),r(10,"a",16),N("click",function(){O(e);let n=m();return b(n.contactSupport())}),S(11,7),a()()()}if(t&2){let e=m();p("illustration",g(1,2,e.callOutIllustration$))("backgroundColor","aqua3")}}function rc(t,s){if(t&1){let e=$();r(0,"button",16),N("click",function(){let n=O(e).$implicit,o=m();return b(o.deleteApiKey(n.id))}),P(1,"Delete"),a()}}function lc(t,s){t&1&&w(0,"ww-empty-state",17)}var ho=(()=>{class t extends B{constructor(){super(),this.apiKeyRx=c(hr),this.commonDisplay=c(ft),this.createApiKeyWrite=c(yr),this.datePipe=c(ca),this.deleteApiKeyWrite=c(Lr),this.dialog=c(K),this.intercom=c(it),this.layout=c(Z),this.permissionRx=c(fr),this.roleService=c(Tt),this.userRx=c(cn),this.pluckApiKeysActions$=this.permissionRx.hasPermission("api-keys.delete").pipe(u(e=>e?()=>this.apiKeysActionsTmpl:null)),this.columns=[{label:$localize`API Key`,ke
1y:"apiKey"},{label:$localize`User`,key:"user"},{label:$localize`Roles`,key:"roles"},{label:$localize`Created`,key:"created"}],this.isLoading$=this.apiKeyRx.apiKeys$.pipe(u(()=>!1),je(!0)),this.callOutIllustration$=this.layout.isMobile$.pipe(u(e=>e?null:"ww-account-api-webhooks")),this.callOutClosed=ki(wo,!1,Vt),this.pluckApiKeysCellLabel$=this.roleService.roleItems$.pipe(u(e=>i=>({apiKey:i.key,user:i.userInfo?.name??"",roles:this.commonDisplay.displayRoles(i.userInfo?.roles??[],e),created:this.datePipe.transform(i.created)}))),this.subscribeToCreate()}closeCallOut(){zi(wo,!0),this.callOutClosed=!0}subscribeToCreate(){this.createApiKeyWrite.response$.pipe(H(this.ngOnDestroy$)).subscribe(e=>{e.key&&this.dialog.open(C(fo,{options:{title:$localize`API Key successfully added`,message:$localize`Please copy the API key and store it safely on your end. You will not be able to view the key again once you close this dialog.`,subtitle:$localize`API Key`,key:e.key,buttonLabel:$localize`Done`}}))})}contactSupport(){this.intercom.show()}createApiKey(){return W(this,null,function*(){let e=yield E(this.userRx.userId$);this.createApiKeyWrite.payload.next({userId:e})})}deleteApiKey(e){return W(this,null,function*(){this.deleteApiKeyWrite.payload.next({apiKeyId:e})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-api"]],viewQuery:function(i,n){if(i&1&&Ft(ec,7),i&2){let o;Ut(o=vt())&&(n.apiKeysActionsTmpl=o.first)}},hostAttrs:[1,"ww-account-api","flex","flex-col","gap-6"],standalone:!1,features:[L],decls:15,vars:23,consts:()=>{let e;e=$localize`Read the documentation.`;let i;i=$localize` Integrate waitlisting and scheduling into your app or platform with our flexible API. `;let n;n=$localize` New API Key 2`;let o;o=$localize` Learn more `;let _;_=$localize` Learn about how to integrate with the Waitwhile API on our developer hub or reach out to our support for more help. `;let h;h=$localize` Developer hub `;let I;I=$localize`Contact support`;let G;return G=$localize`No API-keys found`,[["apiKeysActionsTmpl",""],["emptyStateTmpl",""],i,n,o,_,h,I,["wwButton","primary",3,"click",4,"wwLayoutPrimaryAction"],[1,"max-w-lg"],["content",e,"href","https://help.waitwhile.com/en/articles/9948686-getting-started-with-integrations#h_f149a68faa",3,"inline"],[3,"illustration","backgroundColor"],[3,"data","columns","selection","pluckActions","pluckCellLabel","loading","placeholder"],["wwButton","primary",3,"click"],[3,"closed"],["href","https://developers.waitwhile.com","target","_blank","wwButton","primary"],["wwButton","tertiary",3,"click"],["message",G,"icon","ww-empty-state"]]},template:function(i,n){if(i&1&&(U(0,oc,2,0,"button",8),r(1,"p",9)(2,"span"),S(3,2),a(),w(4,"ww-link",10),a(),T(5,ac,12,4,"ww-call-out",11),w(6,"ww-table",12),d(7,"async"),d(8,"async"),d(9,"async"),d(10,"async"),U(11,rc,2,0,"ng-template",null,0,me)(13,lc,1,0,"ng-template",null,1,me)),i&2){let o=_e(14);p("wwLayoutPrimaryAction",Me(21,nc,Me(19,ic,ze(18,tc)))),l(4),p("inline",!0),l(),f(n.callOutClosed?-1:5),l(),p("data",g(7,10,n.apiKeyRx.apiKeys$))("columns",n.columns)("selection","none")("pluckActions",g(8,12,n.pluckApiKeysActions$))("pluckCellLabel",g(9,14,n.pluckApiKeysCellLabel$))("loading",g(10,16,n.isLoading$))("placeholder",o)}},dependencies:[Tn,fn,ii,wn,ni,ui,De,z,we,tt,M],encapsulation:2,changeDetection:0})}}return t})();var as=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=Be({type:t})}static{this.\u0275inj=Pe({providers:[fe,Fe,ke],imports:[Ce,j,ve,ue,Le,D]})}}return t})();var Ci={name:$localize`Plan & Billing`,routerLink:"/account/settings/billing"},Bn={deleted:$localize`Deleted`,draft:$localize`Upcoming`,open:$localize`Open`,paid:$localize`Paid`,uncollectible:$localize`Uncollectible`,void:$localize`Void`};function sc(t,s){t&1&&(r(0,"ww-form-field-error"),S(1,3),a())}var rs=(()=>{class t extends B{constructor(){super(...arguments),this.dialogRef=c(Za),this.defaultMinDate=new Date(2023,0,1),this.accountRx=c(V),this.analyticsRx=c(wr),this.snackBar=c(en),this.formGroup=new X({startDate:new y(Ma(qn(new Date,-1)),{nonNullable:!0,validators:[te.required,Ke.maxDate(new Date)]}),endDate:new y(Ra(qn(new Date,-1)),{nonNullable:!0,validators:[te.required,Ke.maxDate(new Date)]})}),this.maxAnalyticsHistoricalDays$=this.accountRx.getAccount(["features"]).pipe(u(e=>e.features.maxAnalyticsHistoricalDays)),this.minDate$=this.maxAnalyticsHistoricalDays$.pipe(u(e=>e?xa(Pa(),e):this.defaultMinDate)),this.maxDate=$a(new Date)}download(){return W(this,null,function*(){if(this.formGroup.invalid)return;let e=this.formGroup.getRawValue();if(e.startDate>e.endDate)return;let i=`usage-report-${Kn(e.startDate)}-${Kn(e.endDate)}.csv`;if(yield E(this.analyticsRx.downloadMessageUsageReport(e.startDate,e.endD
2ate,i))){this.snackBar.open({message:$localize`Usage report downloaded.`}),this.dialogRef.close();return}this.snackBar.open({message:$localize`Usage report contained no data. Please adjust your date intervals.`})})}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-billing-usage-report-modal"]],hostAttrs:[1,"ww-account-billing-usage-report-modal"],features:[L],decls:15,vars:13,consts:()=>{let e;e=$localize`Start date`;let i;i=$localize`End date`;let n;n=$localize`Message usage report`;let o;o=$localize` Get a breakdown of your Waitwhile accountsâ message usage for a certain period of time. `;let _;_=$localize`Download CSV`;let h;return h=$localize` Start date must be before End date. `,[n,o,_,h,[1,"flex","flex-col","gap-6",3,"padding"],["wwFormFieldSize","large",1,"flex","gap-6"],["size","auto","label",e,3,"formControl","min","max"],["size","auto","label",i,3,"formControl","min","max"],[3,"hideCancel"],["wwButton","",3,"click"]]},template:function(i,n){i&1&&(r(0,"ww-dialog-layout")(1,"ww-dialog-layout-title"),S(2,0),a(),r(3,"ww-dialog-layout-content",4)(4,"p"),S(5,1),a(),r(6,"div",5),w(7,"ww-datepicker",6),d(8,"async"),w(9,"ww-datepicker",7),d(10,"async"),a(),T(11,sc,2,0,"ww-form-field-error"),a(),r(12,"ww-dialog-layout-actions",8)(13,"button",9),N("click",function(){return n.download()}),S(14,2),a()()()),i&2&&(l(3),p("padding",!0),l(4),p("formControl",n.formGroup.controls.startDate)("min",g(8,9,n.minDate$))("max",n.maxDate),l(2),p("formControl",n.formGroup.controls.endDate)("min",g(10,11,n.minDate$))("max",n.maxDate),l(2),f(n.formGroup.controls.startDate.value>n.formGroup.controls.endDate.value?11:-1),l(),p("hideCancel",!0))},dependencies:[j,se,ce,D,z,or,qt,Qt,Jt,Zt,Ka,dt,M],encapsulation:2,changeDetection:0})}}return t})();function wc(t,s){t&1&&(Ee(0,1,1),w(1,"ww-display-date",23),Ae()),t&2&&(l(),p("date",s))}function hc(t,s){t&1&&(r(0,"a",24),S(1,2),a())}function Ec(t,s){t&1&&(r(0,"a",25),w(1,"ww-icon",27),P(2," Upgrade "),a())}function Ac(t,s){if(t&1){let e=$();r(0,"a",28),N("click",function(){O(e);let n=m(2);return b(n.openEventOrEnterpriseChangePlanModal())}),P(1," Change plan "),a()}}function Nc(t,s){if(t&1&&(r(0,"ww-setting-card-suffix",18),T(1,hc,2,0,"a",24),d(2,"async"),T(3,Ec,3,0,"a",25),d(4,"async"),T(5,Ac,2,0,"a",26),d(6,"async"),d(7,"async"),a()),t&2){let e=m();l(),f(g(2,3,e.showEditButton$)?1:-1),l(2),f(g(4,5,e.showUpgradeButton$)?3:-1),l(2),f(g(6,7,e.changePlanService.isEventPlan$)||g(7,9,e.changePlanService.isEnterprisePlan$)?5:-1)}}function Ic(t,s){if(t&1&&(r(0,"div",19)(1,"ww-info-bubble",29)(2,"span"),Ee(3,3),d(4,"async"),w(5,"ww-display-date",23),d(6,"async"),w(7,"ww-display-date",23),d(8,"async"),Ae(),a()()()),t&2){let e=m();l(5),p("date",g(6,3,e.changePlanService.cancelDate$)),l(2),p("date",g(8,5,e.changePlanService.currentPeriodEndDate$)),l(),$e(g(4,7,e.changePlanService.planName$)),Re(3)}}function yc(t,s){if(t&1&&(r(0,"span",34),P(1),d(2,"number"),a()),t&2){m(2);let e=de(0);p("wwColor","darkerGrey"),l(),Q("/ ",Ve(2,2,e.locations.limit,"1.0-0"))}}function Lc(t,s){if(t&1&&(r(0,"div",31)(1,"div",36)(2,"span",33),S(3,5),a(),r(4,"span"),P(5),d(6,"number"),a(),r(7,"span",34),P(8),d(9,"number"),a()(),w(10,"mat-progress-bar",35),a()),t&2){m(2);let e=de(0);l(5),le(Ve(6,4,e.visits.current,"1.0-0")),l(2),p("wwColor","darkerGrey"),l(),Q(" / ",Ve(9,7,e.visits.limit,"1.0-0")),l(2),p("value",e.visits.progress)}}function Oc(t,s){t&1&&ut(0)}function bc(t,s){t&1&&w(0,"ww-link",43)}function $c(t,s){if(t&1&&(r(0,"ww-info-bubble",41),w(1,"ww-icon",42),P(2),T(3,bc,1,0,"ww-link",43),a()),t&2){m(3);let e=de(0),i=de(2);p("color",e.messageCredit.infoColor)("hideIcon",!0),l(),p("color",e.messageCredit.infoColor)("icon",e.messageCredit.infoIcon),l(),Q(" ",e.messageCredit.infoText," "),l(),f(i!=null&&i.enabled?-1:3)}}function Rc(t,s){if(t&1){let e=$();r(0,"div",31)(1,"div",37)(2,"div",36)(3,"span",33),S(4,6),a(),r(5,"span"),P(6),d(7,"number"),a(),r(8,"span",34),P(9),d(10,"number"),a()(),r(11,"button",38),N("click",function(){O(e);let n=m(2);return b(n.openUsageReport())}),S(12,7),a()(),w(13,"mat-progress-bar",39),U(14,Oc,1,0,"ng-container",40),T(15,$c,4,6,"ww-info-bubble",41),a()}if(t&2){m(2);let e=_e(29),i=de(0);l(6),Q("$",Ve(7,7,i.messageCredit.current,"1.0-2")),l(2),p("wwColor","darkerGrey"),l(),Q(" / $",Ve(10,10,i.messageCredit.limit,"1.0-2")),l(4),p("color",i.messageCredit.color)("value",i.messageCredit.progress),l(),p("wwOutlet",e),l(),f(i.messageCredit.infoText?15:-1)}}function Mc(t,s){t&1&&ut(0)}function xc(t,s){if(t&1){let e=$();r(0,"div",31)(1,"div",37)(2,"div",36)(3,"span",33),S(4,8),a(),r(5,"span"),P(6),d(7,"number"),a(),r(8,"span",34),P(9),d(10,"number"),a()(),r(11,"button",38),N("click",function(){O(e);let n=m(2);return b(n.openUsageReport())}),S(12,9),a()(),w(13,"mat-progress-bar",39),U(14,Mc,1,0,"ng-container",40),a()}if(t&2){m(2);let e=_e(29),i=de(0);l(6),le(Ve(7,6,i.messageLimit.current,"1.0-2")),l(2),p("wwColor","darkerGrey"),l(),Q(" / ",Ve(10,9,i.messageLimit.limit,"1.0-2")),l(4),p("color",i.messageLimit.color)("value",i.messageLimit.progress),l(),p("wwOutlet",e)}}function Pc(t,s){if(t&1&&(r(0,"div",47),S(1,12),a()),t&2){m(4);let e=de(2);l(),$e(e.amount)(e.threshold),Re(1)}}function Bc(t,s){t&1&&(r(0,"div",47),S(1,13),a())}function Fc(t,s){if(t&1&&T(0,Pc,2,2,"div",47)(1,Bc,2,0,"div",47),t&2){m(3);let e=de(2);f(e.enabled?0:1)}}function Uc(t,s){if(t&1){let e=$();r(0,"div",31)(1,"div",37)(2,"div",44)(3,"div",45)(4,"span",33),S(5,10),d(6,"number"),a(),w(7,"ww-icon",46),a(),T(8,Fc,2,1),a(),r(9,"button",38),N("click",function(){O(e);let n=m(2);return b(n.openUsageReport())}),S(10,11),a()()()}if(t&2){m(2);let e=de(0),i=de(2);l(6),$e(Ve(6,2,e.extraCredit,"1.0-2")),Re(5),l(2),f(i?8:-1)}}
2function vc(t,s){if(t&1&&(r(0,"div",20)(1,"div",30)(2,"div",31)(3,"div",32)(4,"span",33),S(5,4),a(),r(6,"span"),P(7),d(8,"number"),a(),T(9,yc,3,5,"span",34),a(),w(10,"mat-progress-bar",35),a(),T(11,Lc,11,10,"div",31),T(12,Rc,16,13,"div",31)(13,xc,15,12,"div",31)(14,Uc,11,5,"div",31),a()()),t&2){m();let e=de(0);l(7),Q("",Ve(8,5,e.locations.current,"1.0-0")," "),l(2),f(e.locations.limit>0?9:-1),l(),p("value",e.locations.progress),l(),f(e.visits?11:-1),l(),f(e.messageCredit?12:e.messageLimit?13:e.extraCredit?14:-1)}}function Gc(t,s){t&1&&(r(0,"div",21),w(1,"mat-spinner"),a())}function Wc(t,s){if(t&1&&(r(0,"div",45)(1,"span"),S(2,14),d(3,"number"),a(),w(4,"ww-icon",50),a()),t&2){m(3);let e=de(0);l(3),$e(Ve(3,1,e.extraCredit,"1.0-2")),Re(2)}}function Dc(t,s){t&1&&(r(0,"div",45),w(1,"ww-icon",51),r(2,"span"),S(3,15),a()())}function kc(t,s){if(t&1&&(r(0,"div",49),T(1,Wc,5,4,"div",45),T(2,Dc,4,0,"div",45),a()),t&2){m(2);let e=de(0),i=de(2);Gt("justify-between",!!e.extraCredit)("justify-end",!e.extraCredit),l(),f(e.extraCredit?1:-1),l(),f(i!=null&&i.enabled?2:-1)}}function zc(t,s){if(t&1&&T(0,kc,3,6,"div",48),t&2){m();let e=de(0);f(e?0:-1)}}function Vc(t,s){if(t&1&&(r(0,"ww-bullet-list-item"),P(1),a()),t&2){let e=s.$implicit;l(),le(e)}}function Xc(t,s){if(t&1&&(r(0,"ww-call-out",22),d(1,"async"),r(2,"ww-call-out-content")(3,"div",52)(4,"div",53)(5,"h4"),P(6),a(),r(7,"ww-bullet-list",54),ne(8,Vc,2,1,"ww-bullet-list-item",null,be),a(),w(10,"ww-link",55),a(),r(11,"a",56),S(12,16),a()()()()),t&2){let e=s,i=m();p("illustration",g(1,6,i.planUpsellIllustration$))("backgroundColor","upgrade2"),l(6),le(e.title),l(2),oe(e.features),l(2),p("wwEventLogger","opened_change_plan"),l(),p("routerLink","/account/settings/billing/change-plan")("wwEventLogger","opened_change_plan")}}var Lo=(()=>{class t extends B{constructor(){super(...arguments),this.changePlanService=c(Oe),this.accountRx=c(V),this.decimalPipe=c(Wt),this.dialog=c(K),this.layout=c(Z),this.plansRx=c(ti),this.autoRefill$=this.accountRx.getAccount(["settings"]).pipe(u(({settings:e})=>({enabled:e?.paidMessageCreditIncrementActive??!1,amount:e?.paidMessageCreditIncrement??0,threshold:e?.paidMessageCreditIncrementThreshold??2}))),this.planSegment$=this.accountRx.getAccount(["planSegment"]).pipe(u(({planSegment:e})=>e)),this.planUsage$=this.planSegment$.pipe(ie(()=>this.plansRx.planInfo$.pipe(u(e=>{if(!e)return null;let{numActiveLocations:i,maxLocations:n,visitLimit:o,visitUsage:_,planMessageCredit:h,planMessageCreditUsage:I,messageLimit:G,messageUsage:x,paidMessageCredit:Y}=this.getPlanInfoWithDefaults(e),ht=Y>0,he={current:i,limit:n,progress:i>=n?100:i/n*100},Ri=_/o*100>=100,Mi=_/o*100>90,xi=o>0?{current:_,limit:o,progress:_/o*100,color:Ri?"warn":Mi?"accent":""}:null,Et=I/h*100>=100&&!ht,xt=I/h*100>90,Pi=h>0?{current:I,limit:h,progress:I/h*100,color:Et?"warn":xt?"accent":"",infoColor:Et?"warning":xt?"alert":void 0,infoIcon:Et?"ww-info-triangle":"bx-info-circle",infoText:Et?$localize`You have no remaining SMS credit.`:xt?$localize`You only have $${this.decimalPipe.transform(h-I,"1.0-2")} in SMS credit.`:null}:null,Bi=x/G*100>=100,Fi=x/G*100>90,Ui=G>0?{current:x,limit:G,progress:x/G*100,color:Bi?"warn":Fi?"accent":""}:null;return{locations:he,visits:xi,messageCredit:Pi,messageLimit:Ui,extraCredit:Y}})))),this.planUpsell$=R([this.planSegment$,this.changePlanService.plans$]).pipe(u(([e,i])=>{let n=Qr[e];if(!n)return null;let o=i.find(_=>_.segment===n.segment);return o?La(n,_=>typeof _=="string"?this.changePlanService.patchStringWithPlanValues(o,_)??"":_):n})),this.planUpsellIllustration$=this.layout.isMobile$.pipe(u(e=>e?null:"ww-account-billing-upsell")),this.showEditButton$=this.accountRx.getAccount(["planSegment"]).pipe(u(({planSegment:e})=>e!=="FREE"&&e!=="DEMO"&&e!=="EVENT"&&e!=="ENTERPRISE")),this.showUpgradeButton$=this.accountRx.getAccount(["planSegment"]).pipe(u(({planSegment:e})=>e!=="DEMO"&&e!=="EVENT"&&e!=="ENTERPRISE"))}openUsageReport(){this.dialog.open(C(rs))}openEventOrEnterpriseChangePlanModal(){this.changePlanService.openCancelPlanModal()}getPlanInfoWithDefaults(e){return va(e,{numActiveLocations:0,maxLocations:0,visitLimit:0,visitUsage:0,planMessageCredit:0,planMessageCreditUsage:0,messageLimit:0,messageUsage:0,paidMessageCredit:0})}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-billing"]],hostAttrs:[1,"ww-account-billing","flex","flex-col","gap-6"],standalone:!1,features:[L],decls:32,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD*16:1\uFFFD"}:START_BLOCK_IF: Next billing date is ${"\uFFFD#1:1\uFFFD"}:START_TAG_WW_DISPLAY_DATE:${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_WW_DISPLAY_DATE:${"\uFFFD/*16:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD#18\uFFFD"}:START_TAG_SPAN:.${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPAN:`;let i;i=$localize`Edit`;let n;n=$localize`Upgrade plan`;let o;o=$localize`Change plan`;let _;_=$localize` Edit `;let h;h=$localize` Your ${"\uFFFD0\uFFFD"}:INTERPOLATION: plan was cancelled on ${"\uFFFD#5\uFFFD"}:START_TAG_WW_DISPLAY_DATE:${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_WW_DISPLAY_DATE: and will be converted to a Free plan on ${"\uFFFD#7\uFFFD"}:START_TAG_WW_DISPLAY_DATE_1:${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_WW_DISPLAY_DATE:`,h=la(h);let I;I=$localize`Locations`;let G;G=$localize`Visits`;let x;x=$localize`SMS Credit`;let Y;Y=$localize` Usage report `;let ht;ht=$localize`Enable auto-refill`;let he;he=$localize`Message Limit`;let Ri;Ri=$localize` Usage report `;let Mi;Mi=$localize`SMS credits are used for sending text messages to your customers. If auto-refill is enabled, your balance will automatically top up with your specified amount when it drops below $2.`;let xi;xi=$localize`SMS credits remaining: $${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Et;Et=$localize` Usage report `;let xt;xt=$localize` Auto-refills with $${"\uFFFD0\uFFFD"}:INTERPOLATION: when $${"\uFFFD1\uFFFD"}:INTERPOLATION_1: remaining `;let Pi;Pi=$localize` SMS auto-refill disabled `;let Bi;Bi=$localize`The credit reserve will be used when you run out of SMS credit during a billing period. Auto-refill will be used if it is enabled and your credit reserve runs out.`;let Fi;Fi=$localize`Credit reserve: $${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ui;Ui=$localize`Auto-refill enabled`;let jo;jo=$localize`See all features`;let Ko;return Ko=$localize` Upgrade now `,[["extraCreditTmpl",""],e,_,h,I,G,x,Y,he,Ri,xi,Et,xt,Pi,Fi,Ui,Ko,[1,"invisible"],[1,"below-small:!max-w-48"],["wwBackgroun
2dColor","white",1,"pb-4"],[1,"!flex","flex-col","gap-2"],[1,"flex","flex-col","py-6"],[1,"ww-account-billing-call-out",3,"illustration","backgroundColor"],[3,"date"],["wwButton","secondary","aria-label",i,"routerLink","manage-plan"],["wwButton","primary","aria-label",n,"routerLink","change-plan"],["wwButton","secondary","aria-label",o],["icon","bxs-bolt","size","small"],["wwButton","secondary","aria-label",o,3,"click"],["color","alert",1,"!w-full"],[1,"flex","flex-col","gap-6"],[1,"flex","flex-col","gap-2"],[1,"flex","items-end","gap-1.5","min-h-10"],[1,"font-medium"],[3,"wwColor"],["mode","determinate",3,"value"],[1,"flex","items-end","gap-1","min-h-10"],[1,"flex","items-end","justify-between"],["wwButton","secondary",3,"click"],["mode","determinate",1,"",3,"color","value"],[4,"wwOutlet"],[1,"!w-full","!max-w-full",3,"color","hideIcon"],["size","small",3,"color","icon"],["wwColor","black","type","router-link","href","/account/settings/billing/auto-refill","content",ht],[1,"flex","flex-col"],[1,"flex","items-center","gap-1"],["icon","bx-help-circle","size","x-small","wwColor","darkerGrey","wwTooltip",Mi],["wwTypography","body2","wwColor","darkerGrey"],["wwTypography","body2","wwColor","darkerGrey",1,"flex","items-center",3,"justify-between","justify-end"],["wwTypography","body2","wwColor","darkerGrey",1,"flex","items-center"],["icon","bx-help-circle","size","x-small","wwTooltip",Bi],["icon","bx-check","size","x-small"],[1,"flex","below-mobile:flex-col","below-mobile:gap-6","items-start","space-between","w-full"],[1,"flex","flex-col","flex-grow","gap-6"],["icon","bx-check"],["type","router-link","href","/account/settings/billing/change-plan","content",jo,3,"wwEventLogger"],["wwButton","secondary","wwBackgroundColor","black","wwColor","white",3,"routerLink","wwEventLogger"]]},template:function(i,n){if(i&1&&(yt(0),d(1,"async"),yt(2),d(3,"async"),r(4,"ww-setting-card")(5,"ww-setting-card-header")(6,"ww-setting-card-title")(7,"ww-setting-card")(8,"ww-setting-card-header")(9,"ww-setting-card-title"),P(10),d(11,"async"),r(12,"span",17),P(13,"."),a()(),r(14,"ww-setting-card-subtitle"),Ee(15,1),T(16,wc,2,1),d(17,"async"),w(18,"span",17),Ae(),a(),T(19,Nc,8,11,"ww-setting-card-suffix",18),d(20,"async"),a()()()(),r(21,"ww-setting-card-content")(22,"ww-setting-card")(23,"ww-setting-card-content"),T(24,Ic,9,9,"div",19),d(25,"async"),T(26,vc,15,8,"div",20)(27,Gc,2,0,"div",21),a()()()(),U(28,zc,1,1,"ng-template",null,0,me),T(30,Xc,13,8,"ww-call-out",22),d(31,"async")),i&2){let o,_,h=Si(g(1,6,n.planUsage$));l(2),Si(g(3,9,n.autoRefill$)),l(8),Q(" ",g(11,12,n.changePlanService.planName$)," "),l(6),f((o=g(17,14,n.changePlanService.nextBillingDate$))?16:-1,o),l(3),f(g(20,16,n.changePlanService.canUpdateAccount$)?19:-1),l(5),f(g(25,18,n.changePlanService.cancelAtPeriodEnd$)?24:-1),l(2),f(h?26:27),l(4),f((_=g(31,20,n.planUpsell$))?30:-1,_)}},dependencies:[kt,ii,ni,Sn,Fr,$n,yn,In,Ln,On,bn,er,qi,Qi,Ji,z,We,et,ae,we,Kt,Ki,gt,M,Wt],styles:[`.ww-account-billing .ww-account-billing-call-out .ww-call-out-background{background:radial-gradient(circle at 100% 10%,var(--ww-background-color),transparent 60%)}.ww-account-billing .ww-account-billing-call-out .ww-call-out-background .ww-call-out-column{flex-grow:1} 3/*noopaccount-billing.component-5N2I7LHI.css.map */ 4`],encapsulation:2,changeDetection:0})}}return t})();function Hc(t,s){if(t&1){let e=$();r(0,"button",6),N("click",function(){O(e);let n=m();return b(n.deleteAccountWrite.payload.next())}),w(1,"ww-icon",7),r(2,"span"),S(3,1),a()()}if(t&2){let e=m();p("wwBackgroundColor","warning")("disabled",e.formControl.value!==e.confirmWord)}}var Oo=(()=>{class t{constructor(){this.deleteAccountWrite=c(Nr),this.formControl=new y,this.confirmWord="DELETE"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-billing-delete-account"]],hostAttrs:[1,"ww-account-billing-delete-account","flex","flex-col","gap-6"],standalone:!1,decls:6,vars:4,consts:()=>{let e;e=$localize`Delete Waitwhile account`;let i;i=$localize`Type '${"\uFFFD0\uFFFD"}:INTERPOLATION:' to confirm and permanently remove your Waitwhile account`;let n;n=$localize` Warning: This will permanently delete this account. This action can not be reversed. Are you sure? 5`;let o;return o=$localize`Delete account`,[n,o,["sublabel",i],["color","warning"],["label",e,3,"placeholder","formControl",6,"sublabel"],["wwButton","primary",3,"wwBackgroun
5dColor","disabled","click",4,"wwPermission"],["wwButton","primary",3,"click","wwBackgroundColor","disabled"],["icon","bx-trash"]]},template:function(i,n){i&1&&(r(0,"ww-info-bubble",3),S(1,0),a(),r(2,"ww-input",4),ra(3,2),a(),r(4,"div"),U(5,Hc,4,2,"button",5),a()),i&2&&(l(2),$e(n.confirmWord),Re(3),p("placeholder",n.confirmWord)("formControl",n.formControl),l(3),p("wwPermission","accounts.delete"))},dependencies:[se,ce,ot,z,We,et,ae,Ct],encapsulation:2,changeDetection:0})}}return t})();var lt={name:$localize`Account settings`,routerLink:"/account/settings"};function jc(t,s){t&1&&ut(0)}function Kc(t,s){t&1&&ut(0)}function Yc(t,s){if(t&1&&(r(0,"ww-display-object-key"),U(1,jc,1,0,"ng-container",3),a(),r(2,"ww-display-object-value"),U(3,Kc,1,0,"ng-container",3),a()),t&2){let e=s.$implicit;l(),p("wwOutlet",e.label),l(2),p("wwOutlet",e.component)}}function qc(t,s){if(t&1&&(r(0,"ww-display-object"),ne(1,Yc,4,2,null,null,be),d(3,"async"),a()),t&2){let e=m();l(),oe(g(3,0,e.details$))}}var bo=(()=>{class t extends B{constructor(){super(...arguments),this.currencyPipe=c(fe),this.invoice$=this.observe("invoice"),this.details$=this.invoice$.pipe(u(e=>[{label:$localize`ID`,component:Ne({content:e.id})},{label:$localize`Order number`,component:Ne({content:e.number})},{label:$localize`Details`,component:Ot({$element:{classList:["flex","flex-col","gap-2"]},components:e.items.map(i=>Ne({content:i.description}))})},{label:$localize`Amount`,component:Ne({content:this.currencyPipe.transform(e.subtotal,"USD")})},{label:$localize`Tax`,component:Ne({content:this.currencyPipe.transform(e.tax,"USD")})},{label:$localize`Total`,component:Ne({content:this.currencyPipe.transform(e.total,"USD")})},{label:$localize`Status`,component:Ne({content:Bn[e.status]})}]))}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-billing-invoice-details-modal"]],hostAttrs:[1,"ww-account-billing-invoice-details-modal"],inputs:{invoice:"invoice"},standalone:!1,features:[L],decls:9,vars:4,consts:()=>{let e;e=$localize` Invoice `;let i;return i=$localize`Download PDF`,[e,i,["wwButton","secondary",3,"href"],[4,"wwOutlet"]]},template:function(i,n){if(i&1&&(r(0,"ww-dialog-layout")(1,"ww-dialog-layout-title"),S(2,0),a(),r(3,"ww-dialog-layout-content"),T(4,qc,4,2,"ww-display-object"),d(5,"async"),a(),r(6,"ww-dialog-layout-actions")(7,"a",2),S(8,1),a()()()),i&2){let o;l(4),f((o=g(5,2,n.invoice$))?4:-1,o),l(3),p("href",n.invoice.pdfUrl,oa)}},dependencies:[z,qt,Qt,Jt,Zt,lr,ar,rr,Kt,M],encapsulation:2,changeDetection:0})}}return t})();function Jc(t,s){if(t&1){let e=$();r(0,"div",4)(1,"h5"),S(2,0),a(),r(3,"ww-table",5),d(4,"async"),N("rowClicked",function(n){O(e);let o=m(2);return b(o.showInvoice(n))}),a()()}if(t&2){let e=m(2);l(3),p("flex",!0)("columns",g(4,4,e.columns$))("data",s)("pluckCellLabel",e.pluckCellLabel)}}function Zc(t,s){if(t&1){let e=$();r(0,"div",4)(1,"h5"),S(2,1),a(),r(3,"ww-table",5),d(4,"async"),N("rowClicked",function(n){O(e);let o=m(2);return b(o.showInvoice(n))}),a()()}if(t&2){let e=m(2);l(3),p("flex",!0)("columns",g(4,4,e.columns$))("data",s)("pluckCellLabel",e.pluckCellLabel)}}function ep(t,s){if(t&1&&(r(0,"div",2),T(1,Jc,5,6,"div",4),d(2,"async"),T(3,Zc,5,6,"div",4),d(4,"async"),a()),t&2){let e,i,n=m();l(),f((e=g(2,2,n.upcomingInvoices$))?1:-1,e),l(2),f((i=g(4,4,n.invoices$))?3:-1,i)}}function tp(t,s){t&1&&(r(0,"ww-section-content",3),w(1,"mat-spinner"),a())}var Li=(()=>{class t extends B{constructor(){super(),this.breakpoints=c(qe),this.commonDisplay=c(ft),this.currencyPipe=c(fe),this.dialog=c(K),this.invoiceRx=c(Ar),this.layout=c(Z),this.plansRx=c(ti),this.columns$=this.breakpoints.isAboveMobile$.pipe(u(e=>[{key:"date",label:$localize`Date`},e?{key:"description",label:$localize`Description`}:null,{key:"total",label:$localize`Amount`},{key:"status",label:$localize`Status`}].filter(_t))),this.invoices$=this.invoiceRx.invoices$.pipe(u(e=>e)),this.upcomingInvoices$=this.plansRx.planInfo$.pipe(u(e=>Lt(e?.upcomingInvoice))),this.invoicesLoaded$=R([this.invoices$,this.upcomingInvoices$]).pipe(je([null,null]),u(([e,i])=>e!==null&&i!==null)),this.pluckCellLabel=e=>({date:this.commonDisplay.displayDate(e.date),description:e.items.map(i=>i.description).join(`\r 6`),total:this.currencyPipe.transform(e.total,"USD","symbol"),status:Bn[e.status]}),this.layout.setFeatureContext({name:$localize`Invoices`,breadcrumbs:[lt,Ci]})}showInvoice(e){this.dialog.open(C(bo,{invoice:e}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-billing-invoices"]],hostAttrs:[1,"ww-account-billing-invoices"],standalone:!1,features:[L],decls:3,vars:3,consts:()=>{let e;e=$localize`Upcoming`;let i;return i=$localize`History`,[e,i,[1,"flex","flex-col","gap-8"],[1,"justify-center"],[1,"flex","flex-col"],[3,"rowClicked","flex","columns","data","pluckCellLabel"]]},template:function(i,n){i&1&&(T(0,ep,5,6,"div",2),d(1,"async"),Bt(2,tp,2,0,"ww-section-content",3)),i&2&&f(g(1,1,n.invoicesLoaded$)?0:2)},dependencies:[qi,nn,tt,M],encapsulation:2,changeDetection:0})}}return t})();var ss=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=Be({type:t})}static{this.\u0275inj=Pe({providers:[fe,Fe,ke],imports:[Ce,j,ve,ue,Le,D]})}}return t})();function ip(t,s){if(t&1&&(r(0,"div",8)(1,"p"),P(2),a()()),t&2){let e=m().$implicit;l(2),le(e.description)}}function np(t,s){if(t&1&&(r(0,"ww-expansion",5)(1,"ww-expansion-header",6)(2,"h3"),P(3),a()(),U(4,ip,3,1,"div",7),a()),t&2){let e=s.$implicit,i=s.$index;p("initiallyOpened",i===0)("bordered",!1),l(3),le(e.title)}}var cs=(()=>{class t{constructor(){this.questions=[{title:$localize`Can I use Waitwhile for free?`,description:$localize`Yes, indeed! You can waitlist up to 50 customers each month on the Free plan and access all of the awesome features.`},{title:$localize`What if I exceed my Free or paid plan limits?`,description:$localize`You will still be able to access your waitlist, but you won't be able to add any new customers until the beginning of the next month (or if you choose to upgrade to the next plan).`}
6,{title:$localize`How do I know which plan is right for me?`,description:"If you waitlist fewer than 50 customers a month, you should try our Free plan. Otherwise, choose Starter or Business based on the number of customers you expect, and for more features."},{title:$localize`Is billing based on each waitlist?`,description:$localize`No, billing is based on your Waitwhile Account which may have as many waitlists as you want. The total number of waitlisted customers across all your waitlists is what counts towards the different plan thresholds.`},{title:$localize`How do I cancel my monthly subscription?`,description:$localize`Canceling can be done easily within the billing tab of your account and your plan won't renew after the current billing period. You don't lose your statistics or customer data if you cancel either so it's flexible to turn off or turn on based on your current needs.`},{title:$localize`Are there any long-term commitments or cancellation fees?`,description:$localize`No. You can upgrade, downgrade, or cancel your subscription at any time. We'll never charge a cancellation fee or ask you to sign a minimum contract. This means you can use Waitwhile only as needed and not pay for the months you don't need it!`},{title:$localize`What are my payment options - credit card and/or invoicing?`,description:$localize`You can use your credit card to pay for any plan. We support VISA, MasterCard and AMEX. If you sign up for an Annual subscription, we can invoice you annually.`},{title:$localize`What kind of support do I get?`,description:$localize`We got your back! All our plans come with support via email and chat, and our Business and Enterprise plans also get phone support.`},{title:$localize`Do you offer nonprofit, or educational discounts?`,description:$localize`Sure thing. Just contact us and we'll figure something out.`},{title:$localize`Do you offer Enterprise contracts/pricing/support?`,description:$localize`Yep! Email us and we'll make it happen.`},{title:$localize`Can I make a payment by invoice?`,description:$localize`We're happy to provide invoicing on our Enterprise plans. Contact us to set up payment by check or bank transfer. We do not offer monthly invoicing.`}]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-billing-change-plan-faq"]],hostAttrs:[1,"ww-account-billing-change-plan-faq","flex","flex-col","items-center","gap-10","w-full"],decls:8,vars:0,consts:()=>{let e;e=$localize`Frequently asked questions`;let i;return i=$localize` Check out this list of commonly asked questions. If you don't see what you need, email us at ${"\uFFFD#4\uFFFD"}:START_LINK:[email protected]${"\uFFFD/#4\uFFFD"}:CLOSE_LINK:`,[e,i,[1,"max-w-lg","text-center","pb-10"],["wwColor","primary","href","mailto:[email protected]","target","_blank"],[1,"ww-account-billing-change-plan-faq-container","w-full","small:max-w-4xl","max-w-full"],[1,"ww-account-billing-change-plan-faq-question",3,"initiallyOpened","bordered"],["openIcon","bx-minus","closedIcon","bx-plus"],["class","pt-4",4,"wwExpansionContent"],[1,"pt-4"]]},template:function(i,n){i&1&&(r(0,"h1"),S(1,0),a(),r(2,"p",2),Ee(3,1),w(4,"a",3),Ae(),a(),r(5,"ww-expansion-accordion",4),ne(6,np,5,3,"ww-expansion",5,be),a()),i&2&&(l(6),oe(n.questions))},dependencies:[j,D,We,sr,pr,cr,ur],styles:[`.ww-account-billing-change-plan-faq .ww-account-billing-change-plan-faq-container{gap:0}.ww-account-billing-change-plan-faq .ww-account-billing-change-plan-faq-container .ww-account-billing-change-plan-faq-question{padding:32px 0;border-top:1px solid var(--ww-color-mediumGrey)}.ww-account-billing-change-plan-faq .ww-account-billing-change-plan-faq-container .ww-account-billing-change-plan-faq-question:last-of-type{border-bottom:1px solid var(--ww-color-mediumGrey)} 7/*noopaccount-billing-change-plan-faq.component-6HME64L3.css.map */ 8`],encapsulation:2,changeDetection:0})}}return t})();function op(t,s){if(t&1&&(r(0,"h2",1),P(1),a()),t&2){let e=m().$implicit,i=m();l(),Q(" ",i.featureGroups[e.group].title," ")}}function ap(t,s){t&1&&w(0,"ww-icon",2)}function rp(t,s){if(t&1&&(r(0,"div",0),T(1,op,2,1,"h2",1),T(2,ap,1,0,"ww-icon",2),w(3,"ww-table",3),d(4,"async"),a()),t&2){let e=s.$implicit,i=m();l(),f(i.featureGroups[e.group].title?1:-1),l(),f(i.featureGroups[e.group].title?2:-1),l(),Gt("ww-account-billing-compare-plans-table-without-header",!i.featureGroups[e.group].header),p("flex",!0)("columns",i.columns)("data",e.data)("pluckCellLabel",g(4,9,i.pluckCellLabel$))("selection","none")}}var ps=(()=>{class t extends B{constructor(){super(...arguments),this.changePlanService=c(Oe),this.plansFeatureContent$=this.changePlanService.planFeatureContent$.pipe(u(e=>e)),this.plans=["FREE","STARTER","BUSINESS","ENTERPRISE"],this.groups=Ge()(["pricing","lists","team","personalization","analytics","integrations","support","security"]),this.items=this.groups.map(e=>({group:e,data:this.getData(e)})),this.featureGroups=uo,this.columns=[{key:"feature"},...this.plans.map(e=>({key:`${e}`,label:$t[e]}))],this.getCellLabel=(e,i,n)=>n[e][i]?Ot({$element:{classList:["flex","flex-col","items-center"]},components:n[e][i]?.map(o=>Ne({content:o,truncate:!1,$element:{classList:["text-xs"]}}))}):bt({icon:"bx-check",color:"primary",$element:{classList:["ww-account-billing-compare-plans-feature-check-icon"]}}),this.pluckCellLabel$=this.changePlanService.planFeatureContent$.pipe(u(e=>i=>this.plans.reduce((n,o)=>q(v({},n),{[o]:i.segments.includes(o)?this.getCellLabel(o,i.feature,e):" "}),{feature:Ot({$element:{classList:["flex","flex-col"]},components:[Ne({content:i.title,truncate:!1,$element:{classList:["ww-account-billing-compare-plans-feature-title"]}}),Ne({content:i.subTitle,truncate:!1,$element:{classList:["ww-account-billing-compare-plans-feature-subtitle"],color:"darkerGrey"}})]})})))}getData(e){return uo[e].features.flatMap(i=>({feature:i,title:Jr[i],subTitle:Zr[i],segments:this.plans.filter(n=>el[n].includes(i))}))}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-billing-compare-plans"]],hostAttrs:[1,"ww-account-billing-compare-plans","small:max-w-4xl","max-w-full"],features:[L],decls:2,vars:0,consts:[[1,"ww-account-billing-compare-plans-group"],[1,"pt-6"],["icon","ww-
8plan-feature-underline","sizeStyle","auto",1,"!h-2","!min-h-0"],[3,"flex","columns","data","pluckCellLabel","selection"]],template:function(i,n){i&1&&ne(0,rp,5,11,"div",0,be),i&2&&oe(n.items)},dependencies:[j,D,et,tt,M],styles:[`.ww-account-billing-compare-plans{width:100%}.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table.ww-account-billing-compare-plans-table-without-header thead{display:none}.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table .mat-mdc-table .mat-mdc-row{min-height:80px;height:auto}.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table .mat-mdc-table .mat-mdc-row:hover,.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table .mat-mdc-table .mat-mdc-row:hover .mat-mdc-cell{background:var(--ww-color-white)}.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table tr :first-child{padding-left:0}.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table tr :last-child{padding-right:0}.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table th,.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table td{justify-content:center}.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table th.mat-column-feature,.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table td.mat-column-feature{width:100%;min-width:360px}.ww-breakpoints-below-small .ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table th.mat-column-feature,.ww-breakpoints-below-small .ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table td.mat-column-feature{min-width:180px}.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table th:not(.mat-column-feature),.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table td:not(.mat-column-feature){min-width:120px}.ww-breakpoints-below-small .ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table th,.ww-breakpoints-below-small .ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table td{padding:0}.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table th{font-size:14px;font-weight:500}.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table .ww-account-billing-compare-plans-feature-title{font-weight:500}.ww-breakpoints-below-small .ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table .ww-account-billing-compare-plans-feature-title{font-size:12px;line-height:14px}.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table .ww-account-billing-compare-plans-feature-subtitle{font-size:12px}.ww-breakpoints-below-small .ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table .ww-account-billing-compare-plans-feature-subtitle{font-size:10px;line-height:14px}.ww-account-billing-compare-plans .ww-account-billing-compare-plans-group .ww-table .ww-account-billing-compare-plans-feature-check-icon{height:20px;width:20px;min-height:20px;min-width:20px} 9/*noopaccount-billing-compare-plans.component-MWKEFHVN.css.map */ 10`],encapsulation:2,changeDetection:0})}}return t})();var lp=(t,s)=>s.segment;function sp(t,s){if(t&1){let e=$();r(0,"ww-change-plan-builder-quantity",18),N("quantityChanged",function(n){O(e);let o=m(3);return b(o.onQuantityChanged(n))}),a()}if(t&2){let e=s.$implicit,i=m(2);Gt("hidden",e.segment!==i.plan.segment),p("minQty",e.minQty)("maxQty",e.maxQty)("formatSliderLabel",e.formatSliderLabel)("title",e.composerTitle??null)("intro",e.composerIntro??null)("currentQty",i.quantity)}}function cp(t,s){if(t&1){let e=$();r(0,"ww-change-plan-builder-buttons",16),N("planChanged",function(n){O(e);let o=m(2);return b(o.onPlanChanged(n))}),a(),ne(1,sp,1,8,"ww-change-plan-builder-quantity",17,lp)}if(t&2){let e=s,i=m();p("plans",e)("selectedPlan",i.plan),l(),oe(e)}}function pp(t,s){t&1&&(r(0,"a",12),S(1,2),a())}function up(t,s){if(t&1){let e=$();r(0,"button",19),N("click",function(){O(e);let n=m(2);return b(n.openUpgradeDowngradeModal())}),S(1,3),a()}}function _p(t,s){if(t&1){let e=$();r(0,"button",20),N("click",function(){O(e);let n=m(2);return b(n.openUpgradeDowngradeModal())}),S(1,4),a()}}function mp(t,s){t&1&&(r(0,"button",15),S(1,5),a()),t&2&&p("disabled",!0)}function dp(t,s){if(t&1){let e=$();r(0,"div",8)(1,"div",9),T(2,cp,3,2),d(3,"async"),a(),r(4,"div",10)(5,"ww-change-plan-builder-summary",11),N("annualChanged",function(n){O(e);let o=m();return b(o.onAnnualChanged(n))}),a(),T(6,pp,2,0,"a",12),T(7,up,2,0,"button",13),d(8,"async"),T(9,_p,2,0,"button",14),d(10,"async"),T(11,mp,2,1,"button",15),d(12,"async"),a()()}if(t&2){let e,i=s,n=m();l(2),f((e=g(3,10,n.pickablePlanDetails$))?2:-1,e),l(3),p("selectedPlan",i.plan)("price",i.price)("annual",i.annual)("locations",i.locations)("visits",i.visits),l(),f(i.plan.demoForm?6:-1),l(),f(g(8,12,n.isDowngrade$)&&!i.plan.demoForm?7:-1),l(2),f(g(10,14,n.isUpgrade$)&&!i.plan.demoForm?9:-1),l(2),f(g(12,16,n.isSame$)&&!i.plan.demoForm?11:-1)}}var us=(()=>{class t extends B{constructor(){super(),this.breakpoints=c(qe),this.changePlanService=c(Oe),this.dialog=c(K),this.planDetails$=this.observe("planDetails"),this.pickableSegments$=this.observe("pickableSegments"),this.currentSegment$=this.observe("currentSegment"),this.currentPlanVersion$=this.observe("currentPlanVersion"),this.currentQuantity$=this.observe("currentQuantity"),this.currentAnnual$=this.observe("currentAnnual"),this.selectedPlanSub=new Te(null),this.selectedPlan$=this.selectedPlanSub.asObservable(),this.annualSub=new Te(!1),this.annual$=this.annualSub.asObservable(),this.quantitySub=new Te(0),this.quantity$=this.quantitySub.asObservable(),this.pickablePlanDetails$=R([this.pickableSegments$,this.planDetails$]).pipe(u(([e,i])=>e.map(n=>i.find(o=>o.segment===n)).filter(_t))),this.lowestMonthlyPlanPrice$=this.planDetails$.pipe(u(e=>e.reduce((i,n)=>{if(n.prices&&n.prices.length>0){let o=n.prices.find(_=>_.annual);if(o?.price&&o.price/12<i)return o.price/12}return i},100))),this.price$=R([this.selectedPlan$,this.annual$,this.quantity$]).pipe(u(([e,i,n])=>
10nl(e,n,i))),this.locations$=R([this.selectedPlan$,this.quantity$]).pipe(u(([e,i])=>ol(e,i))),this.visits$=R([this.selectedPlan$,this.quantity$]).pipe(u(([e,i])=>al(e,i))),this.data$=R([this.selectedPlan$,this.quantity$,this.annual$,this.price$,this.locations$,this.visits$]).pipe(u(([e,i,n,o,_,h])=>e?{plan:e,quantity:i,annual:n,price:o,locations:_,visits:h}:null)),this.isDowngrade$=R([this.currentSegment$,this.currentPlanVersion$,this.selectedPlan$,this.currentQuantity$,this.quantity$]).pipe(u(([e,i,n,o,_])=>this.changePlanService.isDowngrade(e,i,n?.segment??null,o,_))),this.isUpgrade$=R([this.currentSegment$,this.currentPlanVersion$,this.selectedPlan$,this.currentQuantity$,this.quantity$]).pipe(u(([e,i,n,o,_])=>this.changePlanService.isUpgrade(e,i,n?.segment??null,o,_))),this.isSame$=R([this.currentSegment$,this.selectedPlan$,this.currentQuantity$,this.quantity$]).pipe(u(([e,i,n,o])=>i&&e&&n!==null&&o!==null&&e===i.segment&&n===o)),this.subscribe()}subscribe(){R([this.currentSegment$,this.currentQuantity$,this.currentAnnual$,this.pickablePlanDetails$]).pipe(He(1),H(this.ngOnDestroy$)).subscribe(([e,i,n,o])=>{let _=o.find(h=>h.segment===e);_?this.selectedPlanSub.next(_):this.selectedPlanSub.next(o[0]),this.quantitySub.next(i),this.annualSub.next(n)})}openUpgradeDowngradeModal(){return W(this,null,function*(){if(!(yield E(this.changePlanService.hasCompleteBillingAddress$))&&!(yield E(this.dialog.open(C(pi,{description:$localize`To continue using Waitwhile you need to provide a business address in order to be taxed correctly.`}),{size:this.breakpoints.isAboveMobile?"auto":"bottom-sheet"}).afterClosed$)))return;let i=yield E(this.selectedPlan$),n=yield E(this.quantity$),o=yield E(this.annual$);i&&this.dialog.open(C(An,{currentSegment:this.currentSegment,currentPlanVersion:this.currentPlanVersion,currentQuantity:this.currentQuantity,currentAnnual:this.currentAnnual,currentPeriodEndDate:this.currentPeriodEndDate,selectedPlan:i,initialQuantity:n,initialAnnual:o,countryCode:this.countryCode,stripeLast4:this.stripeLast4}),{id:"upgrade",disableClose:!0,size:this.breakpoints.isBelowMobile?"fullscreen":"auto"})})}selectPlan(e){this.selectedPlanSub.next(e),e.segment===this.currentSegment?this.quantitySub.next(this.currentQuantity):this.quantitySub.next(e.minQty)}onAnnualChanged(e){this.annualSub.next(e)}onPlanChanged(e){this.selectedPlanSub.next(e),e.segment===this.currentSegment?this.quantitySub.next(this.currentQuantity):this.quantitySub.next(e.minQty)}onQuantityChanged(e){this.quantitySub.next(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-billing-plan-composer"]],hostAttrs:[1,"ww-account-billing-plan-composer","flex","flex-col","items-center","gap-20","w-full"],inputs:{planDetails:"planDetails",pickableSegments:"pickableSegments",currentSegment:"currentSegment",currentPlanVersion:"currentPlanVersion",currentQuantity:"currentQuantity",currentAnnual:"currentAnnual",currentPeriodEndDate:"currentPeriodEndDate",countryCode:"countryCode",stripeLast4:"stripeLast4"},features:[L],decls:7,vars:6,consts:()=>{let e;e=$localize` Build the plan that works for you 11`;let i;i=$localize` Waitwhile plans start as low as $${"\uFFFD0\uFFFD"}:INTERPOLATION: per month, and scale with your usage and number of locations. 12`;let n;n=$localize`Downgrade`;let o;o=$localize`Upgrade`;let _;_=$localize`Current plan`;let h;h=$localize` Contact sales `;let I;I=$localize` Downgrade `;let G;G=$localize` Upgrade `;let x;return x=$localize` Current plan `,[e,i,h,I,G,x,[1,"max-w-lg","text-center","!leading-tight"],[1,"max-w-lg","text-center"],[1,"flex","flex-row","justify-between","gap-12","w-full"],[1,"flex","flex-col","flex-grow","gap-12","w-full"],[1,"ww-account-billing-plan-composer-summary","flex","flex-col","items-center","gap-8","pt-2"],[3,"annualChanged","selectedPlan","price","annual","locations","visits"],["wwButton","","href","https://waitwhile.com/contact-sales","target","_blank",1,"w-full"],["wwButton","secondary","aria-label",n,1,"w-full"],["wwButton","","aria-label",o,1,"w-full"],["wwButton","","aria-label",_,1,"w-full",3,"disabled"],[3,"planChanged","plans","selectedPlan"],[3,"hidden","minQty","maxQty","formatSliderLabel","title","intro","currentQty"],[3,"quantityChanged","minQty","maxQty","formatSliderLabel","title","intro","currentQty"],["wwButton","secondary","aria-label",n,1,"w-full",3,"click"],["wwButton","","aria-label",o,1,"w-full",3,"click"]]},template:function(i,n){if(i&1&&(r(0,"h1",6),S(1,0),a(),r(2,"p",7),S(3,1),d(4,"async"),a(),T(5,dp,13,18,"div",8),d(6,"async")),i&2){let o;l(4),$e(g(4,2,n.lowestMonthlyPlanPrice$)),Re(3),l(),f((o=g(6,4,n.data$))?5:-1,o)}},dependencies:[j,ll,En,sl,D,z,M],styles:[`.ww-account-billing-plan-composer{max-width:900px;width:100%}.ww-breakpoints-below-small .ww-account-billing-plan-composer{max-width:100%}.ww-account-billing-plan-composer .ww-account-billing-plan-composer-summary{max-width:200
12px;width:100%}.ww-breakpoints-below-small .ww-account-billing-plan-composer .ww-account-billing-plan-composer-summary{max-width:100%} 13/*noopaccount-billing-plan-composer.component-3TYHIZFG.css.map */ 14`],encapsulation:2,changeDetection:0})}}return t})();function Cp(t,s){if(t&1&&(r(0,"span",11),P(1),a()),t&2){let e=m();l(),le(e.price)}}function gp(t,s){if(t&1&&(r(0,"span",10),P(1),a()),t&2){let e=m();l(),Q(" / ",e.pricePeriod)}}function Sp(t,s){if(t&1&&(r(0,"span",12),P(1),a()),t&2){let e=m();l(),le(e.priceText)}}function Tp(t,s){if(t&1){let e=$();r(0,"button",19),N("click",function(){O(e);let n=m(3).$implicit,o=m();return b(o.openUpgradeDowngradeModal(n))}),S(1,1),a()}if(t&2){let e=m(3).$implicit;p("ngClass","ww-account-billing-plans-"+e.toLocaleLowerCase())}}function fp(t,s){t&1&&(r(0,"button",18),S(1,2),a()),t&2&&p("disabled",!0)}function wp(t,s){if(t&1&&T(0,Tp,2,1,"button",17)(1,fp,2,1,"button",18),t&2){let e=m(2).$implicit;f(e!=="ENTERPRISE"?0:1)}}function hp(t,s){t&1&&(r(0,"button",18),S(1,3),a()),t&2&&p("disabled",!0)}function Ep(t,s){if(t&1){let e=$();r(0,"button",22),N("click",function(){O(e);let n=m(3).$implicit,o=m();return b(o.openUpgradeDowngradeModal(n))}),S(1,4),a()}if(t&2){let e=m(3).$implicit;p("ngClass","ww-account-billing-plans-"+e.toLocaleLowerCase())}}function Ap(t,s){t&1&&(r(0,"a",21),S(1,5),a())}function Np(t,s){if(t&1){let e=$();r(0,"button",19),N("click",function(){O(e);let n=m(3).$implicit,o=m();return b(o.openUpgradeDowngradeModal(n))}),S(1,6),a()}if(t&2){let e=m(3).$implicit;p("ngClass","ww-account-billing-plans-"+e.toLocaleLowerCase())}}function Ip(t,s){if(t&1){let e=$();r(0,"button",22),N("click",function(){O(e);let n=m(3).$implicit,o=m();return b(o.openUpgradeDowngradeModal(n))}),S(1,7),a()}if(t&2){let e=m(3).$implicit;p("ngClass","ww-account-billing-plans-"+e.toLocaleLowerCase())}}function yp(t,s){if(t&1&&T(0,hp,2,1,"button",18)(1,Ep,2,1,"button",20)(2,Ap,2,0,"a",21)(3,Np,2,1,"button",17)(4,Ip,2,1,"button",20),t&2){let e=m(2).$implicit,i=m();f(e===i.currentSegment&&!i.hasLegacyPlan?0:e===i.currentSegment&&i.hasLegacyPlan?1:e==="ENTERPRISE"?2:i.isDowngrade(e,i.currentSegment,i.currentPlanVersion)?3:i.isUpgrade(e,i.currentSegment,i.currentPlanVersion)?4:-1)}}function Lp(t,s){if(t&1&&(r(0,"ww-bullet-list-item",15),P(1),a()),t&2){let e=s.$implicit;l(),le(e)}}function Op(t,s){if(t&1){let e=$();r(0,"div",9)(1,"div")(2,"h3"),P(3),a(),r(4,"span"),P(5),a()(),r(6,"div")(7,"div",10),P(8),a(),r(9,"div"),T(10,Cp,2,1,"span",11),T(11,gp,2,1,"span",10),T(12,Sp,2,1,"span",12),a()()(),T(13,wp,2,1)(14,yp,5,1),r(15,"div",13)(16,"div",14),S(17,0),a(),r(18,"ww-bullet-list"),ne(19,Lp,2,1,"ww-bullet-list-item",15,be),a(),r(21,"div")(22,"ww-link",16),N("click",function(n){O(e);let o=m(2);return b(o.scrollToFeatures(n))}),a()()()}if(t&2){let e=s,i=m(2);l(3),le(e.title),l(2),le(e.subTitle),l(3),le(e.priceTitle??"\xA0"),l(2),f(e.price!==void 0?10:-1),l(),f(e.pricePeriod?11:-1),l(),f(e.priceText?12:-1),l(),f(i.currentSegment==="EVENT"||i.currentSegment==="ENTERPRISE"?13:14),l(6),oe(e.highlights),l(3),p("content",e.featuresLinkText)}}function bp(t,s){if(t&1&&(r(0,"ww-card",8),T(1,Op,23,8),a()),t&2){let e,i=s.$implicit,n=m();l(),f((e=n.planFeatures[i])?1:-1,e)}}var _s=(()=>{class t extends B{constructor(){super(...arguments),this.breakpoints=c(qe),this.changePlanService=c(Oe),this.dialog=c(K),this.allSegments=Ge()(["FREE","DEMO","EVENT","STARTER","BUSINESS","ENTERPRISE"])}getPlanDetails(e){return W(this,null,function*(){return e==="FREE"?yield E(this.changePlanService.freePlanDetails$):e==="DEMO"?yield E(this.changePlanService.demoPlanDetails$):e==="EVENT"?yield E(this.changePlanService.eventPlanDetails$):e==="STARTER"?yield E(this.changePlanService.starterPlanDetails$):e==="BUSINESS"?yield E(this.changePlanService.businessPlanDetails$):e==="ENTERPRISE"?yield E(this.changePlanService.enterprisePlanDetails$):null})}isUpgrade(e,i,n){return i==="DEMO"||e==="ENTERPRISE"||e==="FREE"?!1:this.changePlanService.isUpgrade(i,n,e,-1,-1)}isDowngrade(e,i,n){return this.changePlanService.isDowngrade(i,n,e,-1,-1)}scrollToFeatures(e){e.preventDefault();let i=document.querySelectorAll(".ww-account-billing-compare-plans");i.length>0&&i.item(0).scrollIntoView({behavior:"smooth"})}openUpgradeDowngradeModal(e){return W(this,null,function*(){if(!(yield E(this.changePlanService.hasCompleteBillingAddress$))&&!(yield E(this.dialog.open(C(pi,{description:$localize`To continue using Waitwhile you need to provide a business address in order to be taxed correctly.`}),{size:this.breakpoints.isAboveMobile?"auto":"bottom-sheet"}).afterClosed$)))return;let n=yield this.getPlanDetails(e);if(!n||(yield E(this.changePlanService.hasLegacyPlan$))&&e==="FREE"&&!(yield E(this.dialog.openConfirm({title:$localize`Downgrade to Free?`,message:$localize`Downgrading to the Free plan will apply new plan limits. You won't be able to revert to your legacy plan once the change is made. Are you sure?`,cancelLabel:$localize`Go back`,confirmLabel:$localize`Downgrade`,confirmColor:"warning"}).afterClosed$)))return;let _=yield E(this.breakpoints.isBelowMobile$);this.dialog.open(C(An,{currentSegment:this.currentSegment,currentPlanVersion:this.currentPlanVersion,currentQuantity:this.currentQuantity,currentAnnual:this.currentAnnual,currentPeriodEndDate:this.currentPeriodEndDate,selectedPlan:n,initialQuantity:n.minQty,initialAnnual:n.segment==="FREE"?!1:this.currentAnnual,countryCode:this.countryCode,stripeLast4:this.stripeLast4}),{id:"upgrade",disableClose:!0,size:_?"bottom-sheet":"auto",blurBackgroun
14d:!0})})}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-billing-plans"]],hostAttrs:[1,"ww-account-billing-plans","flex","flex-row","flex-wrap","medium:flex-nowrap","justify-between","gap-4"],inputs:{currentSegment:"currentSegment",currentPlanVersion:"currentPlanVersion",currentQuantity:"currentQuantity",currentAnnual:"currentAnnual",currentPeriodEndDate:"currentPeriodEndDate",countryCode:"countryCode",stripeLast4:"stripeLast4",plans:"plans",planFeatures:"planFeatures",hasLegacyPlan:"hasLegacyPlan"},features:[L],decls:2,vars:0,consts:()=>{let e;e=$localize`Plan highlights`;let i;i=$localize` Downgrade `;let n;n=$localize` Current plan `;let o;o=$localize` Current plan `;let _;_=$localize` Upgrade `;let h;h=$localize` Contact sales `;let I;I=$localize` Downgrade `;let G;return G=$localize` Upgrade `,[e,i,n,o,_,h,I,G,["wwTypography","body2",1,"flex-col","gap-6","py-4","px-6"],[1,"flex","flex-col","gap-4"],["wwColor","darkerGrey"],["wwColor","primary",1,"font-medium","text-2xl"],[1,"font-medium","text-base","leading-8","whitespace-nowrap"],[1,"flex","flex-col","gap-2"],[1,"font-medium"],["icon","bx-check-circle"],["wwColor","darkerGrey","href","",3,"click","content"],["wwButton","secondary",3,"ngClass"],["wwButton","primary",3,"disabled"],["wwButton","secondary",3,"click","ngClass"],["wwButton","primary",3,"ngClass"],["wwButton","","href","https://waitwhile.com/contact-sales","target","_blank"],["wwButton","primary",3,"click","ngClass"]]},template:function(i,n){i&1&&ne(0,bp,2,1,"ww-card",8,be),i&2&&oe(n.plans)},dependencies:[Ce,sa,j,D,Qi,Ji,z,Qa,We,we,gt],styles:[`.ww-account-billing-plans .ww-card{width:100%}.ww-breakpoints-above-small .ww-account-billing-plans .ww-card{width:calc(50% - 8px)}.ww-breakpoints-above-medium .ww-account-billing-plans .ww-card{width:calc(25% - 8px);max-width:224px} 15/*noopaccount-billing-plans.component-FEGTVPBS.css.map */ 16`],encapsulation:2,changeDetection:0})}}return t})();function $p(t,s){if(t&1&&(r(0,"ww-info-bubble",2),Ee(1,0),d(2,"async"),w(3,"ww-link",4),Ae(),a()),t&2){let e=m(2);l(3),p("inline",!0),$e(g(2,2,e.currentPlanName$)),Re(1)}}function Rp(t,s){if(t&1&&w(0,"ww-account-billing-plans",3),t&2){let e=m(),i=m();p("currentSegment",e.segment)("currentPlanVersion",e.planVersion)("currentQuantity",e.quantity)("currentAnnual",e.annual)("currentPeriodEndDate",e.periodEndDate)("countryCode",e.countryCode)("stripeLast4",e.stripeLast4)("hasLegacyPlan",e.hasLegacyPlan)("plans",i.plans)("planFeatures",s)}}function Mp(t,s){if(t&1&&(yt(0),d(1,"async"),w(2,"ww-account-billing-plan-composer",5)),t&2){let e=m(2),i=m(),n=g(1,9,i.composerAnnual$)??!1;l(2),p("currentSegment",e.segment)("currentPlanVersion",e.planVersion)("currentQuantity",e.quantity)("currentAnnual",n)("currentPeriodEndDate",e.periodEndDate)("countryCode",e.countryCode)("stripeLast4",e.stripeLast4)("pickableSegments",i.composerPlans)("planDetails",e.planDetails)}}function xp(t,s){if(t&1&&(T(0,Mp,3,11,"ww-account-billing-plan-composer",5),d(1,"async")),t&2){let e,i=m(2);f((e=g(1,1,i.planFeatures$))?0:-1,e)}}function Pp(t,s){if(t&1&&(r(0,"div",1),T(1,$p,4,4,"ww-info-bubble",2),d(2,"async"),T(3,Rp,1,10,"ww-account-billing-plans",3),d(4,"async"),T(5,xp,2,3),d(6,"async"),w(7,"ww-account-billing-compare-plans")(8,"ww-account-billing-change-plan-faq"),a()),t&2){let e,i=m();l(),f(g(2,3,i.hasLegacyPlan$)?1:-1),l(2),f((e=g(4,5,i.planFeatures$))?3:-1,e),l(2),f(g(6,7,i.breakpoints.isAboveMobile$)?5:-1)}}var ms=(()=>{class t extends B{constructor(){super(),this.breakpoints=c(qe),this.accountRx=c(V),this.changePlanService=c(Oe),this.intercom=c(it),this.layout=c(Z,{optional:!0}),this.currentSegment$=this.accountRx.getAccount(["planSegment"]).pipe(u(({planSegment:e})=>e)),this.currentPlanVersion$=this.accountRx.getAccount(["planPricingVersion"]).pipe(u(({planPricingVersion:e})=>{switch(e){case"V1":return 1;case"V2":return 2;default:return 0}})),this.currentPlanName$=this.currentSegment$.pipe(u(e=>$t[e]??e)),this.currentPlanQuantity$=this.accountRx.getAccount(["planQuantity"]).pipe(u(({planQuantity:e})=>e??0)),this.currentPlanIsAnnual$=this.accountRx.getAccount(["planPeriod"]).pipe(u(({planPeriod:e})=>e==="ANNUAL")),this.currentPeriodEndDate$=this.accountRx.getAccount(["stripeCurrentPeriodEnd"]).pipe(u(({stripeCurrentPeriodEnd:e})=>e??null)),this.countryCode$=this.accountRx.getAccount(["billingAddress"]).pipe(u(({billingAddress:e})=>e?.country?.code??null)),this.stripeLast4$=this.accountRx.getAccount(["stripeLast4"]).pipe(u(({stripeLast4:e})=>e??null)),this.plans=Ge()(["FREE","STARTER","BUSINESS","ENTERPRISE"]),this.planFeatures$=this.changePlanService.planFeatures$,this.hasLegacyPlan$=this.changePlanService.hasLegacyPlan$,this.planDetails$=R([this.changePlanService.freePlanDetails$,this.changePlanService.demoPlanDetails$,this.changePlanService.starterPlanDetails$,this.changePlanService.businessPlanDetails$,this.changePlanService.enterprisePlanDetails$]).pipe(u(([e,i,n,o,_])=>[e,i,n,o,_].filter(_t))),this.composerPlans=["STARTER","BUSINESS","ENTERPRISE"],this.data$=R([this.currentSegment$,this.currentPlanVersion$,this.currentPlanQuantity$,this.currentPlanIsAnnual$,this.currentPeriodEndDate$,this.planDetails$,this.countryCode$,this.stripeLast4$,this.hasLegacyPlan$]).pipe(u(([e,i,n,o,_,h,I,G,x])=>({segment:e,planVersion:i,quantity:n,annual:o,periodEndDate:_,planDetails:h,countryCode:I,stripeLast4:G,hasLegacyPlan:x}))),this.composerAnnual$=this.data$.pipe(u(e=>e.segment==="FREE"?!0:e.annual)),this.layout?.setFeatureContext({name:$localize`Change plan`,breadcrumbs:[lt,Ci]})}openIntercom(){this.intercom.show()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-billing-change-plan"]],hostAttrs:[1,"ww-account-billing-change-plan"],features:[L],decls:2,vars:3,consts:()=>{let e;e=$localize`Read more`;let i;return i=$localize` You are on a legacy ${"\uFFFD0\uFFFD"}:INTERPOLATION: plan. Changing plans will apply updated pricing and limits. ${"\uFFFD#3\uFFFD"}:START_TAG_WW_LINK:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_WW_LINK:`,[i,[1,"flex","flex-col","items-center","small:gap-6","gap-4"],[1,"!w-full","!max-w-[944px]","below-medium:!max-w-full"],[1,"small:pb-16",3,"currentSegment","currentPlanVersion","currentQuantity","currentAnnual","currentPeriodEndDate","countryCode","stripeLast4","hasLegacyPlan","plans","planFeatures"],["content",e,"type","external-in-new-tab","href","https://help.waitwhile.com/en/articles/11185489-upcoming-changes-to-waitwhile-plans-pricing-and-sms-credits",3,"inline"],[3,"currentSegment","currentPlanVersion","currentQuantity","currentAnnual","currentPeriodEndDate","countryCode","stripeLast4","pickableSegments","planDetails"]]},template:function(i,n){if(i&1&&(T(0,Pp,9,9,"div",1),d(1,"async")),i&2){let o;f((o=g(1,1,n.data$))?0:-1,o)}},dependencies:[j,cs,ps,us,_s,D,ae,we,M],encapsulation:2,changeDetection:0})}}return t})();var Fp=["addressElement"],Up={theme:"stripe",variables:{colorPrimary:Ye("black"),colorBackgroun
16d:Ye("white"),colorText:Ye("black"),colorDanger:Ye("warning"),colorTextPlaceholder:Ye("darkGrey"),fontFamily:'"Poppins", sans-serif',fontSizeBase:"15px",borderRadius:"8px",spacingGridRow:"16px"},rules:{".Input":{border:`1px solid ${Ye("darkGrey")}`,boxShadow:"none",padding:"9px 10px",lineHeight:"22px"},".Input:hover":{border:`1px solid ${Ye("darkerGrey")}`},".Input:focus":{border:`1px solid ${Ye("black")}`,boxShadow:"none",outline:"0"},".Label":{fontSize:"15px",fontWeight:"600",color:Ye("black"),marginBottom:"4px"},".Error":{fontSize:"13px"}}},ds=(()=>{class t extends B{constructor(){super(),this.changeDetectorRef=c(Di),this.accountRx=c(V),this.environment=c(Ga),this.layout=c(Z),this.pendingChangesStore=c(nt),this.snackBar=c(en),this.stripeService=c(il),this.updateAccountWrite=c(ye),this.salesTaxExemptControl=new y(!1),this.billingEmailControl=new y("",[te.email]),this.stripeAddressControl=new y(null),this.trackPendingChangesFormArray=new Dt([this.billingEmailControl,this.stripeAddressControl,this.salesTaxExemptControl]),this.stripeAddressElement=null,this.stripeFormReady=!1,this.currentAccount$=this.accountRx.account$.pipe(u(e=>({billingAddress:e?.billingAddress,businessName:e?.businessName??""}))),this.reset(),this.layout.updateFeatureContext({pendingChanges:{formId:"account-billing-details",reset:()=>this.reset(),save:()=>this.save(),store:this.pendingChangesStore,enabledConfig:{permissions:["accounts.update"]}}})}initStripeForm(){return W(this,null,function*(){this.stripeAddressElement&&(this.stripeAddressElement.destroy(),this.stripeAddressElement=null),this.stripeFormReady=!1,this.stripe=yield this.stripeService.setApiKey(this.environment.stripe.apiKey);let e=this.stripe.elements({appearance:Up,fonts:tl.fonts}),i=yield E(this.currentAccount$),n=i.billingAddress?Yn({name:i.businessName,address:{line1:i.billingAddress.street,line2:i.billingAddress.street2,city:i.billingAddress.city,state:i.billingAddress.state?.code,postal_code:i.billingAddress.zip,country:i.billingAddress.country?.code}},jn):void 0,o=e.create("address",{mode:"billing",autocomplete:{mode:"google_maps_api",apiKey:this.environment.firebase.apiKey},defaultValues:n});o.mount(this.addressElement.nativeElement),this.stripeAddressElement=o,o.on("change",_=>{if(!this.stripeFormReady){this.stripeFormReady=!0;return}if(!_.complete){this.stripeAddressControl.setValue(null),this.stripeAddressControl.markAsDirty(),this.stripeAddressControl.updateValueAndValidity(),this.changeDetectorRef.markForCheck();return}let h=Ta(_.value.address.country),I=fa(_.value.address.country,_.value.address.state);this.stripeAddressControl.setValue({businessName:_.value.name,billingAddress:Yn({street:_.value.address.line1,street2:_.value.address.line2??void 0,city:_.value.address.city,zip:_.value.address.postal_code,state:I?{code:I.code,name:I.name}:void 0,country:h?{code:h.cca2,name:h.name}:void 0},jn)}),this.stripeAddressControl.markAsDirty(),this.stripeAddressControl.updateValueAndValidity(),this.changeDetectorRef.markForCheck()})})}reset(){return W(this,null,function*(){let e=this.accountRx.nullableAccount;e&&(this.salesTaxExemptControl.setValue(e.salesTaxExempt==="exempt",{emitEvent:!1}),this.salesTaxExemptControl.markAsPristine(),this.salesTaxExemptControl.updateValueAndValidity(),this.billingEmailControl.setValue(e.billingEmail??"",{emitEvent:!1}),this.billingEmailControl.markAsPristine(),this.billingEmailControl.updateValueAndValidity(),this.stripeAddressControl.setValue(null,{emitEvent:!1}),this.stripeAddressControl.markAsPristine(),this.stripeAddressControl.updateValueAndValidity(),this.stripeAddressElement&&(yield this.initStripeForm()))})}save(){return W(this,null,function*(){let e={};if(e.salesTaxExempt=this.salesTaxExemptControl.value?"exempt":"none",this.billingEmailControl.dirty&&(e.billingEmail=this.billingEmailControl.value??void 0),this.stripeAddressControl.dirty){let n=this.stripeAddressControl.value;if(!n){this.snackBar.open({message:$localize`Please fill out all non-optional fields`});return}e.businessName=n.businessName,e.billingAddress=n.billingAddress}this.updateAccountWrite.payload.next(e),(yield E(this.updateAccountWrite.response$))&&this.snackBar.open({message:$localize`Billing details updated successfully`})})}ngAfterViewInit(){return W(this,null,function*(){this.initStripeForm()})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-billing-details"]],viewQuery:function(i,n){if(i&1&&Ft(Fp,5),i&2){let o;Ut(o=vt())&&(n.addressElement=o.first)}},hostAttrs:[1,"ww-account-billing-details","flex","flex-col","gap-6"],features:[L],decls:8,vars:5,consts:()=>{let e;e=$localize`Tax exempt`;let i;i=$localize`Check this box if your business is tax exempt.`;let n;n=$localize`Billing email`;let o;o=$localize`Enter the email address for billing and payment receipts.`;let _;_=$localize`e.g. [email protected]`;let h;return h=$localize`Address`,[["addressElement",""],h,[1,"flex","flex-col","gap-6",3,"wwTrackPendingChanges","wwTrackPendingChangesUntil"],["label",e,"sublabel",i,3,"formControl"],["label",n,"sublabel",o,"placeholder",_,3,"formControl"],[3,"wwFormFieldSize"]]},template:function(i,n){i&1&&(r(0,"div",2),w(1,"ww-checkbox",3)(2,"ww-input",4),r(3,"ww-label-layout")(4,"ww-label"),S(5,1),a(),w(6,"div",5,0),a()()),i&2&&(p("wwTrackPendingChanges",n.trackPendingChangesFormArray)("wwTrackPendingChangesUntil",n.updateAccountWrite.response$),l(),p("formControl",n.salesTaxExemptControl),l(),p("formControl",n.billingEmailControl),l(4),p("wwFormFieldSize","large"))},dependencies:[j,se,ce,D,pe,dt,Ze,Je,Ct,at],encapsulation:2,changeDetection:0})}}return t})();var vp=()=>["plan.update"],Gp=t=>({permissions:t}),Wp=t=>({enabledConfig:t});
16function Dp(t,s){if(t&1){let e=$();r(0,"button",6),d(1,"async"),N("click",function(){O(e);let n=m();return b(n.save())}),S(2,0),a()}if(t&2){let e=m();p("disabled",g(1,1,e.unchanged$))}}function kp(t,s){if(t&1&&(r(0,"ww-info-bubble",4),Ee(1,1),r(2,"span"),d(3,"async"),w(4,"ww-link",7),a(),Ae(),a()),t&2){let e=m();l(4),p("inline",!0),$e(g(3,2,e.currentPlanName$)),Re(1)}}function zp(t,s){if(t&1){let e=$();r(0,"ww-change-plan-summary",10),d(1,"async"),d(2,"async"),d(3,"async"),d(4,"async"),d(5,"async"),N("annualChanged",function(n){O(e);let o=m(3);return b(o.onAnnualChanged(n))}),a()}if(t&2){let e=m(),i=m(2),n=de(1);p("planName",g(1,8,i.summaryName$)??"")("planByLine",g(2,10,i.summaryByLine$)??"")("priceMonthlyPerMonth",g(3,12,i.priceMonthly$)??0)("priceAnnualPerMonth",g(4,14,i.priceAnnual$)??0)("annual",!!g(5,16,i.annual$))("periodIsReadOnly",n)("locations",e)("visits",s)}}function Vp(t,s){if(t&1&&(T(0,zp,6,18,"ww-change-plan-summary",9),d(1,"async")),t&2){let e,i=m(2);f((e=g(1,1,i.visits$))?0:-1,e)}}function Xp(t,s){if(t&1){let e=$();r(0,"div",5)(1,"ww-change-plan-builder-quantity",8),d(2,"async"),d(3,"async"),d(4,"async"),d(5,"async"),d(6,"async"),N("quantityChanged",function(n){O(e);let o=m();return b(o.onQuantityChanged(n))}),a(),T(7,Vp,2,3),d(8,"async"),a()}if(t&2){let e,i=m();l(),p("minQty",g(2,7,i.minQty$))("maxQty",g(3,9,i.maxQty$))("formatSliderLabel",g(4,11,i.formatSliderLabel$))("title",g(5,13,i.composerTitle$))("intro",g(6,15,i.composerIntro$))("currentQty",s),l(6),f((e=g(8,17,i.locations$))?7:-1,e)}}var Cs=(()=>{class t extends B{constructor(){super(),this.accountRx=c(V),this.breakpoints=c(qe),this.changePlanService=c(Oe),this.decimalPipe=c(Wt),this.dialog=c(K),this.layout=c(Z),this.plansRx=c(ti),this.updateAccountWrite=c(ye),this.quantitySub=new Te(0),this.quantity$=this.quantitySub.asObservable(),this.annualSub=new Te(!1),this.annual$=this.annualSub.asObservable(),this.stripePriceId$=this.accountRx.getAccount(["stripePriceId"]).pipe(u(({stripePriceId:e})=>e??null)),this.currentPlanSegment$=this.accountRx.getAccount(["planSegment"]).pipe(u(({planSegment:e})=>e??null)),this.currentPlanName$=this.currentPlanSegment$.pipe(u(e=>$t[e]??e)),this.currentPlanQuantity$=this.accountRx.getAccount(["planQuantity"]).pipe(u(({planQuantity:e})=>e??0)),this.currentPlanIsAnnual$=this.accountRx.getAccount(["planPeriod"]).pipe(u(({planPeriod:e})=>e==="ANNUAL")),this.entitlements$=this.accountRx.getAccount(["entitlements"]).pipe(u(({entitlements:e})=>e??{})),this.hasLegacyPlan$=this.changePlanService.hasLegacyPlan$,this.minQty$=this.entitlements$.pipe(u(e=>e.planMinQuantity??0)),this.maxQty$=this.entitlements$.pipe(u(e=>e.planMaxQuantity??e.planMinQuantity??0)),this.currentPlanPricePerQuantityAndPeriod$=this.plansRx.planInfo$.pipe(u(e=>e?(e.planPrice??0)/100:0)),this.calculatedPrice$=R([this.currentPlanPricePerQuantityAndPeriod$,this.quantity$]).pipe(u(([e,i])=>e*i)),this.calculatedPricePerMonth$=R([this.calculatedPrice$,this.currentPlanIsAnnual$]).pipe(u(([e,i])=>i?e/12:e)),this.selectedPlan$=R([this.hasLegacyPlan$,this.currentPlanSegment$,this.changePlanService.plans$]).pipe(u(([e,i,n])=>e?null:n?.find(o=>o.segment===i)??null)),this.selectedPlanId$=R([this.selectedPlan$,this.annual$]).pipe(u(([e,i])=>e?.prices?.find(n=>i?n.period==="P1Y":n.period==="P1M")?.id??null)),this.priceMonthlyPerMonth$=R([this.selectedPlan$,this.quantity$]).pipe(u(([e,i])=>(e?.prices?.find(o=>o.period==="P1M")?.cost??0)*i)),this.priceAnnualPerMonth$=R([this.selectedPlan$,this.quantity$]).pipe(u(([e,i])=>(e?.prices?.find(o=>o.period==="P1Y")?.cost??0)*i/12)),this.priceMonthly$=this.hasLegacyPlan$.pipe(ie(e=>e?this.calculatedPricePerMonth$:this.priceMonthlyPerMonth$)),this.priceAnnual$=this.hasLegacyPlan$.pipe(ie(e=>e?this.calculatedPrice$:this.priceAnnualPerMonth$)),this.unchanged$=R([this.currentPlanQuantity$,this.quantity$,this.currentPlanIsAnnual$,this.annual$]).pipe(u(([e,i,n,o])=>e===i&&n===o)),this.formatSliderLabel$=this.entitlements$.pipe(u(e=>i=>e?e.locationsPerQuantity===0&&e.baseLocations>0?`${e.baseLocations} ${$localize`locations`} 17${i*e.visitsPerQuantity} ${$localize`visits / mo`}`:`${(e.locationsPerQuantity>0?`${i*e.locationsPerQuantity} ${$localize`locations`} 18`:"")+`${i*e.visitsPerQuantity} ${$localize`visits / mo`}`}`:"")),this.locations$=R([this.entitlements$,this.quantity$]).pipe(u(([e,i])=>e.baseLocations+e.locationsPerQuantity*i)),this.visits$=R([this.entitlements$,this.quantity$]).pipe(u(([e,i])=>e.visitsPerQuantity*i)),this.composerTitle$=R([this.entitlements$,this.currentPlanSegment$]).pipe(u(([e,i])=>this.patchWithPlanValues(e,po[i].composerTitle??null))),this.composerIntro$=R([this.entitlements$,this.currentPlanSegment$]).pipe(u(([e,i])=>this.patchWithPlanValues(e,po[i].composerIntro??null))),this.summaryName$=R([this.entitlements$,this.currentPlanSegment$]).pipe(u(([e,i])=>
18this.patchWithPlanValues(e,$t[i]))),this.summaryByLine$=R([this.entitlements$,this.currentPlanSegment$]).pipe(u(([e,i])=>this.patchWithPlanValues(e,qr[i]))),this.subscribe(),this.layout.setFeatureContext({name:$localize`Manage plan`,breadcrumbs:[lt,Ci]})}subscribe(){R([this.currentPlanQuantity$,this.currentPlanIsAnnual$]).pipe(H(this.ngOnDestroy$)).subscribe(([e,i])=>{this.quantitySub.next(e),this.annualSub.next(i)})}patchWithPlanValues(e,i){let n=i??"";n=n.replace("[[minVisits]]",`${this.decimalPipe.transform(e.visitsPerQuantity*e.planMinQuantity,"1.0-0")}`),n=n.replace("[[maxVisits]]",`${this.decimalPipe.transform(e.visitsPerQuantity*e.planMaxQuantity,"1.0-0")}`);let o=e.baseLocations+e.locationsPerQuantity*e.planMinQuantity;n=n.replace("[[minLocations]]",`${this.decimalPipe.transform(o,"1.0-0")}`);let _=e.maxLocations??1;return n=n.replace("[[maxLocations]]",`${this.decimalPipe.transform(_,"1.0-0")}`),n}onAnnualChanged(e){this.annualSub.next(e)}onQuantityChanged(e){this.quantitySub.next(e)}save(){return W(this,null,function*(){if(!(yield E(this.changePlanService.hasCompleteBillingAddress$))&&!(yield E(this.dialog.open(C(pi,{description:$localize`To continue using Waitwhile you need to provide a business address in order to be taxed correctly.`}),{size:this.breakpoints.isAboveMobile?"auto":"bottom-sheet"}).afterClosed$)))return;let n=(yield E(this.hasLegacyPlan$))?yield E(this.stripePriceId$):yield E(this.selectedPlanId$),o=yield E(this.entitlements$),_=yield E(this.quantity$);if(!n)throw new Error("Could not find a planId");if(_<o.planMinQuantity)throw new Error(`Quantity can not be less than ${o.planMinQuantity}`);if(_>o.planMaxQuantity)throw new Error(`Quantity can not be larger than ${o.planMaxQuantity}`);this.updateAccountWrite.payload.next({planId:n,planQuantity:_})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-billing-manage-plan"]],hostAttrs:[1,"ww-account-billing-manage-plan-modal"],features:[L],decls:7,vars:13,consts:()=>{let e;e=$localize`Save`;let i;i=$localize` Save 19`;let n;n=$localize`Read more`;let o;return o=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPAN: You are on a legacy ${"\uFFFD0\uFFFD"}:INTERPOLATION: plan. You can only change the quantity of locations/visits per month. ${"\uFFFD#4\uFFFD"}:START_TAG_WW_LINK:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_WW_LINK:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`,[i,o,["wwButton","","aria-label",e,3,"disabled","click",4,"wwLayoutPrimaryAction"],[1,"flex","flex-col","items-center","gap-6","w-full","small:!pt-20"],[1,"small:!max-w-3xl","!w-full"],[1,"flex","small:flex-row","flex-col","items-center","justify-between","small:gap-10","gap-6","w-full","small:max-w-3xl","max-w-full"],["wwButton","","aria-label",e,3,"click","disabled"],["content",n,"type","external-in-new-tab","href","https://help.waitwhile.com/en/articles/11185489-upcoming-changes-to-waitwhile-plans-pricing-and-sms-credits",3,"inline"],[3,"quantityChanged","minQty","maxQty","formatSliderLabel","title","intro","currentQty"],[3,"planName","planByLine","priceMonthlyPerMonth","priceAnnualPerMonth","annual","periodIsReadOnly","locations","visits"],[3,"annualChanged","planName","planByLine","priceMonthlyPerMonth","priceAnnualPerMonth","annual","periodIsReadOnly","locations","visits"]]},template:function(i,n){if(i&1&&(U(0,Dp,3,3,"button",2),yt(1),d(2,"async"),r(3,"div",3),T(4,kp,5,4,"ww-info-bubble",4),T(5,Xp,9,19,"div",5),d(6,"async"),a()),i&2){let o;p("wwLayoutPrimaryAction",Me(11,Wp,Me(9,Gp,ze(8,vp)))),l();let _=Si(g(2,3,n.hasLegacyPlan$)??!1);l(3),f(_?4:-1),l(),f((o=g(6,6,n.quantity$))?5:-1,o)}},dependencies:[En,cl,Hr,De,ri,D,z,ae,we,M],encapsulation:2,changeDetection:0})}}return t})();var Hp=["paymentCardForm"];function jp(t,s){if(t&1){let e=$();r(0,"div")(1,"button",3),d(2,"async"),N("click",function(n){O(e);let o=m();return b(o.submitForm(n))}),P(3," Save "),a()()}if(t&2){let e=m();l(),p("disabled",g(2,1,e.formComplete$)===!1)}}var gs=(()=>{class t extends B{constructor(){super(...arguments),this.accountRx=c(V),this.updatePaymentSourceWrite=c(Ir),this.countryCode$=this.accountRx.getAccount(["billingAddress"]).pipe(u(({billingAddress:e})=>e?.country?.code??null)),this.postalCode$=this.accountRx.getAccount(["billingAddress"]).pipe(u(({billingAddress:e})=>e?.zip??null)),this.formCompleteSub=new Te(!1),this.formComplete$=this.formCompleteSub.asObservable()}onFormComplete(e){this.formCompleteSub.next(e)}onTokenReceived(e){this.updatePaymentSourceWrite.payload.next({stripeToken:e})}submitForm(e){e.preventDefault(),this.paymentCardForm.requestToken()}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-billing-payment-card"]],viewQuery:function(i,n){if(i&1&&Ft(Hp,5),i&2){let o;Ut(o=vt())&&(n.paymentCardForm=o.first)}},hostAttrs:[1,"ww-account-billing-payment-card","flex","flex-col","gap-6"],features:[L],decls:5,vars:7,consts:()=>{let e;return e=$localize`Save`,[["paymentCardForm",""],[3,"formComplete","tokenReceived","countryCode","postalCode"],[4,"wwPermission"],["wwButton","primary","aria-label",e,3,"click","disabled"]]},template:function(i,n){i&1&&(r(0,"ww-change-plan-payment-form",1,0),d(2,"async"),d(3,"async"),N("formComplete",function(_){return n.onFormComplete(_)})("tokenReceived",function(_){return n.onTokenReceived(_)}),a(),U(4,jp,4,3,"div",2)),i&2&&(p("countryCode",g(2,3,n.countryCode$))("postalCode",g(3,5,n.postalCode$)),l(4),p("wwPermission","plan.update"))},dependencies:[rl,ri,ot,D,z,M],encapsulation:2,changeDetection:0})}}return t})();var Ss=(()=>{class t{constructor(){this.intercom=c(it)}contactSupport(){this.intercom.show()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-settings-contact-support-button"]],decls:2,vars:0,consts:()=>{let e;return e=$localize` Contact support to modify 20`,[e,["wwButton","secondary","type","button",3,"click"]]},template:function(i,n){i&1&&(r(0,"button",1),N("click",function(){return n.contactSupport()}),S(1,0),a())},dependencies:[ja,z],encapsulation:2,changeDetection:0})}}return t})();function Wn(t){if(ba()&&t.length!==1)throw new Error("Cannot create a default transformer for multiple properties. Specify a transformer manually.")}function Kp(t){return C(fl,t)}function vS(t,s=Yp(Lt(t))){return Kp({$rx:{enabled:qo(()=>c(V).getAccount(Lt(t)).pipe(u(e=>s(e))))}})}function Yp(t){Wn(t);let s=t[0];return e=>!!e[s]}var Ts=(()=>{class t extends B{constructor(){super(),this.disabled=null,this.disabled$=this.observe("disabled"),this.properties$=this.observe("properties"),this.confirmation=null,this.transformer$=this.observe("transformer"),this.accountRx=c(V),this.dialog=c(K),this.injector=c(pt),this.updateAccountWrite=c(ye),this.settingItem=c(hl,{optional:!0}),this.formControl=new y(null),this.disabledReason$=this.disabled$.pipe(u(e=>e?.reason??"")),this.account$=this.properties$.pipe(ie(e=>this.accountRx.getAccount(e))),this.view$=R([this.account$,this.transformer$]).pipe(u(([e,i])=>{let n=i?.toView;return n?At(this.injector,()=>n(e)):null})),this.payload$=R([this.formControl.valueChanges,this.transformer$]).pipe(u(([e,i])=>!i||e===null?null:i.toPayload(e))),this.view$.pipe(H(this.ngOnDestroy$)).subscribe(e=>{this.formControl.setValue(e,{emitEvent:!1})}),this.payload$.pipe(Gi(this.view$),H(this.ngOnDestroy$)).subscribe(([e,i])=>this.updateAccount(e,i))}updateAccount(e,i){return W(this,null,function*(){if(!(!e||!this.accountRx.nullableAccount)){if(this.confirmation){let n=this.confirmation(e,this.accountRx.nullableAccount);if(n&&!(yield E(this.dialog.openConfirm(n).afterClosed$))){this.formControl.setValue(i,{emitEvent:!1});return}}this.updateAccountWrite.payload.next(e)}})}ngOnChanges(e){super.ngOnChanges(e),this.settingItem&&this.settingItem.disabledReason$.pipe(H(this.ngOnDestroy$)).subscribe(i=>{i?this.formControl.disable({emitEvent:!1}):this.formControl.enable({emitEvent:!1})}),"disabled"in e&&(this.disabled?.value?this.formControl.disable({emitEvent:!1}):this.formControl.enable({emitEvent:!1}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=aa({type:t,inputs:{disabled:"disabled",properties:"properties",confirmation:"confirmation",transformer:"transformer"},features:[L,ia]})}}return t})();function qp(t,s){if(t&1&&(r(0,"span",1),d(1,"async"),w(2,"ww-toggle",2),a()),t&2){let e=m();p("wwTooltip",g(1,3,e.disabledReason$)??""),l(2),p("label",e.label)("formControl",e.formControl)}}var fs=(()=>{class t extends Ts{constructor(){super(...arguments),this.label=null}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-settings-toggle"]],hostAttrs:[1,"ww-account-settings-toggle"],inputs:{label:"label",featureEnabledConfig:"featureEnabledConfig"},features:[L],decls:1,vars:1,consts:[[3,"wwTooltip",4,"wwFeatureEnabledConfig"],[3,"wwTooltip"],[3,"label","formControl"]],template:function(i,n){i&1&&U(0,qp,3,5,"span",0),i&2&&p("wwFeatureEnabledConfig",n.featureEnabledConfig)},dependencies:[Ce,ue,Br,D,dr,Ki,j,se,ce,M],encapsulation:2,changeDetection:0})}}return t})();function sT(t,s){t=Array.isArray(t)?t:[t];let e=s?.transformer??Qp(t);return C(fs,v({properties:t,transformer:e,featureEnabledConfig:{permissions:["accounts.update"]}},s))}function Qp(t){Wn(t);let s=t[0];return{toPayload:e=>({[s]:e}),toView:e=>!!e[s]}}function $o(t){return q(v({},t),{rx:s=>{let e=t.isSessionSupported?R([s.get(V).getAccount([]).pipe(He(1)),s.get(cn).getCurrentUser([]).pipe(He(1))]).pipe(He(1),u(([n,o])=>t.isSessionSupported?t.isSessionSupported({account:n,user:o}):!0)):J(!0),i=t.rx?t.rx(s):J(!0);
20return R([e,i]).pipe(u(([n,o])=>!n||!o?!1:zt(n)||zt(o)?n??o:!0),Pt())}})}var AT=new ea("ACCOUNT_SETTING_FORM_OPTIONS");var Ro=gi(ao());var ws=v(v({},Fa),Ua);function Jp(t,s){if(t&1&&w(0,"ww-joi-form",1,0),t&2){let e=s,i=m();p("form",e)("wwTrackPendingChanges",e.options.formGroup)("wwTrackPendingChangesUntil",i.updateAccountWrite.response$)}}var Zp=0,Oi=(()=>{class t extends B{constructor(){super(),this.type="standalone",this.type$=this.observe("type"),this.formId=`account-settings-form-${++Zp}`,this.createOptions$=this.observe("createOptions"),this.layout=c(Z),this.pendingChangesStore=c(nt),this.accountRx=c(V),this.dialog=c(K),this.injector=c(pt),this.updateAccountWrite=c(ye),this.subscriptions=[],this.options$=this.createOptions$.pipe(u(e=>At(this.injector,()=>e())),this.shareReplay()),this.account$=this.accountRx.getAccount([]),this.formInitializedSub=new Yo,this.form$=this.formInitializedSub.pipe(ie(()=>this.options$.pipe(u(e=>ci(q(v({},e.joi),{description:Ro.PAYLOAD_SCHEMA}))))),this.shareReplay()),this.valueChanges$=this.form$.pipe(ie(e=>e.options.formGroup.valueChanges)),this.showSaveButton$=R([this.form$,this.type$]).pipe(u(([e,i])=>i==="standalone"&&e.items.some(n=>!n.component.inputs||!n.component.inputs.readonly))),this.subscribe()}save(e){return W(this,null,function*(){let i=Yr(e.options.formGroup,e.options.description),n=yield E(this.options$),o=n.transformer?.toPayload(i)??i;if(n.confirmation&&this.accountRx.nullableAccount){let G=n.confirmation(o,this.accountRx.nullableAccount);if(G&&!(yield E(this.dialog.openConfirm(G).afterClosed$)))return}let _=this.accountRx.nullableAccount?v({},this.accountRx.nullableAccount):{};this.updateAccountWrite.payload.next(o);let h=yield E(this.updateAccountWrite.response$),I=n.updateSideEffect;I&&At(this.injector,()=>{let G=I(o,_,h);G&&this.subscriptions.push(G)})})}saveCurrentForm(){return W(this,null,function*(){let e=yield E(this.form$);yield this.save(e)})}resetCurrentForm(){return W(this,null,function*(){let e=yield E(this.options$),i=yield E(this.form$),n=this.accountRx.nullableAccount;e.joi.formGroup.reset({emitEvent:!1}),n&&this.setInitialValue(e,n),i.options.formGroup.markAsPristine(),i.options.formGroup.updateValueAndValidity()})}setInitialValue(e,i){let n=e.transformer?.toView,o=n?At(this.injector,()=>n(i)):i;e.joi.formGroup.patchValue(o,{emitEvent:!1})}subscribe(){this.form$.pipe(H(this.ngOnDestroy$)).subscribe(e=>{si(Ro.PAYLOAD_SCHEMA,e.options.formGroup)}),this.valueChanges$.pipe(Gi(this.form$,this.type$),H(this.ngOnDestroy$)).subscribe(([e,i,n])=>{n==="inline"&&this.save(i)}),this.showSaveButton$.pipe(H(this.ngOnDestroy$)).subscribe(e=>{e?this.layout.updateFeatureContext({pendingChanges:{formId:this.formId,store:this.pendingChangesStore,save:()=>this.saveCurrentForm(),reset:()=>this.resetCurrentForm(),enabledConfig:{permissions:["accounts.update"]}}}):this.layout.updateFeatureContext({pendingChanges:null})}),Jo([this.options$,this.account$]).pipe(He(1),H(this.ngOnDestroy$)).subscribe(([e,i])=>{let n=e.transformer?.toView,o=n?At(this.injector,()=>n(i)):i,_=this.addDefaultValues(o,ws);e.joi.formGroup.patchValue(_,{emitEvent:!1}),this.formInitializedSub.next()})}addDefaultValues(e,i){let n=v({},e);for(let o of Object.keys(e)){let _=i[o];if(_===void 0)continue;let h=e[o];zt(h)&&zt(_)?n[o]=v(v({},n[o]),this.addDefaultValues(h,_)):h===void 0&&(n[o]=v(v({},n[o]),_))}return n}ngOnDestroy(){for(let e of this.subscriptions)e.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-settings-form"]],hostAttrs:[1,"ww-account-settings-form","flex","flex-col","gap-4","items-start"],inputs:{createOptions:"createOptions",type:"type"},standalone:!1,features:[L],decls:2,vars:3,consts:[["joiForm",""],[3,"form","wwTrackPendingChanges","wwTrackPendingChangesUntil"]],template:function(i,n){if(i&1&&(T(0,Jp,2,3,"ww-joi-form",1),d(1,"async")),i&2){let o;f((o=g(1,1,n.form$))?0:-1,o)}},dependencies:[at,li,M],encapsulation:2,changeDetection:0})}}return t})();function xe(t){return C(Oi,{createOptions:t})}function Es(t){return Qe()(t)}var As=(()=>{class t extends B{constructor(){super(),this.properties$=this.observe("properties"),this.display$=this.observe("display"),this.accountRx=c(V),this.account$=this.properties$.pipe(ie(e=>this.accountRx.getAccount(e).pipe(u(i=>e.reduce((n,o)=>(n[o]=i[o],n),{}))))),this.value$=R([this.account$,this.display$]).pipe(u(([e,i])=>{let n=i(e);return ha(n)?{text:n,disabled:!1}:Vt(n)?{text:$localize`Enabled`,disabled:!n}:n}),this.shareReplay()),this.disabled$=this.value$.pipe(u(e=>e.disabled)),this.text$=this.value$.pipe(u(e=>e.disabled?$localize`Off`:e.text)),this.addClassBinding("ww-account-settings-text-disabled",this.disabled$)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-settings-text"]],hostAttrs:[1,"ww-account-settings-text","whitespace-nowrap"],inputs:{properties:"properties",display:"display"},features:[L],decls:2,vars:3,template:function(i,n){i&1&&(P(0),d(1,"async")),i&2&&le(g(1,1,n.text$))},dependencies:[D,M],styles:[`.ww-account-settings-text{text-overflow:ellipsis;overflow:hidden}.ww-account-settings-text.ww-account-settings-text-disabled{color:var(--ww-color-darkerGrey)} 21/*noopaccount-settings-text.component-BSM5IER3.css.map */ 22`],encapsulation:2,changeDetection:0})}}return t})();function bi(t,s,e){return C(As,v({properties:t,display:s,$element:{typography:"body1"}},e))}function eu(t,s){if(t&1){let e=$();r(0,"button",7),N("click",function(){O(e);let n=m(2);return b(n.save())}),S(1,1),a()}if(t&2){let e=m(2);p("disabled",e.cssFormControl.invalid)}}function tu(t,s){t&1&&(r(0,"ww-account-feature-button"),S(1,2),a())}function iu(t,s){if(t&1&&(r(0,"div"),U(1,eu,2,1,"button",6)(2,tu,2,0,"ng-template",null,0,me),a()),t&2){let e=_e(3);l(),p("wwAccountFeature","enableCustomStyle")("wwAccountFeatureElse",e)}}var ys=(()=>{class t extends B{constructor(){super(),this.accountRx=c(V),this.fileRx=c(Er),this.removeAccountFileWrite=c(_n),this.updateAccountWrite=c(ye),this.uploadAccountFileWrite=c(Ei),this.cssFormControl=new y(null),this.subscribe()}subscribe(){this.fileRx.accountPublicStyleCss$.pipe(H(this.ngOnDestroy$)).subscribe(e=>{e&&this.cssFormControl.setValue(e,{emitEvent:!1})})}save(){return W(this,null,function*(){if(!this.cssFormControl.valid)return;let e=yield E(this.accountRx.account$);if(!e)return;let i=null,n=this.cssFormControl.value?.trim();if(!n||n.length===0)this.removeAccountFileWrite.payload.next({accountId:e.id,fileType:"public-style"}),this.updateAccountWrite.payload.next({styling:{publicStyleUrl:null}}),yield Promise.all([E(this.updateAccountWrite.response$),E(this.removeAccountFileWrite.response$)]);else{let _=`text/css,${btoa(unescape(encodeURIComponent(this.cssFormControl.value??"")))}`;this.uploadAccountFileWrite.payload.next({accountId:e.id,fileType:"public-style",dataUrl:_}),i=(yield E(this.uploadAccountFileWrite.response$))?.url??null}this.updateAccountWrite.payload.next({styling:{publicStyleUrl:i}}),yield E(this.updateAccountWrite.response$)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-settings-custom-css"]],hostAttrs:[1,"ww-account-settings-custom-css"],inputs:{layout:"layout"},features:[L],decls:3,vars:3,consts:()=>{let e;e=$localize`Custom CSS`;let i;i=$localize`Customize the public pages for all your locations with your own CSS stylesheet.`;let n;n=$localize` Update `;let o;return o=$localize`Update`,[["featureMissingTmpl",""],n,o,[1,"flex","flex-col","gap-6"],["label",e,"sublabel",i,3,"formControl","minRows"],[4,"wwPermission"],["wwButton","",3,"disabled","click",4,"wwAccountFeature","wwAccountFeatureElse"],["wwButton","",3,"click","disabled"]]},template:function(i,n){i&1&&(r(0,"div",3),w(1,"ww-code",4),U(2,iu,4,2,"div",5),a()),i&2&&(l(),p("formControl",n.cssFormControl)("minRows",10),l(),p("wwPermission","accounts.update"))},dependencies:[j,se,ce,ue,oi,ai,ot,Le,ri,D,z,Ja],encapsulation:2,changeDetection:0})}}return t})();var nu=(t,s)=>s.key;function ou(t,s){if(t&1){let e=$();r(0,"button",6),N("click",function(){O(e);let n=m();return b(n.download())}),S(1,0),a()}if(t&2){let e=m();p("disabled",!e.languageFormControl.value)}}function au(t,s){if(t&1){let e=$();r(0,"ww-label-layout")(1,"ww-label")(2,"ww-checkbox",7),N("changed",function(n){let o=O(e).$implicit;return b(n?o.targetFormControl.enable():o.targetFormControl.disable())}),a()(),w(3,"ww-textarea",8),a()}if(t&2){let e=s.$implicit;l(2),p("layout","vertical")("label",e.label),l(),p("layout","vertical")("minRows",2)("maxRows",10)("formControl",e.targetFormControl)("size","large")}}function ru(t,s){if(t&1){let e=$();r(0,"ww-paginator",9),N("page",function(n){O(e);let o=m();return b(o.pageEventSub.next(n))}),a()}if(t&2){let e=m();p("pageIndex",e.pageEventSub.value.pageIndex)("pageSize",e.pageEventSub.value.pageSize)("length",e.pageEventSub.value.length)}}var bs=(()=>{class t extends B{constructor(){super(),this.httpClient=c(pa),this.languages=Wa,this.languageFormControl=new y(null),this.searchSub=new Te(""),this.pageEventSub=new Te({length:200,pageIndex:0,pageSize:100}),this.language$=Xt(this.languageFormControl),this.sourceAsset$=this.httpClient.get("/assets/locale/en.json").pipe(Hn(()=>J(null))),this.targetAsset$=this.language$.pipe(ie(e=>e?this.httpClient.get(`/assets/locale/${e}.json`):J(null)),Hn(()=>J(null)),this.shareReplay()),this.items$=this.targetAsset$.pipe(ie(e=>e?this.sourceAsset$.pipe(u(i=>i?Object.entries(e.translations).map(([n,o])=>{let _=i.translations[n]??"",h=o,I=new y(h);return I.disable(),{key:n,label:_,source:_,target:h,targetFormControl:I}}):[])):J([])),this.shareReplay()),this.searchedItems$=R([this.items$,this.searchSub]).pipe(u(([e,i])=>e.filter(n=>n.source.toLowerCase().includes(i.toLowerCase())||n.target.toLowerCase().includes(i.toLowerCase()))),this.shareReplay()),this.paginatedItems$=R([this.searchedItems$,this.pageEventSub]).pipe(u(([e,i])=>{let n=i.pageIndex*i.pageSize,o=n+i.pageSize;return e.slice(n,o)}),this.shareReplay()),this.hasData$=ji(this.searchedItems$,this.pageEventSub),this.subscribe()}download(){return W(this,null,function*(){if(!this.languageFormControl.value)return;let e=yield E(this.items$),i={locale:this.languageFormControl.value,translations:{}};for(let n of e)n.targetFormControl.disabled||!n.targetFormControl.value||n.targetFormControl.value===n.target||(i.translations[n.key]=n.targetFormControl.value.trim());wa(JSON.stringify(i,null,2),`${this.languageFormControl.value}.json`)})}subscribe(){this.searchedItems$.pipe(H(this.ngOnDestroy$)).subscribe(e=>{this.pageEventSub.next(q(v({},this.pageEventSub.value),{length:e.length}))})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-staff-experience-localization"]],hostAttrs:[1,"ww-staff-experience-localization"],features:[L],decls:10,vars:10,consts:()=>{let e;e=$localize`Select language`;let i;return i=$localize` Download 23`,[i,["wwButton","primary",3,"disabled","click",4,"wwLayoutPrimaryAction"],[3,"searchChanged","defaultState"],["placeholder",e,3,"data","formControl","size","layout"],[1,"flex","flex-col","gap-6","py-6"],[1,"mt-6",3,"pageIndex","pageSize","length"],["wwButton","primary",3,"click","disabled"],[3,"changed","layout","label"],[3,"layout","minRows","maxRows","formControl","size"],[1,"mt-6",3,"page","pageIndex","pageSize","length"]]},template:function(i,n){i&1&&(U(0,ou,2,1,"button",1),r(1,"ww-page-toolbar")(2,"ww-page-search",2),N("searchChanged",function(_){return n.searchSub.next(_??"")}),a(),w(3,"ww-select",3),a(),r(4,"div",4),ne(5,au,4,7,"ww-label-layout",null,nu),d(7,"async"),a(),T(8,ru,1,3,"ww-paginator",5),d(9,"async")),i&2&&(l(2),p("defaultState","expanded"),l(
23),p("data",n.languages)("formControl",n.languageFormControl)("size","medium")("layout","vertical"),l(2),oe(g(7,6,n.paginatedItems$)),l(3),f(g(9,8,n.hasData$)?8:-1))},dependencies:[Ce,j,se,ce,ue,De,Vr,Sl,D,z,pe,Ze,Je,ei,Ie,fi,M],encapsulation:2,changeDetection:0})}}return t})();var Dn=(()=>{class t{constructor(){this.dialog=c(K)}openCompare(){this.dialog.open(C(Pr),{size:"2x-large"})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=re({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var cu=()=>["accounts.update"],pu=t=>({permissions:t}),uu=t=>({enabledConfig:t}),_u=t=>({roleId:t}),mu=(t,s)=>s.id;function du(t,s){t&1&&w(0,"ww-spinner-overlay")}function Cu(t,s){t&1&&ut(0)}function gu(t,s){if(t&1&&(r(0,"ww-setting-card-subtitle"),U(1,Cu,1,0,"ng-container",10),a()),t&2){let e=m().$implicit;l(),p("wwOutlet",e.description)}}function Su(t,s){if(t&1&&(r(0,"a",8)(1,"ww-setting-card")(2,"ww-setting-card-header")(3,"ww-setting-card-title"),P(4),a(),T(5,gu,2,1,"ww-setting-card-subtitle"),r(6,"ww-setting-card-suffix"),w(7,"ww-icon",9),a()()()()),t&2){let e=s.$implicit;p("routerLink","edit")("queryParams",Me(5,_u,e.id)),l(4),Q(" ",e.name," "),l(),f(e.description?5:-1),l(2),p("icon","bx-chevron-right")}}function Tu(t,s){if(t&1&&(r(0,"ww-info-bubble")(1,"p"),Ee(2,1),w(3,"ww-link",7),Ae(),a()(),r(4,"ww-setting-card")(5,"ww-setting-card-content"),ne(6,Su,8,7,"a",8,mu),d(8,"async"),a()()),t&2){let e=m();l(3),p("href","/account/users")("inline",!0),l(3),oe(g(8,2,e.roleService.roleItems$))}}function fu(t,s){if(t&1){let e=$();r(0,"button",11),N("click",function(){O(e);let n=m();return b(n.accountPermissionsService.openCompare())}),S(1,2),a()}}function wu(t,s){t&1&&(r(0,"button",13),S(1,3),a()),t&2&&p("routerLink","edit")}function hu(t,s){t&1&&(r(0,"ww-account-feature-button"),S(1,4),a())}function Eu(t,s){if(t&1&&(Nt(0),U(1,wu,2,1,"button",12)(2,hu,2,0,"ng-template",null,0,me),It()),t&2){let e=_e(3);l(),p("wwAccountFeature","enableCustomUserRoles")("wwAccountFeatureElse",e)}}var xo=(()=>{class t extends B{constructor(){super(...arguments),this.accountPermissionsService=c(Dn),this.roleService=c(Tt)}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-permissions"]],hostAttrs:[1,"ww-account-permissions","flex","flex-col","gap-6"],standalone:!1,features:[L],decls:5,vars:9,consts:()=>{let e;e=$localize`Users`;let i;i=$localize` Assign roles to team members in ${"\uFFFD#3\uFFFD"}:START_TAG_WW_LINK:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_WW_LINK:`;let n;n=$localize` Compare roles 24`;let o;o=$localize` Add role `;let _;return _=$localize`Add role`,[["featureMissingTmpl",""],i,n,o,_,["wwButton","secondary",3,"click",4,"wwLayoutTertiaryAction"],[4,"wwLayoutPrimaryAction"],["type","router-link","content",e,3,"href","inline"],[3,"routerLink","queryParams"],[3,"icon"],[4,"wwOutlet"],["wwButton","secondary",3,"click"],["wwButton","",3,"routerLink",4,"wwAccountFeature","wwAccountFeatureElse"],["wwButton","",3,"routerLink"]]},template:function(i,n){i&1&&(T(0,du,1,0,"ww-spinner-overlay"),d(1,"async"),Bt(2,Tu,9,4),U(3,fu,2,0,"button",5)(4,Eu,4,2,"ng-container",6)),i&2&&(f(g(1,2,n.roleService.isLoading$)?0:2),l(4),p("wwLayoutPrimaryAction",Me(7,uu,Me(5,pu,ze(4,cu)))))},dependencies:[kt,De,hn,oi,ai,$n,yn,In,Ln,On,bn,z,et,ae,we,Kt,ln,M],encapsulation:2,changeDetection:0})}}return t})();var $s=gi(ao()),Po=$s.PAYLOAD_SCHEMA.keys.roles.items[0];function Au(t,s){if(t&1&&(w(0,"ww-select",1),d(1,"async")),t&2){let e=m();p("data",g(1,3,e.roleService.roleItems$))("formControl",e.copyPermissionFormControl)("pluckLabel",e.pluckRoleItemLabel)}}function Nu(t,s){if(t&1&&(w(0,"ww-selection-list",2),d(1,"async")),t&2){let e=s.$implicit,i=m();p("formControlName",e.name)("label",e.label)("data",e.permissions)("pluckLabel",i.pluckLabel)("pluckClassNames",i.pluckClassNames)("selection","multiple")("readonly",i.readonly)("checkPosition","before")("pluckDisabled",g(1,9,i.pluckDisabled$))}}var Bo=(()=>{class t extends B{constructor(){super(),this.elementRef=c(na),this.roleService=c(Tt),this.label=null,this.readonly=null,this.data=io,this.pluckCategoryLabel=e=>Ha[e],this.pluckLabel=e=>Xa[e],this.pluckClassNames=e=>Cr[e]||gr[e]?"!pl-8":"",this.formGroup=new X(no.reduce((e,i)=>q(v({},e),{[i]:new y([],{nonNullable:!0})}),{})),this.copyPermissionFormControl=new y(null),this.pluckRoleItemLabel=e=>e.name,this.groups=Object.entries(Na(io,e=>e.split(".")[0])).map(([e,i])=>({permissions:i,name:e,label:this.pluckCategoryLabel(e)}
24)).sort(Oa("label")),this.writtenValueSub=new Te([]),this.writtenValue$=this.writtenValueSub.asObservable(),this.viewValue$=this.formGroup.valueChanges.pipe(u(e=>Object.values(e).flat().filter(_t)),Pt((e,i)=>Aa(e,i))),this.value$=vi(this.writtenValue$,this.viewValue$),this.pluckDisabled$=this.value$.pipe(u(e=>{let i=oo(e),n=sn(e);return o=>i.includes(o)||n.includes(o)})),this.subscribeToTogglePermissions(),this.subscribeToCopyPermissions()}writeValue(e){this.writtenValueSub.next(e??[]),this.setValues(e??[],!1)}registerOnChange(e){this.viewValue$.pipe(H(this.ngOnDestroy$)).subscribe(e)}registerOnTouched(e){Ea(this.elementRef.nativeElement).pipe(He(1),H(this.ngOnDestroy$)).subscribe(e)}setDisabledState(e){e?this.formGroup.disable({emitEvent:!1}):this.formGroup.enable({emitEvent:!1})}setValues(e,i){this.formGroup.setValue(no.reduce((n,o)=>q(v({},n),{[o]:e.filter(_=>_.startsWith(o))}),{}),{emitEvent:i})}subscribeToTogglePermissions(){this.viewValue$.pipe(Zo(),H(this.ngOnDestroy$)).subscribe(([e,i])=>{let n=oo(i);n.length>0&&(i=i.filter(I=>!n.includes(I)));let o=sn(i);o.length>0&&(i=Xi([...i,...o]));let _=e.filter(I=>!i.includes(I)),h=sn(_);h.length>0&&(i=i.filter(I=>!h.includes(I))),this.setValues(i,!0)})}subscribeToCopyPermissions(){this.copyPermissionFormControl.valueChanges.pipe(H(this.ngOnDestroy$)).subscribe(e=>{this.setValues(e?.permissions??[],!0)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-permissions-role-permission-list"]],hostAttrs:[1,"ww-account-permissions-role-editor-modal"],inputs:{label:"label",readonly:"readonly"},standalone:!1,features:[Wi([{provide:ua,useExisting:t,multi:!0}]),L],decls:4,vars:2,consts:()=>{let e;e=$localize`Copy permissions from`;let i;i=$localize`Select an existing role to duplicate its permissions.`;let n;return n=$localize`Select`,[["wwForm","",3,"formGroup"],["label",e,"sublabel",i,"placeholder",n,3,"data","formControl","pluckLabel"],[3,"formControlName","label","data","pluckLabel","pluckClassNames","selection","readonly","checkPosition","pluckDisabled"]]},template:function(i,n){i&1&&(r(0,"form",0),T(1,Au,2,5,"ww-select",1),ne(2,Nu,2,11,"ww-selection-list",2,be),a()),i&2&&(p("formGroup",n.formGroup),l(),f(n.readonly?-1:1),l(),oe(n.groups))},dependencies:[ma,se,_a,ce,Ca,da,Ya,Ie,Yi,M],encapsulation:2,changeDetection:0})}}return t})();var Iu=()=>["accounts.update"],yu=t=>({permissions:t}),Lu=t=>({enabledConfig:t});function Ou(t,s){if(t&1){let e=$();r(0,"button",8),N("click",function(){O(e);let n=m(3);return b(n.delete())}),r(1,"div"),S(2,1),a()()}}function bu(t,s){if(t&1&&T(0,Ou,3,0,"button",7),t&2){let e=m(2);f(e._latestEntityId?0:-1)}}function $u(t,s){if(t&1&&(Nt(0),T(1,bu,1,1),d(2,"async"),It()),t&2){let e=m();l(),f(g(2,1,e.readonly$)===!1?1:-1)}}function Ru(t,s){if(t&1){let e=$();Nt(0),r(1,"button",10),N("click",function(){O(e);let n=m(2);return b(n.save())}),S(2,2),a(),It()}}function Mu(t,s){t&1&&(r(0,"ww-account-feature-button",11),S(1,3),a())}function xu(t,s){if(t&1&&U(0,Ru,3,0,"ng-container",9)(1,Mu,2,0,"ng-template",null,0,me),t&2){let e=_e(2);p("wwAccountFeature","enableCustomUserRoles")("wwAccountFeatureElse",e)}}function Pu(t,s){if(t&1){let e=$();r(0,"button",8),N("click",function(){O(e);let n=m(2);return b(n.accountPermissionsService.openCompare())}),S(1,4),a()}}function Bu(t,s){t&1&&U(0,Pu,2,0,"button",12)}var Fu=jt(Ht),Fo=(()=>{class t extends Fu{constructor(){super(),this.accountRx=c(V),this.dialog=c(K),this.roleService=c(Tt),this.router=c(Ue),this.pendingChangesStore=c(nt),this.accountPermissionsService=c(Dn),this.layout=c(Z),this.updateAccountWrite=c(ye),this.formId="account-permissions-role-editor",this._entityIdQueryParamName="roleId",this._entityApi=e=>this.roleService.getRoleItem(e),this.breadcrumbs=[lt,{name:$localize`Roles & Permissions`,routerLink:"/account/settings/permissions"}],this.initialValue$=this._entity$.pipe(u(e=>e?{id:e.id,name:e.name,description:e.description,permissions:e.permissions}:null)),this.readonly$=this._entity$.pipe(u(e=>!!e?.readonly)),this.formGroup=si(Po,new X(Qe()({name:["",[te.required]],description:[""],permissions:[[]]}))),this.form=ci({description:Po,formGroup:this.formGroup,labels:{name:$localize`Name`,description:$localize`Description`,permissions:$localize`Permissions`},sublabels:{name:$localize`Assign a name to this role for easy identification.`,description:$localize`Provide a brief explanation of this role's responsibilities.`},placeholders:{name:$localize`Role name`,description:$localize`e.g. Manages booking requests and confirmations`},components:{permissions:C(Bo,{$rx:{readonly:this.readonly$}})},componentModifiers:{name:e=>C(e,{$rx:{readonly:this.readonly$}}),description:e=>C(e,{$rx:{readonly:this.readonly$}})}}),this.featureName$=this.readonly$.pipe(u(e=>this.getFeatureName(e)),this.shareReplay()),this.transformer={toView:e=>({name:e.name,description:e.description,permissions:e.permissions}),toPayload:e=>({id:this._latestEntityId??this.nameToId(e.name),name:e.name,description:e.description,permissions:Sr(e.permissions)})},this.subscribe()}delete(){return W(this,null,function*(){if(!(yield E(this.dialog.openConfirm({title:$localize`Delete role?`,message:$localize`Are you sure you want to delete this role?`,confirmType:"warning"}).afterClosed$)))return;let i=this._latestEntityId;if(!i)return;let o=((yield E(this.accountRx.account$)).roles??[]).filter(_=>_.id!==i).map(_=>this.accountRoleToAccountPayload(_));this.updateAccountWrite.payload.next({roles:o}),yield E(this.updateAccountWrite.response$),this.router.navigate(["/account/settings/permissions"])})}save(){return W(this,null,function*(){if(!this.formGroup.valid)return;let e=this.formGroup.getRawValue(),n=(yield E(this.accountRx.account$)).roles??[],o=yield E(this.initialValue$),_=n.map(this.accountRoleToAccountPayload),h=this.transformer.toPayload(e),I=n.findIndex(G=>G.id===o?.id);I>=0?_[I]=h:_.push(h),this.updateAccountWrite.payload.next({roles:_}),yield E(this.updateAccountWrite.response$),this.router.navigateByUrl(this.breadcrumbs[this.breadcrumbs.length-1].routerLink)})}reset(e){this.formGroup.reset(void 0,{emitEvent:!1}),e&&this.formGroup.patchValue(this.transformer.toView(e),{emitEvent:!1}
24),this.formGroup.markAsPristine(),this.formGroup.updateValueAndValidity()}accountRoleToAccountPayload(e){return q(v({},e),{permissions:Xi(e.permissions)})}nameToId(e){return e.toUpperCase().replace(/\s/g,"-")}subscribe(){this.initialValue$.pipe(H(this.ngOnDestroy$)).subscribe(e=>{this.reset(e)}),R([this.featureName$,this._entityId$.pipe(je(null))]).pipe(H(this.ngOnDestroy$)).subscribe(([e,i])=>{this.layout.setFeatureContext({name:e,breadcrumbs:this.breadcrumbs,pendingChanges:this.getFeatureContextPendingChanges(i)})})}getFeatureContextPendingChanges(e){return e?{formId:this.formId,store:this.pendingChangesStore,save:()=>this.save(),reset:()=>W(this,null,function*(){let i=yield E(this._entity$);this.reset(i)}),enabledConfig:{accountFeatures:["enableCustomUserRoles"],permissions:["accounts.update"]}}:null}getFeatureName(e){return e?$localize`View role`:this._latestEntityId?$localize`Edit role`:$localize`Add role`}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-permissions-role-editor"]],hostAttrs:[1,"ww-account-permissions-role-editor"],inputs:{entity:"entity",entityId:"entityId",disableEntityUpdates:"disableEntityUpdates"},standalone:!1,features:[L],decls:5,vars:15,consts:()=>{let e;e=$localize`Delete`;let i;i=$localize`Add`;let n;n=$localize` Add `;let o;return o=$localize` Compare roles `,[["featureMissingTmpl",""],e,i,n,o,[4,"wwLayoutPrimaryAction"],[3,"form","formId","wwTrackPendingChanges","wwTrackPendingChangesOnce","wwTrackPendingChangesUntil"],["wwButton","secondary"],["wwButton","secondary",3,"click"],[4,"wwAccountFeature","wwAccountFeatureElse"],["wwButton","primary",1,"mt-4",3,"click"],[1,"mt-4"],["wwButton","secondary",3,"click",4,"wwLayoutTertiaryAction"]]},template:function(i,n){i&1&&(U(0,$u,3,3,"ng-container",5),w(1,"ww-joi-form",6),T(2,xu,3,2),d(3,"async"),T(4,Bu,1,0,"button",7)),i&2&&(p("wwLayoutPrimaryAction",Me(13,Lu,Me(11,yu,ze(10,Iu)))),l(),p("form",n.form)("formId",n.formId)("wwTrackPendingChanges",n.formGroup)("wwTrackPendingChangesOnce",!0)("wwTrackPendingChangesUntil",n.updateAccountWrite.response$),l(),f(!n._latestEntityId&&g(3,8,n.readonly$)===!1?2:-1),l(2),f(n._latestEntityId?-1:4))},dependencies:[De,hn,oi,ai,at,li,z,M],encapsulation:2,changeDetection:0})}}return t})();var Rs=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=Be({type:t})}static{this.\u0275inj=Pe({providers:[fe,Fe,ke],imports:[Ce,j,ve,ue,Le,D]})}}return t})();var Uo={ERASE:$localize`Delete data`,MASK:$localize`Mask data`},Ms=Object.keys(Uo),xs=[0,300,600,900,1800,3600,7200],Ps={0:$localize`Don't logout automatically`,300:$localize`5 minutes`,600:$localize`10 minutes`,900:$localize`15 minutes`,1800:$localize`30 minutes`,3600:$localize`1 hour`,7200:$localize`2 hours`};var Bs=gi(ao()),Tw=Bs.PAYLOAD_SCHEMA.keys.settings;var Fs=/^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$/;function vu(t,s){if(t&1&&w(0,"ww-chip-input",8),t&2){let e=m();p("formControl",e.chipInputFormControl)}}var vo=(()=>{class t extends B{constructor(){super(),this.accountRx=c(V),this.layout=c(Z),this.pendingChangesStore=c(nt),this.updateAccountWrite=c(ye),this.formId="account-security-ip-allowlist",this.radioFormControl=new y(!1,[te.required]),this.chipInputFormControl=new y([],{validators:[Ke.every(te.pattern(Fs))]}),this.active$=Xt(this.radioFormControl).pipe(u(e=>e??!1)),this.editedIndex=0,this.trackPendingChangesFormArray=new Dt([this.radioFormControl,this.chipInputFormControl]),this.reset(),this.layout.updateFeatureContext({pendingChanges:{formId:this.formId,reset:()=>this.reset(),save:()=>this.save(),store:this.pendingChangesStore,enabledConfig:{permissions:["accounts.update"]}}})}save(){let i={ipWhitelist:this.chipInputFormControl.value??[]};this.updateAccountWrite.payload.next(i)}reset(){let e=this.accountRx.nullableAccount;if(!e)return;let i=Lt(e.ipWhitelist);this.radioFormControl.setValue(i.length>0,{emitEvent:!1}),this.chipInputFormControl.setValue(i,{emitEvent:!1}),this.radioFormControl.markAsPristine(),this.chipInputFormControl.markAsPristine(),this.radioFormControl.updateValueAndValidity(),this.chipInputFormControl.updateValueAndValidity()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-security-ip-allowlist"]],hostAttrs:[1,"ww-account-security-ip-allowlist","flex","flex-col","gap-6","items-start"],standalone:!1,features:[L],decls:16,vars:8,consts:()=>{let e;e=$localize`Active IP addresses/CIDR subnets`;let i;i=$localize`Enter any IP address or range in CIDR notation`;let n;n=$localize`e.g. 192.168.10.10`;let o;o=$localize` Restrict so that only devices on your IP range is allowed to access your Waitwhile account. `;let _;_=$localize`Access`;let h;h=$localize`Choose whether any device can access or restrict access to specific IP ranges only.`;let I;I=$localize` Any device can access `;let G;return G=$localize` Only devices within a specific IP range `,[o,_,h,I,G,[1,"flex","flex-col","gap-6",3,"wwTrackPendingChanges","wwTrackPendingChangesUntil"],[1,"flex","flex-col","gap-1",3,"formControl"],[3,"value"],["label",e,"sublabel",i,"placeholder",n,3,"formControl"]]},template:function(i,n){i&1&&(r(0,"div",5)(1,"p"),S(2,0),a(),r(3,"ww-label-layout")(4,"ww-label")(5,"span"),S(6,1),a(),r(7,"ww-sublabel"),S(8,2),a()(),r(9,"mat-radio-group",6)(10,"mat-radio-button",7),S(11,3),a(),r(12,"mat-radio-button",7),S(13,4),a()()(),T(14,vu,1,1,"ww-chip-input",8),d(15,"async"),a()),i&2&&(p("wwTrackPendingChanges",n.trackPendingChangesFormArray)("wwTrackPendingChangesUntil",n.updateAccountWrite.response$),l(9),p("formControl",n.radioFormControl),l(),p("value",!1),l(2),p("value",!0),l(2),f(g(15,6,n.active$)?14:-1))},dependencies:[se,ce,at,mr,an,Zi,Ze,Je,Yt,M],encapsulation:2,changeDetection:0})}}return t})();var Gu=(t,s)=>s.id;function Wu(t,s){if(t&1&&(w(0,"ww-input",7)(1,"ww-select",8),r(2,"ww-label-layout")(3,"ww-label")(4,"span"),S(5,1),a(),r(6,"ww-sublabel"),S(7,2),a()(),r(8,"div",9)(9,"mat-radio-button",10),S(10,3),a(),r(11,"mat-radio-button",10),S(12,4),a()()()),t&2){let e=s.$implicit;p("value",e.id)("readonly",!0),l(),p("value",e.domains)("readonly",!0)("selection","multiple"),l(8),p("disabled",!0)("checked",e.enableJitProvisioning),l(2),p("disabled",!0)("checked",!e.enableJitProvisioning)}}var Go=(()=>{class t extends B{constructor(){super(...arguments),this.accountRx=c(V),this.intercom=c(it),this.providers$=this.accountRx.getAccount(["sso"]).pipe(u(({sso:e})=>e?.providers??{}),u(e=>Object.entries(e).map(([i,n])=>({id:i,domains:n.allowedDomains,enableJitProvisioning:n.enableJitProvisioning}))))}contactSupport(){this.intercom.show()}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-security-sso"]],hostAttrs:[1,"ww-account-security-sso"],standalone:!1,features:[L],decls:6,vars:2,consts:()=>{let e;e=$localize` This feature can only be configured by your account manager `;let i;i=$localize`Provider`;let n;n=$localize`The identifier of the single sign-on provider`;let o;o=$localize`Domains`;let _;_=$localize`The email domains allowed for single sign-on access`;let h;h=$localize`Just-in-time user provisioning`;let I;I=$localize` Waitwhile supports Just-in-time user provisioning so that your organization can allow new staff members to immediately get access to the Waitwhile platform, without having to be invited. `;let G;G=$localize` Enabled `;let x;return x=$localize` Disabled `,[e,h,I,G,x,[1,"flex","flex-col","gap-6"],["color","alert"],["label",i,"sublabel",n,3,"value","readonly"],["label",o,"sublabel",_,3,"value","readonly","selection"],[1,"flex","flex-col"],[3,"disabled","checked"]]},template:function(i,n){i&1&&(r(0,"div",5)(1,"ww-info-bubble",6),S(2,0),a(),ne(3,Wu,13,9,null,null,Gu),d(5,"async"),a()),i&2&&(l(3),oe(g(5,0,n.providers$)))},dependencies:[an,Ze,Je,Yt,ae,Ct,Ie,M],encapsulation:2,changeDetection:0})}}return t})();var vs=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=Be({type:t})}static{this.\u0275inj=Pe({providers:[fe,Fe,ke],imports:[Ce,j,ve,ue,Le,D]})}}return t})();var Du=()=>["id"],ku=()=>[10,25,50,100];function zu(t,s){t&1&&w(0,"ww-wait-duration-chart",2),t&2&&p("source","account")}function Vu(t,s){t&1&&U(0,zu,1,1,"ww-wait-duration-chart",5),t&2&&p("wwPermission","analytics.show")}function Xu(t,s){if(t&1){let e=$();r(0,"ww-paginator",6),d(1,"async"),d(2,"async"),N("page",function(n){O(e);let o=m();return b(o.pageEventSub.next(n))}),a()}if(t&2){let e=m();p("pageIndex",e.pageEventSub.value.pageIndex)("pageSize",e.pageEventSub.value.pageSize)("length",g(1,5,e.pageLength$))("disabled",g(2,7,e.isLoading$))("pageSizeOptions",ze(9,ku))}}function Hu(t,s){t&1&&w(0,"ww-empty-state",7)}function ju(t,s){if(t&1&&(T(0,Hu,1,0,"ww-empty-state",7),d(1,"async")),t&2){let e=m();f(g(1,1,e.isEmpty$)?0:-1)}}var Gs=(()=>{class t extends jr{constructor(){super(...arguments),this.commonDisplay=c(ft),this.router=c(Ue),this.columns=[{key:"name",label:$localize`Name`,sortable:!0},{key:"waitEstimationMethod",label:$localize`Model`,sortable:!0},{key:"link",label:"",sortable:!1}],this.tableOrderBy$=this.orderBySub.pipe(u(e=>e||{property:"name",direction:"asc"})),this.pluckCellLabel$=this.locationItemRecord$.pipe(u(e=>i=>{let n=e[i],{isOpen:o}=this.getLocationIsOpen(n);return{name:this.commonDisplay.displayLocation(n,{options:{status:{isActive:!!n.isActive,isOpen:o}}}),waitEstimationMethod:Tr(n)?Qn.INTELLIGENT:Qn.CLASSIC,link:bt({icon:"bx-chevron-right",color:"darkerGrey",size:"medium"})}})),this.showWaitDurationChart$=this.accountRx.getAccountProperty("planSegment").pipe(u(e=>
24e==="DEMO"||e==="ENTERPRISE"),Pt())}onRowClicked(e){this.locationRx.selectLocation(e),this.router.navigate(["/settings/waitlist/wait-time-estimation"])}onHeaderClicked(e){this.orderBySub.next(za(this.orderBySub.value,e))}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-settings-wait-time-estimation"]],hostAttrs:[1,"ww-account-settings-wait-time-estimation"],features:[L],decls:12,vars:22,consts:()=>{let e;return e=$localize`No locations found`,[["emptyStateTmpl",""],[1,"flex","flex-col","gap-6","max-w-[740px]"],[3,"source"],[1,"w-full",3,"rowClicked","headerClicked","columns","data","loading","placeholder","trackByProperty","orderBy","pluckCellLabel"],[3,"pageIndex","pageSize","length","disabled","pageSizeOptions"],[3,"source",4,"wwPermission"],[3,"page","pageIndex","pageSize","length","disabled","pageSizeOptions"],["icon","ww-empty-state","message",e]]},template:function(i,n){if(i&1&&(r(0,"div",1),T(1,Vu,1,1,"ww-wait-duration-chart",2),d(2,"async"),r(3,"ww-table",3),d(4,"async"),d(5,"async"),d(6,"async"),d(7,"async"),N("rowClicked",function(_){return n.onRowClicked(_)})("headerClicked",function(_){return n.onHeaderClicked(_)}),a(),T(8,Xu,3,10,"ww-paginator",4),d(9,"async"),U(10,ju,2,3,"ng-template",null,0,me),a()),i&2){let o=_e(11);l(),f(g(2,9,n.showWaitDurationChart$)?1:-1),l(2),p("columns",n.columns)("data",g(4,11,n.locationIds$))("loading",g(5,13,n.isLoading$))("placeholder",o)("trackByProperty",ze(21,Du))("orderBy",g(6,15,n.tableOrderBy$))("pluckCellLabel",g(7,17,n.pluckCellLabel$)),l(5),f(g(9,19,n.canPaginate$)?8:-1)}},dependencies:[ue,ui,ot,D,ei,tt,Dl,M],encapsulation:2,changeDetection:0})}}return t})();function Ku(t,s){if(t&1&&(r(0,"span",0),P(1),a()),t&2){let e=m();l(),Q(" ",e.options.title," ")}}var $i=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-webhooks-created-modal"]],hostAttrs:[1,"ww-account-webhooks-created-modal"],inputs:{options:"options"},standalone:!1,decls:18,vars:6,consts:[[1,"ww-typography-h3"],["wwButton","tertiary","matDialogClose","",1,"ml-auto"],["icon","bx-x"],[1,"flex","flex-col","gap-y-4"],[1,"ww-typography-h4"],[1,"ww-account-webhooks-created-modal-key-container"],[1,"ww-account-webhooks-created-modal-key-value"],[1,"ml-auto",3,"content"],[1,"flex","justify-end"],["wwButton","","matDialogClose",""]],template:function(i,n){i&1&&(r(0,"ww-section")(1,"ww-section-title"),T(2,Ku,2,1,"span",0),r(3,"button",1),w(4,"ww-icon",2),a()(),r(5,"ww-section-content")(6,"div",3)(7,"ww-info-bubble"),P(8),a(),r(9,"span",4),P(10),a(),r(11,"div",5)(12,"span",6),P(13),a(),w(14,"ww-copy-to-clipboard-button",7),a()()(),r(15,"ww-section-actions",8)(16,"button",9),P(17),a()()()),i&2&&(l(2),f(n.options.title?2:-1),l(6),Q(" ",n.options.message," "),l(2),le(n.options.subtitle),l(3),le(n.options.key),l(),p("content",n.options.key),l(3),Q(" ",n.options.buttonLabel," "))},dependencies:[Nn,tn,z,et,ae,tr,nr,nn,ir],styles:[`.ww-account-webhooks-created-modal .ww-account-webhooks-created-modal-key-container{display:flex;flex-direction:row;align-items:center;justify-content:space-between;border:1px solid var(--ww-color-lightGrey);border-radius:12px;padding:8px 8px 8px 20px}.ww-account-webhooks-created-modal .ww-account-webhooks-created-modal-key-container .ww-account-webhooks-created-modal-key-value{color:var(--ww-color-primary)} 25/*noopaccount-webhooks-created-modal.component-4M6MEF4C.css.map */ 26`],encapsulation:2,changeDetection:0})}}return t})();var Wo=gi(Rr());function Yu(t,s){if(t&1&&(r(0,"ww-label-layout")(1,"ww-label")(2,"span"),S(3,5),a(),w(4,"ww-sublabel"),a(),r(5,"ww-info-bubble",14)(6,"div",15)(7,"div",16),Ee(8,6),w(9,"ww-display-date",17),Ae(),a(),r(10,"p",18),P(11),a(),r(12,"div",19),Ee(13,7),w(14,"ww-display-date",17),Ae(),a()()()()),t&2){let e=m(2);l(5),p("hideIcon",!0),l(2),p("wwTypography","body2"),l(2),p("date",e.webhook.failLast),l(2),Q(" ",e.webhook.failError," "),l(),p("wwTypography","body2"),l(2),p("date",e.webhook.failFirst)}}function qu(t,s){if(t&1&&(r(0,"ww-label-layout")(1,"ww-label")(2,"span"),S(3,0),a(),r(4,"ww-sublabel"),S(5,1),a()(),r(6,"div"),P(7),r(8,"span"),S(9,2),a()()(),T(10,Yu,15,6,"ww-label-layout"),r(11,"ww-label-layout")(12,"ww-label")(13,"span"),S(14,3),a()(),r(15,"p"),S(16,4),a()()),t&2){let e=m();l(7),Q("",e.webhook.numRequests," "),l(3),f(e.webhook.failError?10:-1)}}function Qu(t,s){if(t&1){let e=$();r(0,"button",21),d(1,"async"),N("click",function(){O(e);let n=m(2);return b(n.save())}),S(2,8),a()}if(t&2){let e=m(2);p("disabled",g(1,1,e.formInvalid$))}}function Ju(t,s){if(t&1&&(Nt(0),T(1,Qu,3,3,"button",20),It()),t&2){let e=m();l(),f(e.initialValue?-1:1)}}var Zu={"location-status.updated":$localize`Location status updated`,"location.created":$localize`Location created`,"location.removed":$localize`Location removed`,"location.updated":$localize`Location updated`,"message.created":$localize`Message created`,"message.updated":$localize`Message updated`,"visit.created":$localize`Visit created`,"visit.removed":$localize`Visit removed`,"visit.updated":$localize`Visit updated`},e_={NONE:$localize`None`,OAUTH_CLIENT_CREDENTIALS:$localize`Use OAuth 2.0 with Client Credentials`,OAUTH_JWT_BEARER:$localize`Use OAuth 2.0 with JWT Bearer Token`},Do=(()=>{class t extends B{constructor(){super(),this.layout=c(Z),this.pendingChangeStore=c(nt),this.webhook=null,this.initialValue=null,this.initialValue$=this.observe("initialValue"),this.saved=new ta,this.activeData=[!0,!1],this.activeFormControl=new y(!1),this.pluckActiveLabel=e=>e?$localize`Enabled`:$localize`Disabled`,this.formGroup=si(Wo.PAYLOAD_SCHEMA,new X(q(v({},Qe()({url:["",{validators:[Ke.url()]}],locationIds:[[]],eventTypes:[[]],authMethod:["NONE"]})),{oAuth:new X(q(v({},Qe()({tokenUrl:[""],clientId:["",te.required],clientSecret:[],expirationPeriod:[0],privateKey:[""],claims:[]})),{customClaims:new y({},{nonNullable:!0,validators:[te.required]})}))}))),this.form=ci({formGroup:this.formGroup,description:Wo.PAYLOAD_SCHEMA,labels:{url:$localize`Endpoint URL to be called`,locationIds:$localize`Locations`,eventTypes:$localize`Events`,authMethod:$localize`Authentication method`,oAuth:$localize`OAuth 2.0`},sublabels:{url:$localize`Enter the URL where webhook notifications will be sent.`,locationIds:$localize`Select the locations this webhook applies to.`,eventTypes:$localize`Choose the events that will trigger this webhook.`,authMethod:$localize`Select the method used to authenticate webhook requests.`},placeholders:{url:$localize`https://example.com/endpoint`},locale:e_,componentModifiers:{authMethod:e=>C(e,{selection:"radio"}),eventTypes:()=>C(Yi,{checkPosition:"before",selection:"multiple",data:Ge()(["location-status.updated","visit.created","visit.updated","visit.removed","message.created","message.updated","location.created","location.updated","location.removed"]),pluckLabel:e=>Zu[e]}
26),locationIds:()=>C(Kr),url:e=>C(e,{prefixComponent:bt({icon:"bx-link"})})},children:{oAuth:{labels:{claims:$localize`Claims`,clientId:$localize`Client Id`,clientSecret:$localize`Client Secret`,tokenUrl:$localize`Token URL`,expirationPeriod:$localize`Expiration time`,privateKey:$localize`Private key`,customClaims:$localize`Custom claims`},sublabels:{claims:$localize`Claims to include in the OAuth JWT bearer flow.`,clientId:$localize`Enter the Client ID used in the OAuth client credentials flow.`,clientSecret:$localize`Enter the Client secret used in the OAuth client credentials flow.`,tokenUrl:$localize`Enter the URL used to obtain the authentication token.`,expirationPeriod:$localize`Set the duration before this webhook request expires.`,privateKey:$localize`The private key used in the OAuth JWT bearer flow.`,customClaims:$localize`Here you can add custom claims that you want included in the OAuth JWT bearer flow.`},placeholders:{clientId:$localize`e.g. 12345-abcde-67890-fghij`,clientSecret:$localize`e.g. s3cr3tK3yXyz`,tokenUrl:$localize`https://example.com/token-url`,expirationPeriod:$localize`e.g. 1`,privateKey:$localize`e.g. -----BEGIN PRIVATE KEY----- ABC123... -----END PRIVATE KEY-----`},components:{expirationPeriod:C(wi),claims:C(to,{staticKeys:["iss","aud","sub"],maxEntries:3}),customClaims:C(to,{invalidKeys:["iss","aud","sub"],maxEntries:10})},componentModifiers:{tokenUrl:e=>C(e,{prefixComponent:bt({icon:"bx-link"})})},dependencies:e=>({clientId:e.pipe(u(({authMethod:i})=>({hidden:i!=="OAUTH_CLIENT_CREDENTIALS"}))),clientSecret:e.pipe(u(({authMethod:i})=>({hidden:i!=="OAUTH_CLIENT_CREDENTIALS"}))),tokenUrl:e.pipe(u(({authMethod:i})=>({disabled:i==="NONE"}))),expirationPeriod:e.pipe(u(({authMethod:i})=>({hidden:i!=="OAUTH_JWT_BEARER"}))),privateKey:e.pipe(u(({authMethod:i})=>({hidden:i!=="OAUTH_JWT_BEARER"}))),claims:e.pipe(u(({authMethod:i})=>({hidden:i!=="OAUTH_JWT_BEARER"}))),customClaims:e.pipe(u(({authMethod:i})=>({hidden:i!=="OAUTH_JWT_BEARER"})))})}},dependencies:e=>({oAuth:e.pipe(u(({authMethod:i})=>({hidden:i==="NONE"})))})}),this.trackPendingChangesFormArray=new Dt([this.activeFormControl,this.formGroup]),this.transformer={toView:e=>{let i=Ia(e.oAuth?.claims??{},["iss","aud","sub"]),n=Object.entries(ya(e.oAuth?.claims??{},["iss","aud","sub"])).reduce((o,[_,h])=>(o[_]=`${h}`,o),{});return q(v({},e),{locationIds:e.locationIds??[],eventTypes:e.eventTypes??[],authMethod:e.authMethod??void 0,oAuth:q(v({authMethod:e.authMethod??void 0},e.oAuth),{claims:i,customClaims:n})})},toPayload:e=>{let i=Vi(e);if(i.authMethod==="OAUTH_JWT_BEARER"){i.oAuth=Vi(e.oAuth),delete i.oAuth?.claims,delete i.oAuth?.customClaims;let n=e.oAuth?.claims??{},o=e.oAuth?.customClaims??{};if(i.oAuth=q(v({},i.oAuth),{claims:v(v({},n),o)}),i.oAuth?.privateKey){let _=i.oAuth?.privateKey!==this.initialValue?.oAuth?.privateKey?i.oAuth?.privateKey:null;_?i.oAuth=q(v({},i.oAuth),{privateKey:_}):delete i.oAuth.privateKey}}if(i.authMethod==="OAUTH_CLIENT_CREDENTIALS"&&(i.oAuth=Vi(e.oAuth),i.oAuth?.clientSecret)){let n=i.oAuth?.clientSecret!==this.initialValue?.oAuth?.clientSecret?i.oAuth?.clientSecret:null;n?i.oAuth=q(v({},i.oAuth),{clientSecret:n}):delete i.oAuth.clientSecret}return q(v({},i),{isActive:this.activeFormControl.value??!1,oAuth:i.oAuth,url:i.url??null,eventTypes:e.eventTypes?.length?e.eventTypes:void 0,authMethod:e.authMethod??void 0,locationIds:e.locationIds?.length?e.locationIds:void 0})}},this.formInvalid$=this.formGroup.statusChanges.pipe(je(null),u(()=>this.formGroup.invalid)),this.subscribe()}subscribe(){this.initialValue$.pipe(H(this.ngOnDestroy$)).subscribe(e=>{e&&(this.activeFormControl.setValue(e.isActive??!1,{emitEvent:!1}),this.formGroup.patchValue(this.transformer.toView(e)))})}save(){return W(this,null,function*(){if(this.formGroup.invalid)return;let e=this.transformer.toPayload(this.formGroup.value);this.saved.emit(e)})}reset(){return W(this,null,function*(){this.formGroup.reset(void 0),this.initialValue&&(this.activeFormControl.setValue(this.initialValue.isActive??!1),this.formGroup.reset(this.transformer.toView(this.initialValue))),this.formGroup.markAsPristine(),this.formGroup.updateV
26alueAndValidity(),this.activeFormControl.markAsPristine(),this.activeFormControl.updateValueAndValidity()})}ngOnInit(){this.layout.setFeatureContext({name:this.initialValue?$localize`Edit webhook`:$localize`Add webhook`,breadcrumbs:[lt,{name:$localize`Webhooks`,routerLink:"account/settings/webhooks"}],pendingChanges:{formId:"account-webhooks-form",reset:()=>this.reset(),save:()=>this.save(),store:this.pendingChangeStore,enabledConfig:{permissions:["webhooks.update"]}}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-webhooks-form"]],hostAttrs:[1,"ww-account-webhooks-form","flex","flex-col","gap-4"],inputs:{webhook:"webhook",initialValue:"initialValue"},outputs:{saved:"saved"},standalone:!1,features:[L],decls:6,vars:8,consts:()=>{let e;e=$localize`Webhook`;let i;i=$localize`Toggle to enable or disable this webhook endpoint`;let n;n=$localize`Endpoint activity`;let o;o=$localize`Displays the number of requests received by this webhook endpoint`;let _;_=$localize`requests`;let h;h=$localize`Signing secret`;let I;I=$localize` For security reasons you can no longer display the signing secret. It's only accessible once, at the time of its creation. `;let G;G=$localize`Latest error`;let x;x=$localize` Latest error in this series occurred at ${"\uFFFD#9\uFFFD"}:START_TAG_WW_DISPLAY_DATE:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_WW_DISPLAY_DATE:`;let Y;Y=$localize` First error in this series occurred at ${"\uFFFD#14\uFFFD"}:START_TAG_WW_DISPLAY_DATE:${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_WW_DISPLAY_DATE:`;let ht;return ht=$localize` Add endpoint `,[n,o,_,h,I,G,x,Y,ht,[1,"flex","flex-col","gap-6"],["label",e,"sublabel",i,3,"data","pluckLabel","formControl"],[3,"form","wwTrackPendingChanges","wwTrackPendingChangesUntil"],[1,"mt-4"],[4,"wwPermission"],["color","warning","wwFormFieldSize","large",3,"hideIcon"],["wwFormFieldSize","large",1,"flex","flex-col","gap-2"],["wwBorderColor","darkGrey",1,"border-b","border-solid","pb-2",3,"wwTypography"],[3,"date"],[1,"ww-account-webhooks-form-error"],["wwBorderColor","darkGrey",1,"border-t","border-solid","pt-2",3,"wwTypography"],["wwButton","primary",3,"disabled"],["wwButton","primary",3,"click","disabled"]]},template:function(i,n){i&1&&(r(0,"div",9),w(1,"ww-radio",10),T(2,qu,17,2),a(),w(3,"ww-joi-form",11),r(4,"div",12),U(5,Ju,2,1,"ng-container",13),a()),i&2&&(l(),p("data",n.activeData)("pluckLabel",n.pluckActiveLabel)("formControl",n.activeFormControl),l(),f(n.webhook?2:-1),l(),p("form",n.form)("wwTrackPendingChanges",n.trackPendingChangesFormArray)("wwTrackPendingChangesUntil",n.saved),l(2),p("wwPermission","webhooks.create"))},dependencies:[se,ce,Sn,ot,at,li,z,We,dt,Ze,Je,Yt,ae,rn,gt,M],styles:[`.ww-account-webhooks-form .ww-account-webhooks-form-error{font-family:var(--ww-typography-body2-font-family);font-size:var(--ww-typography-body2-font-size);font-weight:var(--ww-typography-body2-font-weight);line-height:var(--ww-typography-body2-line-height);letter-spacing:var(--ww-typography-body2-letter-spacing);font-family:monospace;white-space:normal} 27/*noopaccount-webhooks-form.component-35ABLETK.css.map */ 28`],encapsulation:2,changeDetection:0})}}return t})();function i_(t,s){t&1&&w(0,"ww-spinner-overlay")}function n_(t,s){if(t&1){let e=$();r(0,"ww-account-webhooks-form",1),d(1,"async"),d(2,"async"),N("saved",function(n){O(e);let o=m();return b(o.onSaved(n))}),a()}if(t&2){let e=m();p("webhook",g(1,2,e._entity$))("initialValue",g(2,4,e._entity$))}}var o_=jt(Ht),ko=(()=>{class t extends o_{constructor(){super(...arguments),this.createWebhookWrite=c(mn),this.updateWebhookWrite=c(xr),this.webhookRx=c(pn),this.router=c(Ue),this.dialog=c(K),this._entityIdQueryParamName="webhookId",this._entityApi=e=>this.webhookRx.getWebhook(e)}onSaved(e){return W(this,null,function*(){if(this._latestEntityId)this.updateWebhookWrite.payload.next({webhookId:this._latestEntityId,postPayload:e}),(yield E(this.updateWebhookWrite.response$))&&this.router.navigate(["account/settings/webhooks"]);else{this.createWebhookWrite.payload.next(e);let i=yield E(this.createWebhookWrite.response$),{id:n,secret:o}=i??{};n&&o&&(yield E(this.dialog.open(C($i,{options:{title:$localize`Endpoint successfully added`,message:$localize`Please copy the webhook signature secret and store it safely on your end. You will not be able to view the secret again once you close this dialog.`,subtitle:$localize`Webhook signature secret`,key:o,buttonLabel:$localize`Done`}})).afterClosed$),this.router.navigate(["account/settings/webhooks"]))}})}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-webhooks-editor"]],hostAttrs:[1,"ww-account-webhooks-editor"],standalone:!1,features:[L],decls:3,vars:3,consts:[[3,"webhook","initialValue"],[3,"saved","webhook","initialValue"]],template:function(i,n){i&1&&(T(0,i_,1,0,"ww-spinner-overlay"),d(1,"async"),Bt(2,n_,3,6,"ww-account-webhooks-form",0)),i&2&&f(g(1,1,n._entityApiLoading$)?0:2)},dependencies:[ln,Do,M],encapsulation:2,changeDetection:0})}}return t})();var Ws=gi(Rr()),a_=Ws.PAYLOAD_SCHEMA.keys.oAuth,tE=a_.keys.claims;var kn=(()=>{class t{constructor(){this.router=c(Ue)}edit(e){this.router.navigate(["account/settings/webhooks/edit"],{queryParams:{webhookId:e}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=re({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var zn=(()=>{class t extends vr{constructor(){super(...arguments),this.deleteWebhookWrite=c(Mr),this.webhooksService=c(kn)}createActions(e){return{edit:{api:()=>this.webhooksService.edit(e),label:$localize`Edit`,icon:"bx-edit-alt",enabledConfig:{permissions:["webhooks.update"]},disabled:!1},delete:{api:()=>this.deleteWebhookWrite.payload.next({webhookId:e}
28),label:$localize`Delete`,color:"warning",icon:"bx-trash",enabledConfig:{permissions:["webhooks.update"]}}}}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275prov=re({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ds={pageIndex:0,pageSize:10,length:0},zo="account-webhooks-call-out-closed";var r_=jt(Ht),Vo=(()=>{class t extends r_{constructor(){super(...arguments),this.webhookActions=c(zn),this.actions$=this._entityId$.pipe(ie(e=>e?this.webhookActions.getActions(e):J([])))}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=k(t)))(n||t)}})()}static{this.\u0275cmp=A({type:t,selectors:[["ww-webhook-actions"]],hostAttrs:[1,"ww-webhook-actions"],inputs:{entityId:"entityId",entity:"entity"},standalone:!1,features:[L],decls:2,vars:3,consts:[[3,"actions"]],template:function(i,n){i&1&&(w(0,"ww-model-action-menu",0),d(1,"async")),i&2&&p("actions",g(1,1,n.actions$))},dependencies:[Ur,M],encapsulation:2,changeDetection:0})}}return t})();function l_(t,s){t&1&&(r(0,"button",13),S(1,2),a())}function s_(t,s){if(t&1){let e=$();r(0,"ww-call-out",10),d(1,"async"),r(2,"ww-call-out-title"),S(3,3),a(),r(4,"ww-call-out-close",14),N("closed",function(){O(e);let n=m();return b(n.closeCallOut())}),a(),r(5,"ww-call-out-content"),S(6,4),a(),r(7,"ww-call-out-actions")(8,"a",15),S(9,5),a(),r(10,"a",16),N("click",function(){O(e);let n=m();return b(n.contactSupport())}),S(11,6),a()()()}if(t&2){let e=m();p("illustration",g(1,2,e.callOutIllustration$))("backgroundColor","aqua3")}}function c_(t,s){if(t&1){let e=$();r(0,"ww-paginator",17),d(1,"async"),d(2,"async"),N("page",function(n){O(e);let o=m();return b(o.pageEventSub.next(n))}),a()}if(t&2){let e=m();p("pageIndex",e.pageEventSub.value.pageIndex)("pageSize",e.pageEventSub.value.pageSize)("length",g(1,4,e.pageLength$))("disabled",g(2,6,e.isLoading$))}}function p_(t,s){t&1&&w(0,"ww-empty-state",18)}var Xo=(()=>{class t extends B{constructor(){super(),this.createWebhookWrite=c(mn),this.dateService=c(Ba),this.dialog=c(K),this.intercom=c(it),this.layout=c(Z),this.webhookService=c(kn),this.webhooksRx=c(pn),this.webhookActions=c(zn),this.pageEventSub=new Te(Ds),this.webhooks$=Da(this.pageEventSub,e=>this.webhooksRx.getWebhooks(e)).pipe(u(e=>e.results??[]),this.shareReplay()),this.isLoading$=vi(this.pageEventSub.pipe(u(()=>!0)),this.webhooks$.pipe(u(()=>!1))),this.callOutIllustration$=this.layout.isMobile$.pipe(u(e=>e?null:"ww-account-api-webhooks")),this.callOutClosed=ki(zo,!1,Vt),this.columns=[{label:$localize`Endpoint`,key:"endpoint"},{label:$localize`Locations`,key:"locationIds"},{label:$localize`Created`,key:"created"},{label:$localize`Status`,key:"status"}],this.pluckCellLabel=e=>({endpoint:e.url,locationIds:e.locationIds.length,created:this.dateService.transform(e.created,{hideTime:!0}),status:e.isActive?$localize`Active`:$localize`Inactive`}),this.pluckActions=e=>C(Vo,{entityId:e.id}),this.pageLength$=ka(this.webhooks$,this.pageEventSub),this.hasData$=this.isLoading$.pipe(ie(e=>e?J(!1):ji(this.webhooks$,this.pageEventSub))),this.subscribeToCreate()}onRowClicked(e){this.webhookService.edit(e.id)}closeCallOut(){zi(zo,!0),this.callOutClosed=!0}subscribeToCreate(){this.createWebhookWrite.response$.pipe(H(this.ngOnDestroy$)).subscribe(e=>{e.secret&&this.dialog.open(C($i,{options:{title:$localize`Endpoint successfully added`,message:$localize`Please copy the webhook signature secret and store it safely on your end. You will not be able to view the secret again once you close this dialog.`,subtitle:$localize`Webhook signature secret`,key:e.secret,buttonLabel:$localize`Done`}}))})}contactSupport(){this.intercom.show()}getWebhookStatus(e){return e.isActive?e.failError?$localize`Failed`:$localize`Enabled`:$localize`Disabled`}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-webhooks"]],hostAttrs:[1,"ww-account-webhooks","flex","flex-col","gap-6"],standalone:!1,features:[L],decls:13,vars:15,consts:()=>{let e;e=$localize`Read the documentation.`;let i;i=$localize` Send Waitwhile events straight to your server through our flexible URL endpoints. `;let n;n=$localize` New endpoint 29`;let o;o=$localize` Learn more `;let _;_=$localize` Learn about how to integrate with webhooks on our developer hub or reach out to our support for more help. `;let h;h=$localize` Developer hub `;let I;I=$localize` Contact support `;let G;return G=$localize`No webhooks found`,[["emptyStateTmpl",""],i,n,o,_,h,I,["
29wwButton","primary","routerLink","edit",4,"wwLayoutPrimaryAction"],[1,"max-w-lg"],["content",e,"href","https://help.waitwhile.com/en/articles/9948686-getting-started-with-integrations#h_3810fc4e44",3,"inline"],[3,"illustration","backgroundColor"],[3,"rowClicked","data","columns","pluckCellLabel","pluckActions","loading","placeholder"],[1,"mt-6",3,"pageIndex","pageSize","length","disabled"],["wwButton","primary","routerLink","edit"],[3,"closed"],["href","https://developers.waitwhile.com","target","_blank","wwButton","primary",1,"ww-account-webhooks-info-button"],["wwButton","tertiary",1,"ww-account-webhooks-info-button",3,"click"],[1,"mt-6",3,"page","pageIndex","pageSize","length","disabled"],["message",G,"icon","ww-empty-state"]]},template:function(i,n){if(i&1&&(U(0,l_,2,0,"button",7),r(1,"p",8)(2,"span"),S(3,1),a(),w(4,"ww-link",9),a(),T(5,s_,12,4,"ww-call-out",10),r(6,"ww-table",11),d(7,"async"),d(8,"async"),N("rowClicked",function(_){return n.onRowClicked(_)}),a(),T(9,c_,3,8,"ww-paginator",12),d(10,"async"),U(11,p_,1,0,"ng-template",null,0,me)),i&2){let o=_e(12);l(4),p("inline",!0),l(),f(n.callOutClosed?-1:5),l(),p("data",g(7,9,n.webhooks$))("columns",n.columns)("pluckCellLabel",n.pluckCellLabel)("pluckActions",n.pluckActions)("loading",g(8,11,n.isLoading$))("placeholder",o),l(3),f(g(10,13,n.hasData$)?9:-1)}},dependencies:[kt,Tn,fn,ii,wn,ni,ui,De,z,we,ei,tt,M],encapsulation:2,changeDetection:0})}}return t})();var ks=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=Be({type:t})}static{this.\u0275inj=Pe({providers:[fe,Fe,ke],imports:[Ce,j,ve,ue,Le,D]})}}return t})();var Vn={id:"",layout:"grid",title:$localize`Account settings`,categories:[{item:{type:"title",id:"location",title:$localize`General`,icon:"ww-account-settings-general"},items:[{type:"link",description:$localize`Edit your general business information and URL short name.`,page:{id:"business-info",title:$localize`Business information`,component:xe(()=>{let t=c(V),s=c(Ei);return{joi:{formGroup:new X(q(v({},Es({displayName:[""],shortName:["",te.required],businessType:[void 0,te.required]})),{styling:new X({iconUrl:new y,logoUrl:new y})})),labels:{displayName:$localize`Display name`,shortName:$localize`Business short name`,businessType:$localize`Business type`,styling:$localize`Styling`},sublabels:{displayName:$localize`Display a different business name on your public pages.`,shortName:$localize`Your business name as used in URLs.`,businessType:$localize`Select the category that best describes your business.`},components:{businessType:C(pl)},componentModifiers:{shortName:e=>C(e,{prefixComponent:Ne({content:"waitwhile.com/accounts/",$element:{classList:["ww-account-settings-business-info-prefix"],color:"darkerGrey"}})})},children:{styling:{labels:{iconUrl:$localize`Favicon`,logoUrl:$localize`Account Logo`},sublabels:{iconUrl:$localize`Upload a custom favicon to personalize the browser tab icon for your business.`,logoUrl:$localize`Upload a logo for your business. This can be displayed on your public pages.`},components:{logoUrl:C(on,{uploader:e=>W(null,null,function*(){let i=yield E(t.getAccount(["id"]));return s.payload.next({accountId:i.id,fileType:"public-logo",dataUrl:e}),(yield E(s.response$))?.url})}),iconUrl:C(on,{uploader:e=>W(null,null,function*(){let i=yield E(t.getAccount(["id"]));return s.payload.next({accountId:i.id,fileType:"icon",dataUrl:e}),(yield E(s.response$))?.url})})}}}}}})}},{type:"link",description:$localize`Manage your subscription plan, billing details, message credit and invoices.`,enabledConfig:Rt,page:{id:"billing",title:$localize`Plan & Billing`,component:C(Lo),categories:[{items:[{type:"link",description:$localize`Automatically refill SMS credit before it runs out.`,enabledConfig:Ql,page:{id:"auto-refill",title:$localize`SMS auto-refill`,description:$localize`Your credit reserve will be automatically refilled according to the auto-refill amount you select.`,component:xe(()=>({joi:{formGroup:new X({settings:new X({paidMessageCreditIncrementActive:new y(!1),paidMessageCreditIncrement:new y(null,[te.required])})}),children:{settings:{labels:{paidMessageCreditIncrementActive:$localize`Auto-refill`,paidMessageCreditIncrement:$localize`Auto-refill amount`},sublabels:{paidMessageCreditIncrementActive:$localize`Refill your SMS credit automatically before it runs out.`,paidMessageCreditIncrement:$localize`Refill SMS credits with this amount when you have less than $2 left.`},placeholders:{paidMessageCreditIncrement:$localize`e.g. 10`},components:{paidMessageCreditIncrementActive:C(Ai)},componentModifiers:{paidMessageCreditIncrement:t=>C(t,{prefixComponent:"$"})}}}},transformer:{toView:t=>({settings:{paidMessageCreditIncrementActive:!!t.settings?.paidMessageCreditIncrementActive,paidMessageCreditIncrement:t.settings?.paidMessageCreditIncrement??null,paidMessageCreditIncrementThreshold:t.settings?.paidMessageCreditIncrementThreshold??2}}),toPayload:t=>({settings:{paidMessageCreditIncrementActive:!!t.settings.paidMessageCreditIncrementActive,paidMessageCreditIncrement:t.settings.paidMessageCreditIncrement??void 0}})}}))}},{type:"link",description:$localize`Update your payment information.`,page:{
29id:"payment-card",title:$localize`Payment information`,component:()=>[C(ae,{$rx:{content:c(V).getAccount(["stripeLast4"]).pipe(u(({stripeLast4:t})=>t?$localize`You are paying with credit card **** **** **** ${t}`:$localize`You have not added a credit card yet`))}}),C(gs)]},enabledConfig:$o(q(v({},Mt),{isSessionSupported:({account:t})=>t&&t.planSegment!=="DEMO"&&t.planSegment!=="ENTERPRISE"}))},{type:"link",description:$localize`View your invoice history.`,enabledConfig:Rt,page:{id:"invoices",title:$localize`Invoices`,component:C(Li)}},{type:"link",description:$localize`Edit billing email and address.`,enabledConfig:Rt,page:{id:"details",title:$localize`Billing details`,component:C(ds)}},{type:"button",id:"end-subscription",title:$localize`End subscription`,description:$localize`Ending your subscription will stop future billing and access to features on paid plans.`,api:()=>{c(Oe).openCancelPlanModal()},enabledConfig:$o({permissions:["accounts.update","plan.show","plan.update"],isSessionSupported:({account:t})=>t&&["STARTER","BUSINESS","EVENT"].includes(t.planSegment)&&!t.cancelAtPeriodEnd,rx:t=>t.get(hi).withBilling$})},{type:"link",description:$localize`Deleting your account will permanently erase all your data and content.`,enabledConfig:{permissions:["accounts.delete"],rx:t=>t.get(V).account$.pipe(u(s=>s&&s.planSegment!=="ENTERPRISE"&&s.planSegment!=="DEMO"))},page:{id:"delete-account",title:$localize`Delete Waitwhile account`,component:C(Oo)}}]}]}},{type:"link",description:$localize`Create roles for your users to manage access and permissions.`,page:{id:"permissions",title:$localize`Roles & Permissions`,component:C(xo)}},{type:"link",description:$localize`Automatically shorten links in your messages.`,page:{id:"link-shortening",title:$localize`Link shortening`,description:$localize`Automatically shorten URLs in your messages to reduce SMS length, improve readability, and lower your messaging costs.`,component:xe(()=>({joi:{formGroup:new X({settings:new X({linkShortening:new y("NONE")})}),children:{settings:{labels:{linkShortening:$localize`Apply link shortening to`},sublabels:{linkShortening:$localize`Specify which links in your messages to be shortened.`},components:{linkShortening:C(rn,{data:["ALL","INTERNAL","NONE"],pluckLabel:t=>t==="ALL"?$localize`All links`:t==="INTERNAL"?$localize`Waitwhile links only`:$localize`None`})}}}},transformer:{toView:t=>t.settings?.enableLinkShortening?t.settings.shortenedLinkMethod==="ALL"?{settings:{linkShortening:"ALL"}}:{settings:{linkShortening:"INTERNAL"}}:{settings:{linkShortening:"NONE"}},toPayload:t=>t.settings.linkShortening==="ALL"?{settings:{enableLinkShortening:!0,shortenedLinkMethod:"ALL"}}:t.settings.linkShortening==="INTERNAL"?{settings:{enableLinkShortening:!0,shortenedLinkMethod:"INTERNAL"}}:{settings:{enableLinkShortening:!1}}}}))}},{type:"link",description:$localize`Set default display settings for this account.`,enabledConfig:{permissions:["accounts.update","assets.update"]},page:{id:"display-settings",title:$localize`Display settings`,tabs:[{id:"calendar",title:$localize`Calendar`,component:C(_l,{assetScope:"account",hideProperties:!0})},{id:"visits",title:$localize`Visits`,component:C(ul,{assetScope:"account",hideProperties:!0})}]}},{type:"link",description:$localize`Suggest improvements to the localization of this application.`,enabledConfig:{permissions:["accounts.update"],rx:t=>
29t.get(V).hasAccountFeature("enableLocalizationContribution")},page:{id:"staff-localization",title:$localize`Staff localization`,description:$localize`This page can update all translations seen by staff members. Download the resulting translation file and share it your Waitwhile account manager.`,component:C(bs)}}]},{item:{type:"title",title:$localize`Customer journey`,id:"customer-journey",icon:"ww-account-settings-customer-journey"},items:[{type:"link",description:$localize`Let customers begin registration by selecting a location.`,enabledConfig:{accountFeatures:["enableLocationDirectory"],permissions:["accounts.update"]},page:{id:"location-directory",title:$localize`Location directory`,component:()=>{let t=c(K),s=c(un);return[C(_o,{label:$localize`URL`,$rx:{value:s.allLocationsUrl$,qrCodeValue:s.allLocationsQrUrl$}}),C(_r,{label:$localize`${mt} configuration`,sublabel:st([$localize`Learn how ${mt} can be used and configured for the Location directory. `,{type:"router-link",content:$localize`Learn more about ${mt} here.`,link:"/account/settings/app-clips"}]),buttons:[{key:"qr",icon:"ww-qr",label:bl,sublabel:Rl,action:()=>{t.open(C(mo,{options:{isLocationDirectory:!0,isNfc:!1}}),{size:"medium"})}},{key:"nfc",icon:"ww-nfc",label:$l,sublabel:Ml,action:()=>{t.open(C(mo,{options:{isLocationDirectory:!0,isNfc:!0}}),{size:"medium"})}}]}),xe(()=>{let e=c(V),i=c(ft);return{joi:{formGroup:new X({styling:new X({isEnabled:new y,publicAccountSignupShowServices:new y,showAccountLogo:new y,showTitle:new y,showSubtitle:new y,showMap:new y,googleMapTheme:new y,showSearchBar:new y,expandLocationCards:new y,showRegistrationButton:new y,showLocationLogo:new y,showAddress:new y,showOpenStatus:new y,showHours:new y,showPhone:new y,showGeoFencing:new y,showStatusIndicator:new y,liveDataDisplay:new y})}),children:{styling:{labels:{isEnabled:$localize`Enabled`,publicAccountSignupShowServices:$localize`Pick service before location`,showMap:"",googleMapTheme:"",publicAccountSignupHeader:$localize`Page header markdown`,showAccountLogo:$localize`Show account logo`,showTitle:$localize`Show page title`,showSubtitle:$localize`Show page subtitle`,showSearchBar:"",showLocationLogo:$localize`Show logo`,showOpenStatus:$localize`Show open/closed`,showHours:$localize`Show open hours`,showAddress:$localize`Show address`,showGeoFencing:$localize`Show geofence`,showPhone:$localize`Show phone number`,liveDataDisplay:$localize`Status indicator`,showRegistrationButton:$localize`Location action`,showStatusIndicator:$localize`Show status indicator`,expandLocationCards:$localize`Location cards`},sublabels:{publicAccountSignupShowServices:$localize`Require customer to pick a service before showing locations.`,showAccountLogo:st([$localize`Edit the account logo under `,{type:"router-link",content:$localize`Account settings > Business information`,link:"/account/settings/business-info"}]),showTitle:st([$localize`Edit the page title under `,{type:"router-link",content:$localize`Account settings > Customer Journey > Localization > Customer journey terms`,link:"/account/settings/localization/registration",queryParams:{tab:"location-directory"}}]),showSubtitle:st([$localize`Edit the page subtitle under `,{type:"router-link",content:$localize`Account settings > Customer Journey > Localization > Customer journey terms`,link:"/account/settings/localization/registration",queryParams:{tab:"location-directory"}}])},infos:{showMap:$localize`The map will replace any background image if using the Left or Right layout option. The map will be shown inline if using the Center layout.`,showSearchBar:$localize`Allow guests to search for locations by address.`},groups:{enabledGroup:{children:["isEnabled"],label:$localize`Enable location directory`},mapGroup:{label:$localize`Map`,sublabel:$localize`Display a location map.`,children:["showMap","googleMapTheme"]},pageContent:{children:["showAccountLogo","showTitle","showSubtitle"],label:$localize`Page content`},searchBarGroup:{children:["showSearchBar"],label:$localize`Address search`,sublabel:$localize`Allow guests to search for locations by address.`},locationItemSettings:{children:["showLocationLogo","showOpenStatus","showH
29ours","showAddress","showGeoFencing","showPhone","showStatusIndicator","liveDataDisplay"],label:"Location details"}},components:{showAccountLogo:C(pe),showTitle:C(pe),showSubtitle:C(pe),expandLocationCards:C(Ai,{pluckLabel:n=>n?$localize`Location cards are expanded`:$localize`Location cards are collapsed, but can be expanded`,pluckSublabel:n=>n?$localize`All location details will be displayed.`:$localize`Location cards can be expanded to view additional location details, such as open hours and contact details.`}),showSearchBar:i.displayAccountFeatureLabel(C(pe,{label:$localize`Show address search bar`}),["enableAdvancedLocationDirectory"]),showMap:i.displayAccountFeatureLabel(C(pe,{label:$localize`Show map`}),["enableAdvancedLocationDirectory"]),publicAccountSignupShowServices:C(Ai,{data:[!1,!0],pluckLabel:n=>n?$localize`Select service first`:$localize`Select location first`}),googleMapTheme:C(Zn,{withPadding:!1,data:Ge()([Ti.LIGHT,Ti.DARK,Ti.LIGHT_MONOCHROME,Ti.DARK_MONOCHROME]),pluckLabel:n=>C(Jn,{icon:Cl[n],$element:{classList:["block","w-20","h-20"]}}),pluckHint:n=>gl[n]}),isEnabled:C(pe),showStatusIndicator:C(pe),liveDataDisplay:C(Ie),showGeoFencing:C(pe),showHours:C(pe),showLocationLogo:C(pe),showPhone:C(pe),showRegistrationButton:C(Ai,{pluckLabel:n=>n?$localize`Proceed by clicking on a button`:$localize`Proceed by clicking on location item`,pluckInfo:n=>n?st([$localize`The button label depends on registration types available for each location. Label for locations with only waitlist is "Join waitlist", only booking is "Shedule a booking", and both waitlist and booking is "Register now". These can be changed under `,{type:"router-link",content:$localize`Account settings > Localization`,link:"/account/settings/localization/registration",queryParams:{tab:"welcome-page"}},"."]):null,pluckSublabel:n=>n?$localize`A button for selecting the location will be placed within the card.`:$localize`The whole location card will be clickable and take the guest to the next step.`}),showOpenStatus:C(pe),showAddress:C(pe)},componentModifiers:{showAccountLogo:(n,o)=>C(pe,{$rx:{suffixComponent:R([o,e.getAccount(["styling"])]).pipe(u(([_,h])=>{let I=_.styling?.showAccountLogo===!0,G=!!h?.styling?.logoUrl;return!I||G?null:wl([$localize`There is no account logo on this account.`])}))}}),liveDataDisplay:()=>C(Ie,{data:Ge()(["EST-WAIT","WAITING","SERVING"]),pluckLabel:n=>Va[n]})},dependencies:n=>({liveDataDisplay:n.pipe(u(o=>({hidden:o.styling.showStatusIndicator!==!0}
29))),showSearchBar:e.hasAccountFeature("enableAdvancedLocationDirectory").pipe(u(o=>({disabled:!o}))),showMap:e.hasAccountFeature("enableAdvancedLocationDirectory").pipe(u(o=>({disabled:!o}))),googleMapTheme:R([n.pipe(u(o=>o.styling.showMap)),e.hasAccountFeature("enableAdvancedLocationDirectory")]).pipe(u(([o,_])=>({disabled:!_||!o})))})}}},transformer:{toView:n=>{let o=e.nullableAccount?.features.enableAdvancedLocationDirectory??!1;return{styling:{isEnabled:n.styling?.locationDirectory?.isEnabled,publicAccountSignupShowServices:n.styling?.publicAccountSignupShowServices,showAccountLogo:n.styling?.locationDirectory?.showAccountLogo,showTitle:n.styling?.locationDirectory?.showTitle,showSubtitle:n.styling?.locationDirectory?.showSubtitle,showMap:o&&!!n.styling?.locationDirectory?.showMap,googleMapTheme:o?n.styling?.googleMapTheme:void 0,showSearchBar:o?!!n.styling?.locationDirectory?.showSearchBar:!1,expandLocationCards:!!n.styling?.locationDirectory?.item?.expandLocationCards,showRegistrationButton:n.styling?.locationDirectory?.item?.showRegistrationButton,showLocationLogo:n.styling?.locationDirectory?.item?.showLocationLogo,showAddress:n.styling?.locationDirectory?.item?.showAddress,showOpenStatus:n.styling?.locationDirectory?.item?.showOpenStatus,showHours:n.styling?.locationDirectory?.item?.showHours,showPhone:n.styling?.locationDirectory?.item?.showPhone,showGeoFencing:n.styling?.locationDirectory?.item?.showGeoFencing,showStatusIndicator:n.styling?.locationDirectory?.item?.liveDataDisplay!==null,liveDataDisplay:n.styling?.locationDirectory?.item?.liveDataDisplay}}},toPayload:n=>({styling:{publicAccountSignupShowServices:n.styling.publicAccountSignupShowServices,googleMapTheme:n.styling.googleMapTheme??void 0,locationDirectory:{isEnabled:n.styling.isEnabled,showMap:n.styling.showMap,showTitle:n.styling.showTitle,showSubtitle:n.styling.showSubtitle,showSearchBar:n.styling.showSearchBar,showAccountLogo:n.styling.showAccountLogo,item:{showAddress:n.styling.showAddress,showRegistrationButton:n.styling.showRegistrationButton,showGeoFencing:n.styling.showGeoFencing,liveDataDisplay:n.styling.showStatusIndicator?n.styling.liveDataDisplay:null,showHours:n.styling.showHours,showPhone:n.styling.showPhone,showLocationLogo:n.styling.showLocationLogo,showOpenStatus:n.styling.showOpenStatus,expandLocationCards:n.styling.expandLocationCards}}}})}}})]}}},{type:"link",description:$localize`Waitlist overview for the account.`,page:{id:"waitlist",title:$localize`Waitlist overview`,component:()=>[C(ae,{content:Ot({$element:{classList:["!inline"]},components:[$localize`You can specify if your location should be included in the Waitlist overview from `,C(we,{content:$localize`Location settings > Waitlist > Waitlist display`,href:"/settings/waitlist/display",inline:!0,type:"internal-in-same-tab",$element:{color:"blue2"}}),"."]})}),C(_o,{label:$localize`URL`,sublabel:$localize`The public URL where customers can view all waitlists across all public locations.`,$rx:{value:c(un).waitlistOverviewAccountUrl$}}),C(dl,{label:$localize`Embed widget`,sublabel:$localize`Copy this code snippet to your HTML page to display an iframe with the Waitlist overview.`,copyMessage:$localize`Embed widget copied!`,$rx:{value:c(un).waitlistOverviewAccountUrl$.pipe(u(t=>`<iframe src="${t}?registration=waitlist" allowtransparency="true" frameborder="0" scrolling="no" width="100%" height="900px"></iframe>`))}}),xe(()=>({joi:{formGroup:new X({styling:new X({publicAccountWaitlistsHeader:new y})}),children:{styling:{labels:{publicAccountWaitlistsHeader:$localize`Page header`},sublabels:{publicAccountWaitlistsHeader:$localize`Customize the content of your Waitlist overview header.`},components:{publicAccountWaitlistsHeader:C(fi)}}}}}))]}},{type:"link",description:$localize`Override the default designs with your own CSS stylesheet. Advanced feature.`,enabledConfig:{permissions:["accounts.update"],rx:t=>
29t.get(V).hasAccountFeature("enableCustomStyle")},page:{id:"custom-css",title:$localize`Custom stylesheets`,component:C(ys)}},{type:"link",description:$localize`Customize buttons, fonts, backgrounds and more. This will be applied to the Location directory and Waitlist overview.`,enabledConfig:{permissions:["accounts.update"]},page:{id:"custom-design",title:$localize`Custom design`,tabs:[{id:"theming",title:$localize`Theming`,component:xe(()=>{let t=c(V),s=c(_n),e=c(Ei);return{joi:{formGroup:new X({styling:new X(q(v({},Qe()({theme:[]})),{publicTheme:new X(v({},Qe()({layout:[],bgColor:[],bgImageUrl:[],contentBgColor:[],headingFont:[],textFont:[],textColor:[],btnBorderRadius:[],btnBgColor:[],btnTextColor:[],secondaryBtnBgColor:[],secondaryBtnTextColor:[]})))}))}),children:{styling:{labels:{theme:$localize`Theme`,publicTheme:$localize``},sublabels:{theme:$localize`Choose between our default themes or create your own custom theme.`},components:{theme:C(zr)},dependencies:i=>({publicTheme:i.pipe(u(n=>({hidden:n.styling.theme!=="custom"})))}),children:{publicTheme:{labels:{layout:$localize`Layout`,bgColor:$localize`Background color`,bgImageUrl:$localize`Background image`,contentBgColor:$localize`Content card`,headingFont:$localize`Heading font`,textFont:$localize`Body font`,textColor:$localize`Text color`,btnBorderRadius:$localize`Button radius`,btnBgColor:$localize`Primary button color`,btnTextColor:$localize`Primary button text color`,secondaryBtnBgColor:$localize`Secondary button color`,secondaryBtnTextColor:$localize`Secondary button text color`},sublabels:{layout:$localize`Choose the layout for the Location directory.`,bgColor:$localize`Set the background color for the Location directory.`,bgImageUrl:$localize`Add a background image to your Location directory.`,contentBgColor:$localize`Set the color for the content card where the Locations directory and Waitlists are displayed.`,headingFont:$localize`Choose the font for the headings and titles displayed on the content card.`,textFont:$localize`Select the font used for the main body text.`,textColor:$localize`Choose the color for the text displayed on the Locations directory and Waitlist overview.`,btnBorderRadius:$localize`Set the roundness of the buttons.`,btnBgColor:$localize`Select the color for the primary action buttons.`,btnTextColor:$localize`Choose the color for the text inside the primary action buttons.`,secondaryBtnBgColor:$localize`Select the color for secondary action buttons.`,secondaryBtnTextColor:$localize`Choose the color for the text inside the secondary action buttons.`},components:{layout:C(Zn,{withPadding:!1,data:Ge()(["CENTERED","TWO_COLUMNS_CONTENT_LEFT","TWO_COLUMNS_CONTENT_RIGHT"]),pluckLabel:i=>C(Jn,{icon:Wr[i],$element:{classList:["block","w-20","h-20"]}}),pluckHint:i=>Dr[i]}),bgColor:C(St,{withCustomColorPicker:!0}),bgImageUrl:C(on,{uploader:i=>W(null,null,function*(){let n=yield E(t.getAccount(["id"]));return e.payload.next({accountId:n.id,fileType:"public-theme-backgroundimage",dataUrl:i}),(yield E(e.response$))?.url})}),contentBgColor:C(St,{withCustomColorPicker:!0}),headingFont:C(Ie,{data:ro.flatMap(i=>i.fonts),groupBy:lo}),textFont:C(Ie,{data:ro.flatMap(i=>i.fonts),groupBy:lo}),textColor:C(St,{withCustomColorPicker:!0}),btnBorderRadius:C(kr),btnBgColor:C(St,{withCustomColorPicker:!0}),btnTextColor:C(St,{withCustomColorPicker:!0}),secondaryBtnBgColor:C(St,{withCustomColorPicker:!0}),secondaryBtnTextColor:C(St,{withCustomColorPicker:!0})}}}}}},transformer:{toView:i=>({styling:{theme:i.styling?.theme,publicTheme:{layout:i.styling?.publicTheme?.layout??null,bgColor:i.styling?.publicTheme?.bgColor??rt.backgroundColor,bgImageUrl:i.styling?.publicTheme?.bgImageUrl??null,contentBgColor:i.styling?.publicTheme?.contentBgColor??rt.contentBgColor,headingFont:so(i.styling?.publicTheme?.headingFont??rt.headingFont),textFont:so(i.styling?.publicTheme?.textFont??rt.textFont),textColor:i.styling?.publicTheme?.textColor??rt.textColor,btnBorderRadius:i.styling?.publicTheme?.btnBorderRadius,btnBgColor:i.styling?.publicTheme?.btnBgColor??rt.btnBgColor,btnTextColor:i.styling?.publicTheme?.btnTextColor??rt.btnTextColor,secondaryBtnBgColor:i.styling?.publicTheme?.secondaryBtnBgColor??rt.secondaryBtnBgColor,secondaryBtnTextColor:i.styling?.publicTheme?.secondaryBtnTextColor??rt.secondaryBtnTextColor}}}),toPayload:i=>({styling:{theme:i.styling.theme,publicTheme:i.styling.theme!=="custom"?null:{layout:i.styling.publicTheme.layout,bgColor:i.styling.publicTheme.bgColor,bgImageUrl:i.styling.publicTheme.bgImageUrl,contentBgColor:i.styling.publicTheme.contentBgColor,headingFont:co(i.styling.publicTheme.headingFont),textFont:co(i.styling.publicTheme.textFont),textColor:i.styling.publicTheme.textColor,btnBorderRadius:i.styling.publicTheme.btnBorderRadius,btnBgColor:i.styling.publicTheme.btnBgColor,btnTextColor:i.styling.publicTheme.btnTextColor,secondaryBtnBgColor:i.styling.publicTheme.secondaryBtnBgColor,secondaryBtnTextColor:i.styling.publicTheme.secondaryBtnTextColor}}})},updateSideEffect:(i,n)=>{let o=n.styling?.publicTheme?.bgImageUrl;!i.styling.publicTheme?.bgImageUrl&&o&&o.length>0&&s.payload.next({accountId:n.id,fileType:"public-theme-backgroundimage"})}}})},{id:"content",title:$localize`Content`,categories:[{items:[{type:"link",description:$localize`Customize the all waitlists display using markdown, HTML and CSS.`,page:{
29id:"all-waitlists",title:$localize`All waitlists page`,component:xe(()=>({joi:{formGroup:new X({styling:new X({publicAccountWaitlistsHeader:new y})}),children:{styling:{labels:{publicAccountWaitlistsHeader:$localize`Page header`},sublabels:{publicAccountWaitlistsHeader:$localize`Customize the content of your Waitlist overview header.`},components:{publicAccountWaitlistsHeader:C(fi)}}}}}))},suffix:()=>[bi(["styling"],t=>{let s=t.styling?.publicAccountWaitlistsHeader;return s&&s.length>0?$localize`Customized`:$localize`Default`},{})]},{type:"link",description:$localize`Customize the location directory using markdown, HTML and CSS.`,page:{id:"location-directory",title:$localize`Location directory`,component:xe(()=>({joi:{formGroup:new X({locationDirectoryHeader:new y,locationDirectoryItem:new y}),labels:{locationDirectoryHeader:$localize`Location directory header`,locationDirectoryItem:$localize`Location directory item`},sublabels:{locationDirectoryHeader:$localize`Customize the content of the header. This is added below any current page titles.`,locationDirectoryItem:$localize`Customize the content of location items using markdown. This content can be overridden by markdown added from individual locations.`},placeholders:{locationDirectoryHeader:$localize`Style with markdown`,locationDirectoryItem:$localize`Style with markdown`},components:{locationDirectoryHeader:C(eo),locationDirectoryItem:C(eo)}},transformer:{toView:t=>({locationDirectoryHeader:t.styling?.publicAccountSignupHeader,locationDirectoryItem:t.styling?.locationDirectory?.item.customContent}),toPayload:t=>({styling:{publicAccountSignupHeader:t.locationDirectoryHeader,locationDirectory:{item:{customContent:t.locationDirectoryItem}}}})}}))},suffix:()=>[bi(["styling"],t=>{let s=t.styling?.publicAccountSignupHeader,e=t.styling?.locationDirectory?.item?.customContent;return s&&s.length>0||e&&e.length>0?$localize`Customized`:$localize`Default`},{})]}]}]}]}},{type:"link",description:$localize`Customize your company ${mt} card design.`,enabledConfig:{accountFeatures:["enableAppClips"],permissions:["accounts.update"]},page:{id:"app-clips",title:mt,description:$localize`Customize your company ${mt} card design.`,component:C(Ol),keywords:["NFC",mt]}},{type:"link",description:$localize`Manage localization for this account.`,enabledConfig:{permissions:["accounts.update"]},page:{id:"localization",title:$localize`Localization`,categories:[{items:[{type:"link",description:$localize`Select the languages available for your customers.`,enabledConfig:{permissions:["accounts.update"]},page:{id:"languages",title:$localize`Public languages`,component:xe(()=>({joi:{formGroup:new X({settings:new X({publicLocales:new y([],{nonNullable:!0,validators:te.required}),defaultLocale:new y(null,{validators:te.required})})}),children:{settings:{labels:{publicLocales:$localize`Languages`,defaultLocale:$localize`Default language`},sublabels:{publicLocales:$localize`Select the languages available for your customers.`,defaultLocale:$localize`Select the default language used when customers have not selected a language, or when there are no translations available for their selected language.`},components:{publicLocales:C(ml),defaultLocale:C(Ie,{selection:"radio"})},componentModifiers:{defaultLocale:(t,s)=>C(t,{pluckLabel:Hi,pluckTrigger:Hi,$rx:{data:s.pipe(u(e=>e.settings.publicLocales))}})},dependencies:t=>({defaultLocale:t.pipe(u(s=>({hidden:s.settings.publicLocales.length<=1})))})}}},transformer:{toView:t=>({settings:{publicLocales:t.settings?.publicLocales??[],defaultLocale:t.settings?.publicLocales?.[0]??null}}),toPayload:t=>({settings:{publicLocales:t.settings.publicLocales.sort((s,e)=>s===t.settings.defaultLocale?-1:e===t.settings.defaultLocale?1:0)}})}}))},suffix:()=>[bi(["settings"],({settings:t})=>{let s=t?.publicLocales||[],e=s?.length??0;if(e===0)return!1;let i=s.map(Hi).slice(0,2),n=e-i.length;return`${i.join(", ")}${n>0?` +${n}`:""}`})]},{type:"link",description:$localize`Customize and translate your customer journey terms.`,page:{id:"registration",title:$localize`Customer journey terms`,component:C(Tl)}}]}]}}]},{item:{type:"title",id:"operations",title:$localize`Operations`,icon:"ww-account-settings-operations"},items:[{type:"link",description:$localize`Create and manage new and existing resources across all your locations.`,enabledConfig:_i,page:{id:"resources",t
29itle:$localize`Resources`,component:C(Fl)}},{type:"link",description:$localize`Create and manage new and existing services across all your locations.`,enabledConfig:mi,page:{id:"services",title:$localize`Services`,component:C(Wl)}},{type:"link",description:$localize`View each locationsâ estimation models and their performance.`,page:{id:"wait-time-estimation",title:$localize`Wait time estimation`,component:C(Gs)}}]},{item:{type:"title",id:"integrations",title:$localize`Integrations`,icon:"ww-account-settings-integrations"},items:[{type:"link",description:$localize`Integrate waitlisting and scheduling into your app or platform with our flexible API.`,enabledConfig:ql,page:{id:"api",title:$localize`API`,component:C(ho)}},{type:"link",enabledConfig:Ni,description:$localize`Send Waitwhile events straight to your server through our URL endpoints.`,page:{id:"webhooks",title:$localize`Webhooks`,component:C(Xo)}},{type:"link",description:$localize`Automatically synchronize resources' Waitwhile bookings and events in their external calendars.`,enabledConfig:{accountFeatures:["enableExternalCalendarSync"],permissions:["accounts.update"]},page:{id:"calendar",title:$localize`Calendar`,categories:[{items:[{type:"link",description:$localize`Automatically synchronize resources' Waitwhile bookings and their Outlook calendar events.`,icon:"ww-logo-outlook",suffix:()=>bi(["settings"],t=>t.settings?.externalCalendars?.OUTLOOK?.enabled?$localize`On`:$localize`Off`),page:{title:$localize`Outlook calendar`,description:()=>st([$localize`The Outlook calendar integration allows users linked to resources to connect their Outlook calendar to Waitwhile. Once connected, their Waitwhile bookings will be exported to their Outlook calendar, and/or their Outlook events will be imported to Waitwhile.`,$localize` Please ensure that your IT admin has whitelisted Waitwhile within Outlook to allow setting up the connection.`,$localize` Configure whether to import or export events in `,{type:"router-link",content:$localize`Location settings > Integrations > Outlook calendar`,link:"/settings/integrations/outlook-calendar"},"."]),id:"outlook-calendar",component:()=>[xe(()=>({joi:{formGroup:new X({settings:new X({externalCalendars:new X({OUTLOOK:new X({enabled:new y,allowedDomains:new y([],{validators:[Ke.every(Ke.domain),te.required],nonNullable:!0})})})})}),children:{settings:{children:{externalCalendars:{children:{OUTLOOK:{labels:{enabled:$localize`Enable calendar integration`,allowedDomains:$localize`Domain whitelisting`},placeholders:{allowedDomains:$localize`e.g. example.com`},sublabels:{allowedDomains:$localize`New calendar connections are only allowed to external calendars if the external email's domain is in this list.`},groups:{enabled:{label:$localize`Outlook calendar`,sublabel:$localize`Enabling this will allow you to configure the integration at the location level.`,children:["enabled"]}},components:{allowedDomains:C(Zi,{separatorKeyCodes:[188,13,32]})}}}}}}}},confirmation:(t,s)=>!s.settings?.externalCalendars?.OUTLOOK?.enabled||t.settings?.externalCalendars?.OUTLOOK?.enabled?null:{title:$localize`Disable integration`,message:[$localize`Disabling the integration will prevent any future updates to Waitwhile bookings or Outlook events from synchronizing, but it will not remove existing connections or exported visits.`,$localize`You can fully remove existing calendar connections in resource settings.`],confirmLabel:$localize`Disable`,cancelLabel:$localize`Cancel`,confirmColor:"warning"}}))]}}]}]}}]},{item:{type:"title",id:"location",title:$localize`Security`,icon:"ww-account-settings-security"},items:[{type:"link",description:$localize`Set how long the logged in session will live before being automatically logged out if no activity is performed.`,page:{id:"inactivity-log-out",title:$localize`Inactivity log out`,description:$localize`Set how long the logged in session will live before being automatically logged out if no activity is performed.`,component:xe(()=>({joi:{formGroup:new X({settings:new X({appSessionInactivityTimeout:new y})}),children:{settings:{labels:{appSessionInactivityTimeout:$localize`Log out timer`},sublabels:{appSessionInactivityTimeout:$localize`Set how long the logged in session will live before being automatically logged out if no activity is performed.`},components:{appSessionInactivityTimeout:C(Ie,{selection:"single",data:xs,pluckLabel:t=>Ps[t]})}}}}}))}},{type:"link",description:$localize`Enable SSO (SAML 2.0 and OIDC) authentication so you can use your organization's standard login to access Waitwhile.`,enabledConfig:{someAccountFeatures:["enableSamlSso","enableOidcSso"],permissions:["accounts.update"]},page:{id:"single-sign-on",title:$localize`Single sign-on`,keywords:["saml","oidc","sso"],description:$localize`Security Assertion Markup Language (SAML) and OpenID Connect (OIDC) are security standards for logging into applications. Single sign-on (SSO) gives users access to Waitwhile through an i
29dentity provider (IDP) of your choice.`,component:C(Go)}},{type:"link",description:$localize`Anonymize your customer data on the Waitwhile servers.`,enabledConfig:{accountFeatures:["enableAnonymizeData"],permissions:["accounts.update"]},page:{id:"anonymize-customer-history",title:$localize`Customer data controls`,component:xe(()=>({joi:{formGroup:new X({settings:new X({customerDataMaxAgeDays:new y({value:null,disabled:!0}),isAnonymizationActive:new y(null),anonymizationMethod:new y(null,[te.required]),anonymizationAge:new y(null,[te.required])})}),children:{settings:{labels:{customerDataMaxAgeDays:$localize`Data retention period *`,isAnonymizationActive:$localize`Anonymization`,anonymizationMethod:$localize`Anonymization method`,anonymizationAge:$localize`Time until data becomes anonymized`},sublabels:{customerDataMaxAgeDays:$localize`The time period before customer data is automatically deleted`,isAnonymizationActive:$localize`Anonymize customer data.`,anonymizationMethod:$localize`Choose the method for anonymizing customer data.`,anonymizationAge:$localize`Set the time period before customer data is automatically anonymized.`},placeholders:{anonymizationAge:$localize`e.g. 1`},projection:{customerDataMaxAgeDays:{above:st([{type:"label",content:$localize`Data retention`},{type:"text",content:$localize`Control how long Waitwhile holds on to your customer data. Your analytics and aggregated data are retained forever, but individual customer records are deleted after this period to ensure data compliance.`}])},isAnonymizationActive:{above:st([{type:"label",content:$localize`Data anonymization`},{type:"text",content:$localize`Waitwhile supports anonymizing your customer data by removing all PII (Personally Identifiable Information). This includes names, phone numbers, email addresses, and any data entered into sensitive input fields. Anonymization runs automatically each day and applies to customers whose visits have been completed or removed. You can choose whether customer data should be deleted or masked.`}])}},components:{customerDataMaxAgeDays:C(wi,{readonly:!0,suffixComponent:C(Ss)}),isAnonymizationActive:C(pe),anonymizationMethod:C(Ie,{data:Ms,pluckLabel:t=>Uo[t]}),anonymizationAge:C(wi)}}}},transformer:{toView:t=>({settings:{customerDataMaxAgeDays:t?.features?.customerDataMaxAgeDays??null,isAnonymizationActive:t?.settings?.isAnonymizationActive??null,anonymizationMethod:t?.settings?.anonymizationMethod??null,anonymizationAge:t?.settings?.anonymizationAge??null}}),toPayload:t=>({settings:{isAnonymizationActive:t.settings.isAnonymizationActive??void 0,anonymizationMethod:t.settings.anonymizationMethod??void 0,anonymizationAge:t.settings.anonymizationAge??void 0}})}}))}},{type:"link",description:$localize`Restrict so that only devices on your IP range are allowed to access your Waitwhile account.`,enabledConfig:{permissions:["accounts.update"],accountFeatures:["enableIpWhitelist"]},page:{id:"ip-safelist",title:$localize`IP safelist`,component:C(vo)}}]}]};var zs=El(Vn,"account/settings",t=>Xe(t,{trackPendingChanges:!0})),Xn=[Xe({path:"billing/change-plan",component:ms,enabledConfig:Mt,searchTarget:{segments:["Account settings","Billing","Change plan"],type:"page"}},{enabledConfig:Mt}),Xe({path:"billing/manage-plan",component:Cs,enabledConfig:Mt,searchTarget:{segments:["Account settings","Billing","Manage plan"],type:"page"}},{enabledConfig:Mt}),Xe({path:"billing/invoices",component:Li,enabledConfig:Rt,searchTarget:{segments:["Account settings","Billing","Invoices"],type:"page"}},{enabledConfig:Rt}),Xe({path:"permissions/edit",component:Fo,enabledConfig:So,searchTarget:{segments:["Account settings","Permissions","Add role"],type:"create"}},{trackPendingChanges:!0,enabledConfig:So}),Xe({path:"webhooks/edit",component:ko,enabledConfig:Ni,searchTarget:{segments:["Account settings","Webhooks","Add webhook"],type:"create"}},{trackPendingChanges:!0,enabledConfig:Ni}),{path:"resource-categories",component:Bl,enabledConfig:_i,searchTarget:{segments:[$localize`Resources`,$localize`Resource categories`],type:"page"}}
29,Xe({path:"resources/edit",enabledConfig:_i,component:Co},{trackPendingChanges:!0}),Xe({path:"resources/create",component:Co,enabledConfig:_i,searchTarget:{segments:[$localize`Resources`,$localize`Create resource`],type:"create"}},{trackPendingChanges:!0}),{path:"service-categories",component:Gl,enabledConfig:mi,searchTarget:{segments:[$localize`Services`,$localize`Service categories`],type:"page"}},Xe({path:"services/edit",component:go,enabledConfig:mi},{trackPendingChanges:!0}),Xe({path:"services/create",component:go,enabledConfig:mi,searchTarget:{segments:[$localize`Services`,$localize`Create service`],type:"create"}},{trackPendingChanges:!0})];var Vs="account-settings-search-history";var Xs=(()=>{class t extends Al{constructor(){let e=c(pt);super(e),this.routes=Xn,this.page=Vn,this.localStorageKey=Vs,this.formComponent=Oi,this.injector=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=re({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function u_(t,s){if(t&1){let e=$();r(0,"div",5)(1,"div"),S(2,1),a(),r(3,"button",6),N("click",function(){O(e);let n=m(2);return b(n.accountSettingSearch.clearHistory())}),S(4,2),a()()}t&2&&p("wwTypography","caption1")("wwColor","darkerGrey")}function __(t,s){if(t&1&&(T(0,u_,5,2,"div",5),d(1,"async")),t&2){let e=m();f(g(1,1,e.hasSearchHistory$)?0:-1)}}var Ho=(()=>{class t extends B{constructor(){super(),this.changeDetectorRef=c(Di),this.eventLogger=c(Or),this.router=c(Ue),this.accountSettingSearch=c(Xs),this.formControl=new y("",{nonNullable:!0}),this.search$=Xt(this.formControl),this.open=!1,this.items$=this.search$.pipe(ie(e=>e.length===0?this.accountSettingSearch.history$:this.accountSettingSearch.search(e)),this.shareReplay()),this.hasItems$=this.items$.pipe(u(e=>e.length>0)),this.hasSearchHistory$=R([this.items$,this.search$]).pipe(u(([e,i])=>e.length>0&&i.length===0)),this.subscribe()}onSearchRemoved(e){this.eventLogger.log("account_setting_search_cancelled",{params:{search_query:e}})}onSelected(e){this.eventLogger.log("account_setting_searched",{params:{search_query:this.formControl.value}}),this.formControl.setValue("",{emitEvent:!1}),this.accountSettingSearch.addToHistory(e),this.open=!1,this.router.navigate([`/account/settings/${e.routerLink}`],{queryParams:e.queryParams})}subscribe(){this.formControl.valueChanges.pipe(H(this.ngOnDestroy$)).subscribe(()=>{this.open=!0,this.changeDetectorRef.markForCheck()})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-settings-search"]],hostAttrs:[1,"ww-account-settings-search"],standalone:!1,features:[L],decls:5,vars:9,consts:()=>{let e;e=$localize`Search history`;let i;return i=$localize` Clear `,[["headerTmpl",""],e,i,[3,"focusin","shouldClose","selected","wwFormFieldSize","open","data","headerComponent","pluckLabel"],[3,"searchRemoved","formControl","size"],[1,"flex","justify-between","p-4","pb-1",3,"wwTypography","wwColor"],["wwButton","link",3,"click"]]},template:function(i,n){if(i&1&&(r(0,"ww-autocomplete",3),d(1,"async"),N("focusin",function(){return n.open=!0})("shouldClose",function(){return n.open=!1})("selected",function(_){return n.onSelected(_)}),r(2,"ww-search-input",4),N("searchRemoved",function(_){return n.onSearchRemoved(_)}),a()(),U(3,__,2,3,"ng-template",null,0,me)),i&2){let o=_e(4);p("wwFormFieldSize","full")("open",n.open&&g(1,7,n.hasItems$))("data",n.items$)("headerComponent",o)("pluckLabel",n.accountSettingSearch.pluckLabel),l(2),p("formControl",n.formControl)("size","full")}},dependencies:[se,ce,Gr,qa,z,We,dt,gt,M],encapsulation:2,changeDetection:0})}}return t})();function d_(t,s){t&1&&w(0,"ww-account-settings-search")}var Hs=(()=>{class t extends B{constructor(){super(),this.dialog=c(K),this.injector=c(pt),this.layout=c(Z),this.router=c(Ue),this.isHome$=this.router.events.pipe(Qo(e=>e instanceof ga),je(this.router),u(()=>this.router.url),u(e=>e.split("/").pop()==="settings")),this.subscribe(),this.dialog.setInjector(this.injector),this.layout.enableRestoreScrollPosition(this.ngOnDestroy$),this.layout.setInjector(this.injector)}subscribe(){this.isHome$.pipe(H(this.ngOnDestroy$)).subscribe(e=>{e&&this.layout.setFeatureContext({name:$localize`Account settings`})})}ngOnDestroy(){this.dialog.setInjector(null),this.layout.setInjector(null)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=A({type:t,selectors:[["ww-account-settings"]],hostAttrs:[1,"ww-account-settings"],standalone:!1,features:[Wi([Pl,vl,Nl,Il,yl,Ll,xl,Ul,kl,zl,br,$r,{provide:Rn,useClass:Vl},{provide:dn,useClass:Xl},{provide:Cn,useClass:Hl},{provide:gn,useClass:jl},{provide:Mn,useClass:Kl},{provide:xn,useClass:Yl}]),L],decls:4,vars:3,consts:[["wwLayoutPadding","",1,"ww-account-settings-container"]],template:function(i,n){i&1&&(r(0,"div",0),T(1,d_,1,0,"ww-account-settings-search"),d(2,"async"),w(3,"router-outlet"),a()),i&2&&(l(),f(g(2,1,n.isHome$)?1:-1))},dependencies:[Xr,Sa,Ho,M],styles:[`.ww-account-settings{--ww-setting-column-width: 500px;--ww-setting-gap: 16px}.ww-breakpoints-above-small .ww-account-settings{--ww-setting-gap: 24px}.ww-account-settings .ww-account-settings-search{max-width:100%;width:calc(2 * var(--ww-setting-column-width) + var(--ww-setting-gap))}.ww-account-settings .ww-account-settings-container{display:flex;flex-direction:column;gap:var(--ww-setting-gap)}.ww-account-settings .ww-account-settings-container .ww-tab-bar{margin:0 calc(-1 * var(--ww-setting-gap))}.ww-account-settings .ww-form-field-prefix:has(.ww-account-settings-business-info-prefix){max-width:100%}.ww-account-settings .ww-account-settings-form .ww-setting-text,.ww-account-settings .ww-account-settings-form .ww-settings-text{width:100%;max-width:720px} 30/*noopaccount-settings.component-AO7Y3C3G.css.map */ 31`],encapsulation:2,changeDetection:0})}}return t})();var DA=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=Be({type:t})}static{this.\u0275inj=Pe({providers:[fe,Fe,ke],imports:[Ce,j,ue,Le,D,j,ve.forChild([{path:"",component:Hs,children:[...zs,...Xn]}]),as,ss,Rs,vs,ks]})}}return t})();export{AT as ACCOUNT_SETTING_FORM_OPTIONS,Hs as WwAccountSettingsComponent,Ss as WwAccountSettingsContactSupportButtonComponent,ys as WwAccountSettingsCustomCssComponent,Oi as WwAccountSettingsFormComponent,DA as WwAccountSettingsModule,Ho as WwAccountSettingsSearchComponent,fs as WwAccountSettingsToggleComponent,As as WwSettingsTextComponent,Es as accountFormControls,bi as accountText,$o as enabled,xe as form,vS as simpleStatus,Kp as status,sT as toggle}; 32//noopchunk-DZTZJ5QI.js.map
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.