','overflow','log','notAuthorizedModal','/therapists','1131865rVHZcv','short','numeric','
','ready','','closeCart','yearsExperience','display','','335712zXThEe','data:\x20','en-CA','profileImg',' Purchase\x20Session
','','cursor','hidden','text','closeAuthorized','545445FxbeUc','90sBcHyl','.therapistBtn','/activeSession','
','/isLoggedIn','15dBjbPq','userType','closeSession','onclick'];_0x3d16=function(){return _0x4b2f56;};return _0x3d16();}const _0x1d1c11=_0x5367;(function(_0xb68abb,_0x42076f){const _0x43e66f=_0x5367,_0x12e872=_0xb68abb();while(!![]){try{const _0x54f91a=parseInt(_0x43e66f(0x15d))/0x1*(parseInt(_0x43e66f(0x13f))/0x2)+parseInt(_0x43e66f(0x11f))/0x3+parseInt(_0x43e66f(0x15b))/0x4*(-parseInt(_0x43e66f(0x12c))/0x5)+-parseInt(_0x43e66f(0x15f))/0x6+-parseInt(_0x43e66f(0x139))/0x7+-parseInt(_0x43e66f(0x14d))/0x8+-parseInt(_0x43e66f(0x126))/0x9*(-parseInt(_0x43e66f(0x127))/0xa);if(_0x54f91a===_0x42076f)break;else _0x12e872['push'](_0x12e872['shift']());}catch(_0x356019){_0x12e872['push'](_0x12e872['shift']());}}}(_0x3d16,0x67db3));const cartExistModal=document['getElementById'](_0x1d1c11(0x15e)),therapistExistModal=document['getElementById']('therapySessionExistModal'),notAuthorizedModal=document[_0x1d1c11(0x140)](_0x1d1c11(0x137));function _0x5367(_0x2b9298,_0x446f1f){const _0x3d16c4=_0x3d16();return _0x5367=function(_0x53673f,_0x5c692f){_0x53673f=_0x53673f-0x11e;let _0x290409=_0x3d16c4[_0x53673f];return _0x290409;},_0x5367(_0x2b9298,_0x446f1f);}var currentURL=window[_0x1d1c11(0x155)]['href'];currentURL!=window[_0x1d1c11(0x155)]['origin']+_0x1d1c11(0x138)&&setTimeout(_0x1d1c11(0x159),0x1f4);$(document)[_0x1d1c11(0x147)](async function(){const _0x18b103=_0x1d1c11;await $['ajax']({'url':'/getTherapists','type':_0x18b103(0x160),'success':function(_0x4306bc){const _0x8706a2=_0x18b103;console[_0x8706a2(0x136)](_0x8706a2(0x14e),_0x4306bc);var _0x527fd7=0x1;_0x4306bc[_0x8706a2(0x131)](function(_0x4d4df8){const _0x2e243c=_0x8706a2;var _0x3c6aba=_0x2e243c(0x151)+_0x527fd7+'\x22>';_0x3c6aba+='
',_0x3c6aba+=_0x2e243c(0x13c)+_0x4d4df8[_0x2e243c(0x152)]+_0x2e243c(0x120),_0x3c6aba+=_0x2e243c(0x12a),_0x3c6aba+=_0x2e243c(0x12a),document['getElementById'](_0x2e243c(0x157))['innerHTML']+=_0x3c6aba,_0x527fd7++;});}});function _0x205c9e(_0x293818){const _0x32eb44=_0x18b103;$['get'](_0x32eb44(0x12b),function(_0x331995){const _0x36db57=_0x32eb44;if(_0x331995[_0x36db57(0x12d)]!='patient')notAuthorizedModal[_0x36db57(0x141)][_0x36db57(0x14b)]=_0x36db57(0x145),btn['title']=_0x36db57(0x11e),btn[_0x36db57(0x141)][_0x36db57(0x122)]=_0x36db57(0x154);else{if(_0x293818=='cartExists')cartExistModal[_0x36db57(0x141)][_0x36db57(0x14b)]=_0x36db57(0x145),document['body'][_0x36db57(0x141)][_0x36db57(0x135)]=_0x36db57(0x123);else _0x293818=='orderExists'?setTimeout(()=>{const _0x4abe1d=_0x36db57;$['get'](_0x4abe1d(0x129),function(_0x552eba){const _0x2a09b6=_0x4abe1d;console[_0x2a09b6(0x136)](_0x552eba),$('#therapistName')[_0x2a09b6(0x124)](_0x552eba[_0x2a09b6(0x143)]+'.'),$('#expireDate')[_0x2a09b6(0x124)](''+new Date(_0x552eba[_0x2a09b6(0x133)])['toLocaleString']('en-CA',{'month':_0x2a09b6(0x13a),'day':_0x2a09b6(0x13b),'year':_0x2a09b6(0x13b)})),$(_0x2a09b6(0x158))[_0x2a09b6(0x124)](''+new Date(_0x552eba['purchased'])['toLocaleString'](_0x2a09b6(0x14f),{'hour':'numeric','minute':_0x2a09b6(0x13b),'hour12':!![]}));}),therapistExistModal[_0x4abe1d(0x141)][_0x4abe1d(0x14b)]='block',document[_0x4abe1d(0x153)][_0x4abe1d(0x141)][_0x4abe1d(0x135)]=_0x4abe1d(0x123);},0x32):window[_0x36db57(0x155)]='/checkout';}});}const _0x5ba0cc=document['querySelectorAll'](_0x18b103(0x128));_0x5ba0cc[_0x18b103(0x131)](function(_0xcbf74b){$(_0xcbf74b)['click'](()=>{const _0x4ce1e7=_0x5367;$[_0x4ce1e7(0x13d)]({'url':_0x4ce1e7(0x156),'type':_0x4ce1e7(0x144),'data':{'therapist':_0xcbf74b['id']},'success':_0x205c9e});});});}),document[_0x1d1c11(0x140)](_0x1d1c11(0x149))[_0x1d1c11(0x12f)]=function(){const _0xe46d5f=_0x1d1c11;cartExistModal['style'][_0xe46d5f(0x14b)]=_0xe46d5f(0x132),document['body'][_0xe46d5f(0x141)][_0xe46d5f(0x135)]='auto';},document[_0x1d1c11(0x140)](_0x1d1c11(0x12e))[_0x1d1c11(0x12f)]=function(){const _0x317075=_0x1d1c11;therapistExistModal[_0x317075(0x141)]['display']=_0x317075(0x132),document[_0x317075(0x153)][_0x317075(0x141)][_0x317075(0x135)]=_0x317075(0x15a);},document[_0x1d1c11(0x140)](_0x1d1c11(0x125))['onclick']=function(){const _0x38a9c8=_0x1d1c11;notAuthorizedModal[_0x38a9c8(0x141)][_0x38a9c8(0x14b)]=_0x38a9c8(0x132),document[_0x38a9c8(0x153)][_0x38a9c8(0x141)][_0x38a9c8(0x135)]=_0x38a9c8(0x15a);},window['onclick']=function(_0x43c7fe){const _0x40a7fb=_0x1d1c11;if(_0x43c7fe[_0x40a7fb(0x13e)]==cartExistModal)cartExistModal['style']['display']=_0x40a7fb(0x132),document[_0x40a7fb(0x153)]['style'][_0x40a7fb(0x135)]=_0x40a7fb(0x15a);else _0x43c7fe[_0x40a7fb(0x13e)]==therapistExistModal&&(therapistExistModal[_0x40a7fb(0x141)][_0x40a7fb(0x14b)]=_0x40a7fb(0x132),document[_0x40a7fb(0x153)]['style'][_0x40a7fb(0x135)]=_0x40a7fb(0x15a));};
--------------------------------------------------------------------------------
/html/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
MyMind - 404
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
109 |
110 |
115 |
116 |
117 |
118 |
119 |
120 |
4
121 |
4
122 |
123 |
Oops, smooth brain!
124 |
We can't find the page that you're looking for...
125 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
--------------------------------------------------------------------------------
/html/chat-session.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
MyMind - Chat Session
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
109 |
110 |
115 |
116 |
117 |
118 |
119 |
133 |
134 |
135 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
--------------------------------------------------------------------------------
/html/thank-you.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
MyMind - Thank You
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
109 |
110 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
129 |
130 |
Your Order
131 |
If you have any questions about your order, please contact us at
132 | info@mymind.com or call us at
133 | (604) 555-5012
134 |
135 |
136 |
137 | Start Your Therapy Session
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
Your session has expired!
148 |
Purchase a new session at Therapists to continue your journey.
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
--------------------------------------------------------------------------------
/public/js/sign-up.js:
--------------------------------------------------------------------------------
1 | function _0x4771(_0x2957eb,_0x5cfb80){const _0xce9c10=_0xce9c();return _0x4771=function(_0x477135,_0x3742ec){_0x477135=_0x477135-0x12b;let _0x314a1d=_0xce9c10[_0x477135];return _0x314a1d;},_0x4771(_0x2957eb,_0x5cfb80);}const _0x5a5f63=_0x4771;(function(_0x1afa34,_0x748637){const _0x5200ee=_0x4771,_0x24d1c2=_0x1afa34();while(!![]){try{const _0x296a1a=-parseInt(_0x5200ee(0x147))/0x1+parseInt(_0x5200ee(0x12e))/0x2+-parseInt(_0x5200ee(0x173))/0x3+parseInt(_0x5200ee(0x14c))/0x4+parseInt(_0x5200ee(0x14b))/0x5*(parseInt(_0x5200ee(0x15b))/0x6)+parseInt(_0x5200ee(0x15e))/0x7+parseInt(_0x5200ee(0x14d))/0x8*(-parseInt(_0x5200ee(0x138))/0x9);if(_0x296a1a===_0x748637)break;else _0x24d1c2['push'](_0x24d1c2['shift']());}catch(_0x2eb276){_0x24d1c2['push'](_0x24d1c2['shift']());}}}(_0xce9c,0xd59cb));const batmanAnimation=document['getElementById'](_0x5a5f63(0x150)),batmanSec=document[_0x5a5f63(0x132)]('batmanImg');function clientInputValidation(){const _0x4ef4c4=_0x5a5f63;validated=![];var _0x1556cd=$(_0x4ef4c4(0x136))['val']();if(_0x1556cd[_0x4ef4c4(0x16b)]!=0xa)window[_0x4ef4c4(0x154)](0x0,document[_0x4ef4c4(0x157)][_0x4ef4c4(0x159)]),document[_0x4ef4c4(0x132)](_0x4ef4c4(0x151))[_0x4ef4c4(0x12c)][_0x4ef4c4(0x15c)]=_0x4ef4c4(0x14e),document[_0x4ef4c4(0x132)](_0x4ef4c4(0x151))[_0x4ef4c4(0x145)]='Your\x20phone\x20number\x20must\x20be\x20of\x20length\x2010';else{if(!isEmail($(_0x4ef4c4(0x172))[_0x4ef4c4(0x144)]()))window['scrollTo'](0x0,document['body'][_0x4ef4c4(0x159)]),document[_0x4ef4c4(0x132)]('signUpErrorMessage')[_0x4ef4c4(0x12c)]['display']=_0x4ef4c4(0x14e),document[_0x4ef4c4(0x132)](_0x4ef4c4(0x151))[_0x4ef4c4(0x145)]=_0x4ef4c4(0x130);else{if(inputValidation($(_0x4ef4c4(0x166))[_0x4ef4c4(0x144)]()))window[_0x4ef4c4(0x154)](0x0,document[_0x4ef4c4(0x157)]['scrollHeight']),document['getElementById']('signUpErrorMessage')[_0x4ef4c4(0x12c)]['display']='block',document['getElementById'](_0x4ef4c4(0x151))[_0x4ef4c4(0x145)]=_0x4ef4c4(0x16e);else{if(passwordValidation())window['scrollTo'](0x0,document[_0x4ef4c4(0x157)][_0x4ef4c4(0x159)]),document[_0x4ef4c4(0x132)](_0x4ef4c4(0x151))[_0x4ef4c4(0x12c)]['display']=_0x4ef4c4(0x14e),document[_0x4ef4c4(0x132)](_0x4ef4c4(0x151))['innerHTML']=_0x4ef4c4(0x139);else negativeValidation()?(window['scrollTo'](0x0,document[_0x4ef4c4(0x157)][_0x4ef4c4(0x159)]),document[_0x4ef4c4(0x132)](_0x4ef4c4(0x151))[_0x4ef4c4(0x12c)][_0x4ef4c4(0x15c)]='block',document['getElementById'](_0x4ef4c4(0x151))[_0x4ef4c4(0x145)]='Experience\x20or\x20cost\x20of\x20session\x20cannot\x20be\x20less\x20than\x200'):validated=!![];}}}return validated;}function handleSignUpResponse(_0x5ed784){const _0x6f4a96=_0x5a5f63;if(_0x5ed784=='existingEmail')window[_0x6f4a96(0x154)](0x0,document[_0x6f4a96(0x157)][_0x6f4a96(0x159)]),document['getElementById']('signUpErrorMessage')[_0x6f4a96(0x12c)][_0x6f4a96(0x15c)]='block',document[_0x6f4a96(0x132)](_0x6f4a96(0x151))[_0x6f4a96(0x145)]=_0x6f4a96(0x12d);else{if(_0x5ed784==_0x6f4a96(0x133))window[_0x6f4a96(0x154)](0x0,document[_0x6f4a96(0x157)][_0x6f4a96(0x159)]),document[_0x6f4a96(0x132)](_0x6f4a96(0x151))['style'][_0x6f4a96(0x15c)]='block',document[_0x6f4a96(0x132)](_0x6f4a96(0x151))['innerHTML']=_0x6f4a96(0x16d);else{if(_0x5ed784==_0x6f4a96(0x155))window['scrollTo'](0x0,document['body'][_0x6f4a96(0x159)]),document[_0x6f4a96(0x132)](_0x6f4a96(0x151))[_0x6f4a96(0x12c)][_0x6f4a96(0x15c)]=_0x6f4a96(0x14e),document[_0x6f4a96(0x132)](_0x6f4a96(0x151))['innerHTML']=_0x6f4a96(0x13b);else _0x5ed784==_0x6f4a96(0x137)&&(document[_0x6f4a96(0x132)](_0x6f4a96(0x151))[_0x6f4a96(0x12c)][_0x6f4a96(0x15c)]=_0x6f4a96(0x152),document[_0x6f4a96(0x132)]('signupSuccessModal')[_0x6f4a96(0x12c)][_0x6f4a96(0x15c)]=_0x6f4a96(0x170),document['body'][_0x6f4a96(0x12c)]['overflow']=_0x6f4a96(0x16c),setTimeout(()=>{const _0x4ed521=_0x6f4a96;window[_0x4ed521(0x143)]=_0x4ed521(0x15a);},0x9c4));}}}$(_0x5a5f63(0x153))['click'](()=>{const _0x10b120=_0x5a5f63;clientInputValidation()&&$[_0x10b120(0x160)]({'url':'/sign-up','type':_0x10b120(0x15d),'data':{'firstname':$(_0x10b120(0x162))[_0x10b120(0x144)]()[_0x10b120(0x171)](0x0)[_0x10b120(0x16f)]()+$('#firstname')[_0x10b120(0x144)]()[_0x10b120(0x14a)](0x1),'lastname':$('#lastname')[_0x10b120(0x144)]()['charAt'](0x0)[_0x10b120(0x16f)]()+$(_0x10b120(0x142))[_0x10b120(0x144)]()['substring'](0x1),'username':$(_0x10b120(0x131))[_0x10b120(0x144)]()[_0x10b120(0x163)](),'phone':$(_0x10b120(0x136))[_0x10b120(0x144)](),'email':$('#email')['val']()[_0x10b120(0x163)](),'userType':$(_0x10b120(0x166))['val'](),'yearsExperience':$(_0x10b120(0x134))[_0x10b120(0x144)](),'sessionCost':$(_0x10b120(0x158))['val'](),'password':$(_0x10b120(0x165))[_0x10b120(0x144)]()},'success':handleSignUpResponse});}),setInterval(eastereEgg,0x3e8);var doOnce=![];function eastereEgg(){const _0x4c1e61=_0x5a5f63;$(_0x4c1e61(0x131))[_0x4c1e61(0x13c)](function(){const _0x108757=_0x4c1e61;var _0x2fd51e=$(this)[_0x108757(0x144)]()[_0x108757(0x163)]();_0x2fd51e['includes'](_0x108757(0x13e))&&doOnce==![]&&(window[_0x108757(0x154)](0x0,document[_0x108757(0x157)]['scrollHeight']),batmanAnimation[_0x108757(0x15f)][_0x108757(0x167)](_0x108757(0x149)),document[_0x108757(0x132)](_0x108757(0x140))['play'](),document[_0x108757(0x132)](_0x108757(0x140))[_0x108757(0x141)]=0x1,doOnce=!![]);});}function isEmail(_0x489e35){const _0x2f4a9b=_0x5a5f63;var _0x10f27c=/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;return _0x10f27c[_0x2f4a9b(0x16a)](_0x489e35);}function inputValidation(_0xc4160){const _0x430b47=_0x5a5f63,_0x26b44e=document['getElementById'](_0x430b47(0x146)),_0x3b4932=document[_0x430b47(0x132)](_0x430b47(0x169)),_0x860281=document[_0x430b47(0x132)](_0x430b47(0x13d)),_0x3e1dbb=document[_0x430b47(0x132)](_0x430b47(0x12b)),_0x304b08=document[_0x430b47(0x132)](_0x430b47(0x168));if(_0xc4160==_0x430b47(0x161)){if(!_0x26b44e[_0x430b47(0x135)]()||!_0x3b4932[_0x430b47(0x135)]()||!_0x860281[_0x430b47(0x135)]()||!_0x3e1dbb['checkValidity']()||!_0x304b08['checkValidity']())return!![];}else{if(!_0x26b44e[_0x430b47(0x135)]()||!_0x3b4932[_0x430b47(0x135)]()||!_0x860281[_0x430b47(0x135)]())return!![];}}function passwordValidation(){const _0x4b449c=_0x5a5f63,_0x47842b=document[_0x4b449c(0x132)]('password');if(!_0x47842b[_0x4b449c(0x135)]())return!![];}function _0xce9c(){const _0x34cd7f=['classList','ajax','therapist','#firstname','toLowerCase','value','#password','#userType','add','sessionCost','lastname','test','length','hidden','A\x20user\x20with\x20that\x20phone\x20number\x20already\x20exists','There\x20are\x20empty\x20fields','toUpperCase','flex','charAt','#email','706236jaOBjZ','yearsExperience','style','A\x20user\x20with\x20that\x20email\x20already\x20exists','149394qfeFVY','addEventListener','Please\x20follow\x20this\x20email\x20pattern:\x20example@email.com','#username','getElementById','existingPhone','#yearsExperience','checkValidity','#phone','login','176967LaAvzw','Password\x20must\x20be\x20at\x20least\x205\x20or\x20less\x20than\x2020\x20characters\x20long','preventDefault','A\x20user\x20with\x20that\x20username\x20already\x20exists','keyup','username','batman','.form-control','audio','volume','#lastname','location','val','innerHTML','firstname','960772DhsMzO','querySelectorAll','startAnimation','substring','55uNkcKA','3354032bSkyex','56jPtiro','block','.therapistOptions','batmanImg','signUpErrorMessage','none','#signupBtn','scrollTo','existingUsername','click','body','#sessionCost','scrollHeight','/login','306354nZRSDT','display','POST','5137482OFZdgz'];_0xce9c=function(){return _0x34cd7f;};return _0xce9c();}function negativeValidation(){const _0x26e444=_0x5a5f63,_0x420cc1=document[_0x26e444(0x132)](_0x26e444(0x12b))['value'],_0x487dc8=document[_0x26e444(0x132)](_0x26e444(0x168))['value'];if(_0x420cc1<0x0||_0x487dc8<0x0)return!![];}function showTherapyOptions(_0xbd3c22){const _0x30e636=_0x5a5f63,_0x1c4bc4=_0xbd3c22[_0x30e636(0x164)],_0xe9688c=document[_0x30e636(0x148)](_0x30e636(0x14f));if(_0x1c4bc4=='therapist')for(var _0x508330=0x0;_0x508330<_0xe9688c[_0x30e636(0x16b)];_0x508330++){_0xe9688c[_0x508330]['style']['display']=_0x30e636(0x170);}else for(var _0x508330=0x0;_0x508330<_0xe9688c['length'];_0x508330++){_0xe9688c[_0x508330]['style'][_0x30e636(0x15c)]='none';}}const input=document[_0x5a5f63(0x148)](_0x5a5f63(0x13f));for(var i=0x0;i
','from','POST','orderId','flex','patientToolbar','#000','getElementsByTagName','/getPatientInfo','charAt','none','therapist','resultsFound','timeLength','1200514oNjQXj','72047LiYKda','sessionCost','getElementsByClassName','plan','1980FrHYYg','click','ajax','color','
','ready','/getPreviousPatients','4928ebOBrf','patientTableContainer','setAttribute','9FMhOqi','307512tiwrbQ','fullName','searchbar','threeMonthPlan','Trial ','GET','status','tableRows','','html','asc','log','getElementById','6alZkvB','innerHTML','#09C5A3','class','addEventListener','map','style','$','slice','substring','toLocaleString','2336148TckzHp','.tHead','patientTable',' ',' Expired ','display','bi\x20bi-caret-up-fill','noPatientsAvailable','65084oXqqTp','Active ','toISOString','indexOf','purchased','numeric','tBodies','sort','toFixed','expiringTime','374364JGEnPe','string','querySelectorAll','parentElement','value','userId','refunded'];_0x4e8c=function(){return _0xbfd571;};return _0x4e8c();}const _0x3ae5cd=_0x14d9;(function(_0x1ca3ca,_0x1a7ba7){const _0x509e9c=_0x14d9,_0x6ddd1=_0x1ca3ca();while(!![]){try{const _0x46466a=-parseInt(_0x509e9c(0xa9))/0x1*(-parseInt(_0x509e9c(0xc5))/0x2)+parseInt(_0x509e9c(0xe2))/0x3+-parseInt(_0x509e9c(0xd8))/0x4*(-parseInt(_0x509e9c(0x8f))/0x5)+parseInt(_0x509e9c(0xd0))/0x6+-parseInt(_0x509e9c(0xa8))/0x7+-parseInt(_0x509e9c(0xb8))/0x8*(parseInt(_0x509e9c(0xb7))/0x9)+-parseInt(_0x509e9c(0xad))/0xa*(parseInt(_0x509e9c(0xb4))/0xb);if(_0x46466a===_0x1a7ba7)break;else _0x6ddd1['push'](_0x6ddd1['shift']());}catch(_0x292a48){_0x6ddd1['push'](_0x6ddd1['shift']());}}}(_0x4e8c,0x7d3e5),$(document)[_0x3ae5cd(0xb2)](async function(){const _0xec5b8b=_0x3ae5cd;function _0x4b296b(_0x2570fd,_0x2140a0){const _0x24adc5=_0x14d9;console[_0x24adc5(0xc3)](_0x24adc5(0x93));let _0x1090d8;var _0xfd339d=_0x24adc5(0xb1);let _0x13850d=new Date(_0x2570fd[_0x24adc5(0xdc)]),_0x545054=_0x13850d['getTimezoneOffset']()*0x3c*0x3e8,_0x17d9d3=new Date(_0x13850d-_0x545054)[_0x24adc5(0xda)]()[_0x24adc5(0xcd)](0x0,0xa);_0xfd339d+=''+_0x17d9d3+' ',_0xfd339d+=_0x24adc5(0xd3)+new Date(_0x2570fd['purchased'])[_0x24adc5(0xcf)]('en-CA',{'hour':_0x24adc5(0xdd),'minute':'numeric','hour12':!![]})+_0x24adc5(0xc0),_0xfd339d+=_0x24adc5(0xd3)+_0x2140a0[_0x24adc5(0xb9)]+_0x24adc5(0xc0);if(_0x2570fd['timeLength']=='freePlan')_0xfd339d+=_0x24adc5(0xbc),_0x1090d8=0x0;else{if(_0x2570fd[_0x24adc5(0xa7)]=='monthPlan')_0xfd339d+='1\x20Month ',_0x1090d8=0x1;else _0x2570fd[_0x24adc5(0xa7)]==_0x24adc5(0xbb)?(_0xfd339d+='3\x20Months ',_0x1090d8=0x3):(_0xfd339d+='1\x20Year ',_0x1090d8=0x6);}_0xfd339d+=_0x24adc5(0xcc)+parseFloat(_0x2140a0['sessionCost']*_0x1090d8*1.12)[_0x24adc5(0xe0)](0x2)+_0x24adc5(0xc0),_0xfd339d+=_0x24adc5(0xd3)+_0x2570fd[_0x24adc5(0x9d)]+'';if(_0x2570fd[_0x24adc5(0xbe)]==_0x24adc5(0x8b))_0xfd339d+='Refunded ';else new Date(_0x2570fd[_0x24adc5(0xe1)])>new Date()?_0xfd339d+=_0x24adc5(0xd9):_0xfd339d+=_0x24adc5(0xd4);_0xfd339d+=_0x24adc5(0x9a),$(_0x24adc5(0x96))[_0x24adc5(0x97)](_0xfd339d);}await $[_0xec5b8b(0xaf)]({'url':_0xec5b8b(0xb3),'type':_0xec5b8b(0xbd),'success':function(_0x4098e1){const _0x3e1c50=_0xec5b8b;_0x4098e1[_0x3e1c50(0x98)]>0x0&&(document[_0x3e1c50(0xc4)](_0x3e1c50(0xd7))['style'][_0x3e1c50(0xd5)]='none',document[_0x3e1c50(0xc4)](_0x3e1c50(0x9f))['style']['display']=_0x3e1c50(0x9e),document[_0x3e1c50(0xc4)](_0x3e1c50(0xb5))[_0x3e1c50(0xcb)][_0x3e1c50(0xd5)]=_0x3e1c50(0x9e),_0x4098e1[_0x3e1c50(0x8d)](_0x134155=>{getPatient(_0x134155,_0x4b296b);}),document[_0x3e1c50(0xc4)](_0x3e1c50(0xa6))[_0x3e1c50(0xc6)]=_0x4098e1[_0x3e1c50(0x98)]);}}),document['getElementById']('0')[_0xec5b8b(0xb6)](_0xec5b8b(0xc8),_0xec5b8b(0x92)),document['getElementById']('1')[_0xec5b8b(0xb6)](_0xec5b8b(0xc8),_0xec5b8b(0x92)),document['getElementById']('2')[_0xec5b8b(0xb6)](_0xec5b8b(0xc8),_0xec5b8b(0x92)),document[_0xec5b8b(0xc4)]('3')['setAttribute'](_0xec5b8b(0xc8),_0xec5b8b(0x92)),document[_0xec5b8b(0xc4)]('4')['setAttribute'](_0xec5b8b(0xc8),'bi\x20bi-caret-down-fill'),document['getElementById']('5')[_0xec5b8b(0xb6)]('class',_0xec5b8b(0x92)),document['getElementById']('6')[_0xec5b8b(0xb6)]('class',_0xec5b8b(0x92)),sortTable();}));function _0x14d9(_0x39ebfd,_0x479a8d){const _0x4e8cdc=_0x4e8c();return _0x14d9=function(_0x14d965,_0x3f0c8){_0x14d965=_0x14d965-0x89;let _0x547523=_0x4e8cdc[_0x14d965];return _0x547523;},_0x14d9(_0x39ebfd,_0x479a8d);}function getPatient(_0x268963,_0x3d6a2d){const _0x190192=_0x3ae5cd;let _0x59af39=_0x268963[_0x190192(0x8a)],_0x84f433=_0x268963[_0x190192(0xa5)],_0x59e92b;$['ajax']({'url':_0x190192(0xa2),'method':_0x190192(0x9c),'data':{'_id':_0x59af39},'success':function(_0x65d3f3){const _0x1d8869=_0x190192;_0x59e92b={'fullName':_0x65d3f3[_0x1d8869(0x94)][_0x1d8869(0xa3)](0x0)+'.\x20'+_0x65d3f3['lastName']},$[_0x1d8869(0xaf)]({'url':_0x1d8869(0x8c),'method':_0x1d8869(0x9c),'data':{'therapistId':_0x84f433},'success':function(_0x178a4c){const _0x2e938a=_0x1d8869;_0x59e92b[_0x2e938a(0xaa)]=_0x178a4c[_0x2e938a(0xaa)],_0x3d6a2d(_0x268963,_0x59e92b);}});}});}function searchTable(){const _0x507377=_0x3ae5cd,_0x3d6efc=document['getElementById'](_0x507377(0xba))[_0x507377(0x89)]['toUpperCase'](),_0x3d208b=document[_0x507377(0xc4)](_0x507377(0xd2)),_0x2d6cdf=_0x3d208b[_0x507377(0xde)][0x0][_0x507377(0xa1)]('tr');let _0x3b7c96=0x0;for(var _0x3ec8f1=0x0;_0x3ec8f1<_0x2d6cdf['length'];_0x3ec8f1++){var _0xda9b58=_0x2d6cdf[_0x3ec8f1]['getElementsByTagName']('td');_0x2d6cdf[_0x3ec8f1]['style'][_0x507377(0xd5)]=_0x507377(0xa4);for(var _0x187710=0x0;_0x187710<_0xda9b58[_0x507377(0x98)];_0x187710++){if(_0xda9b58[_0x187710][_0x507377(0xc6)]['toUpperCase']()[_0x507377(0xdb)](_0x3d6efc)>-0x1){_0x2d6cdf[_0x3ec8f1][_0x507377(0xcb)]['display']='',_0x3b7c96++;break;}}}$('#resultsFound')[_0x507377(0xc1)](''+_0x3b7c96);}function sortTable(){const _0x15ddf0=_0x3ae5cd,_0x5c5b8f=document[_0x15ddf0(0xc4)](_0x15ddf0(0xd2)),_0x3c1724=_0x5c5b8f['querySelectorAll'](_0x15ddf0(0xd1)),_0xdde2fb=Array[_0x15ddf0(0x9b)](_0x3c1724)[_0x15ddf0(0xca)](function(_0x5b5459){return'';}),_0xc86c87=function(_0x2f835f,_0x256f6a){const _0x2db6e3=_0x15ddf0,_0x241278=_0x3c1724[_0x2f835f][_0x2db6e3(0x95)](_0x2db6e3(0x90));var _0x21bcd1={};switch(_0x241278){case _0x2db6e3(0x91):_0x256f6a=_0x256f6a[_0x2db6e3(0xce)](0x1);return parseFloat(_0x256f6a);case _0x2db6e3(0xe3):case _0x2db6e3(0xac):_0x256f6a=_0x256f6a[_0x2db6e3(0xce)](0x2);return _0x256f6a;default:return _0x256f6a;}},_0x40313d=_0x5c5b8f['querySelector'](_0x15ddf0(0x96)),_0x54176e=_0x40313d[_0x15ddf0(0xab)](_0x15ddf0(0xbf)),_0xe1d3d3=function(_0x4c4094){const _0x218fb6=_0x15ddf0,_0x5803de=_0xdde2fb[_0x4c4094]||_0x218fb6(0xc2),_0x58e261=_0x5803de==='asc'?0x1:-0x1,_0x4cc994=Array[_0x218fb6(0x9b)](_0x54176e);_0x4cc994[_0x218fb6(0xdf)](function(_0xa8bec0,_0x3573ce){const _0x205289=_0x218fb6,_0x274612=_0xa8bec0[_0x205289(0xe4)]('td')[_0x4c4094]['innerHTML']['toLowerCase'](),_0x2d91e0=_0x3573ce['querySelectorAll']('td')[_0x4c4094]['innerHTML']['toLowerCase'](),_0x586dcb=_0xc86c87(_0x4c4094,_0x274612),_0x3a4531=_0xc86c87(_0x4c4094,_0x2d91e0);switch(!![]){case _0x586dcb>_0x3a4531:return 0x1*_0x58e261;case _0x586dcb<_0x3a4531:return-0x1*_0x58e261;case _0x586dcb===_0x3a4531:return 0x0;}}),[][_0x218fb6(0x8d)][_0x218fb6(0x99)](_0x54176e,function(_0x26dbdd){const _0x545a74=_0x218fb6;_0x40313d[_0x545a74(0x8e)](_0x26dbdd);}),_0x5803de===_0x218fb6(0xc2)?(_0xdde2fb[_0x4c4094]='desc',document[_0x218fb6(0xc4)](_0x4c4094)[_0x218fb6(0xb6)](_0x218fb6(0xc8),_0x218fb6(0x92))):(_0xdde2fb[_0x4c4094]=_0x218fb6(0xc2),document[_0x218fb6(0xc4)](_0x4c4094)['setAttribute'](_0x218fb6(0xc8),_0x218fb6(0xd6))),_0x4cc994['forEach'](function(_0x41e785){_0x40313d['appendChild'](_0x41e785);});};[][_0x15ddf0(0x8d)]['call'](_0x3c1724,function(_0x47f165,_0x57d83a){const _0x1bf7c6=_0x15ddf0;_0x47f165[_0x1bf7c6(0xc9)](_0x1bf7c6(0xae),function(){const _0x393c59=_0x1bf7c6;_0xe1d3d3(_0x57d83a);for(var _0x1db02b=0x0;_0x1db02b<_0x3c1724['length'];_0x1db02b++){_0x1db02b==_0x57d83a?_0xdde2fb[_0x57d83a]===_0x393c59(0xc2)?document['getElementById'](_0x1db02b)['parentElement'][_0x393c59(0xcb)][_0x393c59(0xb0)]=_0x393c59(0xa0):document['getElementById'](_0x1db02b)[_0x393c59(0xe5)][_0x393c59(0xcb)]['color']=_0x393c59(0xc7):document['getElementById'](_0x1db02b)[_0x393c59(0xe5)]['style'][_0x393c59(0xb0)]='#000';}});});}
--------------------------------------------------------------------------------
/html/my-patients.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | MyMind - My Patients
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
109 |
110 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
My Patients
122 |
123 |
124 |
125 |
126 |
127 |
No patients have placed an order with you yet. Please wait and check your email
128 | frequenty for any future patients that book a session with you.
129 |
130 |
131 |
138 |
139 |
140 |
141 |
142 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
Your session has expired!
161 |
Purchase a new session at Therapists to continue your journey.
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
--------------------------------------------------------------------------------
/public/images/thankyou.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/html/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | MyMind - Login
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
109 |
110 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
Welcome Back!
126 |
127 |
154 |
155 |
156 |
157 |
158 |
159 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
--------------------------------------------------------------------------------
/html/therapists.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | MyMind - Therapists
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
109 |
110 |
115 |
116 |
117 |
118 |
125 |
126 |
127 |
Available Therapists
128 |
Choose a therapy session to get started!
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
Cart is full!
140 |
You already have a therapist added to your cart, empty your cart at Checkout
141 | to proceed.
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
Hold on there!
153 |
You currently have an active session with your therapist,
154 | Your session expires on at
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
Not authorized to purchase!
163 |
To purchase a therapist, please Login or Sign Up as a
164 | patient.
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
Your session has expired!
175 |
Purchase a new session at Therapists to continue your journey.
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
--------------------------------------------------------------------------------
/public/originaljs/sign-up.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Constant variables.
3 | */
4 | const batmanAnimation = document.getElementById('batmanImg');
5 | const batmanSec = document.getElementById('batmanImg');
6 |
7 | /**
8 | *
9 | * This function helps with input validation from the forms to ensure user
10 | * inputs values that match our patterns and minumum requirements.
11 | *
12 | * @returns true if the inputted values are invalid.
13 | */
14 | function clientInputValidation(){
15 | validated = false;
16 | var phoneLength = $("#phone").val();
17 | if (phoneLength.length != 10) {
18 | window.scrollTo(0, document.body.scrollHeight);
19 | document.getElementById("signUpErrorMessage").style.display = 'block';
20 | document.getElementById("signUpErrorMessage").innerHTML = "Your phone number must be of length 10";
21 | } else if (!isEmail($("#email").val())) {
22 | window.scrollTo(0, document.body.scrollHeight);
23 | document.getElementById("signUpErrorMessage").style.display = 'block';
24 | document.getElementById("signUpErrorMessage").innerHTML = "Please follow this email pattern: example@email.com";
25 | } else if (inputValidation($("#userType").val())) {
26 | window.scrollTo(0, document.body.scrollHeight);
27 | document.getElementById("signUpErrorMessage").style.display = 'block';
28 | document.getElementById("signUpErrorMessage").innerHTML = "There are empty fields";
29 | } else if (passwordValidation()) {
30 | window.scrollTo(0, document.body.scrollHeight);
31 | document.getElementById("signUpErrorMessage").style.display = 'block';
32 | document.getElementById("signUpErrorMessage").innerHTML = "Password must be at least 5 or less than 20 characters long";
33 | } else if (negativeValidation()) {
34 | window.scrollTo(0, document.body.scrollHeight);
35 | document.getElementById("signUpErrorMessage").style.display = 'block';
36 | document.getElementById("signUpErrorMessage").innerHTML = "Experience or cost of session cannot be less than 0";
37 | } else{
38 | validated = true;
39 | }
40 | return validated;
41 | }
42 |
43 | /**
44 | *
45 | * This function acts as a helper function that displays proper error messages
46 | * if duplicate records exists in the database.
47 | *
48 | * @param {*} data as an JSON object
49 | */
50 | function handleSignUpResponse(data) {
51 | if (data == "existingEmail") {
52 | window.scrollTo(0, document.body.scrollHeight);
53 | document.getElementById("signUpErrorMessage").style.display = 'block';
54 | document.getElementById("signUpErrorMessage").innerHTML = "A user with that email already exists";
55 | } else if (data == "existingPhone") {
56 | window.scrollTo(0, document.body.scrollHeight);
57 | document.getElementById("signUpErrorMessage").style.display = 'block';
58 | document.getElementById("signUpErrorMessage").innerHTML = "A user with that phone number already exists";
59 | } else if (data == "existingUsername") {
60 | window.scrollTo(0, document.body.scrollHeight);
61 | document.getElementById("signUpErrorMessage").style.display = 'block';
62 | document.getElementById("signUpErrorMessage").innerHTML = "A user with that username already exists";
63 | } else if (data == "login") {
64 | document.getElementById("signUpErrorMessage").style.display = 'none';
65 | document.getElementById('signupSuccessModal').style.display = 'flex';
66 | document.body.style.overflow = 'hidden';
67 | setTimeout(() => {
68 | window.location = '/login'
69 | }, 2500);
70 | }
71 | }
72 |
73 | /**
74 | * AJAX call that signs up the user if input validations and duplicate records are cleared.
75 | */
76 | $('#signupBtn').click(() => {
77 | if (clientInputValidation()) {
78 | $.ajax({
79 | url: '/sign-up',
80 | type: 'POST',
81 | data: {
82 | firstname: $("#firstname").val().charAt(0).toUpperCase() + $("#firstname").val().substring(1),
83 | lastname: $("#lastname").val().charAt(0).toUpperCase() + $("#lastname").val().substring(1),
84 | username: $("#username").val().toLowerCase(),
85 | phone: $("#phone").val(),
86 | email: $("#email").val().toLowerCase(),
87 | userType: $("#userType").val(),
88 | yearsExperience: $("#yearsExperience").val(),
89 | sessionCost: $("#sessionCost").val(),
90 | password: $("#password").val(),
91 | }, success: handleSignUpResponse
92 | })
93 | }
94 | });
95 |
96 | /**
97 | * Set for every second.
98 | */
99 | setInterval(eastereEgg, 1000);
100 |
101 | /**
102 | * Easter egg function.
103 | */
104 | var doOnce = false;
105 | /**
106 | * This function plays an animation when the username field includes the word 'batman'.
107 | */
108 | function eastereEgg() {
109 | $('#username').keyup(function () {
110 | var userField = $(this).val().toLowerCase();
111 | if (userField.includes('batman') && doOnce == false) {
112 | window.scrollTo(0, document.body.scrollHeight);
113 | batmanAnimation.classList.add('startAnimation');
114 | document.getElementById("audio").play();
115 | document.getElementById("audio").volume = 1;
116 | doOnce = true;
117 | }
118 | });
119 | }
120 |
121 | /**
122 | *
123 | * This function checks to see if the email in the form field mathces the email pattern.
124 | *
125 | * @param {*} email as an input valie
126 | * @returns true if the email is valid, else returns false.
127 | */
128 | function isEmail(email) {
129 | var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
130 | return regex.test(email);
131 | }
132 |
133 | /**
134 | *
135 | * Helper function that checks the input validations on the fields.
136 | *
137 | * @param {*} userType as a input value
138 | * @returns true if the input values are invalid
139 | */
140 | function inputValidation(userType) {
141 | const inpObjFirstName = document.getElementById("firstname");
142 | const inpObjLastName = document.getElementById("lastname");
143 | const inpObjUsername = document.getElementById("username");
144 | const inpObjExperience = document.getElementById("yearsExperience");
145 | const inpObjSession = document.getElementById("sessionCost");
146 | if (userType == "therapist") {
147 | if (!inpObjFirstName.checkValidity() || !inpObjLastName.checkValidity() || !inpObjUsername.checkValidity()
148 | || !inpObjExperience.checkValidity() || !inpObjSession.checkValidity()) {
149 | return true;
150 | }
151 | } else {
152 | if (!inpObjFirstName.checkValidity() || !inpObjLastName.checkValidity() || !inpObjUsername.checkValidity()) {
153 | return true;
154 | }
155 | }
156 | }
157 |
158 | /**
159 | *
160 | * Checks the input validation for password field.
161 | *
162 | * @returns true if the input value is invalid
163 | */
164 | function passwordValidation() {
165 | const inpObjPassword = document.getElementById("password");
166 | if (!inpObjPassword.checkValidity()) {
167 | return true;
168 | }
169 | }
170 |
171 | /**
172 | *
173 | * Checks the input validation for sessionCost and yearsExperience fields.
174 | *
175 | * @returns true if the fields are invalid
176 | */
177 | function negativeValidation() {
178 | const yearsExp = document.getElementById("yearsExperience").value;
179 | const cost = document.getElementById("sessionCost").value;
180 | if (yearsExp < 0 || cost < 0) {
181 | return true;
182 | }
183 | }
184 |
185 |
186 | /**
187 | *
188 | * Display therapy field options if usertype is a therapist
189 | *
190 | * @param {*} selectObject as event listener
191 | */
192 | function showTherapyOptions(selectObject) {
193 | const value = selectObject.value;
194 | const therapyFieldOptions = document.querySelectorAll('.therapistOptions');
195 | if (value == 'therapist') {
196 | for (var i = 0; i < therapyFieldOptions.length; i++) {
197 | therapyFieldOptions[i].style.display = 'flex';
198 | }
199 | } else {
200 | for (var i = 0; i < therapyFieldOptions.length; i++) {
201 | therapyFieldOptions[i].style.display = 'none';
202 | }
203 | }
204 | }
205 |
206 | /**
207 | * Trigger click function for enter key for all input fields.
208 | */
209 | const input = document.querySelectorAll(".form-control");
210 | for (var i = 0; i < input.length; i++) {
211 | input[i].addEventListener("keypress", function (e) {
212 | if (e.key === "Enter") {
213 | e.preventDefault();
214 | document.getElementById("signupBtn").click();
215 | }
216 | });
217 | }
--------------------------------------------------------------------------------
/html/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | MyMind
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
109 |
110 |
115 |
116 |
117 |
118 |
126 |
127 |
128 |
Popular Therapy Sessions
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
MyMind Can Help You
139 |
MyMind can help anyone that struggles with mental health problems with guided therapy sessions.
140 |
Although therapy in Canada is available, it is not cheap and fees can range from $50-$240 per
141 | session. Many people with mental health problems require 12-16 sessions on average and only 50
142 | percent of patients recover as indicated by self-reported symptom measures.
143 |
144 |
145 |
146 |
170 |
171 |
172 |
173 |
174 |
175 |
Your session has expired!
176 |
Purchase a new session at Therapists to continue your journey.
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
194 |
195 |
196 |
--------------------------------------------------------------------------------
/public/js/checkout.js:
--------------------------------------------------------------------------------
1 | var _0x45b07c=_0x3a20;(function(_0x46a68e,_0x5a75b4){var _0x5d981b=_0x3a20,_0x10f244=_0x46a68e();while(!![]){try{var _0x557110=parseInt(_0x5d981b(0x182))/0x1+parseInt(_0x5d981b(0x17c))/0x2+parseInt(_0x5d981b(0x1b7))/0x3*(-parseInt(_0x5d981b(0x1c0))/0x4)+-parseInt(_0x5d981b(0x1b6))/0x5+parseInt(_0x5d981b(0x1bf))/0x6*(parseInt(_0x5d981b(0x175))/0x7)+-parseInt(_0x5d981b(0x188))/0x8*(parseInt(_0x5d981b(0x19f))/0x9)+parseInt(_0x5d981b(0x1a1))/0xa*(parseInt(_0x5d981b(0x197))/0xb);if(_0x557110===_0x5a75b4)break;else _0x10f244['push'](_0x10f244['shift']());}catch(_0x36e34a){_0x10f244['push'](_0x10f244['shift']());}}}(_0x5b65,0xa0a48));function _0x5b65(){var _0x2c7f26=['focus','flex',' ','PUT','checkoutErrorMessage','#taxTotal','display','#orderNumber','cancelRemove','/thank-you','block','timeLength','new\x20div','#total','GET','getElementById','_id','val','','5840960hxlhOX','813819EQbmdz','orderId','hide','#cartPlan','getMinutes','signupSuccessModal','#subTotal','attr','192hratxY','12UeANCY','setMinutes','overflow','#therapistName','sessionCost','150577EeqPiZ','hidden','ajax','yearPlan','onclick','errorMsg','toFixed','2619158rFqWWO','POST','lastName','cartTotalSec','\x20per\x20session','removeOrderBtn','358269eWuqza','
Order:\x20MM0509123456 ','/getTherapistInfo','
Print\x20Invoice ','\x20years\x20of\x20experience\x20in\x20the\x20profession,\x20and\x20offers\x20$','#therapistImg','105496SWbSxn','src','body','monthPlan','#orderSummary','freePlan','#cartCost','style','toLocaleTimeString','text','none','height=600,width=600','removeOrderModal','profileImg','html','12985709sTWnYQ','target','innerHTML','document','\x20
','/checkStatus',' ','threeMonthPlan','612NSNIqm','write','10dYXtHf','change'];_0x5b65=function(){return _0x2c7f26;};return _0x5b65();}var therapistInformation,totalPrice;$(document)['ready'](async function(){var _0x2496bb=_0x3a20;await $['ajax']({'url':_0x2496bb(0x19c),'method':_0x2496bb(0x1b1),'success':function(_0x4e0b8e){var _0x16cd0c=_0x2496bb;_0x4e0b8e&&($(_0x16cd0c(0x1aa))[_0x16cd0c(0x191)](''+_0x4e0b8e[_0x16cd0c(0x1b8)]),$('#noOrderSummary')[_0x16cd0c(0x1b9)](),$(_0x16cd0c(0x18c))['show'](),getTherapist(_0x4e0b8e['therapist']),$(_0x16cd0c(0x1ba))[_0x16cd0c(0x1b4)](''+_0x4e0b8e[_0x16cd0c(0x1ae)]),updateCart());}});});function getTherapist(_0x5d0287){var _0x1caa33=_0x3a20;$[_0x1caa33(0x177)]({'url':_0x1caa33(0x184),'method':_0x1caa33(0x17d),'data':{'therapistId':_0x5d0287},'success':function(_0x218563){var _0x464c0c=_0x1caa33;$(_0x464c0c(0x173))[_0x464c0c(0x191)](_0x218563['firstName']+'\x20'+_0x218563[_0x464c0c(0x17e)]),$('#therapistDesc')[_0x464c0c(0x191)](_0x218563['yearsExperience']+_0x464c0c(0x186)+_0x218563[_0x464c0c(0x174)]+_0x464c0c(0x180)),$(_0x464c0c(0x187))[_0x464c0c(0x1be)](_0x464c0c(0x189),''+_0x218563[_0x464c0c(0x195)]),therapistInformation=_0x218563,therapistInformation[_0x464c0c(0x1b3)]=_0x5d0287;let _0x4788c1;if($(_0x464c0c(0x1ba))[_0x464c0c(0x1b4)]()=='freePlan')_0x4788c1=0x0;else{if($(_0x464c0c(0x1ba))['val']()==_0x464c0c(0x18b))_0x4788c1=0x1;else $(_0x464c0c(0x1ba))['val']()==_0x464c0c(0x19e)?_0x4788c1=0x3:_0x4788c1=0x6;}$(_0x464c0c(0x18e))[_0x464c0c(0x196)](''+parseFloat(therapistInformation[_0x464c0c(0x174)]*_0x4788c1)[_0x464c0c(0x17b)](0x2)),$(_0x464c0c(0x1bd))[_0x464c0c(0x196)](''+parseFloat(therapistInformation[_0x464c0c(0x174)]*_0x4788c1)['toFixed'](0x2)),$(_0x464c0c(0x1a8))[_0x464c0c(0x196)]('$'+parseFloat(therapistInformation[_0x464c0c(0x174)]*_0x4788c1*0.12)[_0x464c0c(0x17b)](0x2)),$(_0x464c0c(0x1b0))[_0x464c0c(0x196)]('$'+parseFloat(therapistInformation['sessionCost']*_0x4788c1*1.12)[_0x464c0c(0x17b)](0x2));}});}function updateCart(){var _0x46497d=_0x3a20;$(_0x46497d(0x1ba))[_0x46497d(0x1a2)](()=>{var _0x1cbc3f=_0x46497d;$[_0x1cbc3f(0x177)]({'url':'/updateCart','type':_0x1cbc3f(0x1a6),'data':{'timeLength':$(_0x1cbc3f(0x1ba))[_0x1cbc3f(0x1b4)]()},'success':function(){var _0xb0b145=_0x1cbc3f;let _0x16466f;if($(_0xb0b145(0x1ba))['val']()==_0xb0b145(0x18d))_0x16466f=0x0;else{if($(_0xb0b145(0x1ba))['val']()=='monthPlan')_0x16466f=0x1;else $(_0xb0b145(0x1ba))['val']()==_0xb0b145(0x19e)?_0x16466f=0x3:_0x16466f=0x6;}$('#cartCost')[_0xb0b145(0x196)](''+parseFloat(therapistInformation[_0xb0b145(0x174)]*_0x16466f)['toFixed'](0x2)),$('#subTotal')[_0xb0b145(0x196)](''+parseFloat(therapistInformation[_0xb0b145(0x174)]*_0x16466f)[_0xb0b145(0x17b)](0x2)),$('#taxTotal')['html']('$'+parseFloat(therapistInformation['sessionCost']*_0x16466f*0.12)[_0xb0b145(0x17b)](0x2)),$('#total')['html']('$'+parseFloat(therapistInformation['sessionCost']*_0x16466f*1.12)['toFixed'](0x2));}});});}function _0x3a20(_0x867187,_0x1e8829){var _0x5b655e=_0x5b65();return _0x3a20=function(_0x3a20ad,_0x37e0c9){_0x3a20ad=_0x3a20ad-0x172;var _0x4a495e=_0x5b655e[_0x3a20ad];return _0x4a495e;},_0x3a20(_0x867187,_0x1e8829);}var removeOrderModal=document[_0x45b07c(0x1b2)](_0x45b07c(0x194));document[_0x45b07c(0x1b2)]('removeItem')[_0x45b07c(0x179)]=function(_0xc75be3){var _0xe4a1f=_0x45b07c;removeOrderModal[_0xe4a1f(0x18f)][_0xe4a1f(0x1a9)]=_0xe4a1f(0x1ad),document[_0xe4a1f(0x18a)][_0xe4a1f(0x18f)][_0xe4a1f(0x172)]='hidden',document[_0xe4a1f(0x1b2)](_0xe4a1f(0x181))[_0xe4a1f(0x179)]=function(){var _0x8ee18e=_0xe4a1f;$[_0x8ee18e(0x177)]({'url':'/deleteCart','type':'DELETE','success':function(_0x2a09bb){var _0x3335c2=_0x8ee18e;console['log']('Deleted\x20successfully'),removeOrderModal[_0x3335c2(0x18f)][_0x3335c2(0x1a9)]=_0x3335c2(0x192),document[_0x3335c2(0x1b2)](_0x3335c2(0x1bc))[_0x3335c2(0x18f)][_0x3335c2(0x1a9)]=_0x3335c2(0x1a4),document[_0x3335c2(0x18a)][_0x3335c2(0x18f)]['overflow']=_0x3335c2(0x176),setTimeout(()=>{location['reload']();},0x9c4);}});};},document[_0x45b07c(0x1b2)](_0x45b07c(0x1ab))[_0x45b07c(0x179)]=function(){var _0x44287c=_0x45b07c;removeOrderModal[_0x44287c(0x18f)]['display']=_0x44287c(0x192),document['body']['style']['overflow']='auto';},window[_0x45b07c(0x179)]=function(_0x5944e9){var _0x155d1c=_0x45b07c;_0x5944e9[_0x155d1c(0x198)]==removeOrderModal&&(removeOrderModal[_0x155d1c(0x18f)][_0x155d1c(0x1a9)]=_0x155d1c(0x192),document['body'][_0x155d1c(0x18f)][_0x155d1c(0x172)]='auto');};const checkoutErrorMsg=document[_0x45b07c(0x1b2)](_0x45b07c(0x1a7));function handleConfirmOrder(_0x4ed7ad){var _0x163cff=_0x45b07c;_0x4ed7ad[_0x163cff(0x17a)]?(checkoutErrorMsg[_0x163cff(0x18f)]['display']=_0x163cff(0x1ad),checkoutErrorMsg[_0x163cff(0x199)]=_0x4ed7ad[_0x163cff(0x17a)]):(checkoutErrorMsg[_0x163cff(0x18f)][_0x163cff(0x1a9)]=_0x163cff(0x192),document['getElementById']('signupSuccessModal')[_0x163cff(0x18f)][_0x163cff(0x1a9)]=_0x163cff(0x1a4),document[_0x163cff(0x18a)][_0x163cff(0x18f)][_0x163cff(0x172)]='hidden',setTimeout(()=>{var _0x153612=_0x163cff;window['location']=_0x153612(0x1ac);},0x9c4));}document[_0x45b07c(0x1b2)]('confirmOrder')['onclick']=function(){var _0x537f3c=_0x45b07c;const _0x4d624d=new Date();var _0x3241e7,_0x55b917=$(_0x537f3c(0x1ba))[_0x537f3c(0x1b4)]();if(_0x55b917=='freePlan')_0x3241e7=new Date(_0x4d624d['setMinutes'](_0x4d624d[_0x537f3c(0x1bb)]()+0x3));else{if(_0x55b917==_0x537f3c(0x18b))_0x3241e7=new Date(_0x4d624d[_0x537f3c(0x1c1)](_0x4d624d[_0x537f3c(0x1bb)]()+0x5));else{if(_0x55b917=='threeMonthPlan')_0x3241e7=new Date(_0x4d624d[_0x537f3c(0x1c1)](_0x4d624d['getMinutes']()+0xa));else _0x55b917==_0x537f3c(0x178)&&(_0x3241e7=new Date(_0x4d624d['setMinutes'](_0x4d624d[_0x537f3c(0x1bb)]()+0xf)));}}console['log'](_0x3241e7[_0x537f3c(0x190)]()),$[_0x537f3c(0x177)]({'url':'/confirmCart','method':'POST','data':{'cartPlan':$(_0x537f3c(0x1ba))[_0x537f3c(0x1b4)](),'timeLengthforUse':_0x3241e7,'totalPrice':totalPrice,'therapistID':therapistInformation[_0x537f3c(0x1b3)]},'success':handleConfirmOrder});};function printInvoice(){var _0x3d77cd=_0x45b07c,_0x2a69b3=window['open']('',_0x3d77cd(0x1af),_0x3d77cd(0x193));return _0x2a69b3['document'][_0x3d77cd(0x1a0)](_0x3d77cd(0x185)),_0x2a69b3[_0x3d77cd(0x19a)][_0x3d77cd(0x1a0)](_0x3d77cd(0x1a5)),_0x2a69b3[_0x3d77cd(0x19a)]['write'](_0x3d77cd(0x19d)),_0x2a69b3[_0x3d77cd(0x19a)]['write'](_0x3d77cd(0x19b)),_0x2a69b3[_0x3d77cd(0x19a)][_0x3d77cd(0x1a0)](_0x3d77cd(0x183)),_0x2a69b3[_0x3d77cd(0x19a)][_0x3d77cd(0x1a0)](document[_0x3d77cd(0x1b2)]('orderTable')['innerHTML']),_0x2a69b3[_0x3d77cd(0x19a)]['write'](_0x3d77cd(0x1b5)),_0x2a69b3[_0x3d77cd(0x19a)]['write'](document[_0x3d77cd(0x1b2)](_0x3d77cd(0x17f))[_0x3d77cd(0x199)]),_0x2a69b3['document'][_0x3d77cd(0x1a0)]('
'),_0x2a69b3[_0x3d77cd(0x19a)]['write']('
'),_0x2a69b3[_0x3d77cd(0x19a)]['close'](),setTimeout(()=>{var _0x327987=_0x3d77cd;_0x2a69b3[_0x327987(0x1a3)](),_0x2a69b3['print']();},0x3e8),![];}
--------------------------------------------------------------------------------
/public/originaljs/my-patients.js:
--------------------------------------------------------------------------------
1 | $(document).ready(async function () {
2 |
3 | /**
4 | *
5 | * This function will populate the table in the html page after fetching all the data from the database.
6 | *
7 | * @param {*} cartData as object
8 | * @param {*} patientInfo as array
9 | */
10 | function populatePatients(cartData, patientInfo) {
11 | let multiplier;
12 | var x = `
`;
13 | let purchasedDate = new Date(cartData.purchased);
14 | let offSet = purchasedDate.getTimezoneOffset() * 60 * 1000;
15 | let tLocalISO = new Date(purchasedDate - offSet).toISOString().slice(0, 10);
16 | x += `${tLocalISO} `;
17 | x += `${new Date(cartData.purchased).toLocaleString('en-CA', { hour: 'numeric', minute: 'numeric', hour12: true })} `
18 | x += `${patientInfo.fullName} `
19 | if (cartData.timeLength == 'freePlan') {
20 | x += `Trial `
21 | multiplier = 0;
22 | } else if (cartData.timeLength == 'monthPlan') {
23 | x += `1 Month `
24 | multiplier = 1;
25 | } else if (cartData.timeLength == 'threeMonthPlan') {
26 | x += `3 Months `
27 | multiplier = 3;
28 | } else {
29 | x += `1 Year `
30 | multiplier = 6;
31 | }
32 | x += `$${parseFloat(patientInfo.sessionCost * multiplier * 1.12).toFixed(2)} `
33 | x += `${cartData.orderId} `
34 | if (cartData.status == "refunded") {
35 | x += `Refunded `
36 | } else if (new Date(cartData.expiringTime) > new Date()) {
37 | x += `
Active `
38 | } else x += `
Expired `
39 | $("tbody").append(x);
40 | }
41 |
42 | /**
43 | * AJAX call that finds all previous patients for a certain therapists
44 | * and calls the populatepatients helper function to display them.
45 | */
46 | await $.ajax({
47 | url: '/getPreviousPatients',
48 | type: "GET",
49 | success: function (data) {
50 | if (data.length > 0) {
51 | document.getElementById('noPatientsAvailable').style.display = 'none';
52 | document.getElementById('patientToolbar').style.display = 'flex';
53 | document.getElementById('patientTableContainer').style.display = 'flex';
54 |
55 | data.forEach(cartData => {
56 | getPatient(cartData, populatePatients);
57 | });
58 | document.getElementById("resultsFound").innerHTML = data.length;
59 | }
60 | }
61 | });
62 |
63 | /**
64 | * Set the caret icons faced down by default
65 | */
66 | document.getElementById('0').setAttribute("class", "bi bi-caret-down-fill");
67 | document.getElementById('1').setAttribute("class", "bi bi-caret-down-fill");
68 | document.getElementById('2').setAttribute("class", "bi bi-caret-down-fill");
69 | document.getElementById('3').setAttribute("class", "bi bi-caret-down-fill");
70 | document.getElementById('4').setAttribute("class", "bi bi-caret-down-fill");
71 | document.getElementById('5').setAttribute("class", "bi bi-caret-down-fill");
72 | document.getElementById('6').setAttribute("class", "bi bi-caret-down-fill");
73 |
74 | /**
75 | * Call sort table fucntion when user clicks table headings.
76 | */
77 | sortTable();
78 | });
79 |
80 | /**
81 | *
82 | * This function will call an AJAX call to get the patients information.
83 | *
84 | * @param {*} cartData as an object
85 | * @param {*} callback as a listener
86 | */
87 | function getPatient(cartData, callback) {
88 | let userId = cartData.userId
89 | let therapistId = cartData.therapist
90 | let patientInfo;
91 | /**
92 | * AJAX call that gets the patient information.
93 | */
94 | $.ajax({
95 | url: '/getPatientInfo',
96 | method: "POST",
97 | data: {
98 | _id: userId
99 | },
100 | success: function (patient) {
101 | patientInfo = {
102 | fullName: `${patient.firstName.charAt(0)}. ${patient.lastName}`
103 | }
104 | /**
105 | * AJAX call that gets the therapist's information from the cart
106 | * and returns it along with the patient information from previous AJAX call.
107 | */
108 | $.ajax({
109 | url: '/getTherapistInfo',
110 | method: "POST",
111 | data: {
112 | therapistId: therapistId
113 | },
114 | success: function (therapist) {
115 | patientInfo.sessionCost = therapist.sessionCost;
116 | callback(cartData, patientInfo);
117 | }
118 | })
119 | }
120 | })
121 | }
122 |
123 | /**
124 | * Live search function for table search.
125 | */
126 | function searchTable() {
127 | const searchInput = document.getElementById("searchbar").value.toUpperCase();
128 | const table = document.getElementById("patientTable");
129 | const trs = table.tBodies[0].getElementsByTagName("tr");
130 | let count = 0;
131 |
132 | // Loop through tbody's rows
133 | for (var i = 0; i < trs.length; i++) {
134 | var tds = trs[i].getElementsByTagName("td");
135 | trs[i].style.display = "none";
136 |
137 | // loop through row cells to check each element
138 | for (var j = 0; j < tds.length; j++) {
139 | // check if there's a match in the table
140 | if (tds[j].innerHTML.toUpperCase().indexOf(searchInput) > -1) {
141 | trs[i].style.display = "";
142 | count++;
143 | break;
144 | }
145 | }
146 | }
147 | $("#resultsFound").html(`${count}`);
148 | }
149 |
150 | /**
151 | * Sort table function when table headings is clicked.
152 | */
153 | function sortTable() {
154 | const table = document.getElementById('patientTable');
155 | const headers = table.querySelectorAll('.tHead');
156 | const directions = Array.from(headers).map(function (header) {
157 | return '';
158 | });
159 |
160 | const transform = function (index, content) {
161 | const type = headers[index].getAttribute('data-type');
162 | var sort = {};
163 | switch (type) {
164 | case 'number':
165 | content = content.substring(1);
166 | return parseFloat(content);
167 | case 'string':
168 | case 'plan':
169 | content = content.substring(2);
170 | return content;
171 | default:
172 | return content;
173 | }
174 | };
175 |
176 | const tableBody = table.querySelector('tbody');
177 | const rows = tableBody.getElementsByClassName('tableRows');
178 |
179 | const sortColumn = function (index) {
180 | const direction = directions[index] || 'asc';
181 | const multiplier = direction === 'asc' ? 1 : -1;
182 | const newRows = Array.from(rows);
183 |
184 | newRows.sort(function (rowA, rowB) {
185 | const cellA = rowA.querySelectorAll('td')[index].innerHTML.toLowerCase();
186 | const cellB = rowB.querySelectorAll('td')[index].innerHTML.toLowerCase();
187 |
188 | const a = transform(index, cellA);
189 | const b = transform(index, cellB);
190 |
191 | switch (true) {
192 | case a > b:
193 | return 1 * multiplier;
194 | case a < b:
195 | return -1 * multiplier;
196 | case a === b:
197 | return 0;
198 | }
199 | });
200 |
201 | [].forEach.call(rows, function (row) {
202 | tableBody.removeChild(row);
203 | });
204 |
205 | if (direction === 'asc') {
206 | directions[index] = 'desc';
207 | document.getElementById(index).setAttribute("class", "bi bi-caret-down-fill");
208 |
209 | } else {
210 | directions[index] = 'asc';
211 | document.getElementById(index).setAttribute("class", "bi bi-caret-up-fill");
212 | }
213 |
214 | newRows.forEach(function (newRow) {
215 | tableBody.appendChild(newRow);
216 | });
217 | };
218 |
219 | [].forEach.call(headers, function (header, index) {
220 | header.addEventListener('click', function () {
221 | sortColumn(index);
222 | for (var i = 0; i < headers.length; i++) {
223 | if (i == index) {
224 | if (directions[index] === 'asc') {
225 | document.getElementById(i).parentElement.style.color = '#000';
226 | } else {
227 | document.getElementById(i).parentElement.style.color = '#09C5A3';
228 | }
229 | } else {
230 | document.getElementById(i).parentElement.style.color = '#000';
231 | }
232 | }
233 | });
234 | });
235 | }
--------------------------------------------------------------------------------
/public/originaljs/checkout.js:
--------------------------------------------------------------------------------
1 | var therapistInformation;
2 | var totalPrice;
3 | $(document).ready(async function () {
4 | /**
5 | * AJAX call that checks the status of a cart to see if
6 | * there is an item that exist in the shopping cart.
7 | */
8 | await $.ajax({
9 | url: '/checkStatus',
10 | method: 'GET',
11 | success: function (cart) {
12 | if (cart) {
13 | $('#orderNumber').text(`${cart.orderId}`)
14 | $("#noOrderSummary").hide();
15 | $("#orderSummary").show();
16 | getTherapist(cart.therapist);
17 | $('#cartPlan').val(`${cart.timeLength}`)
18 | updateCart();
19 | }
20 | }
21 | })
22 | })
23 |
24 | /**
25 | *
26 | * This function has an AJAX call that finds the therapist that is selected from the shopping cart
27 | * and displays their information in the checkout page.
28 | *
29 | * @param {*} therapistId as object id
30 | */
31 | function getTherapist(therapistId) {
32 | $.ajax({
33 | url: '/getTherapistInfo',
34 | method: "POST",
35 | data: {
36 | therapistId: therapistId
37 | },
38 | success: function (therapist) {
39 | $('#therapistName').text(`${therapist.firstName} ${therapist.lastName}`)
40 | $('#therapistDesc').text(`${therapist.yearsExperience} years of experience in the profession, and offers $${therapist.sessionCost} per session`)
41 | $('#therapistImg').attr('src', `${therapist.profileImg}`)
42 | therapistInformation = therapist;
43 | therapistInformation._id = therapistId;
44 | let multiplier;
45 | if ($('#cartPlan').val() == "freePlan") {
46 | multiplier = 0;
47 | } else if ($('#cartPlan').val() == "monthPlan") {
48 | multiplier = 1;
49 | } else if ($('#cartPlan').val() == "threeMonthPlan") {
50 | multiplier = 3;
51 | } else {
52 | multiplier = 6;
53 | }
54 | $("#cartCost").html(`${parseFloat(therapistInformation.sessionCost * multiplier).toFixed(2)}`)
55 | $("#subTotal").html(`${parseFloat(therapistInformation.sessionCost * multiplier).toFixed(2)}`)
56 | $("#taxTotal").html(`$${parseFloat(therapistInformation.sessionCost * multiplier * 0.12).toFixed(2)}`)
57 | $("#total").html(`$${parseFloat(therapistInformation.sessionCost * multiplier * 1.12).toFixed(2)}`)
58 | }
59 | })
60 | }
61 |
62 | /**
63 | * This function allows users to change their shopping cart's timelength.
64 | * It has an AJAX call that changes the timelength for the user's shopping cart
65 | * in the database so when the order is confirmed the expiring time changes
66 | * corrosponding to the timelength.
67 | */
68 | function updateCart() {
69 | $('#cartPlan').change(() => {
70 | $.ajax({
71 | url: '/updateCart',
72 | type: 'PUT',
73 | data: {
74 | timeLength: $('#cartPlan').val()
75 | },
76 | success: function () {
77 | let multiplier;
78 | if ($('#cartPlan').val() == "freePlan") {
79 | multiplier = 0;
80 | } else if ($('#cartPlan').val() == "monthPlan") {
81 | multiplier = 1;
82 | } else if ($('#cartPlan').val() == "threeMonthPlan") {
83 | multiplier = 3;
84 | } else {
85 | multiplier = 6;
86 | }
87 | $("#cartCost").html(`${parseFloat(therapistInformation.sessionCost * multiplier).toFixed(2)}`)
88 | $("#subTotal").html(`${parseFloat(therapistInformation.sessionCost * multiplier).toFixed(2)}`)
89 | $("#taxTotal").html(`$${parseFloat(therapistInformation.sessionCost * multiplier * 0.12).toFixed(2)}`)
90 | $("#total").html(`$${parseFloat(therapistInformation.sessionCost * multiplier * 1.12).toFixed(2)}`)
91 | }
92 | })
93 | })
94 | }
95 |
96 | /**
97 | * Variables for Delete User Modal.
98 | */
99 | var removeOrderModal = document.getElementById("removeOrderModal");
100 | document.getElementById('removeItem').onclick = function (e) {
101 | removeOrderModal.style.display = "block";
102 | document.body.style.overflow = 'hidden';
103 |
104 | document.getElementById('removeOrderBtn').onclick = function () {
105 | /**
106 | * AJAX call that deletes a item from the shopping cart and changes the status of the cart.
107 | */
108 | $.ajax({
109 | url: '/deleteCart',
110 | type: 'DELETE',
111 | success: function (data) {
112 | removeOrderModal.style.display = "none";
113 | document.getElementById('signupSuccessModal').style.display = 'flex';
114 | document.body.style.overflow = 'hidden';
115 | setTimeout(() => {
116 | location.reload();
117 | }, 2500);
118 | }
119 | })
120 | }
121 | }
122 |
123 | /**
124 | * If cancel button is clicked, hide modal for Delete User
125 | */
126 | document.getElementById("cancelRemove").onclick = function () {
127 | removeOrderModal.style.display = "none";
128 | document.body.style.overflow = 'auto';
129 | }
130 |
131 | /**
132 | *
133 | * If user clicks outside of the modal for both Create and Delete then hide modal
134 | *
135 | * @param {*} event as an event listener
136 | */
137 | window.onclick = function (event) {
138 | if (event.target == removeOrderModal) {
139 | removeOrderModal.style.display = "none";
140 | document.body.style.overflow = 'auto';
141 | }
142 | }
143 |
144 | const checkoutErrorMsg = document.getElementById("checkoutErrorMessage");
145 |
146 | /**
147 | *
148 | * If the order is successfully placed redirect patient to
149 | * thank you page and display their order number and a
150 | * thank you message.
151 | *
152 | * @param {*} data as form field
153 | */
154 | function handleConfirmOrder(data) {
155 | if (data.errorMsg) {
156 | checkoutErrorMsg.style.display = 'block';
157 | checkoutErrorMsg.innerHTML = data.errorMsg;
158 | } else {
159 | checkoutErrorMsg.style.display = 'none';
160 | document.getElementById('signupSuccessModal').style.display = 'flex';
161 | document.body.style.overflow = 'hidden';
162 | setTimeout(() => {
163 | window.location = "/thank-you"
164 | }, 2500);
165 | }
166 | }
167 |
168 | /**
169 | * This onclick calls the AJAX call that confirms an order. Before
170 | * calling the AJAX call it will check the timeLength the user
171 | * chose for their session. It will then change the expiring time
172 | * of the cart based on the timeLength when confirm order is done.
173 | */
174 | document.getElementById('confirmOrder').onclick = function () {
175 | const time = new Date();
176 | var timeLengthforUse;
177 | var selectedTime = $('#cartPlan').val();
178 | if (selectedTime == "freePlan") {
179 | timeLengthforUse = new Date(time.setMinutes(time.getMinutes() + 3));
180 | } else if (selectedTime == "monthPlan") {
181 | timeLengthforUse = new Date(time.setMinutes(time.getMinutes() + 5));
182 | } else if (selectedTime == "threeMonthPlan") {
183 | timeLengthforUse = new Date(time.setMinutes(time.getMinutes() + 10));
184 | } else if (selectedTime == "yearPlan") {
185 | timeLengthforUse = new Date(time.setMinutes(time.getMinutes() + 15));
186 | }
187 | /**
188 | * AJAX call that will confirm the order in the database and start the session for the user.
189 | */
190 | $.ajax({
191 | url: "/confirmCart",
192 | method: "POST",
193 | data: {
194 | cartPlan: $('#cartPlan').val(),
195 | timeLengthforUse: timeLengthforUse,
196 | totalPrice: totalPrice,
197 | therapistID: therapistInformation._id
198 | },
199 | success: handleConfirmOrder
200 | })
201 | }
202 |
203 | /**
204 | *
205 | * Print invoice function
206 | *
207 | * @returns N/A
208 | */
209 | function printInvoice() {
210 | var printWindow = window.open('', 'new div', 'height=600,width=600');
211 | printWindow.document.write('
Print Invoice ');
212 | printWindow.document.write('
');
213 | printWindow.document.write('
');
214 | printWindow.document.write('
');
215 | printWindow.document.write('
Order: MM0509123456 ');
216 | printWindow.document.write(document.getElementById('orderTable').innerHTML);
217 | printWindow.document.write('
');
218 | printWindow.document.write(document.getElementById('cartTotalSec').innerHTML);
219 | printWindow.document.write('
');
220 | printWindow.document.write('
');
221 | printWindow.document.close();
222 |
223 | setTimeout(() => {
224 | printWindow.focus();
225 | printWindow.print();
226 | }, 1000);
227 | return false;
228 | }
--------------------------------------------------------------------------------
/html/order-history.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
MyMind - Order History
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
109 |
110 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
Order History
122 |
123 |
124 |
125 |
126 |
127 |
No orders have been placed. Please visit Therapists and
128 | purchase a therapy package to start your journey!
129 |
130 |
131 |
139 |
140 |
141 |
142 |
143 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
168 |
169 |
170 |
171 |
172 |
175 |
176 |
You're about to refund your session order for the user and will be refunded This action is
178 | irreversible and cannot be undone. Are you sure?
179 |
180 | Cancel
181 | Refund
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
Your session has expired!
191 |
Purchase a new session at Therapists to continue your journey.
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
--------------------------------------------------------------------------------
/public/css/chat-session.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --primaryColor: #09C5A3;
3 | --secondaryColor: #00A98B;
4 | }
5 |
6 | /* Chat Session Page for Mobile */
7 | #wrapper #chatProfileSec {
8 | grid-column: 1 / span 4;
9 | grid-row: 1 / span 1;
10 | position: sticky;
11 | top: 0;
12 | width: 100%;
13 | min-height: 10vh;
14 | padding: 1rem 3rem;
15 | background-color: var(--primaryColor);
16 | box-shadow: 0px 10px 28px -5px rgba(0, 0, 0, 0.2);
17 | z-index: 9999;
18 | }
19 |
20 | #wrapper #chatProfileSec #chatHeader {
21 | display: flex;
22 | flex-direction: row;
23 | justify-content: space-between;
24 | align-items: center;
25 | }
26 |
27 | #wrapper #chatProfileSec #chatHeader #chatProfile {
28 | display: flex;
29 | flex-direction: row;
30 | align-items: center;
31 | max-width: 80%;
32 | }
33 |
34 | #wrapper #chatProfileSec #chatHeader #chatProfile div {
35 | display: flex;
36 | }
37 |
38 | #wrapper #chatProfileSec #chatHeader #chatProfile div #chatImg {
39 | width: 4rem;
40 | height: 4rem;
41 | border-radius: 50%;
42 | object-fit: cover;
43 | object-position: center center;
44 | }
45 |
46 | #wrapper #chatProfileSec #chatHeader #chatProfile #chatProfileDesc {
47 | display: flex;
48 | flex-direction: column;
49 | padding-left: 2rem;
50 | }
51 |
52 | #wrapper #chatProfileSec #chatHeader #chatProfile #chatProfileDesc #chatName {
53 | font-size: 1.3rem;
54 | font-weight: 700;
55 | color: white;
56 | padding-bottom: 0.5rem;
57 | }
58 |
59 | #wrapper #chatProfileSec #chatHeader #chatProfile #chatProfileDesc p:nth-child(2) {
60 | font-size: 1rem;
61 | font-weight: 500;
62 | color: #EFEFEF;
63 | }
64 |
65 | #wrapper #chatProfileSec #chatHeader #chatTools {
66 | display: flex;
67 | flex-direction: row;
68 | align-items: center;
69 | max-width: 20%;
70 | }
71 |
72 | #wrapper #chatProfileSec #chatHeader #chatTools a {
73 | display: flex;
74 | flex-direction: column;
75 | justify-content: center;
76 | align-items: center;
77 | text-decoration: none;
78 | }
79 |
80 | #wrapper #chatProfileSec #chatHeader #chatTools a i {
81 | font-size: 1.5rem;
82 | color: white;
83 | }
84 |
85 | #wrapper #chatMessages {
86 | grid-column: 1 / span 4;
87 | grid-row: 2 / span 1;
88 | padding: 3rem 2rem;
89 | width: 100%;
90 | height: 70vh;
91 | margin: 0;
92 | list-style: none;
93 | overflow-x: hidden;
94 | overflow-y: scroll;
95 | }
96 |
97 | #wrapper #chatMessages #sessionTimer {
98 | position: absolute;
99 | bottom: 10rem;
100 | left: 0;
101 | width: 100%;
102 | font-size: 14px;
103 | font-weight: 500;
104 | text-align: center;
105 | color: #858585;
106 | background-color: white;
107 | padding-top: 0.5rem;
108 | z-index: 2;
109 | }
110 |
111 | #wrapper #chatMessages::-webkit-scrollbar {
112 | width: 5px;
113 | }
114 |
115 | #wrapper #chatMessages::-webkit-scrollbar-track {
116 | background-color: rgba(211, 211, 211, 0.5);
117 | }
118 |
119 | #wrapper #chatMessages::-webkit-scrollbar-thumb {
120 | border-radius: 500px;
121 | background-color: var(--primaryColor);
122 | }
123 |
124 | #wrapper #chatMessages li {
125 | display: inline-block;
126 | position: relative;
127 | font-size: 1rem;
128 | font-weight: 400;
129 | clear: both;
130 | max-width: 65%;
131 | padding: 0.8rem 1rem;
132 | margin: 0 0 1.5rem 0;
133 | cursor: pointer;
134 | color: white;
135 | word-wrap: break-word;
136 | border-radius: 15px;
137 | background-color: var(--primaryColor);
138 | -webkit-transition: all ease-in-out 0.3s;
139 | -moz-transition: all ease-in-out 0.3s;
140 | -ms-transition: all ease-in-out 0.3s;
141 | -o-transition: all ease-in-out 0.3s;
142 | transition: all ease-in-out 0.3s;
143 | }
144 |
145 | #wrapper #chatMessages li:after {
146 | position: absolute;
147 | content: '';
148 | width: 0;
149 | height: 0;
150 | }
151 |
152 | #wrapper #chatMessages li.other {
153 | float: left;
154 | margin-left: 10px;
155 | color: black;
156 | background-color: #F2F2F2;
157 | -webkit-animation: show-chat-odd 0.15s 1 ease-in-out;
158 | -moz-animation: show-chat-odd 0.15s 1 ease-in-out;
159 | -ms-animation: show-chat-odd 0.15s 1 ease-in-out;
160 | -o-animation: show-chat-odd 0.15s 1 ease-in-out;
161 | animation: show-chat-odd 0.15s 1 ease-in-out;
162 | }
163 |
164 | #wrapper #chatMessages li.other.showTime {
165 | margin-bottom: 2.2rem;
166 | }
167 |
168 | #wrapper #chatMessages li.other.showTime::before {
169 | display: block;
170 | content: attr(data-before);
171 | position: absolute;
172 | left: 0;
173 | bottom: -1.3rem;
174 | font-size: 12px;
175 | font-weight: 400;
176 | color: #858585;
177 | text-align: left;
178 | width: fit-content;
179 | min-width: 10rem;
180 | }
181 |
182 | #wrapper #chatMessages li.other:after {
183 | border-top: 20px solid #F2F2F2;
184 | border-left: 20px solid transparent;
185 | bottom: 0%;
186 | left: -10px;
187 | -webkit-transform: rotate(90deg);
188 | -moz-transform: rotate(90deg);
189 | -ms-transform: rotate(90deg);
190 | -o-transform: rotate(90deg);
191 | transform: rotate(90deg);
192 | }
193 |
194 | #wrapper #chatMessages li.self {
195 | float: right;
196 | margin-right: 10px;
197 | -webkit-animation: show-chat-even 0.15s 1 ease-in-out;
198 | -moz-animation: show-chat-even 0.15s 1 ease-in-out;
199 | -ms-animation: show-chat-even 0.15s 1 ease-in-out;
200 | -o-animation: show-chat-even 0.15s 1 ease-in-out;
201 | animation: show-chat-even 0.15s 1 ease-in-out;
202 | }
203 |
204 | #wrapper #chatMessages li.self.showTime {
205 | margin-bottom: 2.2rem;
206 | }
207 |
208 | #wrapper #chatMessages li.self.showTime::before {
209 | display: block;
210 | content: attr(data-before);
211 | position: absolute;
212 | right: 0;
213 | bottom: -1.3rem;
214 | font-size: 12px;
215 | font-weight: 400;
216 | color: #858585;
217 | text-align: right;
218 | width: fit-content;
219 | min-width: 10rem;
220 | }
221 |
222 | #wrapper #chatMessages li.self:after {
223 | border-top: 20px solid var(--primaryColor);
224 | border-right: 20px solid transparent;
225 | right: -8px;
226 | bottom: 0%;
227 | -webkit-transform: rotate(270deg);
228 | -moz-transform: rotate(270deg);
229 | -ms-transform: rotate(270deg);
230 | -o-transform: rotate(270deg);
231 | transform: rotate(270deg);
232 | }
233 |
234 | #wrapper #sendMessageContainer {
235 | grid-column: 1 / span 4;
236 | grid-row: 3 / span 1;
237 | display: flex;
238 | position: fixed;
239 | bottom: 5rem;
240 | left: 0;
241 | right: 0;
242 | padding: 1rem 3rem;
243 | z-index: 2;
244 | }
245 |
246 | #wrapper #sendMessageContainer #chatbox {
247 | font-family: 'Nunito', sans-serif;
248 | font-size: 1rem;
249 | resize: none;
250 | color: black;
251 | border: 1px solid #CCCCCC;
252 | border-radius: 15px;
253 | width: 100%;
254 | max-height: 15rem;
255 | height: 3.2rem;
256 | word-wrap: break-word;
257 | word-break: break-all;
258 | padding: 0.8rem 4rem 0.8rem 1rem;
259 | overflow-y: auto;
260 | outline: none;
261 | }
262 |
263 | #wrapper #sendMessageContainer #chatbox::-webkit-scrollbar {
264 | width: 5px;
265 | }
266 |
267 | #wrapper #sendMessageContainer #chatbox::-webkit-scrollbar-track {
268 | margin-top: 15px;
269 | margin-bottom: 15px;
270 | border-radius: 500px;
271 | background-color: rgba(211, 211, 211, 0.5);
272 | }
273 |
274 | #wrapper #sendMessageContainer #chatbox::-webkit-scrollbar-thumb {
275 | border-radius: 500px;
276 | background-color: var(--primaryColor);
277 | }
278 |
279 | #wrapper #sendMessageContainer #sendMessage {
280 | display: flex;
281 | flex-direction: column;
282 | justify-content: center;
283 | align-items: center;
284 | position: absolute;
285 | right: 4rem;
286 | bottom: 1.5rem;
287 | height: 2.2rem;
288 | width: 2.2rem;
289 | padding: 5px;
290 | background: var(--primaryColor);
291 | border-radius: 50px;
292 | border: none;
293 | cursor: pointer;
294 | }
295 |
296 | #wrapper #sendMessageContainer #sendMessage img {
297 | color: black;
298 | width: 100%;
299 | height: 100%;
300 | margin-right: -2px;
301 | }
302 |
303 | @-webkit-keyframes show-chat-even {
304 | 0% {
305 | margin-left: -480px;
306 | }
307 |
308 | 100% {
309 | margin-left: 0;
310 | }
311 | }
312 |
313 | @-moz-keyframes show-chat-even {
314 | 0% {
315 | margin-left: -480px;
316 | }
317 |
318 | 100% {
319 | margin-left: 0;
320 | }
321 | }
322 |
323 | @-ms-keyframes show-chat-even {
324 | 0% {
325 | margin-left: -480px;
326 | }
327 |
328 | 100% {
329 | margin-left: 0;
330 | }
331 | }
332 |
333 | @-o-keyframes show-chat-even {
334 | 0% {
335 | margin-left: -480px;
336 | }
337 |
338 | 100% {
339 | margin-left: 0;
340 | }
341 | }
342 |
343 | @keyframes show-chat-even {
344 | 0% {
345 | margin-left: -480px;
346 | }
347 |
348 | 100% {
349 | margin-left: 0;
350 | }
351 | }
352 |
353 | @-webkit-keyframes show-chat-odd {
354 | 0% {
355 | margin-right: -480px;
356 | }
357 |
358 | 100% {
359 | margin-right: 0;
360 | }
361 | }
362 |
363 | @-moz-keyframes show-chat-odd {
364 | 0% {
365 | margin-right: -480px;
366 | }
367 |
368 | 100% {
369 | margin-right: 0;
370 | }
371 | }
372 |
373 | @-ms-keyframes show-chat-odd {
374 | 0% {
375 | margin-right: -480px;
376 | }
377 |
378 | 100% {
379 | margin-right: 0;
380 | }
381 | }
382 |
383 | @-o-keyframes show-chat-odd {
384 | 0% {
385 | margin-right: -480px;
386 | }
387 |
388 | 100% {
389 | margin-right: 0;
390 | }
391 | }
392 |
393 | @keyframes show-chat-odd {
394 | 0% {
395 | margin-right: -480px;
396 | }
397 |
398 | 100% {
399 | margin-right: 0;
400 | }
401 | }
--------------------------------------------------------------------------------
/public/js/order-history.js:
--------------------------------------------------------------------------------
1 | const _0x1e764d=_0x4341;function _0x4341(_0x1d80e5,_0x2ca851){const _0x365d49=_0x365d();return _0x4341=function(_0x434155,_0x58f56d){_0x434155=_0x434155-0x165;let _0x1b46fa=_0x365d49[_0x434155];return _0x1b46fa;},_0x4341(_0x1d80e5,_0x2ca851);}(function(_0x716c1c,_0x559312){const _0x43f23a=_0x4341,_0x1c63fb=_0x716c1c();while(!![]){try{const _0x54153a=-parseInt(_0x43f23a(0x172))/0x1+-parseInt(_0x43f23a(0x1bf))/0x2+-parseInt(_0x43f23a(0x190))/0x3+parseInt(_0x43f23a(0x1c8))/0x4+-parseInt(_0x43f23a(0x16a))/0x5*(parseInt(_0x43f23a(0x1a1))/0x6)+parseInt(_0x43f23a(0x177))/0x7*(parseInt(_0x43f23a(0x195))/0x8)+parseInt(_0x43f23a(0x1c9))/0x9;if(_0x54153a===_0x559312)break;else _0x1c63fb['push'](_0x1c63fb['shift']());}catch(_0x5a3f7b){_0x1c63fb['push'](_0x1c63fb['shift']());}}}(_0x365d,0x50336));const orderRefundModal=document[_0x1e764d(0x17c)](_0x1e764d(0x1bc));$(document)[_0x1e764d(0x1a9)](async function(){const _0x56fdf6=_0x1e764d;function _0x43dd45(_0x1358bf){const _0x12a4ed=_0x4341;let _0x512734=_0x1358bf[_0x12a4ed(0x174)]()*0x3c*0x3e8,_0x56478b=new Date(_0x1358bf-_0x512734)[_0x12a4ed(0x1b6)]()['slice'](0x0,0xa);return _0x56478b;}function _0x273271(_0x594e1f,_0x419ab2){const _0x140d7d=_0x4341;let _0x16feff;var _0x2efa71=_0x140d7d(0x185);_0x2efa71+='
'+_0x43dd45(new Date(_0x419ab2[_0x140d7d(0x18b)]))+_0x140d7d(0x1bd),_0x2efa71+=' '+new Date(_0x419ab2['expiringTime'])[_0x140d7d(0x173)]('en-CA',{'hour':_0x140d7d(0x19e),'minute':_0x140d7d(0x19e),'hour12':!![]})+_0x140d7d(0x1bd),_0x2efa71+=_0x140d7d(0x169)+_0x594e1f['fullName']+_0x140d7d(0x1bd);if(_0x419ab2[_0x140d7d(0x17b)]==_0x140d7d(0x1cd))_0x2efa71+=_0x140d7d(0x1cb),_0x16feff=0x0;else{if(_0x419ab2[_0x140d7d(0x17b)]==_0x140d7d(0x168))_0x2efa71+=_0x140d7d(0x171),_0x16feff=0x1;else _0x419ab2[_0x140d7d(0x17b)]=='threeMonthPlan'?(_0x2efa71+=_0x140d7d(0x1a2),_0x16feff=0x3):(_0x2efa71+=' 1\x20Year ',_0x16feff=0x6);}_0x2efa71+='
$'+parseFloat(_0x594e1f[_0x140d7d(0x1d0)]*_0x16feff*1.12)[_0x140d7d(0x19f)](0x2)+_0x140d7d(0x1bd),_0x2efa71+=_0x140d7d(0x169)+_0x419ab2[_0x140d7d(0x1b9)]+_0x140d7d(0x1bd);if(_0x419ab2[_0x140d7d(0x196)]==_0x140d7d(0x180))_0x2efa71+=_0x140d7d(0x1a6);else new Date(_0x419ab2['expiringTime'])>new Date()?_0x2efa71+=_0x140d7d(0x1ca):_0x2efa71+=_0x140d7d(0x183);$(_0x140d7d(0x1d2))[_0x140d7d(0x1c1)](_0x2efa71);}await $['ajax']({'url':_0x56fdf6(0x1c3),'type':_0x56fdf6(0x19c),'success':function(_0x54726d){const _0x4325fa=_0x56fdf6;_0x54726d[_0x4325fa(0x1c5)]>0x0&&(document['getElementById'](_0x4325fa(0x1c0))[_0x4325fa(0x16b)]['display']=_0x4325fa(0x1b5),document[_0x4325fa(0x17c)](_0x4325fa(0x1ac))[_0x4325fa(0x16b)][_0x4325fa(0x1b4)]=_0x4325fa(0x184),document[_0x4325fa(0x17c)]('orderTableContainer')[_0x4325fa(0x16b)][_0x4325fa(0x1b4)]=_0x4325fa(0x184),_0x54726d[_0x4325fa(0x1ab)](_0x4dc530=>{getTherapist(_0x4dc530,_0x273271);}),document[_0x4325fa(0x17c)]('resultsFound')[_0x4325fa(0x1b0)]=_0x54726d[_0x4325fa(0x1c5)]);}}),document[_0x56fdf6(0x17c)]('0')['setAttribute'](_0x56fdf6(0x18d),_0x56fdf6(0x1a5)),document[_0x56fdf6(0x17c)]('1')[_0x56fdf6(0x182)](_0x56fdf6(0x18d),_0x56fdf6(0x1a5)),document['getElementById']('2')[_0x56fdf6(0x182)](_0x56fdf6(0x18d),_0x56fdf6(0x1a5)),document[_0x56fdf6(0x17c)]('3')['setAttribute'](_0x56fdf6(0x18d),_0x56fdf6(0x1a5)),document[_0x56fdf6(0x17c)]('4')[_0x56fdf6(0x182)](_0x56fdf6(0x18d),_0x56fdf6(0x1a5)),document[_0x56fdf6(0x17c)]('5')[_0x56fdf6(0x182)](_0x56fdf6(0x18d),_0x56fdf6(0x1a5)),document[_0x56fdf6(0x17c)]('6')['setAttribute'](_0x56fdf6(0x18d),'bi\x20bi-caret-down-fill'),sortTable(),document[_0x56fdf6(0x17c)](_0x56fdf6(0x1d1))['onclick']=function(){const _0x484433=_0x56fdf6;setTimeout(()=>{const _0x116116=_0x4341;$[_0x116116(0x188)]('/activeSession',function(_0x249037){const _0x30041c=_0x116116;_0x249037==_0x30041c(0x19d)?(document[_0x30041c(0x17c)](_0x30041c(0x194))['style'][_0x30041c(0x1b4)]=_0x30041c(0x175),document[_0x30041c(0x17c)](_0x30041c(0x1b7))[_0x30041c(0x1b0)]=_0x30041c(0x165),document[_0x30041c(0x17c)](_0x30041c(0x178))[_0x30041c(0x1b0)]=_0x30041c(0x1c2),document[_0x30041c(0x17c)]('refundButtonsSec')['style'][_0x30041c(0x1b4)]='none'):($(_0x30041c(0x1be))[_0x30041c(0x1a7)](_0x249037[_0x30041c(0x197)]+'.'),$(_0x30041c(0x18f))[_0x30041c(0x1a7)]('$'+_0x249037[_0x30041c(0x1cc)]));}),orderRefundModal['style'][_0x116116(0x1b4)]='block',document[_0x116116(0x166)]['style'][_0x116116(0x16d)]=_0x116116(0x18c);},0x32),$('#orderRefundBtn')[_0x484433(0x167)](),$(_0x484433(0x193))[_0x484433(0x191)](()=>{const _0x51bb31=_0x484433;orderRefundModal[_0x51bb31(0x16b)][_0x51bb31(0x1b4)]=_0x51bb31(0x1b5),document[_0x51bb31(0x17c)]('signupSuccessModal')[_0x51bb31(0x16b)][_0x51bb31(0x1b4)]='flex',document[_0x51bb31(0x166)][_0x51bb31(0x16b)][_0x51bb31(0x16d)]=_0x51bb31(0x18c),setTimeout(()=>{const _0x4276c7=_0x51bb31;$[_0x4276c7(0x1aa)](_0x4276c7(0x198),function(){const _0x42f7dc=_0x4276c7;location[_0x42f7dc(0x187)]();});},0x9c4);});};});function getTherapist(_0x32d4d0,_0x5c6420){const _0x47118e=_0x1e764d;let _0x4606a4=_0x32d4d0[_0x47118e(0x199)],_0x33b902;$['ajax']({'url':_0x47118e(0x16f),'method':_0x47118e(0x189),'data':{'therapistId':_0x4606a4},'success':function(_0x3e4ee9){const _0x1ddc12=_0x47118e;_0x33b902={'fullName':_0x3e4ee9[_0x1ddc12(0x17a)]['charAt'](0x0)+'.\x20'+_0x3e4ee9[_0x1ddc12(0x1b2)],'sessionCost':_0x3e4ee9['sessionCost']},_0x5c6420(_0x33b902,_0x32d4d0);}});}function searchTable(){const _0x443dbb=_0x1e764d,_0xd52276=document['getElementById'](_0x443dbb(0x192))[_0x443dbb(0x1ae)][_0x443dbb(0x186)](),_0x1cad4b=document[_0x443dbb(0x17c)]('orderTable'),_0xcca7e3=_0x1cad4b['tBodies'][0x0][_0x443dbb(0x1cf)]('tr');let _0x5294c9=0x0;for(var _0x4475db=0x0;_0x4475db<_0xcca7e3['length'];_0x4475db++){var _0x4b3b4d=_0xcca7e3[_0x4475db][_0x443dbb(0x1cf)]('td');_0xcca7e3[_0x4475db][_0x443dbb(0x16b)][_0x443dbb(0x1b4)]=_0x443dbb(0x1b5);for(var _0x403da1=0x0;_0x403da1<_0x4b3b4d['length'];_0x403da1++){if(_0x4b3b4d[_0x403da1]['innerHTML'][_0x443dbb(0x186)]()[_0x443dbb(0x1a3)](_0xd52276)>-0x1){_0xcca7e3[_0x4475db][_0x443dbb(0x16b)][_0x443dbb(0x1b4)]='',_0x5294c9++;break;}}}$(_0x443dbb(0x1c6))['html'](''+_0x5294c9);}function sortTable(){const _0x33c98f=_0x1e764d,_0x14f335=document['getElementById'](_0x33c98f(0x17e)),_0x3721cd=_0x14f335['querySelectorAll'](_0x33c98f(0x179)),_0x2c755c=Array['from'](_0x3721cd)[_0x33c98f(0x19b)](function(_0x506d03){return'';}),_0xb48f3d=function(_0x34fe17,_0x3cbe95){const _0x1edf8d=_0x33c98f,_0x12a893=_0x3721cd[_0x34fe17][_0x1edf8d(0x18e)](_0x1edf8d(0x1bb));var _0x351085={};switch(_0x12a893){case _0x1edf8d(0x1a0):_0x3cbe95=_0x3cbe95[_0x1edf8d(0x1a8)](0x1);return parseFloat(_0x3cbe95);case'string':case'plan':_0x3cbe95=_0x3cbe95[_0x1edf8d(0x1a8)](0x2);return _0x3cbe95;default:return _0x3cbe95;}},_0x201d80=_0x14f335[_0x33c98f(0x1af)]('tbody'),_0x38b190=_0x201d80[_0x33c98f(0x1c7)](_0x33c98f(0x1a4)),_0x45bda8=function(_0x6def02){const _0x32ed5c=_0x33c98f,_0x55a384=_0x2c755c[_0x6def02]||'asc',_0x117d3f=_0x55a384===_0x32ed5c(0x19a)?0x1:-0x1,_0x5a8189=Array[_0x32ed5c(0x1b1)](_0x38b190);_0x5a8189[_0x32ed5c(0x181)](function(_0x15cf9,_0x2c75ea){const _0x57fbd9=_0x32ed5c,_0x365261=_0x15cf9[_0x57fbd9(0x1ce)]('td')[_0x6def02][_0x57fbd9(0x1b0)][_0x57fbd9(0x1c4)](),_0x1d77b7=_0x2c75ea['querySelectorAll']('td')[_0x6def02][_0x57fbd9(0x1b0)][_0x57fbd9(0x1c4)](),_0x4af1b3=_0xb48f3d(_0x6def02,_0x365261),_0x1719c0=_0xb48f3d(_0x6def02,_0x1d77b7);switch(!![]){case _0x4af1b3>_0x1719c0:return 0x1*_0x117d3f;case _0x4af1b3<_0x1719c0:return-0x1*_0x117d3f;case _0x4af1b3===_0x1719c0:return 0x0;}}),[][_0x32ed5c(0x1ab)][_0x32ed5c(0x1ad)](_0x38b190,function(_0x5343bc){_0x201d80['removeChild'](_0x5343bc);}),_0x55a384===_0x32ed5c(0x19a)?(_0x2c755c[_0x6def02]=_0x32ed5c(0x17d),document[_0x32ed5c(0x17c)](_0x6def02)[_0x32ed5c(0x182)]('class',_0x32ed5c(0x1a5))):(_0x2c755c[_0x6def02]='asc',document[_0x32ed5c(0x17c)](_0x6def02)[_0x32ed5c(0x182)](_0x32ed5c(0x18d),_0x32ed5c(0x16e))),_0x5a8189[_0x32ed5c(0x1ab)](function(_0xc41bd8){_0x201d80['appendChild'](_0xc41bd8);});};[][_0x33c98f(0x1ab)][_0x33c98f(0x1ad)](_0x3721cd,function(_0x2d19ec,_0x5189d0){const _0x4f6c3b=_0x33c98f;_0x2d19ec[_0x4f6c3b(0x1b3)](_0x4f6c3b(0x191),function(){const _0x5351ba=_0x4f6c3b;_0x45bda8(_0x5189d0);for(var _0x5b6cb7=0x0;_0x5b6cb7<_0x3721cd[_0x5351ba(0x1c5)];_0x5b6cb7++){_0x5b6cb7==_0x5189d0?_0x2c755c[_0x5189d0]===_0x5351ba(0x19a)?document[_0x5351ba(0x17c)](_0x5b6cb7)[_0x5351ba(0x18a)][_0x5351ba(0x16b)][_0x5351ba(0x17f)]=_0x5351ba(0x1b8):document[_0x5351ba(0x17c)](_0x5b6cb7)[_0x5351ba(0x18a)][_0x5351ba(0x16b)][_0x5351ba(0x17f)]=_0x5351ba(0x16c):document[_0x5351ba(0x17c)](_0x5b6cb7)[_0x5351ba(0x18a)][_0x5351ba(0x16b)][_0x5351ba(0x17f)]='#000';}});});}document[_0x1e764d(0x17c)](_0x1e764d(0x1ba))[_0x1e764d(0x176)]=function(){const _0x3a500f=_0x1e764d;orderRefundModal[_0x3a500f(0x16b)][_0x3a500f(0x1b4)]=_0x3a500f(0x1b5),document[_0x3a500f(0x166)][_0x3a500f(0x16b)][_0x3a500f(0x16d)]=_0x3a500f(0x170);},document[_0x1e764d(0x17c)]('closeRefundIcon')[_0x1e764d(0x176)]=function(){const _0x3077c8=_0x1e764d;orderRefundModal[_0x3077c8(0x16b)][_0x3077c8(0x1b4)]=_0x3077c8(0x1b5),document[_0x3077c8(0x166)][_0x3077c8(0x16b)][_0x3077c8(0x16d)]='auto';},window[_0x1e764d(0x176)]=function(_0x184660){const _0x317cd5=_0x1e764d;_0x184660['target']==orderRefundModal&&(orderRefundModal['style']['display']='none',document[_0x317cd5(0x166)][_0x317cd5(0x16b)][_0x317cd5(0x16d)]=_0x317cd5(0x170));};function _0x365d(){const _0x1eb8cc=['toFixed','number','1031502rslqEO',' 3\x20Months ','indexOf','tableRows','bi\x20bi-caret-down-fill','
Refunded ','text','substring','ready','post','forEach','orderToolbar','call','value','querySelector','innerHTML','from','lastName','addEventListener','display','none','toISOString','headerRefund','#000','orderId','closeRefund','data-type','orderRefundModal','','#refundTherapist','439074tCYwsy','noOrderHistorySummary','append','You\x20have\x20no\x20active\x20session\x20at\x20this\x20time.\x20Please\x20place\x20an\x20order\x20from\x20our\x20
Therapists \x20page','/getPreviousPurchases','toLowerCase','length','#resultsFound','getElementsByClassName','2324232onWcon','8619534gBWazj','
Active ','
Trial ','cost','freePlan','querySelectorAll','getElementsByTagName','sessionCost','refundBtn','tbody','No\x20active\x20orders\x20found','body','off','monthPlan','
','10GGUtis','style','#09C5A3','overflow','bi\x20bi-caret-up-fill','/getTherapistInfo','auto',' 1\x20Month ','133629iPjfPd','toLocaleString','getTimezoneOffset','block','onclick','21VGSBjL','msgRefund','.tHead','firstName','timeLength','getElementById','desc','orderTable','color','refunded','sort','setAttribute','
Expired ','flex','
','toUpperCase','reload','get','POST','parentElement','purchased','hidden','class','getAttribute','#refundPrice','1874142uCnVOI','click','searchbar','#orderRefundBtn','modalHeader','297152WyejKe','status','therapistName','/refundOrder','therapist','asc','map','GET','NoActiveSession','numeric'];_0x365d=function(){return _0x1eb8cc;};return _0x365d();}
--------------------------------------------------------------------------------