PageSourceSearch

https://www.milesmasterclass.com/chunk-UCVJ7UOI.js

js milesmasterclass.com collected 2026-09-24 13:00:29 UTC 15,664 bytes, 1 lines download raw bytes

1import{a as le}from"./chunk-O3TCYVGI.js";import{a as oe}from"./chunk-G2QM4NSK.js";import"./chunk-MLQN2ZS4.js";import{a as de}from"./chunk-MJLVLRM3.js";import{a as re}from"./chunk-LY5OSVSC.js";import"./chunk-BWOWEISN.js";import{a as ie}from"./chunk-YUEUS352.js";import"./chunk-3ERT2GUT.js";import"./chunk-GC2HESGC.js";import"./chunk-DTAKAWGP.js";import"./chunk-YDHC32EP.js";import"./chunk-74PHZBHR.js";import"./chunk-STQVBZ2P.js";import"./chunk-ZA2MUFLF.js";import"./chunk-2HPQVRCC.js";import"./chunk-KWBV653U.js";import"./chunk-MYFX45JL.js";import{sa as Z,xa as ee}from"./chunk-EYSJUWD5.js";import{a as ae}from"./chunk-U6MMUUMZ.js";import"./chunk-VTJ72YT4.js";import{a as ne}from"./chunk-R6APU3SA.js";import"./chunk-DOYHICU5.js";import{a as J,b as K}from"./chunk-GAMBHOSW.js";import"./chunk-RQPHNGPS.js";import"./chunk-PWVZ3RMR.js";import"./chunk-IPKNN4YZ.js";import"./chunk-7XNWVJ7B.js";import{b as te}from"./chunk-6R6R4HQM.js";import"./chunk-NWDWORH2.js";import{c as Q,d as X}from"./chunk-YFYBZN5P.js";import{g as q,i as G}from"./chunk-GEHL6XGR.js";import"./chunk-HPKGILLZ.js";import{$b as r,Ab as k,Ac as z,Dc as o,Ec as S,Fc as f,Gc as W,Ic as j,Jc as B,K as I,Kc as U,M as A,Oc as H,Rb as F,Sc as C,Ub as u,Uc as P,Vb as _,Wc as Y,Yb as $,Zb as R,_b as v,ac as i,ad as x,bc as E,ga as y,ic as h,jd as w,kd as g,lb as l,ma as m,mc as b,na as p,oc as s,sa as L,za as T,zc as O}from"./chunk-ZHQDZIZV.js";import"./chunk-HT2G6UXV.js";import{a as M,b as D}from"./chunk-QJI7QS7F.js";var ue=(n,t)=>t.id;function _e(n,t){n&1&&(r(0,"div",1),E(1,"app-spinner",3),i())}function xe(n,t){n&1&&(r(0,"th",7),o(1,"Sub-company"),i())}function fe(n,t){n&1&&(r(0,"th",9),o(1,"Send to email"),i())}function be(n,t){if(n&1&&(r(0,"td",19),o(1),i()),n&2){let e=s().$implicit;l(),f(" ",e.firm?.name??"\u2014"," ")}}function ge(n,t){if(n&1){let e=h();r(0,"span",25)(1,"input",27),b("input",function(d){m(e);let c=s(2).$implicit,ce=s(2);return p(ce.onDraftInput(c,d))})("keydown.enter",function(){m(e);let d=s(2).$implicit,c=s(2);return p(c.canSend(d)&&c.onSend(d))}),i(),r(2,"app-button",28),b("clicked",function(){m(e);let d=s(2).$implicit,c=s(2);return p(c.onSend(d))}),r(3,"span",29),E(4,"ng-icon",30),o(5," Send "),i()()()}if(n&2){let e=s(2).$implicit,a=s(2);l(),v("value",a.emailDraft(e)),F("aria-label","Email to send seat to"),l(),v("disabled",!a.canSend(e))}}function ve(n,t){n&1&&(r(0,"span",26),o(1,"Expired \u2014 sending disabled"),i())}function he(n,t){n&1&&(r(0,"span",26),o(1,"\u2014"),i())}function ye(n,t){if(n&1&&(r(0,"td",21),u(1,ge,6,3,"span",25)(2,ve,2,0,"span",26)(3,he,2,0,"span",26),i()),n&2){let e=s().$implicit;l(),_(e.status==="available"?1:e.status==="expired"?2:3)}}function Se(n,t){if(n&1){let e=h();r(0,"button",35),b("click",function(){m(e);let d=s(2).$implicit,c=s(2);return p(c.resend.emit(d))}),E(1,"ng-icon",36),i()}if(n&2){let e=s(2).$implicit;F("aria-label","Resend seat to "+e.sent_to_email)}}function Ce(n,t){if(n&1&&(r(0,"span",24)(1,"span",31),o(2),C(3,"date"),i(),r(4,"span",32)(5,"span",33),o(6),i(),u(7,Se,2,1,"button",34),i()()),n&2){let e=s().$implicit,a=s(2);l(2),S(P(3,3,e.shared_on,"MMM d, y")),l(4),S(e.sent_to_email),l(),_(a.sendEnabled()&&e.status==="shared"?7:-1)}}function we(n,t){n&1&&o(0," \u2014 ")}function Te(n,t){if(n&1&&(r(0,"span",24)(1,"span",31),o(2),C(3,"date"),i(),r(4,"span",37),o(5),i()()),n&2){let e=s().$implicit,a=s(2);l(2),S(P(3,2,e.applied_on,"MMM d, y")),l(3),f(" ",a.maskEmail(e.applied_by_email)," ")}}function ke(n,t){n&1&&o(0," \u2014 ")}function Ee(n,t){if(n&1&&(r(0,"tr",17)(1,"td",18),o(2),i(),r(3,"td",19),o(4),i(),u(5,be,2,1,"td",19),r(6,"td",20),o(7),C(8,"currency"),i(),r(9,"td",19),o(10),C(11,"date"),i(),r(12,"td",21)(13,"span",22),o(14),i()(),u(15,ye,4,1,"td",21),r(16,"td",23),u(17,Ce,8,6,"span",24)(18,we,1,0),i(),r(19,"td",23),u(20,Te,6,5,"span",24)(21,ke,1,0),i()()),n&2){let e=t.$implicit,a=s(2);z("opacity-50",e.status==="expired"),l(2),S(e.code),l(2),f(" ",e.partner_code.code," "),l(),_(a.showFirm()?5:-1),l(2),f(" ",Y(8,15,+e.purchase_cost,"USD","symbol","1.0-2")," "),l(3),f(" ",e.expiry_date?P(11,20,e.expiry_date,"MMM d, y"):"\u2014"," "),l(3),O("background",a.chip(e.status).bg)("color",a.chip(e.status).fg),l(),f(" ",a.chip(e.status).label," "),l(),_(a.sendEnabled()?15:-1),l(2),_(e.shared_on?17:18),l(3),_(e.status==="applied"&&e.applied_on?20:21)}}function Pe(n,t){if(n&1){let e=h();r(0,"div",4)(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7),o(5,"Seat code"),i(),r(6,"th",7),o(7,"Partner code"),i(),u(8,xe,2,0,"th",7),r(9,"th",8),o(10,"Purchase cost"),i(),r(11,"th",7),o(12,"Expiry date"),i(),r(13,"th",7),o(14,"Status"),i(),u(15,fe,2,0,"th",9),r(16,"th",7),o(17,"Shared on / to"),i(),r(18,"th",7),o(19,"Applied on / by"),i()()(),r(20,"tbody",10),$(21,Ee,22,23,"tr",11,ue),i()()(),r(23,"div",12)(24,"span"),o(25," Showing "),r(26,"span",13),o(27),i(),o(28),i(),r(29,"div",14)(30,"app-button",15),b("
1clicked",function(){m(e);let d=s();return p(d.prevPage.emit())}),o(31," Prev "),i(),r(32,"span",16),o(33),i(),r(34,"app-button",15),b("clicked",function(){m(e);let d=s();return p(d.nextPage.emit())}),o(35," Next "),i()()()}if(n&2){let e=s();l(8),_(e.showFirm()?8:-1),l(7),_(e.sendEnabled()?15:-1),l(6),R(e.rows()),l(6),W(" ",e.pageWindow().from,"-",e.pageWindow().to," "),l(),f(" of ",e.pageWindow().total," "),l(2),v("disabled",!e.canPrev()),l(3),f("Page ",e.currentPage()),l(),v("disabled",!e.canNext())}}function Ne(n,t){n&1&&(r(0,"p",2),o(1,"No seats to show."),i())}var Ve={available:{label:"Available",bg:"var(--mm-info-bg)",fg:"var(--mm-info-fg)"},shared:{label:"Shared",bg:"var(--mm-warn-bg)",fg:"var(--mm-warn-fg)"},applied:{label:"Applied",bg:"var(--mm-success-bg)",fg:"var(--mm-success-fg)"},expired:{label:"Expired",bg:"var(--mm-danger-bg)",fg:"var(--mm-danger-fg)"}},N=class n{notification=y(ne);rows=g.required();isLoading=g(!1);sendEnabled=g(!1);showFirm=g(!1);currentPage=g(1);pageSize=g(20);totalCount=g(0);hasNext=g(!1);hasPrev=g(!1);share=w();resend=w();prevPage=w();nextPage=w();canPrev=x(()=>this.hasPrev()&&!this.isLoading());canNext=x(()=>this.hasNext()&&!this.isLoading());pageWindow=x(()=>{let t=this.rows().length,e=this.totalCount();if(t===0)return{from:0,to:0,total:e};let a=(this.currentPage()-1)*this.pageSize()+1,d=a+t-1;return{from:a,to:d,total:e}});emailDrafts=T({});emailDraft(t){return this.emailDrafts()[t.id]??""}onDraftInput(t,e){let a=e.target.value;this.emailDrafts.update(d=>D(M({},d),{[t.id]:a}))}canSend(t){return/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(this.emailDraft(t).trim())}onSend(t){let e=this.emailDraft(t).trim();if(!e){this.notification.info("Missing email","Type the email to send this seat to.");return}this.share.emit({seat:t,email:e}),this.emailDrafts.update(a=>D(M({},a),{[t.id]:""}))}chip(t){return Ve[t]}maskEmail(t){if(!t||!t.includes("@"))return t??"\u2014";let e=t.lastIndexOf("@"),a=t.slice(0,e),d=t.slice(e+1),c;return a.length<=2?c=`${a[0]??""}\u2022\u2022\u2022`:a.length<=5?c=`${a[0]}\u2022\u2022\u2022${a[a.length-1]}`:c=`${a.slice(0,2)}\u2022\u2022\u2022${a.slice(-2)}`,`${c}@${d}`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=k({type:n,selectors:[["app-seat-tracker-table"]],hostAttrs:[1,"block","w-full"],inputs:{rows:[1,"rows"],isLoading:[1,"isLoading"],sendEnabled:[1,"sendEnabled"],showFirm:[1,"showFirm"],currentPage:[1,"currentPage"],pageSize:[1,"pageSize"],totalCount:[1,"totalCount"],hasNext:[1,"hasNext"],hasPrev:[1,"hasPrev"]},outputs:{share:"share",resend:"resend",prevPage:"prevPage",nextPage:"nextPage"},features:[H([Q({lucideRotateCw:Z,lucideSend:ee})])],decls:4,vars:2,consts:[[1,"text-white"],[1,"flex","items-center","justify-center","py-12","text-neutral-400"],[1,"py-12","text-center","text-sm","text-neutral-500"],["size","lg","color","white","trackColor","neutral-600"],[1,"overflow-x-auto","rounded-lg","border","border-white/10"],[1,"w-full","min-w-[1040px]","text-left","text-sm"],[1,"text-[11px]","uppercase","tracking-wider",2,"color","var(--mm-fg-3)","background","var(--mm-surface-2)"],[1,"px-4","py-3","font-semibold"],[1,"px-4","py-3","font-semibold","text-right"],[1,"px-4","py-3","font-semibold","min-w-56"],[1,"divide-y","divide-white/5"],[1,"hover:bg-white/3","transition-colors",3,"opacity-50"],[1,"mt-6","flex","flex-wrap","items-center","justify-between","gap-x-4","gap-y-3","text-sm","text-neutral-400"],[1,"font-semibold","text-white"],[1,"flex","items-center","gap-3"],["variant","outline","size","sm",1,"h-9","rounded-md","border-white/15","bg-transparent","w-28","text-xs","text-white","hover:bg-white/5",3,"clicked","disabled"],[1,"text-white/70","tabular-nums"],[1,"hover:bg-white/3","transition-colors"],[1,"px-4","py-3","font-mono","text-neutral-100","break-all"],[1,"px-4","py-3","text-neutral-300","whitespace-nowrap"],[1,"px-4","py-3","text-right","tabular-nums","text-neutral-300"],[1,"px-4","py-3"],[1,"inline-flex","items-center","px-2","py-1","rounded-full","text-xs","font-medium"],[1,"px-4","py-3","text-neutral-300"],[1,"flex","flex-col","gap-0.5"],[1,"flex","items-center","gap-2"],[1,"text-xs","text-neutral-500"],["type","email","placeholder","[email protected]",1,"send-input",3,"input","keydown.enter","value"],["variant","primary","size","sm",3,"clicked","disabled"],[1,"inline-flex","items-center","gap-1.5"],["name","lucideSend","aria-hidden","true",1,"text-sm"],[1,"whitespace-nowrap"],[1,"inline-flex","items-center","gap-1.5","text-xs","text-neutral-400"],[1,"break-all"],["type","button","title","Resend email",1,"drill-btn","shrink-0"],["type","button","title","Resend email",1,"drill-btn","shrink-0",3,"click"],["name","lucideRotateCw","aria-hidden","true",1,"text-sm"],[1,"text-xs","text-neutral-400","break-all"]],template:function(e,a){e&1&&(r(0,"div",0),u(1,_e,2,0,"div",1),u(2,Pe,36,8)(3,Ne,2,0,"p",2),i()),e&2&&(l(),_(a.isLoading()&&!a.rows().length?1:-1),l(),_(a.rows().length?2:a.isLoading()?-1:3))},dependencies:[X,te,ae,G,q],styles:["[_nghost-%COMP%]{display:block}.drill-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border:0;border-radius:.25rem;background:transparent;color:#fff6;
1cursor:pointer;transition:color .15s ease,background .15s ease}.drill-btn[_ngcontent-%COMP%]:hover{color:#fff;background:#ffffff1a}.drill-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--ring, #2a85ff);outline-offset:1px}.send-input[_ngcontent-%COMP%]{width:100%;min-width:11rem;height:2.25rem;padding:0 .625rem;border-radius:.375rem;border:1px solid rgba(255,255,255,.16);background:transparent;color:#fff;font-size:.75rem;transition:border-color .15s ease}.send-input[_ngcontent-%COMP%]::placeholder{color:#ffffff59}.send-input[_ngcontent-%COMP%]:focus-visible{outline:none;border-color:var(--ring, #2a85ff)}"]})};function Me(n,t){if(n&1){let e=h();r(0,"div",6)(1,"app-aria-select",8),b("valueChange",function(d){m(e);let c=s();return p(c.facade.selectFirm(d))}),i()()}if(n&2){let e=s();l(),v("options",e.firmOptions())("value",e.facade.selectedFirmId())}}function De(n,t){n&1&&(r(0,"div",7)(1,"h2",9),o(2,"Not a partner admin"),i(),r(3,"p",10),o(4," Your account isn't provisioned as a partner admin yet. Contact a super admin. "),i()())}function Fe(n,t){n&1&&(r(0,"div",7)(1,"h2",9),o(2,"Seat usage not enabled"),i(),r(3,"p",10),o(4," Your partner-admin account doesn't have the seat-usage capability. Ask a super admin to grant it. "),i()())}function Ie(n,t){if(n&1&&(r(0,"div",16),o(1),i()),n&2){let e=s(2);l(),f(" ",e.facade.error()," ")}}function Ae(n,t){if(n&1){let e=h();r(0,"div",1)(1,"div",11)(2,"h2",12),o(3,"Seats"),i(),r(4,"div",13)(5,"app-aria-input",14),U("valueChange",function(d){m(e);let c=s();return B(c.searchInput,d)||(c.searchInput=d),p(d)}),i()()(),r(6,"app-tab-strip",15),b("selectionChange",function(d){m(e);let c=s();return p(c.onTabChange(d))}),i(),u(7,Ie,2,1,"div",16),r(8,"app-seat-tracker-table",17),b("share",function(d){m(e);let c=s();return p(c.onShare(d))})("resend",function(d){m(e);let c=s();return p(c.onResend(d))})("prevPage",function(){m(e);let d=s();return p(d.goPrev())})("nextPage",function(){m(e);let d=s();return p(d.goNext())}),i()()}if(n&2){let e=s();l(5),j("value",e.searchInput),l(),v("options",e.tabLabels)("selected",e.activeTabLabel()),l(),_(e.facade.error()?7:-1),l(),v("rows",e.facade.seats())("isLoading",e.facade.isLoading())("sendEnabled",e.canSend())("showFirm",e.showFirmColumn())("currentPage",e.currentPage())("pageSize",e.facade.pageSize)("totalCount",e.totalCount())("hasNext",e.facade.hasNextPage())("hasPrev",e.facade.hasPrevPage())}}var V=[{value:"all",label:"All"},{value:"available",label:"Available"},{value:"shared",label:"Shared"},{value:"applied",label:"Applied"},{value:"expired",label:"Expired"}],se=class n{facade=y(le);me=y(oe);destroyRef=y(L);statusTabs=V;searchInput=T("");currentPage=x(()=>this.facade.pageNumber());totalCount=x(()=>this.facade.totalCount());title=x(()=>this.me.network()?.name??this.me.firm()?.name??"Partner network");canReadSeats=x(()=>this.me.can("seat:usage:read"));canSend=x(()=>this.me.can("seat:send"));showFirmColumn=x(()=>this.me.isNetworkAdmin()&&this.facade.selectedFirmId()==null);constructor(){K(this.searchInput).pipe(I(300),A(),J(this.destroyRef)).subscribe(t=>this.facade.setSearch(t))}tabLabels=V.map(t=>t.label);activeTabLabel=x(()=>V.find(t=>this.isActiveTab(t.value))?.label??null);onTabChange(t){let e=V.find(a=>a.label===t);e&&this.selectStatus(e.value)}isActiveTab(t){return this.facade.statusFilter()===t}selectStatus(t){this.facade.setStatusFilter(t)}firmOptions=x(()=>[{value:null,label:"All sub-companies"},...this.facade.firms().map(t=>({value:t.id,label:t.name}))]);goPrev(){this.facade.setPage(this.currentPage()-1)}goNext(){this.facade.setPage(this.currentPage()+1)}onShare(t){this.facade.sendSeat(t.seat,t.email)}onResend(t){t.sent_to_email&&this.facade.sendSeat(t,t.sent_to_email)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=k({type:n,selectors:[["app-tracker-v2"]],hostAttrs:[1,"block","w-full"],decls:12,vars:3,consts:[[1,"admin-theme","flex","flex-col","gap-8","p-6","text-white","min-h-full"],[1,"flex","flex-col","gap-5"],[1,"flex","flex-wrap","items-start","justify-between","gap-3"],[1,"flex","flex-col","gap-1"],[1,"text-base","font-semibold",2,"color","var(--mm-fg-3)"],[1,"text-3xl","font-extrabold","leading-tight"],[1,"flex","items-center","gap-2"],[1,"rounded-xl","border","border-white/10","bg-card","p-8","text-center","max-w-lg","mx-auto"],["
1id","firm-select-v2","label","Sub-company",1,"w-64",3,"valueChange","options","value"],[1,"text-lg","font-bold","mb-2"],[1,"text-sm",2,"color","var(--mm-fg-3)"],[1,"flex","flex-col","gap-3","md:flex-row","md:items-center","md:justify-between"],[1,"text-xl","font-bold"],[1,"flex","w-full","max-w-md","items-center","md:w-auto"],["id","seat-search-v2","type","search","label","Search code or email",1,"w-full",3,"valueChange","value"],["aria-label","Seat status filter",3,"selectionChange","options","selected"],["role","alert",1,"px-3","py-2","text-sm","rounded-md",2,"background","var(--mm-danger-bg)","color","var(--mm-danger-fg)"],[3,"share","resend","prevPage","nextPage","rows","isLoading","sendEnabled","showFirm","currentPage","pageSize","totalCount","hasNext","hasPrev"]],template:function(e,a){e&1&&(r(0,"section",0)(1,"header",1)(2,"div",2)(3,"div",3)(4,"p",4),o(5,"Seat Tracker"),i(),r(6,"h1",5),o(7),i()()(),u(8,Me,2,2,"div",6),i(),u(9,De,5,0,"div",7)(10,Fe,5,0,"div",7)(11,Ae,9,13,"div",1),i()),e&2&&(l(7),f(" ",a.title()," "),l(),_(a.facade.firms().length?8:-1),l(),_(!a.me.isPartnerAdmin()&&!a.me.isLoading()?9:a.me.isPartnerAdmin()&&!a.canReadSeats()?10:11))},dependencies:[ie,N,re,de],encapsulation:2})};export{se as TrackerV2};

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.