PageSourceSearch

https://gospring.ai/chunk-STJLRGYE.js

js gospring.ai collected 2026-10-03 19:26:21 UTC 8,700 bytes, 1 lines download raw bytes

1import{$d as q,Gc as A,Q as z,T as P,ce as p,de as T,ge as o,je as d,ke as m,pe as v,re as b,se as y,te as h,ue as g,wg as j,xe as S,ye as w,ze as E}from"./chunk-672O2MLB.js";import{a as R,b as x,h as f}from"./chunk-V6KAXZDU.js";var C=class D{constructor(e,n){this.firestore=e;this.HelperService=n}template;quizFormatList;quizzes;setTemplate(e){this.template=e}getTemplate(){return this.template}setQuizFormatList(e){this.quizFormatList=e}getQuizFormatList(){return this.quizFormatList}setTemplateQuizzes(e){this.quizzes=e}getTemplateQuizzes(){return this.quizzes}getTemplateDetails(e){return new Promise((n,i)=>{if(e){let a=o(this.firestore,"template",e),t=null;d(a).then(r=>{t=r.data(),t?this.getTemplateQuestionConfig(e,"questionPageLayout").then(c=>{c&&(t.questionPageLayout=c),n(t)}).catch(c=>{n(t)}):n(t)}).catch(r=>{i(!1)})}else i(!1)})}createQuizInviteTemplate(e){return new Promise((n,i)=>{let a=h();var t=o(this.firestore,"quiz_invite_template",e.quizId),r=x(R({},e),{creationDate:a});g(t,r).then(c=>{n(!0)}).catch(c=>{console.log(c)})})}getQuizInviteTemplate(e){return new Promise((n,i)=>{if(e){let a=o(this.firestore,"quiz_invite_template",e),t=null;d(a).then(r=>{t=r.data(),n(t)}).catch(r=>{i(!1)})}})}getTemplateQuestionConfig(e,n){return new Promise((i,a)=>{if(e){let t=o(this.firestore,"template",e,n,"default"),r=null;d(t).then(c=>{r=c.data(),i(r)}).catch(c=>{a(!1)})}else a(!1)})}storeRecipientListInRecipientSubCollection(e,n){return new Promise((i,a)=>{let t=A().currentUser?.uid;e.forEach(r=>f(this,null,function*(){let c=h(),s=this.HelperService.uuidv4();var l=o(this.firestore,"user",t,"recipients",s),u=x(R({},r),{creationDate:c,userId:t,id:s});(yield this.getRecipientByEmail(t,u.Email))||g(l,u)})),Promise.all("done").then(r=>{i(!0)}).catch(r=>{console.log(r)})})}storeRecipientListInRecipientSubCollectionQuizID(e,n){return new Promise((i,a)=>{let t=A().currentUser?.uid;e.forEach(r=>f(this,null,function*(){let c=h(),s=this.HelperService.uuidv4();var l=o(this.firestore,"user",t,"recipients",n,"quizRecipient",s),u=x(R({},r),{creationDate:c,userId:t,id:s});let I=yield this.getRecipientByEmail(t,u.Email);I||(console.log("getData",I,u),g(l,u))})),Promise.all("done").then(r=>{i(!0)}).catch(r=>{console.log(r)})})}getRecipientByEmail(e,n){return new Promise((i,a)=>f(this,null,function*(){let t,r=p(this.firestore,"user",e,"recipients"),c=y(r,w("Email","==",n));try{(yield m(c)).forEach(l=>{l.data()&&(t=l.data())}),i(t)}catch(s){console.log("error in recipent in email ",s),a(s)}}))}getRecipientByUserId(){return new Promise((e,n)=>f(this,null,function*(){let i=A().currentUser?.uid,a=[],t=p(this.firestore,"user",i,"recipients"),r=y(t,b("creationDate"));try{(yield m(r)).forEach(s=>{s.data()&&a.push(s.data())}),e(a)}catch(c){console.log("error while getting recipient user id ",c),n(c)}}))}getCertificateTemplate(e){return new Promise((n,i)=>{let a=o(this.firestore,"templates",e),t=null;d(a).then(r=>{t=r.data(),n(t)}).catch(r=>{i(!1)})})}getListOfTemplates(e){return new Promise((n,i)=>f(this,null,function*(){try{let a=[],t=p(this.firestore,"template"),r=y(t,w("templateId","in",e));(yield m(r)).forEach(s=>{a.push(s.data())}),n(a)}catch(a){i(a)}}))}static \u0275fac=function(n){return new(n||D)(P(q),P(j))};static \u0275prov=z({token:D,factory:D.\u0275fac,providedIn:"root"})};var L=class D{constructor(e){this.firestore=e}microAccountDetails;getMicroAccountDetails(){return this.microAccountDetails}setMicroAccountDetails(e){this.microAccountDetails=e}getPvrQuizzes(e){return new Promise((n,i)=>f(this,null,function*(){let a=y(T(this.firestore,"quiz"),w("refTemplateId","==",e)),t=yield m(a),r=[];t.forEach(c=>f(this,null,function*(){if(c.data().quizStatus!="t"&&(c.data().refContentId=="Z7i7tAYkLfPXuRdMX1bK3PdDIPL2"||c.data().refContentId=="z3NvHAPGN5dC8cv1DNacL6qP7Bs2"||c.data().refContentId=="TX5g6qV634YT1gBgoBT67hPTiil1"||c.data().refContentId=="jSxaIecKXsOSkFTxbc9yCGoTWnj2"||c.data().refContentId=="1GteEB3bVTPGelhUVTcucZembf72"||c.data().refContentId=="GR77h0V0tyYGW4U2Juix5rvbr9z1")){let s={quizStatus:c.data().quizStatus,quizName:c.data().quizName,quizId:c.data().quizId,creationDate:this.getDateTime(c.data().creationDate.seconds),creatorName:c.data().creatorName,refContentId:c.data().refContentId};
1r.push(s)}})),n(r||null)}))}getQuizStats(e){return new Promise((n,i)=>{let a={},t=o(this.firestore,"quiz_stats",e);d(t).then(r=>{a=r.data(),n(a?.instanceCount??0)}).catch(r=>{a=null,i(r)})})}getQuizStats1(e){return new Promise((n,i)=>{let a={},t=o(this.firestore,"quiz_stats",e);d(t).then(r=>{a=r.data(),n(a.completedCount)}).catch(r=>{a=null,i(r)})})}getDateTime(e){if(e){let n=new Date(e*1e3),i=n.toDateString(),a=n.toLocaleString(),t=i.split(" "),r=a.split(", "),c=t[3].split("0"),s;return s=t[0]+" "+t[2]+" "+t[1]+" '"+c[1]+" - "+r[1],s}else return"-"}getAccountInfo(e){return new Promise((n,i)=>{let a="ebGl6wWxjERc6cHt0fDQ",t={};e&&e.refAccountId&&e.refAccountId!==""&&(a=e.refAccountId);let r=o(this.firestore,"account",a);d(r).then(c=>{t=c.data(),t.accountId=c.id,n(t)}).catch(c=>{t=null,i(c)})})}getAccountInfoWithAdapters(e){return new Promise((n,i)=>{let a="ebGl6wWxjERc6cHt0fDQ",t={},r=o(this.firestore,"account",a);d(r).then(c=>{t=c.data(),t.accountId=c.id,t.adapters={};let s=y(p(this.firestore,"adapter"),w("refAccountId","==",a));m(s).then(l=>{l.docs.forEach(u=>{t.adapters[u.id]=u.data(),t.adapters[u.id].id=u.id}),n(t)}).catch(l=>{n(t)})}).catch(c=>{t=null,i(c)})})}createNewAccountAndContent(e){return new Promise((n,i)=>{let a=E(this.firestore),t={accountId:e.userId,name:e.name,refContractId:"",refPlanId:"p01",brandColor:!1,creationDate:h(),createdBy:e.userId},r=o(this.firestore,"account",t.accountId);a.set(r,t);let c={contentId:e.userId,refAccountId:t.accountId,refUserId:e.userId,createdBy:e.userId,creationDate:h()},s=o(this.firestore,"contentAccountMapping",c.contentId);a.set(s,c),a.commit().then(l=>{n(!0)}).catch(l=>{i(!1)})})}getAccountDetails(e){return new Promise((n,i)=>{let a,t=o(this.firestore,"account",e);d(t).then(r=>{a=r.data(),n(a)}).catch(r=>{a=null,i(r)})})}updateAccount(e,n=null){return n?new Promise((i,a)=>{e.lastUpdateDate=h();let t=o(this.firestore,"account",e.accountId);S(t,e),i(e)}):new Promise((i,a)=>{e.lastUpdateDate=h();let t=x(R({},e),{brandColor:!0}),r=o(this.firestore,"account",t.accountId);S(r,t),i(t)})}getAccountStatsById(e){return new Promise((n,i)=>{let a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t,r=new Date,c=new Date(r.setMinutes(r.getMinutes()-r.getTimezoneOffset())),s=a[c.getMonth()],l=r.getFullYear();r=s+"_"+l;let u=o(this.firestore,"account_stats",e,"monthly_stats",r);d(u).then(I=>{t=I.data(),n(t)}).catch(I=>{t=null,i(I)})})}addEventcardData(e,n=null){return new Promise((i,a)=>{e.creationDate=h(),e.id=n?e.id:this.uuidv4(),e.isDeleted=!1;let t=o(this.firestore,"contentAccountMapping",e.contentId,"event_card",e.id);g(t,e).then(r=>{i(!0)}).catch(r=>{a(r)})})}getEventCardListData(e){return new Promise((n,i)=>{let a=[],t=y(p(this.firestore,"contentAccountMapping",e,"event_card"),b("creationDate","desc"));m(t).then(r=>{r.docs.forEach(c=>{let s=c.data();s.isDeleted==!1&&a.push(s)}),n(a)}).catch(r=>{n(a)})})}eventCardDeleteDoc(e){return new Promise((n,i)=>{e.isDeleted=!0,e.updateDate=h();let a=o(this.firestore,"contentAccountMapping",e.contentId,"event_card",e.id);g(a,e).then(t=>{n(!0)}).catch(t=>{i(t)})})}uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=Math.random()*16|0,i=e=="x"?n:n&3|8;return i.toString(16)})}isLeagueNameAlreadyCreated(e){return new Promise((n,i)=>f(this,null,function*(){let a=y(p(this.firestore,"account"),w("leagueName","==",e),v(1)),t=yield m(a),r=[];if(t.size!=0){let c="";t.forEach(s=>f(this,null,function*(){let l=s.data();c=s.id,r.push(l)})),n(r)}else n(r)}))}saveEmailTextInAccount(e,n){return new Promise((i,a)=>f(this,null,function*(){let t=o(this.firestore,"contentAccountMapping",e);g(t,n,{merge:!0}).then(r=>{i(r)}).catch(r=>{a(r)})}))}getContentAccountMappingInfo(e){return new Promise((n,i)=>{let a,t=o(this.firestore,"contentAccountMapping",e);d(t).then(r=>{a=r.data(),n(a)}).catch(r=>{a=null,i(r)})})}recordUnsubscribe(e,n){return new Promise((i,a)=>
1{let t=o(this.firestore,"unsubscribeRecords",e,"list",n.id);g(t,n,{merge:!0}).then(r=>{i(r)}).catch(r=>{a(r)})})}getUnsubscribesDoc(e){return new Promise((n,i)=>f(this,null,function*(){try{let a=[];(yield m(p(this.firestore,"unsubscribeRecords",e,"list"))).forEach(r=>{a.push(r.data())}),n(a)}catch(a){console.log("error while getting unsub list",a),i(a)}}))}static \u0275fac=function(n){return new(n||D)(P(q))};static \u0275prov=z({token:D,factory:D.\u0275fac,providedIn:"root"})};export{C as a,L as b};

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.