PageSourceSearch

https://mentoga.com/mega-session.routes-6HEFMC56.js

js mentoga.com collected 2026-10-09 01:14:20 UTC 52,034 bytes, 4 lines download raw bytes

1import{a as _t,b as ht}from"./chunk-NS6KUU4Q.js";import{a as Ct}from"./chunk-T7TQJKVU.js";import{a as ut,b as gt,c as ft}from"./chunk-IJLIQOAP.js";import{a as bt}from"./chunk-SX3LSNBE.js";import{e as dt}from"./chunk-3FLARNIU.js";import"./chunk-HASIWMRZ.js";import"./chunk-VNXJNU6Q.js";import{f as ct}from"./chunk-SA4VGB43.js";import{a as lt}from"./chunk-X465BL54.js";import{a as pt}from"./chunk-K76733IG.js";import{G as Se,r as Ce,t as yt,v as mt}from"./chunk-FIAF2BT2.js";import"./chunk-BHD3AXLX.js";import"./chunk-4UZIHGUU.js";import{J as ge,K as fe,b as Ue,c as oe,e as E,g as re,l as se,n as Be,o as Le,s as Ae,t as Ne,u as $e,v as je,w as Je,y as Re,z as ae}from"./chunk-K3K62FSN.js";import{Ca as ot,Fa as rt,P as qe,R as Ye,T as Xe,V as Ke,a as pe,b as ue,da as Qe,e as Ze,j as We,na as et,t as He,ta as tt,wa as it,x as Ge,za as nt}from"./chunk-XTSDOJZY.js";import{a as st,b as at,c as _e}from"./chunk-GAV3FHCZ.js";import{J as me,T as V,U as he,b as le,d as ce,f as de,i as be}from"./chunk-TE27S34P.js";import{E as ne,v as Fe,x as te,y as ie}from"./chunk-BK7D3MQQ.js";import{k as K,l as Ve,r as Q,s as Ie,u as ze,v as ee}from"./chunk-66HRGNAO.js";import{Ab as l,Bb as D,Bc as ke,Cc as d,Dc as Y,Ec as U,Fa as G,Fc as ye,Ic as B,Jc as L,Kc as A,Mc as X,Nc as Te,Oc as R,Pc as Oe,Qa as g,Qc as De,Ra as f,Rb as k,Uc as b,Vc as T,Wb as p,Wc as Ee,Xb as q,Yb as ve,Zb as Pe,_ as v,a as Z,aa as z,ac as S,b as W,cc as J,dc as N,ec as $,fc as r,g as we,gc as s,h as xe,hc as x,kc as y,n as H,na as P,pc as _,qc as c}from"./chunk-D2DANOQX.js";var St=we(bt());var zt=(o,m)=>m.id,Ft=o=>({"overflow-y-auto pe-3 pt-3":o}),Ut=()=>({containerClass:"theme-dark-blue"});function Bt(o,m){if(o&1){let t=y();r(0,"div",9)(1,"a",13),_("click",function(){g(t);let e=c();return f(e.toggleCouponModal(!0))}),r(2,"button",14),d(3,"Create Coupon Code"),s()()()}}function Lt(o,m){if(o&1){let t=y();r(0,"div",13),_("click",function(){g(t);let e=c().$implicit,n=c(3);return f(n.showAttendeesList(e==null?null:e.payments))}),x(1,"app-user-avatar",31),s()}if(o&2){let t=c().$implicit;l(),p("users",t==null?null:t.payments)}}function At(o,m){o&1&&(r(0,"div")(1,"p",24),d(2," No bookings "),s()())}function Nt(o,m){if(o&1){let t=y();r(0,"div",15)(1,"div",16)(2,"div",17)(3,"div",18)(4,"div")(5,"h6",19),d(6),s()(),r(7,"div")(8,"span",20),d(9),b(10,"currency"),s()()(),r(11,"div",4),x(12,"fa-icon",21),r(13,"p",22),d(14),s()(),r(15,"div",23)(16,"p",24),d(17),s()(),r(18,"div",25),k(19,Lt,2,1,"div")(20,At,3,0,"div"),r(21,"div",26)(22,"fa-icon",27),_("click",function(){let e=g(t).$implicit,n=c(3);return f(n.copyLinkToSelectedSession(e))}),s(),r(23,"fa-icon",28),_("click",function(){let e=g(t).$implicit,n=c(3);return f(n.editSession(e))}),s(),r(24,"button",29),_("click",function(){let e=g(t).$implicit,n=c(3);return f(n.showSwal(e==null?null:e.id))}),x(25,"fa-icon",30),s()()()()()()}if(o&2){let t=m.$implicit,i=c(3);l(6),U(" ",t==null?null:t.title," "),l(3),Y(T(10,11,t==null?null:t.price)),l(3),p("icon",i.faCalendar),l(2),U(" ",t==null?null:t.formattedDates," "),l(3),U(" ",t==null?null:t.description," "),l(2),S(!(t==null||t.payments==null)&&t.payments.length?19:20),l(3),p("icon",i.faLink),l(),p("icon",i.editIcon),l(2),Pe("color: #8efc5a; cursor: pointer;height: 18px;"),p("icon",i.faTrashCan)}}function $t(o,m){if(o&1&&N(0,Nt,26,13,"div",15,J),o&2){let t=c(2);$(t.sessions)}}function jt(o,m){o&1&&(r(0,"div",2)(1,"div",32)(2,"div",33)(3,"div",34)(4,"div",35)(5,"div",36),x(6,"img",37),s(),r(7,"h6"),d(8,"No MegaSession created yet"),s(),r(9,"p",38),d(10," No megasessions have been created yet. Start creating a megasession to engage with your audience. "),s(),r(11,"button",39),d(12,"Create MegaSession"),s()()()()()()),o&2&&(l(6),p("useSrcset",!0)("lazyLoad","https://res.cloudinary.com/yfhy4efp/image/upload/v1745322591/nekkzjmrbxgfsttmlj89.webp"))}function Jt(o,m){if(o&1&&k(0,$t,2,0)(1,jt,13,2,"div",2),o&2){let t=c();S(t.sessions&&t.sessions.length?0:1)}}function Rt(o,m){o&1&&x(0,"app-mini-loading")}function Zt(o,m){if(o&1){let t=y();r(0,"app-slider-modal",40),_("viewUpdate",function(e){g(t);let n=c();return f(n.handleViewUpdate(e,"attendeeListModal"))}),r(1,"app-attendess-list",41),_("viewUpdate",function(e){g(t);let n=c();return f(n.handleViewUpdate(e,"packageBuyModal"))}),s()()}if(o&2){let t=c();p("view",t.attendeeListModal),l(),p("attendees",t.attendeeListModalData)}}function Wt(o,m){if(o&1&&(r(0,"option",73),d(1),s()),o&2){let t=m.$implicit;p("ngValue",t),l(),U(" ",t.title," ")}}function Ht(o,m){if(o&1){let t=y();r(0,"div",65)(1,"button",74),_("click",function(){g(t);let e=c(2);return f(e.editCouponCode())}),d(2,"Save Changes"),s()()}}function Gt(o,m){if(o&1){let t=y();r(0,"div",71)(1,"button",74),_("click",function(){g(t);let e=c(2);return f(e.generateCouponCode())}),d(2," Generate Code "),s()()}}function qt(o,m){if(o&1){let t=y();
1r(0,"tr")(1,"td",80),d(2),s(),r(3,"td",80),d(4),s(),r(5,"td",80)(6,"button",81),_("click",function(){let e=g(t).$implicit,n=c(3);return f(n.copyCode(e.code))}),x(7,"fa-icon",62),s(),r(8,"button",81),_("click",function(){let e=g(t).$implicit,n=c(3);return f(n.editCouponCodeAction(e))}),x(9,"fa-icon",62),s(),r(10,"button",81),_("click",function(){let e=g(t).$implicit,n=c(3);return f(n.deleteCouponCode(e))}),x(11,"fa-icon",62),s()()()}if(o&2){let t=m.$implicit,i=c(3);l(2),Y(t.code),l(2),Y(t.utilized),l(3),p("icon",i.faCopy),l(2),p("icon",i.editIcon),l(2),p("icon",i.deleteIcon)}}function Yt(o,m){if(o&1&&(r(0,"div",2)(1,"div",75)(2,"div",76)(3,"table",77)(4,"thead",78)(5,"tr")(6,"th",79),d(7,"Code"),s(),r(8,"th",79),d(9,"Used"),s(),r(10,"th",79),d(11,"Actions"),s()()(),r(12,"tbody"),N(13,qt,12,5,"tr",null,zt),s()()()()()),o&2){let t=c(2);l(13),$(t.couponCode)}}function Xt(o,m){if(o&1){let t=y();r(0,"app-modal",12)(1,"div",42)(2,"fa-icon",43),_("click",function(){g(t);let e=c();return f(e.toggleCouponModal(!1))}),s(),r(3,"div",44)(4,"h4",45),d(5,"Create Discount Coupon"),s(),x(6,"hr"),r(7,"h6",46),d(8,"Select a Session"),s(),r(9,"div",47)(10,"div",48)(11,"select",49),A("ngModelChange",function(e){g(t);let n=c();return L(n.selectedMegaSession,e)||(n.selectedMegaSession=e),f(e)}),_("change",function(){g(t);let e=c();return f(e.selectMegaSession())}),r(12,"option",50),d(13,"select megasession"),s(),k(14,Wt,2,2,"option",51),s()()(),r(15,"div",52)(16,"div",53)(17,"div",46)(18,"h6",46),d(19,"Discount %"),s()(),r(20,"div",54)(21,"button",55),_("click",function(){g(t);let e=c();return f(e.changeDiscountPer(!1))}),d(22," - "),s(),r(23,"input",56),A("ngModelChange",function(e){g(t);let n=c();return L(n.discountPer,e)||(n.discountPer=e),f(e)}),_("change",function(){g(t);let e=c();return f(e.checkDiscountPer(e.discountPer))}),s(),r(24,"button",57),_("click",function(){g(t);let e=c();return f(e.changeDiscountPer(!0))}),d(25," + "),s()()(),r(26,"div",58)(27,"div",46)(28,"h6",46),d(29,"Validity"),s()(),r(30,"div",59)(31,"input",60,0),A("ngModelChange",function(e){g(t);let n=c();return L(n.selectedDate,e)||(n.selectedDate=e),f(e)}),s(),r(33,"button",61),_("click",function(){g(t);let e=ke(32);return f(e.show())}),x(34,"fa-icon",62),s()()(),r(35,"div",63)(36,"div",46)(37,"h6",46),d(38,"Maximum Usage"),s()(),r(39,"div",54)(40,"button",55),_("click",function(){g(t);let e=c();return f(e.decrementMaxUsage())}),d(41," - "),s(),r(42,"input",64),A("ngModelChange",function(e){g(t);let n=c();return L(n.maximumUsage,e)||(n.maximumUsage=e),f(e)}),_("change",function(){g(t);let e=c();return f(e.checkMaxUsage(e.maximumUsage))}),s(),r(43,"button",57),_("click",function(){g(t);let e=c();return f(e.incrementMaxUsage())}),d(44," + "),s()()()(),k(45,Ht,3,0,"div",65),r(46,"div",66)(47,"div",67)(48,"div",68)(49,"h5",69),d(50,"Generate your "),r(51,"strong"),d(52,"Mega Session"),s(),d(53," coupon code below "),s()()(),r(54,"div",70),k(55,Gt,3,0,"div",71)(56,Yt,15,0,"div",2),s()(),r(57,"div",2)(58,"div",68)(59,"button",72),_("click",function(){g(t);let e=c();return f(e.closeModal())}),d(60,"Close"),s()()()()()()}if(o&2){let t=c();p("verticallyCentered",!0),l(2),p("icon",t.faTimes),l(9),B("ngModel",t.selectedMegaSession),l(),p("ngValue",null),l(2),p("ngForOf",t.sessions),l(9),B("ngModel",t.discountPer),l(8),p("placeholder",t.selectedDate),B("ngModel",t.selectedDate),p("minDate",t.minDate)("maxDate",t.maxDate)("bsConfig",Te(16,Ut)),l(3),p("icon",t.faCalendar),l(8),B("ngModel",t.maximumUsage),l(3),S(t.isEditCoupon?45:-1),l(10),S(!t.isEditCoupon&&t.selectedMegaSession?55:-1),l(),S(t.couponCode!=null&&t.couponCode.length?56:-1)}}var xt=(()=>{let m=class m{closeModal(){this.helper.showModal(!1,"megaSessionCouponModal")}checkMaxUsage(i){i<1&&(this.toastr.error("Maximum usage cannot be less than 1"),this.maximumUsage=1)}constructor(i,e,n,a,u,h){this.resize=i,this.http=e,this.helper=n,this.router=a,this.store=u,this.toastr=h,this.editIcon=qe,this.deleteIcon=Ye,this.faCalendar=nt,this.faLink=et,this.faTrashCan=Ze,this.faTimes=it,this.faCopy=tt,this.faCircleX=We,this.attendeeListModal=!1,this.loading=!0,this.destroy$=new H,this.user$=this.store.select(me),this.megaSessionCouponModal=!1,this.selectedMegaSession=null,this.discountPer=1,this.isEditCoupon=!1,this.user$.pipe(P(this.destroy$),v((C,M)=>JSON.stringify(C)===JSON.stringify(M))).subscribe(C=>{this.userData=C,this.userData?.uniqueName&&(this.profileUrl=de?.production?"mentoga.com/"+this.userData?.uniqueName:"angular.mentoga.com/"+this.userData?.uniqueName)}),this.getMegaSessions()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}ngOnInit(){this.minDate=new Date,this.maxDate=new Date,this.minDate.setDate(this.minDate.getDate()+1),this.maxDate.setDate(this.minDate.getDate()+365),this.selectedDate=new Date(this.minDate.getFullYear(),this.minDate.getMonth(),this.minDate.getDate()),this.maximumUsage=1,this.couponCode=[],localStorage.removeItem("session")}getMegaSessions(){localStorage.removeItem("session"),this.loading=!0,this.http.loaderGet(`api/MegaSession/get/${this.userData?.id}`,!1,!0).pipe(P(this.destroy$),z(()=>{V.loader.next(!1)}),v((i,e)=>JSON.stringify(i)===JSON.stringify(e))).subscribe(i=>{this.loading=!1,this.sessions=i?.modelList,this.sessions.forEach(e
1=>{if(e?.slots?.length>0){let n=e.slots[0],a=this.helper.formatDate(n?.slotDate,n?.fromTiming),u=this.helper.formatInLocalTime(n?.fromTiming),h=a,C=e.slots.length-1;e.formattedDates=C>0?`${h}, +${C} more`:h}})},i=>{this.sessions=null,this.loading=!1})}removeSession(i){this.http.loaderGet(`api/MegaSession/delete?megaSessionId=${i}`,!0,!0).pipe(P(this.destroy$),z(()=>{V.loader.next(!1)}),v((e,n)=>JSON.stringify(e)===JSON.stringify(n))).subscribe(e=>{this.sessions=this.sessions.filter(n=>n.id!==i),this.toastr.success("Session deleted successfully")})}showSwal(i){St.default.fire({title:"Are you sure?",text:"You want to delete this session",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Delete",cancelButtonText:"Cancel"}).then(e=>{e.isConfirmed&&this.removeSession(i)})}handleViewUpdate(i,e){this[e]=i}showAttendeesList(i){this.attendeeListModalData=i,this.attendeeListModal=!0,this.helper.openModal()}editSession(i){localStorage.setItem("session",JSON.stringify(i)),this.router.navigate(["/creator/mega-session/edit"])}copyLinkToAllSessions(){navigator.clipboard.writeText(this.profileUrl+"/mega-sessions").then(()=>{this.toastr.info("Link copied to clipboard")}).catch(i=>{})}copyLinkToSelectedSession(i){navigator.clipboard.writeText(this.profileUrl+"/mega-session/"+i.id).then(()=>{this.toastr.info("Link copied to clipboard")}).catch(e=>{})}selectMegaSession(){this.maxDate=new Date(this.selectedMegaSession.slots[0].fromDateTime),this.selectedDate=this.maxDate,this.getCouponCode()}getCouponCode(){let i=this.selectedMegaSession?`api/CouponCode/megasession/get?megasessionId=${this.selectedMegaSession?.id}`:"api/CouponCode/megasession/get";this.http.loaderGet(i,!0,!1).pipe(P(this.destroy$),z(()=>{V.loader.next(!1)}),v((e,n)=>JSON.stringify(e)===JSON.stringify(n))).subscribe(e=>{e.status&&(this.couponCode=e.modelList)})}toggleCouponModal(i){i&&this.getCouponCode(),this.megaSessionCouponModal=!0,this.helper.showModal(i,"megaSessionCouponModal")}generateCouponCode(){let i={limit:this.maximumUsage,expiredOn:this.helper.toUtcPreservingLocalTime(this.selectedDate),megaSessionId:this.selectedMegaSession?this.selectedMegaSession.id:null,discountPer:this.discountPer};this.http.loaderPost("api/CouponCode/megasession/post",i,!0,!0).pipe(P(this.destroy$),z(()=>{V.loader.next(!1)}),v((e,n)=>JSON.stringify(e)===JSON.stringify(n))).subscribe(e=>{this.couponCode.push(e?.model)})}copyCode(i){navigator.clipboard.writeText(i).then(()=>{this.toastr.info("Code copied to clipboard")}).catch(e=>{})}editCouponCodeAction(i){this.selectedMegaSession=this.sessions?.filter(e=>e.id==i.megaSessionId)[0],this.discountPer=i.discountPer,this.maximumUsage=i.limit,this.selectedDate=new Date(i.expiredOn),this.couponCodeId=i.id,this.isEditCoupon=!0}editCouponCode(){let i={id:this.couponCodeId,limit:this.maximumUsage,expiredOn:new Date(this.selectedDate).toISOString(),megaSessionId:this.selectedMegaSession?this.selectedMegaSession.id:null,discountPer:this.discountPer};this.http.loaderPost("api/CouponCode/put",i,!0,!0).pipe(P(this.destroy$),z(()=>{V.loader.next(!1)}),v((e,n)=>JSON.stringify(e)===JSON.stringify(n))).subscribe(e=>{e.status&&(this.couponCode=this.couponCode.filter(n=>n.id!==e?.model.id),this.couponCode.push(e?.model),this.isEditCoupon=!1)})}deleteCouponCode(i){let e=`api/CouponCode/delete/${i.id}`;this.http.loaderGet(e,!0,!1).pipe(P(this.destroy$),z(()=>{V.loader.next(!1)}),v((n,a)=>JSON.stringify(n)===JSON.stringify(a))).subscribe(n=>{n.status&&(this.couponCode=this.couponCode.filter(a=>a.id!==i.id))})}incrementMaxUsage(){this.maximumUsage!==50&&this.maximumUsage++}decrementMaxUsage(){this.maximumUsage!==1&&this.maximumUsage--}changeDiscountPer(i){if(i){if(this.discountPer>=100){this.discountPer=100,this.toastr.error("Discount percentage cannot be greater than 100%");return}this.discountPer+=5}else{if(this.discountPer<=1){this.discountPer=1,this.toastr.error("Discount percentage cannot be less than 1%");return}this.discountPer-=5}}checkDiscountPer(i){i<1||i>100?(this.toastr.error("Discount percentage must be between 1% and 100%"),this.discountPer=1):this.discountPer=i}};m.\u0275fac=function(e){return new(e||m)(D(_e),D(he),D(Se),D(te),D(le),D(ce))},m.\u0275cmp=G({type:m,selectors:[["app-mega-session"]],standalone:!0,features:[X],decls:20,vars:18,consts:[["dp","b
1sDatepicker"],[1,"container"],[1,"row"],[1,"col-6","mb-3","d-flex","align-items-center","justify-content-between"],[1,"d-flex","align-items-center"],[1,"gilroyEB","mb-0"],["ngbTooltip","Click to copy link to Mega Sessions tab on your profile.",1,"ms-2","dCenter","action-item-tooltip-icon",3,"click","icon"],[1,"ps-lg-5",3,"ngClass"],["routerLink","create",1,"btnPrimary",3,"ngClass"],[1,"col-3"],[1,"container",3,"ngClass"],[3,"view"],["modalId","megaSessionCouponModal","modalSize","modal-xl",3,"verticallyCentered"],[3,"click"],[1,"btnPrimary"],[1,"col-sm-6","col-md-6","col-lg-4","mb-3"],[1,"rounded-4","p-3","bg-white","shadowAlternate","h-100"],[1,"d-flex","flex-column","session-card"],[1,"d-flex","flex-row","justify-content-between"],[1,"title"],[1,"price"],[2,"color","#8efc5a",3,"icon"],[1,"description","pl-2",2,"font-weight","500","padding-left","5px"],[1,"mt-2"],[1,"description"],[1,"d-flex","flex-row","justify-content-between","mt-3"],[1,"session-actions","d-flex"],["ngbTooltip","Click to copy link to Mega Session",1,"ms-2","dCenter","action-item-tooltip-icon",2,"color","#8efc5a","cursor","pointer","height","18px",3,"click","icon"],["ngbTooltip","Click to edit Mega Session",1,"ms-2","dCenter","action-item-tooltip-icon",2,"color","#8efc5a","cursor","pointer","height","18px",3,"click","icon"],[2,"padding","0","border","none","background-color","transparent",3,"click"],[1,"ms-2","dCenter","action-item-tooltip-icon",3,"icon"],["suffix","Attendees",3,"users"],[1,"col-lg-12"],[1,"card","shadowAlternate","bg-white","rounded-4"],[1,"card-body","row"],[1,"col-10","offset-1","text-center","d-flex","flex-column","justify-content-center","align-items-center","noChatFound"],[1,"chatImgBox","oHideBox","dCenter","dCenter","mb-3"],["defaultImage","https://res.cloudinary.com/yfhy4efp/image/upload/v1701082076/comejoinus/new/brokenimg_1_r0bg15.webp","width","100%","height","100%","alt","Image",1,"lazyImage",3,"useSrcset","lazyLoad"],[1,"text-muted","mx-3","fs-12"],["routerLink","create",1,"btnPrimary"],[3,"viewUpdate","view"],[3,"viewUpdate","attendees"],[1,"modal-body","position-relative","dCenter"],[1,"closeBtn","cursor",3,"click","icon"],[1,"flex-column","flex-grow-1","popup-content"],[1,"gilroy-sb"],[1,"gilroy"],[1,"d-flex","flex-grow-1"],[1,"dropdown-wrapper"],["id","megaSessionSelect",1,"form-select","gilroy",3,"ngModelChange","change","ngModel"],["disabled","",3,"ngValue"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"validity-container","d-flex","mt-4"],[1,"col-12","col-xl-4","col-md-5"],[1,"number-picker-container"],["type","button",1,"btn","btn-decrement",3,"click"],["type","number","min","1","max","100","step","5","placeholder","Enter percent",1,"form-control","number-input","gilroy",3,"ngModelChange","change","ngModel"],["type","button",1,"btn","btn-increment",3,"click"],[1,"col-12","col-xl-4","col-md-8","max-usage"],[1,"date-picker-container"],["bsDatepicker","",1,"form-control","date-picker","gilroy",3,"ngModelChange","placeholder","ngModel","minDate","maxDate","bsConfig"],[1,"copy-button","gilroy",3,"click"],[1,"calendar","cursor",3,"icon"],[1,"col-12","col-xl-4","col-md-5","max-usage"],["type","number","min","1","max","1000","placeholder","Enter number",1,"form-control","number-input","gilroy",3,"ngModelChange","change","ngModel"],[1,"d-flex","mt-2"],[1,"coupon-section"],[1,"row","align-items-center"],[1,"col-12"],[1,"gilroy","generate-coupon-header"],[1,"row","mt-4"],[1,"col-md-12"],[1,"btn","btn-danger","float-end",3,"click"],[3,"ngValue"],[1,"generate-btn",3,"click"],[1,"col-md-12","code-container"],[1,"table-responsive","mt-4"],[1,"table","table-bordered","table-striped","align-middle"],[1,"table-light"],["scope","col",1,"glory-b"],[1,"glory"],[1,"copy-code-btn","gilroy",3,"click"]],template:function(e,n){if(e&1&&(r(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5",5),d(5,"Mega Sessions"),s(),r(6,"fa-icon",6),_("click",function(){return n.copyLinkToAllSessions()}),s()()(),r(7,"div",7)(8,"button",8),d(9,"Create Mega Session"),s()(),k(10,Bt,4,0,"div",9),s()(),r(11,"div",10),b(12,"async"),b(13,"async"),b(14,"async"),r(15,"div",2),k(16,Jt,2,1)(17,Rt,1,0,"app-mini-loading"),s(),k(18,Zt,2,2,"app-slider-modal",11)(19,Xt,61,17,"app-modal",12),s()),e&2){let a,u;l(6),p("icon",n.faLink),l(),p("ngClass",n.sessions&&n.sessions.length?"col-3":"col-6"),l(),p("ngClass",n.sessions&&n.sessions.length?"":"float-end"),l(2),S(n.sessions&&n.sessions.length?10:-1),l(),q("height",((a=T(12,10,n.resize.windowSize$))==null?null:a.width)>1024?((a=T(13,12,n.resize.windowSize$))==null?null:a.height)-70:"100%","px"),p("ngClass",R(16,Ft,((u=T(14,14,n.resize.windowSize$))==null?null:u.width)>
11024)),l(5),S(n.loading?17:16),l(2),S(n.attendeeListModal?18:-1),l(),S(n.megaSessionCouponModal?19:-1)}},dependencies:[ee,K,Ve,Q,ze,_t,ue,pe,ne,ie,ht,Ct,lt,at,st,fe,ge,Ce,ae,Ne,$e,oe,Be,Ae,re,Je,je,se,ft,ut,gt],styles:[`.session-card[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-family:Gilroy;font-size:1.1rem;font-weight:600;text-align:left;color:#002544;margin:0 0 4px}.session-card[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%]{font-family:Gilroy;font-size:12px;font-weight:500;text-align:left;color:#002544;margin:0}.session-card[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:#292b28}.session-card[_ngcontent-%COMP%]   .date-time[_ngcontent-%COMP%]{background-color:#e0fcf4;border-radius:6px;padding:0 8px}.session-card[_ngcontent-%COMP%]   .date-time[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:11px;color:#002544}.session-card[_ngcontent-%COMP%]   .session-actions[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.session-card[_ngcontent-%COMP%]   .session-actions[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-left:10px}.session-card[_ngcontent-%COMP%]{background-color:#e0fcf4}.shadowAlternate[_ngcontent-%COMP%]{background-color:#e0fcf4!important}.btnPrimary[_ngcontent-%COMP%]{font-family:Gilroy;font-size:14px;font-weight:600;text-align:center;color:#000}.closeBtn[_ngcontent-%COMP%]{position:absolute;top:10px;right:10px}.popup-content[_ngcontent-%COMP%]{padding:30px 30px 50px}.date-picker-container[_ngcontent-%COMP%]{display:inline-flex;align-items:center;border:1px solid #d0d0d0;border-radius:8px;overflow:hidden}.copy-button[_ngcontent-%COMP%]{padding:10px 15px;background-color:#8efc5a;color:#002544;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;border:none}.number-picker-container[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;flex:1;align-items:center;border:1px solid #d0d0d0;border-radius:8px}.number-input[_ngcontent-%COMP%]{justify-items:center}.coupon-section[_ngcontent-%COMP%]{padding-top:40px}.generate-coupon-header[_ngcontent-%COMP%]{margin:0}.code-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-family:Arial,sans-serif;padding-right:10px}.code-display[_ngcontent-%COMP%]{border:none;background-color:#f5f5f5;padding:4px 2px 4px 12px;align-items:center;font-size:14px;color:#333;display:flex;justify-content:space-between;flex:1}.code-display[_ngcontent-%COMP%]:focus{outline:none}.copy-code-btn[_ngcontent-%COMP%]{background:none;border:none;padding:8px 16px;font-size:14px;cursor:pointer;border-radius:4px}.generate-btn[_ngcontent-%COMP%]{background-color:#8dff5e;border:none;padding:12px 16px;font-size:14px;cursor:pointer;border-radius:4px}.dropdown-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;max-width:300px}.dropdown-wrapper[_ngcontent-%COMP%]   select.form-select[_ngcontent-%COMP%]{padding:12px 16px;border-radius:8px;border:1px solid #ccc;font-family:Gilroy,sans-serif;font-size:1rem;cursor:pointer;background-color:#f9f9f9;color:#333}.dropdown-wrapper[_ngcontent-%COMP%]   select.form-select[_ngcontent-%COMP%]:focus{border-color:#007bff;outline:none;box-shadow:0 0 0 2px #007bff40}.table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{background-color:#8dff5e;color:#333}@media only screen and (max-width: 766px){.popup-content[_ngcontent-%COMP%]{padding:10px}.validity-container[_ngcontent-%COMP%]{flex-direction:column!important}.validity-container[_ngcontent-%COMP%]   .max-usage[_ngcontent-%COMP%]{margin-top:20px}}
2/*# sourceMappingURL=mega-session.component-KXHI5EFX.css.map */`]});let o=m;return o})();var j=we(yt());var Kt=(o,m,t)=>({"row-cols-2":o,"row-cols-3":m,"row-cols-4":t}),Qt=o=>({conflict:o}),ei=o=>[o],ti=(o,m)=>({"overflow-y-auto":o,"mb-5":m}),ii=o=>({"disabled-slot":o});function ni(o,m){if(o&1&&x(0,"fa-icon",4),o&2){let t=c();p("icon",t.faArrowLeft)}}function oi(o,m){o&1&&(r(0,"h5",5),d(1,"Update MegaSession"),s())}function ri(o,m){o&1&&(r(0,"h5",5),d(1,"Create MegaSession"),s())}function si(o,m){if(o&1){let t=y();r(0,"button",24),_("click",function(){g(t);let e=c();return f(e.letsUpdateMentorSlots())}),d(1," Update Session "),s()}if(o&2){let t=c();p("disabled",t.returnZoomValid()||!(t.newSlots!=null&&t.newSlots.length))}}function ai(o,m){if(o&1){let t=y();r(0,"button",24),_("click",function(){g(t);let e=c();return f(e.letsCreateMentorSlots())}),d(1," Create Session "),s()}if(o&2){let t=c();p("disabled",t.returnZoomValid()||!(t.newSlots!=null&&t.newSlots.length)||t.checkIfAllSlotsUnselected())}}function li(o,m){if(o&1){let t=y();r(0,"div",8)(1,"p",25),d(2," Mentoga MegaSessions happen on Zoom. Connect your Zoom account now for seamless sessions. It's a one-time step. Get started! "),s(),r(3,"button",26),_("click",function(){g(t);let e=c();return f(e.redirectToZoom())}),d(4," Connect Zoom Account "),s()()}}function ci(o,m){if(o&1&&(r(0,"div",31),x(1,"input",32),r(2,"label",33),d(3),s()()),o&2){let t=m.$implicit;l(),p("disabled",!t.availablity)("readOnly",!t.availablity),l(),p("ngClass",R(5,Qt,!t.availablity)),l(),ye(" ",t.fromTiming," - ",t.toTiming,"")}}function di(o,m){if(o&1&&(r(0,"div",27)(1,"div",28)(2,"h4",29),d(3),s()(),r(4,"div",30),b(5,"async"),b(6,"async"),b(7,"async"),b(8,"async"),b(9,"async"),b(10,"async"),b(11,"async"),N(12,ci,4,7,"div",31,J),s()()),o&2){let t,i=m.$implicit,e=c(2);l(3),U(" ",i.convertedTime," "),l(),p("ngClass",De(16,Kt,((t=T(5,2,e.resize.windowSize$))==null?null:t.width)<520,((t=T(6,4,e.resize.windowSize$))==null?null:t.width)>520&&((t=T(7,6,e.resize.windowSize$))==null?null:t.width)<1024||((t=T(8,8,e.resize.windowSize$))==null?null:t.width)>1024,((t=T(9,10,e.resize.windowSize$))==null?null:t.width)>768&&((t=T(10,12,e.resize.windowSize$))==null?null:t.width)<1024||((t=T(11,14,e.resize.windowSize$))==null?null:t.width)>1324)),l(8),$(i.match)}}function mi(o,m){if(o&1&&(r(0,"div",21),N(1,di,14,20,"div",27,J),s()),o&2){let t=c();l(),$(t.Datafilter)}}function pi(o,m){if(o&1){let t=y();r(0,"input",47),A("ngModelChange",function(e){g(t);let n=c().$implicit;return L(n.onlyPeriod,e)||(n.onlyPeriod=e),f(e)}),s(),r(1,"label",48),d(2," AM "),s()}if(o&2){let t=c().$implicit;p("name","amPm"+t.date)("id","am"+t.date),B("ngModel",t.onlyPeriod),l(),p("for","am"+t.date)}}function ui(o,m){if(o&1){let t=y();r(0,"input",49),A("ngModelChange",function(e){g(t);let n=c().$implicit;return L(n.onlyPeriod,e)||(n.onlyPeriod=e),f(e)}),s(),r(1,"label",50),d(2," PM "),s()}if(o&2){let t=c().$implicit;p("name","amPm"+t.date)("id","pm"+t.date),B("ngModel",t.onlyPeriod),l(),p("for","pm"+t.date)}}function gi(o,m){if(o&1&&x(0,"fa-icon",53),o&2){let t=c(4);p("icon",t.faRepeat)}}function fi(o,m){if(o&1){let t=y();r(0,"div",46)(1,"input",51),A("ngModelChange",function(e){let n=g(t).$implicit;return L(n.isSelected,e)||(n.isSelected=e),f(e)}),_("change",function(){let e=g(t).$implicit,n=c(3);return f(n.newSlot(e))}),s(),r(2,"label",52),d(3),k(4,gi,1,1,"fa-icon",53),s()()}if(o&2){let t=m.$implicit,i=c().$implicit,e=c(2);l(),p("id","time"+t.hourId+t.period+i.date),B("ngModel",t.isSelected),p("disabled",e.returnZoomValid()||(e.editSession?(t==null?null:t.slotId)&&(t==null?null:t.megaSessionId)!==(e.editSession==null?null:e.editSession.id):t==null?null:t.slotId)),l(),ve("notAllowed",e.returnZoomValid()||(e.editSession?(t==null?null:t.slotId)&&(t==null?null:t.megaSessionId)!==(e.editSession==null?null:e.editSession.id):t==null?null:t.slotId)),p("ngbTooltip",t.repeat?t.onlyHour+t.onlyPeriod+" recurs every "+i.day:e.returnZoomValid()&&"Connect Zoom First")("for","time"+t.hourId+t.period+i.date)("ngClass",R(11,ii,!!(e.editSession?t!=null&&t.slotId&&(t==null?null:t.megaSessionId)!==(e.editSession==null?null:e.editSession.id):t!=null&&t.slotId))),l(),ye(" ",t.onlyHour," ",t.onlyPeriod," "),l(),S(t!=null&&t.repeat?4:-1)}}function _i(o,m){if(o&1&&(r(0,"div",39)(1,"div",41)(2,"div",42)(3,"h6",43),d(4),b(5,"date"),s(),r(6,"div",44),k(7,pi,3,4)(8,ui,3,4),s()(),r(9,"div",45),N(10,fi,5,13,"div",46,J),s()()()),o&2){let t=m.$implicit;l(4),U(" ",Ee(5,3,t.date,"EEEE dd-MMMM")," "),l(3),S(!(t==null||t.data==null||t.data.amSlots==null)&&t.data.amSlots.length?7:-1),l(),S(!(t==null||t.data==null||t.data.pmSlots==null)&&t.data.pmSlots.length?8:-1),l(2),$(t.onlyPeriod=="AM"?t==null||t.data==null?null:t.data.amSlots:t==null||t.data==null?null:t.data.pmSlots)}}function hi(o,m){if(o&1){let t=y();r(0,"button",24),_("click",function(){g(t);let e=c(3);return f(e.letsUpdateMentorSlots())}),d(1," Update Session "),s()}if(o&2){let t=c(3);p("disabled",t.returnZoomValid()||!(t.newSlots!=null&&t.newSlots.length))}}function Ci(o,m){if(o&1){let t=y();r(0,"button",55),_("click",function(){g(t);let e=c(3);return f(e.helper.showModal(!0,"resetSlotConfirmationModal"))}),d(1," Reset Slots "),s(),r(2,"button",24),_("click",function(){g(t);let e=c(3);return f(e.letsCreateMentorSlots())}),d(3," Create Session "),s()}if(o&2){let t=c(3);l(2),p("disabled",t.returnZoomValid()||!(t.newSlots!=null&&t.newSlots.length)||t.checkIfAllSlotsUnselected())}}function Si(o,m){if(o&1&&(r(0,"div",40)(1,"div",54),k(2,hi,2,1,"button",6)(3,Ci,4,1),s()()),o&2){let t=c(2);l(2),S(t.editSession?2:3)}}function xi(o,m){if(o&1&&(r(0,"div",34)(1,"div",10)(2,"div",11)(3,"h6",12),d(4,"Set your availability Date, and Time"),s(),r(5,"p",35),d(6),s(),r(7,"h6",12),d(8,"Select a time for your MegaSession"),s()()(),r(9,"div",36),x(10,"div",37),b(11,"async"),s()(),r(12,"div",38),b(13,"async"),b(14,"async"),b(15,"async"),b(16,"async"),b(17,"async"),N(18,_i,12,6,"div",39,J),k(20,Si,4,1,"div",40),s()),o&2){let t,i,e,n=c();l(6),U(" ",n.currentUserTimezone+" Standard Time"," "),l(4),p("ngClass",R(18,ei,((t=T(11,6,n.resize.windowSize$))==null?null:t.width)>1024?"justify-content-end":"justify-content-between w-100")),l(2),q("height",((i=T(13,8,n.resize.windowSize$))==null?null:i.width)>1024?n.isZoomConnected?((i=T(14,10,n.resize.windowSize$))==null?null:i.height)-160:((i=T(15,12,n.resize.windowSize$))==null?null:i.height)-320:"100%","px"),p("ngClass",Oe(20,ti,((e=T(16,14,n.resize.windowSize$))==null?null:e.width)>1024,((e=T(17,16,n.resize.windowSize$))==null?null:e.width)<=1024)),l(6),$(n.mergedDates),l(2),S(n.mergedDates!=null&&n.mergedDates.length?20:-1)}}function yi(o,m){if(o&1){let t=y();
2r(0,"app-modal",22)(1,"div",56)(2,"div",57)(3,"h3",58),d(4,"Note"),s(),r(5,"h6",59),d(6," All of your slots will be removed except booked ones "),s()()(),r(7,"div",60)(8,"button",61),d(9," Cancel "),s(),r(10,"button",62),_("click",function(){g(t);let e=c();return f(e.letsResetAllSlots())}),d(11," Continue "),s()()()}o&2&&p("verticallyCentered",!0)}function bi(o,m){if(o&1){let t=y();r(0,"app-modal",23)(1,"div",56)(2,"div",57)(3,"h3",58),d(4,"Note"),s(),r(5,"h6",59),d(6," The changes will be applied to new slots only "),s()()(),r(7,"div",60)(8,"button",63),_("click",function(){g(t);let e=c();return f(e.Buffer=!e.Buffer)}),d(9," Cancel "),s(),r(10,"button",62),_("click",function(){g(t);let e=c();return f(e.updateMentorBuffer())}),d(11," Continue "),s()()()}o&2&&p("verticallyCentered",!0)}var Me=(()=>{let m=class m{constructor(i,e,n,a,u,h,C,M,w,I){this.activatedRoute=i,this.resize=e,this.http=n,this.toastr=a,this.store=u,this.mix=h,this.modalService=C,this.helper=M,this.fb=w,this.router=I,this.sessionForm=this.fb.group({Name:["",[E.required,E.maxLength(70)]],Description:["",[E.required,E.maxLength(300)]],Price:["",[E.required,E.min(0),E.max(1e4)]],Duration:["60",[E.required,E.min(15),E.max(180)]],AttendeeLimit:["100",[E.required,E.min(2),E.max(1e3)]]}),this.faFileSignature=Ke,this.faAddressCard=ot,this.faDollar=rt,this.faClock=Qe,this.faPerson=He,this.sreenHeight=window.innerHeight,this.faArrowLeft=Xe,this.faRepeat=Ge,this.currentUserTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.mentorZoomAuthUrl=de.mentorZoomAuthUrl,this.mergedDates=[],this.slots=[],this.destroy$=new H,this.isZoomConnected=!1,this.user$=this.store.select(me),this.newSlots=[],this.bufferSlotConfirmationModal=!1,this.resetSlotConfirmationModal=!1,this.Datafilter=[],this.isMegaSessionPaid=!1,this.modalService.getModalStateObservable().pipe(P(this.destroy$),v((O,F)=>JSON.stringify(O)===JSON.stringify(F))).subscribe(O=>{this[O?.id]=O?.show}),this.mix.trackPageVisit(),this.user$.pipe(P(this.destroy$),v((O,F)=>JSON.stringify(O)===JSON.stringify(F))).subscribe(O=>{this.localStorageUser=O,this.isZoomConnected=!0,this.localStorageUser?.zoomAccessTokenEnc!=""&&this.localStorageUser?.zoomAccessTokenEnc!=null&&(this.isZoomConnected=!0)}),this.activatedRoute.queryParams.pipe(P(this.destroy$),v((O,F)=>JSON.stringify(O)===JSON.stringify(F))).subscribe(O=>{this.routeBackParam=O.dashboard})}ngOnInit(){let i=localStorage.getItem("session");i&&this.selectMentorSession(JSON.parse(i)),i&&(this.editSession=JSON.parse(i),this.sessionForm.get("Name").setValue(this.editSession.title),this.sessionForm.get("Description").setValue(this.editSession.description),this.sessionForm.get("Price").setValue(this.editSession.price+""),this.sessionForm.get("Duration").setValue(this.editSession.duration+""),this.sessionForm.get("AttendeeLimit").setValue(this.editSession.attendeeLimit+"")),this.fetchUser()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}getUserDataFromLocalStorage(){this.Availability=localStorage.getItem("isAvailable")}updateMentorBuffer(){let i={mentorId:this.localStorageUser.id,onOff:this.Buffer,mentorBufferTimeMin:this.Buffer==!0?5:0};this.http.loaderPost("api/user/create-update-mentor-slot-bufferGap",i,!0,!0).pipe(P(this.destroy$),z(()=>{this.helper.showModal(!1,"bufferSlotConfirmationModal"),V.loader.next(!1)}),v((e,n)=>JSON.stringify(e)===JSON.stringify(n))).subscribe(e=>{let n=W(Z({},this.localStorageUser),{mentorSlotBuffer:e?.model?.mentorDetails?.[0]?.mentorSlotBuffer});this.store.dispatch(be({user:n}))})}setMentorBuffer(i,e){let n=this.localStorageUser.mentorSlotBuffer!==0&&this.localStorageUser.mentorSlotBuffer!==void 0&&this.localStorageUser.mentorSlotBuffer!==null;n&&(this.Buffer=n),this.getUserDataFromLocalStorage(),this.getAndUpdateSlots(e),i&&this.toastr.success(i)}newSlot(i){let e=this.tellIndex(i);e!==-1&&this.newSlots.splice(e,1),i.alreadySelected&&(i.alreadySelected=!1),i.repeat=!1;for(let n of this.mergedDates){for(let a of n.data.amSlots)this.editSession?!a.alreadyRepeat&&(a.alreadySelected||a.isSelected)&&(a.megaSessionId==null||a.megaSessionId===this.editSession?.id)&&(a.isSelected=!1,a.alreadySelected=!1):a.alreadySelected||(a.isSelected=!1);for(let a of n.data.pmSlots)this.editSession?!a.alreadyRepeat&&(a.alreadySelected||a.isSelected)&&(a.megaSessionId==null||a.megaSessionId===this.editSession?.id)&&(a.isSelected=!1,a.alreadySelected=!1):a.alreadySelected||(a.isSelected=!1)}i.isSelected=!0,this.editSession?this.newSlots.push(i):this.newSlots[0]=i,this.mergedDates=[...this.mergedDates]}checkIfAllSlotsUnselected(){return this.newSlots.every(i=>i.isSelected===!1)}repeatToggleCheck(i){let e=i.data[i.onlyPeriod.toLowerCase()+"Slots"];return this.findSimilarObjects(e,this.newSlots)?.length>0}onToggleEverySwitch(i,e){let n=e.data[e.onlyPeriod.toLowerCase()+"Slots"];(n?.filter(w=>w?.isSelected===!0&&w?.alreadySelected===!1)).filter(w=>!this.newSlots.some(I=>
2I.dateTime===w.dateTime)).forEach(w=>{this.newSlots.push(w)});let h=this.findSimilarObjects(n,this.newSlots),C=this.arraysMatch(n,h),M=n?.some(w=>w?.repeat===!0);(C||M)&&n.forEach(w=>{let I=this.newSlots.find(O=>O.dateTime===w.dateTime);if(I){this.updateSlot(I,i.target.checked);let O=this.slots.filter(F=>F?.day===I?.day&&F.hourId===I.hourId&&F?.dateTime!=I?.dateTime);this.updateSlots(O,i.target.checked)}}),i.target.checked||h.forEach(w=>{w.isSelected=w.alreadySelected,w.repeat=w?.alreadyRepeat;let I=this.newSlots.findIndex(O=>O.dateTime===w.dateTime);I!==-1&&this.newSlots.splice(I,1)})}updateSlot(i,e){let n=this.tellIndex(i);n!==-1&&this.newSlots.splice(n,1),i.repeat=e,e&&this.newSlots.push(i)}updateSlots(i,e){i.forEach(n=>{if(n.repeat=n?.alreadyRepeat?!0:e,n.isSelected=n?.alreadySelected?!0:e,e)this.newSlots.push(n);else{let a=this.tellIndex(n);a!==-1&&this.newSlots.splice(a,1)}})}getSlots(i){return this.slots.filter(e=>e.dateString==i.date&&e.onlyPeriod==i.onlyPeriod)}getMentorSlots(i){this.mergedDates=[],this.slots=[];let e=this.localStorageUser,n=(0,j.default)().utc(),a={mentorId:e.id,fromUTCTime:n.format()};this.http.loaderPost("api/user/getMentorSlots",a,!0,!1).pipe(P(this.destroy$),v((u,h)=>JSON.stringify(u)===JSON.stringify(h))).subscribe(u=>xe(this,null,function*(){this.setMentorBuffer(i||null,u.model.slotsData)}))}getAndUpdateSlots(i){let e=i;this.slots=[],this.mergedDates=[],this.slots=e.map(a=>{let u=(0,j.default)(a.dateTime),h=u.format("dddd DD-MMM"),C=u.format("h"),M=u.format("A");return W(Z({},a),{dateString:h,onlyHour:C,onlyPeriod:M,alreadySelected:a.isSelected||!1,dateTime:u})}),this.slots.sort((a,u)=>a.dateTime.valueOf()-u.dateTime.valueOf());let n={};this.slots.forEach(a=>{let u=a.dateTime.format("YYYY-MM-DD");n[u]||(n[u]=[]),this.editSession&&this.editSession?.id===a?.megaSessionId&&(this.newSlots.push(a),this.isMegaSessionPaid=a?.isMegaSessionPaid),n[u].push(a)}),Object.keys(n).forEach(a=>{let u=n[a],h=[],C=[];u.forEach(M=>{M.alreadyRepeat=M?.repeat,M.dateTime.hour()<12?h.push(M):C.push(M)}),n[a]={amSlots:h,pmSlots:C},this.mergedDates.push({date:a,repeat:u.some(M=>M.isSelected),day:(0,j.default)(a).format("dddd"),onlyPeriod:n[a]?.pmSlots?.length?"PM":"AM",onlyHours:u[0].onlyHour,data:n[a]})}),V.loader.next(!1)}letsCreateMentorSlots(){this.newSlots?.map(C=>{delete C?.dateString});let i=this.sessionForm.get("Name").value,e=this.sessionForm.get("Description").value,n=this.sessionForm.get("Price").value,a=this.sessionForm.get("Duration").value,u=this.sessionForm.get("AttendeeLimit").value;if(i==""){this.toastr.error("Session Title is required");return}if(e==""){this.toastr.error("Session Description is required");return}if(n==null||n==""){this.toastr.error("Session Price is required");return}let h={Title:i,Description:e,Price:parseFloat(n),SlotsData:this.newSlots,Duration:a,AttendeeLimit:u};this.http.loaderPost("api/MegaSession/create",h,!0,!0).pipe(P(this.destroy$),v((C,M)=>JSON.stringify(C)===JSON.stringify(M))).subscribe(C=>{this.newSlots=[],this.getMentorSlots(null),V.loader.next(!1),this.router.navigate(["/creator/mega-session"])})}letsUpdateMentorSlots(){this.newSlots?.map(C=>{delete C?.dateString});let i=this.sessionForm.get("Name").value,e=this.sessionForm.get("Description").value,n=this.sessionForm.get("Price").value,a=this.sessionForm.get("Duration").value,u=this.sessionForm.get("AttendeeLimit").value;if(i==""){this.toastr.error("Session Title is required");return}if(e==""){this.toastr.error("Session Description is required");return}if(n==null||n==""){this.toastr.error("Session Price is required");return}if(!this.editSession?.id){this.toastr.error("Session not found");return}let h={Id:this.editSession.id,Title:i,Description:e,Price:parseFloat(n),Duration:a,AttendeeLimit:u,SlotsData:this.newSlots};this.http.loaderPost("api/MegaSession/update",h,!0,!1).pipe(P(this.destroy$),v((C,M)=>JSON.stringify(C)===JSON.stringify(M))).subscribe(C=>{this.newSlots=[],this.getMentorSlots(null),V.loader.next(!1),this.toastr.success("Session updated successfully"),this.router.navigate(["/creator/mega-session"])},C=>{this.toastr.error(C)})}letsResetAllSlots(){this.http.loaderGet("api/user/reset-and-get-all-slots",!0,!0).pipe(P(this.destroy$),v((i,e)=>JSON.stringify(i)===JSON.stringify(e))).subscribe(i=>xe(this,null,function*(){yield this.getMentorSlots(i.successMessage)}))}redirectToZoom(){this.http.loaderGet("api/zoom/redirect",!0,!1).pipe(P(this.destroy$),z(()=>{V.loader.next(!1)}),v((i,e)=>JSON.stringify(i)===JSON.stringify(e))).subscribe(i=>{let e=i?.model?.redirectUrl;localStorage.setItem("check_zoom","true"),window.open(e,"_self")})}tellIndex(i){return this.newSlots.findIndex(n=>n.colabedDateTime===i.colabedDateTime&&n.date===i.date&&n.dateString===i.dateString&&n.dateTime===i.dateTime&&n.day===i.day&&n.endDateTime===i.endDateTime&&n.hour===i.hour&&n.hourId===i.hourId&&n.onlyHour===i.onlyHour&&n.onlyPeriod===i.onlyPeriod&&n.period===i.period)}fetchUser(){this.http.loaderGet("api/User/get-user-profile",!0,!0).pipe(P(this.destroy$),v((i,e)=>JSON.stringify(i)===JSON.stringify(e))).subscribe(i=>{if(i?.model){let e={zoomAccessTokenEnc:i?.model?.mentorDetails?.[0]?.zoomAccessTokenEnc,zoomRefreshTokenEnc:i?.model?.mentorDetails?.[0]?.zoomRefreshTokenEnc,zoomKey:i?.model?.mentorDetails?.[0]?.zoomKey,zoomAesiv:i?.model?.mentorDetails?.[0]?.zoomAesiv};this.store.dispatch(be({user:e})),this.getMentorSlots(null)}})}arraysMatch(i,e){if(i.length&&e.length){for(let n=0;n<e.length;n++){let a=!1;for(let u=0;u<i.length;u++)if(e[n]?.dateTime===i[u]?.dateTime){a=!0;break}if(!a)return!1}return!0}else return!1}findSimilarObjects(i,e){let n=[];for(let a of i)for(let u of e)if(a.dateTime===u.dateTime){n.push(a);break}return n}findSimilarObjectsWithRepeat(i,e){let n=i.data[i.onlyPeriod.toLowerCase()+"Slots"],a=[];for(let u of n)for(let h of e)if(u.dateTime===h.dateTime){u.repeat===!0&&a.push(u);break}return a}returnZoomValid(){return!1}selectMentorSession(i){this.creatorSlotsTiming=i.slots.map(e=>{let n=(0,j.default)(e.fromTiming,"hh:mm A").format("HH:mm"),a=(0,j.default)(e.slotDate+"T"+n+"Z","YYYY-MM-DDTHH:mmZ").format("dddd DD-MMM-YYYY"),u=j.default.utc(e.fromTiming,"LT").local().format("LT"),h=j.default.utc(e.toTiming,"
2LT").local().format("LT");return W(Z({},e),{fromTiming:u,toTiming:h,convertedTime:a})}),this.filterData()}filterData(){let i=this.creatorSlotsTiming.reduce((e,n)=>{let a={id:n.id,days:n.days,fromTiming:n.fromTiming,toTiming:n.toTiming,date:n.date,availablity:n.availablity,conflict:n.conflict,price:n.price,megaSessionId:n.megaSessionId,convertedTime:n.convertedTime},u=e.find(h=>h.convertedTime===a.convertedTime);if(u)u.match.push(a);else{let h={date:a.date,days:a.days,convertedTime:a.convertedTime,match:[a]};e.push(h)}return e},[]);this.Datafilter=i}};m.\u0275fac=function(e){return new(e||m)(D(Fe),D(_e),D(he),D(ce),D(le),D(pt),D(mt),D(Se),D(Re),D(te))},m.\u0275cmp=G({type:m,selectors:[["app-create-mega-session"]],standalone:!0,features:[X],decls:32,vars:19,consts:[[1,"container"],[1,"row"],[1,"col-lg-12","mb-3","d-flex","flex-row","justify-content-between"],[1,"text-start","d-flex","align-items-center"],["routerLink","/creator/complete-profile",1,"me-3","cursor",3,"icon"],[1,"gilroyEB","mb-0"],[1,"btnPrimary","sizeClass","gilroy-sb",3,"disabled"],[1,"schedule","gilroy-sb"],[1,"border","rounded","px-3","py-4","mb-2","text-center"],[1,"row","d-flex","flex-column","mb-4"],[1,"col-12","col-lg-7","d-flex","align-items-center"],[1,"head-text"],[1,"gilroy-sb"],[1,"col-12","d-flex","flex-column","flex-lg-row","gap-2"],[1,"flex-grow-1"],["type","text","control","Name","label","Title","placeholder","Enter a name that reflects the content or purpose of your package.",2,"height","56px","width","100%",3,"form","icon"],["type","text","placeholder","Describe what fans will receive or experience in this package","control","Description","label","Description",2,"height","56px","width","100%",3,"icon","form","limit"],[1,"col-12","d-flex","flex-column","flex-lg-row","gap-2","mt-3"],["type","number","control","Duration","label","Duration (in minutes)","placeholder","Enter the duration of the session in minutes",2,"height","56px","width","100%",3,"form","icon"],["type","text","placeholder","Add maximum number of users that can join","control","AttendeeLimit","label","Maximum Attendees",2,"height","56px","width","100%",3,"icon","form","limit"],["type","number","placeholder","Please enter the price per fan","control","Price","label","Price",2,"height","56px","width","100%",3,"icon","form"],[1,"row","position-relative"],["modalId","resetSlotConfirmationModal",3,"verticallyCentered"],["modalId","bufferSlotConfirmationModal",3,"verticallyCentered"],[1,"btnPrimary","sizeClass","gilroy-sb",3,"click","disabled"],[1,"gilroy"],[1,"btnPrimary",3,"click"],[1,"col-12","py-2"],[1,"my-1"],[1,"fs-6","d-inline-block"],[1,"row","g-3","row-gap-1",3,"ngClass"],[1,"col"],["type","radio",1,"btn-check",3,"disabled","readOnly"],[1,"w-100","btn","datentime","fs-12","gilroy-sb","light-bg-col","rounded-3","border-0","text-primary",3,"ngClass"],[1,"row","justify-content-between","row-1"],[1,"mb-0","sizeClass","gilroy"],[1,"col-12","col-lg-5"],[1,"d-flex","align-items-center",3,"ngClass"],[1,"row","timing","mt-3","overflow-x-hidden","position-relative",3,"ngClass"],[1,"col-12","col-lg-4","mb-3"],[1,"fixed-tops","select-time","rounded","py-3","px-4","my-2"],[1,"rateInp"],[1,"d-flex","justify-content-between","align-items-center","w-100"],[1,"sizeClass","gilroy-sb","mb-0"],["role","group",1,"btn-group","am-pm-grp"],[1,"d-flex","flex-wrap","my-2","hour-card","w-100"],[1,"pt-1","smallBox"],["type","radio","value","AM",1,"btn-check","gilroy-sb",3,"ngModelChange","name","id","ngModel"],[1,"btn",3,"for"],["type","radio","value","PM",1,"btn-check","gilroy-sb",3,"ngModelChange","name","id","ngModel"],[1,"btn","gilroy-sb",3,"for"],["type","checkbox",1,"btn-check","gilroy-sb",3,"ngModelChange","change","id","ngModel","disabled"],["container","body","placement","top",1,"w-100","gilroy-b","text-center","py-2","labelBox","cursor",3,"ngbTooltip","for","ngClass"],[1,"ms-1",3,"icon"],[1,"d-flex","align-items-center","justify-content-end","gap-3","w-100"],[1,"btnPrimary","sizeClass","gilroy-sb",3,"click"],[1,"modal-body"],[1,"py-5","px-3","text-center"],[1,"my-4","gilroy-sb"],[1,"text-black"],[1,"modal-footer"],["data-bs-dismiss","modal",1,"btn","btn-secondary","rounded","gilroy-sb"],["data-bs-dismiss","modal",1,"btnPrimary","btn","me-3","rounded","gilroy-sb",3,"click"],["data-bs-dismiss","modal",1,"btn","btn-secondary","rounded","gilroy-sb",3,"click"]],template:function(e,n){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),k(4,ni,1,1,"fa-icon",4)(5,oi,2,0,"h5",5)(6,ri,2,0,"h5",5),s(),k(7,si,2,1,"button",6)(8,ai,2,1,"button",6),s()(),r(9,"div",7),k(10,li,5,0,"div",8),r(11,"div",9)(12,"div",10)(13,"div",11)(14,"h6",12),d(15,"Session's Details"),s()()(),r(16,"div",13)(17,"div",14),x(18,"app-input",15),s(),r(19,"div",14),x(20,"app-input",16),s()(),r(21,"div",17)(22,"div",14),x(23,"app-input",18),s(),r(24,"div",14),x(25,"app-input",19),s(),r(26,"div",14),x(27,"app-input",20),s()()(),k(28,mi,3,0,"div",21)(29,xi,21,23),s(),k(30,yi,12,1,"app-modal",22)(31,bi,12,1,"app-modal",23),s()),e&2&&(l(4),S(n.routeBackParam?4:-1),l(),S(n.editSession?5:6),l(2),S(n.editSession?7:8),l(3),S(n.returnZoomValid()?10:-1),l(8),p("form",n.sessionForm)("icon",n.faFileSignature),l(2),p("icon",n.faAddressCard)("form",n.sessionForm)("limit",300),l(3),p("form",n.sessionForm)("icon",n.faClock),l(2),p("icon",n.faPerson)("form",n.sessionForm)("limit",1e3),l(2),p("icon",n.faDollar)("form",n.sessionForm),l(),S(n.editSession&&n.isMegaSessionPaid?28:29),l(2),S(n.resetSlotConfirmationModal?30:-1),l(),S(n.bufferSlotConfirmationModal?31:-1))},dependencies:[Ce,ae,oe,Ue,Le,re,se,ee,K,Q,Ie,ue,pe,fe,ge,ne,ie,dt,ct],styles:[`.iosSwitch[_ngcontent-%COMP%]{display:flex;align-items:center}.iosSwitch[_ngcontent-%COMP%]   .theme-checkbox[_ngcontent-%COMP%]{--toggle-size: 16px;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:55px;height:25px;background:-webkit-gradient(linear,left top,right top,color-stop(50%,#a0aec0),color-stop(50%,#0dca3b)) n
2o-repeat;background:-o-linear-gradient(left,#a0aec0 50%,#0dca3b 50%) no-repeat;background:linear-gradient(to right,#a0aec0 50%,#0dca3b 50%) no-repeat;background-size:205%;background-position:0;-webkit-transition:.4s;-o-transition:.4s;transition:.4s;border-radius:99em;position:relative;cursor:pointer;font-size:var(--toggle-size)}.iosSwitch[_ngcontent-%COMP%]   .theme-checkbox[_ngcontent-%COMP%]:before{content:"";width:18px;height:18px;position:absolute;top:50%;transform:translateY(-50%);left:.3em;background:-webkit-gradient(linear,left top,right top,color-stop(50%,#efefef),color-stop(50%,#efefef)) no-repeat;background:-o-linear-gradient(left,#efefef 50%,#efefef 50%) no-repeat;background:linear-gradient(to right,#efefef 50% 50%) no-repeat;background-size:205%;background-position:100%;border-radius:50%;-webkit-transition:.4s;-o-transition:.4s;transition:.4s}.iosSwitch[_ngcontent-%COMP%]   .theme-checkbox[_ngcontent-%COMP%]:checked:before{left:calc(100% - 15px - .438em);background-position:0}.iosSwitch[_ngcontent-%COMP%]   .theme-checkbox[_ngcontent-%COMP%]:checked{background-position:100%}.rateInp[_ngcontent-%COMP%]{background-color:#e0fcf4;border-radius:16px;padding:10px 1rem;display:flex;justify-content:space-between;align-items:center;transition:.5s all ease-in-out}.rateInp.enable[_ngcontent-%COMP%]{background-color:#e0fcf4}.rateInp.disabled[_ngcontent-%COMP%]{background-color:#edf2f7}.notAllowed[_ngcontent-%COMP%]{cursor:not-allowed!important}.rateInp[_ngcontent-%COMP%]{background-color:#e0fcf4;border-radius:16px;padding:10px 1rem;transition:.5s all ease-in-out;min-height:225px;display:flex;flex-direction:column;justify-content:space-between}.rateInp[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#424246;font-size:14px}.rateInp[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{color:#424246}.rateInp[_ngcontent-%COMP%]   .inp[_ngcontent-%COMP%]{background-color:#ddeaff;padding:10px 1rem;border-radius:10px;z-index:1;min-width:10%}.rateInp[_ngcontent-%COMP%]   .inpBox[_ngcontent-%COMP%]{width:60%;margin-left:auto}.rateInp[_ngcontent-%COMP%]   .inpBox[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{width:90%;padding:10px 1rem;border-top-right-radius:10px;border-bottom-right-radius:10px;background:#fff9;border:none;transform:translate(-10px);z-index:0;outline:none}.rateInp[_ngcontent-%COMP%]   .inpBox[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus{border:none;box-shadow:none}.smallBox[_ngcontent-%COMP%]{width:22.2222222222%;margin:4px 6px 4px 0;cursor:pointer}.smallBox[_ngcontent-%COMP%]   .btn-check[_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background-color:#8efc5a;color:#fff}.labelBox[_ngcontent-%COMP%]{color:#8efc5a;border:1px solid #8efc5a;font-size:10px;background-color:transparent;border-radius:10px}.am-pm-grp[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{font-size:12px;background-color:#bdc7db;color:#424246;transition:.5s all ease-in-out;border:none}.am-pm-grp[_ngcontent-%COMP%]   .btn-check[_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background-color:#8efc5a;color:#fff}.schedule[_ngcontent-%COMP%]   .fixed-tops[_ngcontent-%COMP%]{position:sticky;bottom:0;width:97.5%;margin:auto;z-index:999;transition:all .5s}.schedule[_ngcontent-%COMP%]   .sizeClass[_ngcontent-%COMP%]{font-size:13px}.schedule[_ngcontent-%COMP%]   .select-time[_ngcontent-%COMP%]{background-color:#e0fcf4}.schedule[_ngcontent-%COMP%]   .timing[_ngcontent-%COMP%]{overflow-y:auto}.disabled-slot[_ngcontent-%COMP%]{opacity:.6!important;cursor:not-allowed!important}@media only screen and (max-width: 1024px){.rateInp[_ngcontent-%COMP%]   .inpBox[_ngcontent-%COMP%]{width:40%}}@media (max-width: 767.98px){.schedule[_ngcontent-%COMP%]   .row-1[_ngcontent-%COMP%]   .head-text[_ngcontent-%COMP%]{text-align:center}.schedule[_ngcontent-%COMP%]   .row-1[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], .schedule[_ngcontent-%COMP%]   .timing[_ngcontent-%COMP%]   .save[_ngcontent-%COMP%]{width:100%}.schedule[_ngcontent-%COMP%]   .fixed-tops[_ngcontent-%COMP%]{width:89%!important}.schedule[_ngcontent-%COMP%]   .fixed-tops[_ngcontent-%COMP%]{position:fixed;bottom:-5px;left:50%;transform:translate(-50%);margin:0!important}}@media (max-width: 480px){.schedule[_ngcontent-%COMP%]   .package[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]{width:80px}.schedule[_ngcontent-%COMP%]   .package[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{height:35px;padding-left:35px}.schedule[_ngcontent-%COMP%]   .package[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]   .dollar[_ngcontent-%COMP%]{background-color:#e8e7e7;width:25px;height:25px;top:5px;left:5px}.schedule[_ngcontent-%COMP%]   .fixed-tops[_ngcontent-%COMP%]{width:100%!important}.timing-card[_ngcontent-%COMP%]   .hour-card[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{padding:3px}}@media (max-width: 320px){.repeat[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{font-size:15px}}@media (max-width: 991.98px) and (min-width: 767.98px){.timing-card[_ngcontent-%COMP%]   .hour-card[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{font-size:14px}}@media (max-width: 1200px) and (min-width: 1399px){.timing-card[_ngcontent-%COMP%]   .hour-card[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{padding:2px 5px}}
3/*# sourceMappingURL=create-mega-session.component-NBSGXJVB.css.map */`]});let o=m;return o}
3)();var mn=[{path:"",component:xt},{path:"create",component:Me},{path:"edit",component:Me}];export{mn as Mega_Session_Routes};
4//# sourceMappingURL=mega-session.routes-6HEFMC56.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.