diff --git a/Common/Dtos/Conversation/Read_ConversationItemDto.cs b/Common/Dtos/Conversation/Read_ConversationResponseDto.cs similarity index 91% rename from Common/Dtos/Conversation/Read_ConversationItemDto.cs rename to Common/Dtos/Conversation/Read_ConversationResponseDto.cs index 56ad8b4..e58a201 100644 --- a/Common/Dtos/Conversation/Read_ConversationItemDto.cs +++ b/Common/Dtos/Conversation/Read_ConversationResponseDto.cs @@ -3,7 +3,7 @@ namespace Common.Dtos.Conversation { - public class Read_ConversationItemDto + public class Read_ConversationResponseDto { public int ID { get; set; } public int ConversationID { get; set; } diff --git a/Common/Enums/ConversationStatus.cs b/Common/Enums/ConversationStatus.cs index b0dd3f2..1042c44 100644 --- a/Common/Enums/ConversationStatus.cs +++ b/Common/Enums/ConversationStatus.cs @@ -8,6 +8,6 @@ namespace Common.Enums { public enum ConversationStatus { - InProgress, Finished + Recorded, InProgress, Finished } } diff --git a/Common/Enums/ConversationType.cs b/Common/Enums/ConversationType.cs index f507f54..4de508e 100644 --- a/Common/Enums/ConversationType.cs +++ b/Common/Enums/ConversationType.cs @@ -8,6 +8,6 @@ namespace Common.Enums { public enum ConversationType { - EU = 1, UE = 2,Bot=3 + EU = 1, UE = 2,Bot=3,CU=4 } } diff --git a/Common/Models/Auth/AuthResponse.cs b/Common/Models/Auth/AuthResponse.cs index 2e0dd3e..b5edaa4 100644 --- a/Common/Models/Auth/AuthResponse.cs +++ b/Common/Models/Auth/AuthResponse.cs @@ -9,8 +9,11 @@ namespace Common.Models.Auth public class AuthResponse { public int Id { get; set; } + public int? CompanyId { get; set; } public string Fullname { get; set; } public string MobileOrUserName { get; set; } public string Token { get; set; } + public string Role { get; set; } + public byte[]? img { get; set; } } } diff --git a/Hushian.Application/ApplicationServicesRegistration.cs b/Hushian.Application/ApplicationServicesRegistration.cs index b71ef6b..96ebb46 100644 --- a/Hushian.Application/ApplicationServicesRegistration.cs +++ b/Hushian.Application/ApplicationServicesRegistration.cs @@ -1,6 +1,8 @@ -using Microsoft.AspNetCore.Authentication.JwtBearer; +using Hushian.WebApi; +using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; using Microsoft.IdentityModel.Tokens; using System.Reflection; using System.Text; @@ -13,6 +15,11 @@ namespace Hushian.Application IConfiguration configuration) { services.AddAutoMapper(Assembly.GetExecutingAssembly()); + services.AddSignalR() + .AddHubOptions(options => + { + options.ClientTimeoutInterval = TimeSpan.FromMinutes(5); + }); services.AddAuthentication(options => { options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; @@ -31,6 +38,25 @@ namespace Hushian.Application ValidAudience = configuration["JwtSettings:Audience"], IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(configuration["JwtSettings:Key"])) }; + + // ✅ لازم برای SignalR (WebSocket + توکن از query string یا header) + o.Events = new JwtBearerEvents + { + OnMessageReceived = context => + { + var accessToken = context.Request.Query["access_token"]; + + // فقط برای مسیرهای SignalR + var path = context.HttpContext.Request.Path; + if (!string.IsNullOrEmpty(accessToken) && + path.StartsWithSegments("/chatNotificationHub")) + { + context.Token = accessToken; + } + + return Task.CompletedTask; + } + }; }); } diff --git a/Hushian.Application/Hushian.Application.csproj b/Hushian.Application/Hushian.Application.csproj index ed0ee54..22b4098 100644 --- a/Hushian.Application/Hushian.Application.csproj +++ b/Hushian.Application/Hushian.Application.csproj @@ -7,12 +7,12 @@ - + - - + + - + diff --git a/Hushian.Application/Services/AuthService.cs b/Hushian.Application/Services/AuthService.cs index 573c516..c0c5c6f 100644 --- a/Hushian.Application/Services/AuthService.cs +++ b/Hushian.Application/Services/AuthService.cs @@ -52,7 +52,8 @@ namespace Hushian.Application.Services if (auth.Username.StartsWith("09")) { // in Company Search - var Company = await _CompanyRepository.Get().FirstOrDefaultAsync(f => f.Mobile == auth.Username && f.Password == auth.Password.GetHash()); + var Company = await _CompanyRepository.Get() + .FirstOrDefaultAsync(f => f.Mobile == auth.Username && f.Password == auth.Password.GetHash() && f.Verified); if (Company == null) { Response.Errors.Add("کاربری یافت نشد"); @@ -64,14 +65,17 @@ namespace Hushian.Application.Services { Fullname = Company.FullName, Id = Company.ID, + Role="Company", + img=Company.logo, MobileOrUserName = Company.Mobile, - Token = new JwtSecurityTokenHandler().WriteToken(await GenerateToken(Company.Mobile, Company.ID)) + Token = new JwtSecurityTokenHandler().WriteToken(await GenerateToken(Company.Mobile, Company.ID, "Company")) }; } } else { - var exper = await _ExperRepository.Get().FirstOrDefaultAsync(f => f.UserName == auth.Username && f.Password == auth.Password.GetHash()); + var exper = await _ExperRepository.Get().FirstOrDefaultAsync(f => f.UserName == auth.Username + && f.Password == auth.Password.GetHash() && f.Available); if (exper == null) { Response.Errors.Add("کاربری یافت نشد"); @@ -83,8 +87,10 @@ namespace Hushian.Application.Services { Fullname = exper.FullName, Id = exper.ID, + CompanyId = exper.CompanyID, MobileOrUserName = exper.UserName, - Token = new JwtSecurityTokenHandler().WriteToken(await GenerateToken(exper.UserName, exper.ID)) + Role="Exper", + Token = new JwtSecurityTokenHandler().WriteToken(await GenerateToken(exper.UserName, exper.ID, "Exper")) }; } } @@ -121,12 +127,14 @@ namespace Hushian.Application.Services return Response; } - public async Task GenerateToken(string UserName, int userId) + public async Task GenerateToken(string UserName, int userId, string Role) { var claims = new[] { new Claim(JwtRegisteredClaimNames.Sub,UserName), - new Claim(CustomClaimTypes.Uid,userId.ToString()) + new Claim(ClaimTypes.NameIdentifier, UserName), + new Claim(CustomClaimTypes.Uid,userId.ToString()), + new Claim(ClaimTypes.Role, Role) }; diff --git a/Hushian.Application/Services/ChatNotificationHub.cs b/Hushian.Application/Services/ChatNotificationHub.cs new file mode 100644 index 0000000..4539e5d --- /dev/null +++ b/Hushian.Application/Services/ChatNotificationHub.cs @@ -0,0 +1,9 @@ +using Microsoft.AspNetCore.SignalR; +namespace Hushian.WebApi +{ + // Hubs/ChatNotificationHub.cs + public class ChatNotificationHub : Hub + { + // انتخابی: نگهداری کاربران متصل (اختیاری برای این کاربرد) + } +} diff --git a/Hushian.Application/Services/CompanyService.cs b/Hushian.Application/Services/CompanyService.cs index 19b1d86..44dc3a8 100644 --- a/Hushian.Application/Services/CompanyService.cs +++ b/Hushian.Application/Services/CompanyService.cs @@ -45,9 +45,10 @@ namespace Hushian.Application.Services return Response; } - public async Task GETCompanyinformation(int CompanyID) + public async Task GETCompanyinformation(int CompanyID) { var company = await _CompanyRepository.Get().FirstOrDefaultAsync(f => f.ID == CompanyID); + if (company == null) return null; return _mapper.Map(company); } public async Task> EditCompany(ReadANDUpdate_CompanyDto model, int CompanyID) diff --git a/Hushian.Application/Services/ConversationService.cs b/Hushian.Application/Services/ConversationService.cs index aafdbfc..1c52f5e 100644 --- a/Hushian.Application/Services/ConversationService.cs +++ b/Hushian.Application/Services/ConversationService.cs @@ -4,6 +4,8 @@ using Common.Enums; using Hushian.Application.Contracts.Persistence; using Hushian.Application.Models; using Hushian.Domain.Entites; +using Hushian.WebApi; +using Microsoft.AspNetCore.SignalR; using Microsoft.EntityFrameworkCore; using Microsoft.VisualBasic; using System; @@ -22,12 +24,13 @@ namespace Hushian.Application.Services private readonly UserService _userService; private readonly GroupService _groupService; private readonly ExperService _experService; + private readonly IHubContext _hubContext; public ConversationService( IGenericRepository conversationRepository , IGenericRepository conversationResponseRepository , CompanyService companyService, UserService userService, GroupService groupService - , ExperService experService) + , ExperService experService, IHubContext hubContext) { _ConversationRepository = conversationRepository; _ConversationResponseRepository = conversationResponseRepository; @@ -35,6 +38,7 @@ namespace Hushian.Application.Services _userService = userService; _groupService = groupService; _experService = experService; + _hubContext = hubContext; } public async Task> NewConversation(ADD_ConversationDto dto, ConversationType type = ConversationType.UE) @@ -112,17 +116,23 @@ namespace Hushian.Application.Services }; Response.Value = (await _ConversationResponseRepository.ADD(response)).ID; Response.Success = Response.Value > 0; + + if (convModel.Status == ConversationStatus.Recorded && Response.Success) + { + convModel.Status = ConversationStatus.InProgress; + await _ConversationRepository.UPDATE(convModel); + } } else Response.Errors.Add("گفتگویی یافت نشد"); } return Response; } - public async Task> MyConversation(int UserID) + public async Task> GEtConversation(int UserID,int CompanyID) => await _ConversationRepository.Get() .Include(inc => inc.Group) .Include(inc => inc.ConversationResponses).ThenInclude(tinc => tinc.Exper) - .Where(w => w.UserID == UserID) + .Where(w => w.UserID == UserID && w.CompanyID==CompanyID) .Select(s => new Read_ConversationDto() { ExperID = s.ConversationResponses.Last().ExperID, @@ -139,11 +149,32 @@ namespace Hushian.Application.Services UserFullName = s.User.FullName }).ToListAsync(); - public async Task> MyConversationIsFinished(int ExperID) + public async Task> GetConversationItems(int ConversationID, int? ExperID) + { + return await _ConversationResponseRepository.Get() + .Include(inc=>inc.Exper) + .Where(w => w.ConversationID == ConversationID) + .Select(s => new Read_ConversationResponseDto() + { + ConversationID=s.ConversationID, + ExperID=s.ExperID, + ExperName=s.Exper.FullName, + FileContent=s.FileContent, + FileName=s.FileName, + FileType=s.FileType, + ID= s.ID, + IsRead=s.IsRead, + text=s.Text, + Type = s.Type + }).ToListAsync(); + + + } + public async Task> GetConversationByExperID(int ExperID , ConversationStatus status) => await _ConversationRepository.Get() .Include(inc => inc.Group) .Include(inc => inc.ConversationResponses).ThenInclude(tinc => tinc.Exper) - .Where(w => w.ConversationResponses.Any(a => a.ExperID == ExperID) && w.Status == ConversationStatus.Finished) + .Where(w => w.ConversationResponses.Any(a => a.ExperID == ExperID) && w.Status == status) .Select(s => new Read_ConversationDto() { ExperID = s.ConversationResponses.Last().ExperID, @@ -160,11 +191,11 @@ namespace Hushian.Application.Services UserFullName = s.User.FullName }).ToListAsync(); - public async Task> MyConversationIsInProgress(int ExperID) + public async Task> GetConversationByCompanyID(int CompanyID, ConversationStatus status) => await _ConversationRepository.Get() .Include(inc => inc.Group) .Include(inc => inc.ConversationResponses).ThenInclude(tinc => tinc.Exper) - .Where(w => w.ConversationResponses.Any(a => a.ExperID == ExperID) && w.Status == ConversationStatus.InProgress) + .Where(w => w.CompanyID==CompanyID && w.Status ==status) .Select(s => new Read_ConversationDto() { ExperID = s.ConversationResponses.Last().ExperID, @@ -185,7 +216,7 @@ namespace Hushian.Application.Services => await _ConversationRepository.Get() .Include(inc => inc.Group) .Include(inc => inc.ConversationResponses).ThenInclude(tinc => tinc.Exper) - .Where(w => w.ConversationResponses.Any(a => !a.ExperID.HasValue) && w.CompanyID == CompanyID) + .Where(w => w.Status== ConversationStatus.Recorded && w.CompanyID == CompanyID) .Select(s => new Read_ConversationDto() { ExperID = s.ConversationResponses.Last().ExperID, @@ -211,10 +242,59 @@ namespace Hushian.Application.Services if (convModel != null && convModel.Status != ConversationStatus.Finished) { convModel.Status = ConversationStatus.Finished; + convModel.FinishedDateTime = DateTime.Now; return await _ConversationRepository.UPDATEBool(convModel); } return true; } + public async Task MarkAsReadConversationItem(int ID, ConversationType Type , int? ExperID) + { + var item = await _ConversationResponseRepository.Get() + .Include(inc => inc.conversation).FirstOrDefaultAsync(w => w.ID == ID && !w.ExperID.HasValue + && w.conversation.Status != ConversationStatus.Finished); + + if (item != null) + { + if (Type != item.Type) + { + if (Type != ConversationType.UE && item.conversation.Status == ConversationStatus.Recorded) + { + item.conversation.Status = ConversationStatus.InProgress; + await _ConversationRepository.UPDATE(item.conversation); + } + + if (!item.IsRead) + { + item.IsRead = true; + item.ReadDateTime = DateTime.Now; + item.ExperID = ExperID; + return (await _ConversationResponseRepository.UPDATE(item)) != null; + } + } + + + } + return false; + } + public async Task GetCountQueueCompany(int CompanyID, int GroupID = 0) + { + var request = _ConversationRepository.Get() + .Where(w => w.CompanyID == CompanyID && w.Status!=ConversationStatus.Finished); + if (GroupID != 0) + request = request.Where(w => w.GroupID == GroupID); + return await request.CountAsync(); + } + public async Task WriteInHub(ConversationResponse item) + { + // فرض: لیستی از کاربرانی که به گفتگو دسترسی دارند + var usernames = new List(); + + foreach (var usn in usernames) + { + //await _hubContext.Clients.User(usn) + // .SendAsync("ReceiveNewConversation", conv.Id, conv.Title); + } + } } } diff --git a/Hushian.Application/Services/ExperService.cs b/Hushian.Application/Services/ExperService.cs index a0b929b..172ba87 100644 --- a/Hushian.Application/Services/ExperService.cs +++ b/Hushian.Application/Services/ExperService.cs @@ -8,6 +8,7 @@ using Hushian.Domain.Entites; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; +using System.ComponentModel.Design; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -67,7 +68,7 @@ namespace Hushian.Application.Services } public async Task GetInfoExper(int ExperID) => _mapper.Map(await _ExperRepository.Get().FirstOrDefaultAsync(w => w.ID == ExperID)); - public async Task?> GetExpersInCompany(int companyID) + public async Task> GetExpersInCompany(int companyID) => _mapper.Map>(await _ExperRepository.Get().Where(w => w.CompanyID == companyID).ToListAsync()); public async Task GetExpersInGroup(int GroupID) => _mapper.Map(await _ExperRepository.Get().Where(w => w.EG.Any(a => a.GroupID == GroupID)).ToListAsync()); @@ -77,8 +78,21 @@ namespace Hushian.Application.Services exper.FullName = model.FullName; return await _ExperRepository.UPDATEBool(exper); } + public async Task ChangeAvailableExper(int ExperID,int CompanyID,bool Available) + { + var exper = await _ExperRepository.Get().FirstOrDefaultAsync(w => w.ID == ExperID && w.CompanyID==CompanyID); + if (exper == null) return false; + exper.Available = Available; + return await _ExperRepository.UPDATEBool(exper); + } public async Task CheckExperInCompany(int CompanyID, int ExperID) =>await _ExperRepository.Get().AnyAsync(w => w.ID == ExperID && w.CompanyID==CompanyID); + public async Task DeleteExper(int ExperID, int CompanyID) + { + var exper = await _ExperRepository.Get().FirstOrDefaultAsync(w => w.ID == ExperID && w.CompanyID == CompanyID); + if (exper == null) return false; + return await _ExperRepository.DELETE(exper); + } public async Task> ChangePasswordExperFromExper(ChangePasswordDto model, int ExperID) { ResponseBase Response = new(); @@ -135,5 +149,11 @@ namespace Hushian.Application.Services } return Response; } + public async Task GetCompanyIDExper(int ExperID) + { + var exper = await _ExperRepository.Get().FirstOrDefaultAsync(w => w.ID == ExperID); + if (exper == null) return 0; + return exper.CompanyID; + } } } diff --git a/Hushian.Application/Services/GroupService.cs b/Hushian.Application/Services/GroupService.cs index 964b1d6..aaf5e59 100644 --- a/Hushian.Application/Services/GroupService.cs +++ b/Hushian.Application/Services/GroupService.cs @@ -60,7 +60,12 @@ namespace Hushian.Application.Services var entity = await _GroupRepository.Get().Where(f => f.CompanyID == CompanyID).ToListAsync(); return _mapper.Map>(entity); } - public async Task UpdateGroup(Update_GroupDto model, int CompanyID) + public async Task> GetGroupsExper(int ExperID) + { + var entity = await _GroupRepository.Get().Where(f => f.EG.Any(a=>a.ExperID==ExperID)).ToListAsync(); + return _mapper.Map>(entity); + } + public async Task> UpdateGroup(Update_GroupDto model, int CompanyID) { ResponseBase Response = new(); if (!model.Name.IsOnlyPersianLetters()) @@ -91,6 +96,8 @@ namespace Hushian.Application.Services Response.Errors.Add("خطای سیستمی"); } } + + return Response; } public async Task ChangeAvailableGroup(ChangeAvailable_GroupDto model, int CompanyID) { @@ -106,26 +113,70 @@ namespace Hushian.Application.Services return false; } } - public async Task JoinExperInGroup(int GroupID, int ExperID, int CompanyID) + public async Task> DeleteGroup(int GroupID,int CompanyID) { + ResponseBase Response = new(); + + var Group = await _GroupRepository.Get().FirstOrDefaultAsync(a => a.CompanyID == CompanyID && a.ID == GroupID); + if (Group!=null) Response.Value=Response.Success= await _GroupRepository.DELETE(Group); + else Response.Errors.Add("یافت نشد"); + + return Response; + } + public async Task> JoinExperInGroup(int GroupID, int ExperID, int CompanyID) + { + ResponseBase Response = new(); + if (await CHeckGroupMemberCompany(GroupID,CompanyID)) { if (await _experService.CheckExperInCompany(CompanyID,ExperID)) { - return await _EGRepository.ADDBool(new ExperGroup() + Response.Value=Response.Success= await _EGRepository.ADDBool(new ExperGroup() { ExperID = ExperID, GroupID = GroupID }); } + else Response.Errors.Add("کارشناس یافت نشد"); + } - return false; + else Response.Errors.Add("گروه یافت نشد"); + + return Response; + } + public async Task> UnJoinExperInGroup(int GroupID, int ExperID, int CompanyID) + { + ResponseBase Response = new(); + + if (await CHeckGroupMemberCompany(GroupID, CompanyID)) + { + if (await _experService.CheckExperInCompany(CompanyID, ExperID)) + { + try + { + var eg =await _EGRepository.Get().FirstOrDefaultAsync(w=>w.GroupID==GroupID && w.ExperID==ExperID); + Response.Value = Response.Success = eg==null ? true : await _EGRepository.DELETE(eg); + } + catch (Exception) + { + + throw; + } + + } + else Response.Errors.Add("کارشناس یافت نشد"); + + } + else Response.Errors.Add("گروه یافت نشد"); + + return Response; } public async Task AnyGroup(int GroupID) => await _GroupRepository.Get().AnyAsync(a=>a.ID==GroupID); public async Task CHeckGroupMemberCompany(int GroupID, int CompanyID)=> await _GroupRepository.Get().AnyAsync(a => a.CompanyID == CompanyID && a.ID == GroupID); - + public async Task> GetExpersFromGroupID(int GroupID) + => _mapper.Map>( await _EGRepository.Get().Where(w => w.GroupID == GroupID).Select(s=>s.Exper).ToListAsync()); } } diff --git a/Hushian.Application/Services/VerificationService.cs b/Hushian.Application/Services/VerificationService.cs index 1c812f1..281abbf 100644 --- a/Hushian.Application/Services/VerificationService.cs +++ b/Hushian.Application/Services/VerificationService.cs @@ -96,7 +96,8 @@ namespace Hushian.Application.Services Fullname = User.FullName, Id = User.ID, MobileOrUserName = User.Mobile, - Token = new JwtSecurityTokenHandler().WriteToken(await _authService.GenerateToken(User.Mobile, User.ID)) + Role="User", + Token = new JwtSecurityTokenHandler().WriteToken(await _authService.GenerateToken(User.Mobile, User.ID, "User")) }; } else diff --git a/Hushian.Domain/Entites/Conversation.cs b/Hushian.Domain/Entites/Conversation.cs index 91213b5..34bc5d5 100644 --- a/Hushian.Domain/Entites/Conversation.cs +++ b/Hushian.Domain/Entites/Conversation.cs @@ -20,7 +20,7 @@ namespace Hushian.Domain.Entites #region Fild public ConversationStatus Status { get; set; } - = ConversationStatus.InProgress; + = ConversationStatus.Recorded; public DateTime? FinishedDateTime { get; set; } public DateTime Cdatetime { get; set; } = DateTime.Now; diff --git a/Hushian.sln b/Hushian.sln index 00aad12..d104999 100644 --- a/Hushian.sln +++ b/Hushian.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.13.35818.85 d17.13 +VisualStudioVersion = 17.13.35818.85 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hushian.Application", "Hushian.Application\Hushian.Application.csproj", "{E080DBF2-2DD1-4F88-A091-483C6793E112}" EndProject @@ -15,6 +15,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hushian.Persistence", "Infr EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "Common\Common.csproj", "{5E4ECC9D-90EB-4A5E-9308-99E359978FAE}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Presentation", "Presentation", "{F9F2A965-B4E4-4990-B547-F18200AF2631}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hushian.WebApi", "Presentation\Hushian.WebApi\Hushian.WebApi.csproj", "{37AD460D-1663-4755-AC15-703BFFBF20D2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HushianWebApp", "Presentation\HushianWebApp\HushianWebApp.csproj", "{80D865DC-1CCD-9C25-5DAF-153E7B33408E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -41,6 +47,14 @@ Global {5E4ECC9D-90EB-4A5E-9308-99E359978FAE}.Debug|Any CPU.Build.0 = Debug|Any CPU {5E4ECC9D-90EB-4A5E-9308-99E359978FAE}.Release|Any CPU.ActiveCfg = Release|Any CPU {5E4ECC9D-90EB-4A5E-9308-99E359978FAE}.Release|Any CPU.Build.0 = Release|Any CPU + {37AD460D-1663-4755-AC15-703BFFBF20D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37AD460D-1663-4755-AC15-703BFFBF20D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37AD460D-1663-4755-AC15-703BFFBF20D2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37AD460D-1663-4755-AC15-703BFFBF20D2}.Release|Any CPU.Build.0 = Release|Any CPU + {80D865DC-1CCD-9C25-5DAF-153E7B33408E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80D865DC-1CCD-9C25-5DAF-153E7B33408E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80D865DC-1CCD-9C25-5DAF-153E7B33408E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {80D865DC-1CCD-9C25-5DAF-153E7B33408E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -48,6 +62,8 @@ Global GlobalSection(NestedProjects) = preSolution {E2FC6095-8D42-4DD6-9425-8343B73CB452} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} {05D292C2-BB17-4524-B1F2-8A2B6B213C6A} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} + {37AD460D-1663-4755-AC15-703BFFBF20D2} = {F9F2A965-B4E4-4990-B547-F18200AF2631} + {80D865DC-1CCD-9C25-5DAF-153E7B33408E} = {F9F2A965-B4E4-4990-B547-F18200AF2631} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F0E59B62-9EDF-47DC-AAFD-F841443D0AAE} diff --git a/Infrastructure/Infrastructure/Hushian.Infrastructure.csproj b/Infrastructure/Infrastructure/Hushian.Infrastructure.csproj index 125f4c9..c8063a6 100644 --- a/Infrastructure/Infrastructure/Hushian.Infrastructure.csproj +++ b/Infrastructure/Infrastructure/Hushian.Infrastructure.csproj @@ -6,4 +6,14 @@ enable + + + + + + + + + + diff --git a/Infrastructure/Infrastructure/InfrastractureServicesRegistration.cs b/Infrastructure/Infrastructure/InfrastractureServicesRegistration.cs new file mode 100644 index 0000000..79eafce --- /dev/null +++ b/Infrastructure/Infrastructure/InfrastractureServicesRegistration.cs @@ -0,0 +1,27 @@ +using Common.Contracts.Infrastructure; +using Hushian.Application.Models.Message; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +namespace Hushian.Infrastructure +{ + public static class InfrastractureServicesRegistration + { + public static IServiceCollection ConfigureInfrastractureServices(this IServiceCollection services, + IConfiguration configuration) + { + + // services.Configure(configuration.GetSection("EmailSettings")); + //services.AddTransient(); + + services.Configure(configuration.GetSection("MessageSettings")); + services.AddTransient(); + + + //services.Configure(configuration.GetSection("aiSettings")); + //services.AddTransient(); + + // services.AddScoped(c => new Melipayamak.RestClient(configuration.GetSection("MessageSettings:UserName").Value, configuration.GetSection("MessageSettings:Password").Value)); + return services; + } + } +} diff --git a/Infrastructure/Infrastructure/MessageSender.cs b/Infrastructure/Infrastructure/MessageSender.cs new file mode 100644 index 0000000..d44deca --- /dev/null +++ b/Infrastructure/Infrastructure/MessageSender.cs @@ -0,0 +1,25 @@ + +using Common.Contracts.Infrastructure; +using Hushian.Application.Models.Message; +using Microsoft.Extensions.Options; + +namespace Hushian.Infrastructure +{ + public class MessageSender : IMessageSender + { + private readonly Melipayamak.RestClient _restClient; + private MessageSetting _msgSettings; + public MessageSender(Melipayamak.RestClient restClient, IOptions msgSettings) + { + _restClient = restClient; + _msgSettings = msgSettings.Value; + } + + public Task SendMassage(Message message) + { + string From = _msgSettings.From; + // _restClient.Send(message.To, From, message.msg, false); + return Task.Run(()=>true); + } + } +} diff --git a/Infrastructure/Persistence/Hushian.Persistence.csproj b/Infrastructure/Persistence/Hushian.Persistence.csproj index f641ed8..71c8cc6 100644 --- a/Infrastructure/Persistence/Hushian.Persistence.csproj +++ b/Infrastructure/Persistence/Hushian.Persistence.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/Presentation/Hushian.WebApi/ChatNotificationHub.cs b/Presentation/Hushian.WebApi/ChatNotificationHub.cs new file mode 100644 index 0000000..0b5085c --- /dev/null +++ b/Presentation/Hushian.WebApi/ChatNotificationHub.cs @@ -0,0 +1,21 @@ +using Microsoft.AspNetCore.SignalR; +namespace Hushian.Application.Services +{ + // Hubs/ChatNotificationHub.cs + public class ChatNotificationHub : Hub + { + // انتخابی: نگهداری کاربران متصل (اختیاری برای این کاربرد) + + public override Task OnConnectedAsync() + { + //var userId = Context.UserIdentifier; + //// نگهداری یا ثبت اتصال کاربر اگر نیاز باشد + return base.OnConnectedAsync(); + } + + public override Task OnDisconnectedAsync(Exception? exception) + { + return base.OnDisconnectedAsync(exception); + } + } +} diff --git a/Presentation/Hushian.WebApi/Controllers/v1/AuthController.cs b/Presentation/Hushian.WebApi/Controllers/v1/AuthController.cs new file mode 100644 index 0000000..b35c59b --- /dev/null +++ b/Presentation/Hushian.WebApi/Controllers/v1/AuthController.cs @@ -0,0 +1,53 @@ +using Common.Models.Auth; +using Common.Models.Auth.CompanySide; +using Common.Models.Auth.UserSide; +using Hushian.Application.Services; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace Hushian.WebApi.Controllers.v1 +{ + [Route("api/v1/[controller]")] + [ApiController] + public class AuthController : ControllerBase + { + private readonly AuthService _authService; + private readonly VerificationService _verificationService; + public AuthController(AuthService authService, VerificationService verificationService) + { + _authService = authService; + _verificationService = verificationService; + } + + [HttpPost("loginCompanySide")] + public async Task> login([FromBody] AuthRequestFromCompanySide request) + { + var response = await _authService.AuthenticationFromCompanySide(request); + if (response.Success) return Ok(response.Value); + else return BadRequest(response.Errors); + } + [HttpPost("AuthenticationFromUser")] + public async Task> AuthenticationFromUser([FromBody] AuthRequestFromUserSide request) + { + var response = await _authService.AuthenticationFromUserSide(request); + if (response.Success) return Ok(response.Value); + else return BadRequest(response.Errors); + } + [HttpPut("UserLoginVerification/{ID}/{Code}")] + public async Task> UserLoginVerification(int ID,string Code) + { + var response = await _verificationService.VerificationCode(new Common.Dtos.Verification.ConfirmedCodeDto() + { code =Code,codeType=Common.Enums.VerificationCodeType.Login,Id=ID}); + + if (response.Success) return Ok(response.Value); + else return BadRequest(response.Errors); + } + [HttpGet("IsOnline")] + [Authorize] + public async Task IsOnline() + { + return NoContent(); + } + + } +} diff --git a/Presentation/Hushian.WebApi/Controllers/v1/CompanyController.cs b/Presentation/Hushian.WebApi/Controllers/v1/CompanyController.cs new file mode 100644 index 0000000..4b4df7b --- /dev/null +++ b/Presentation/Hushian.WebApi/Controllers/v1/CompanyController.cs @@ -0,0 +1,45 @@ +using Common.Dtos.Company; +using Hushian.Application.Constants; +using Hushian.Application.Services; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace Hushian.WebApi.Controllers.v1 +{ + [Route("api/v1/[controller]")] + [ApiController] + public class CompanyController : ControllerBase + { + private readonly CompanyService _companyService; + + public CompanyController(CompanyService companyService) + { + _companyService = companyService; + } + + [HttpPost("NewCompany")] + public async Task> NewCompany([FromBody] RegisterCompanyDto request) + { + var response = await _companyService.RegisterCompany(request); + return response.Success ? Ok(response.Value) + : BadRequest(response.Errors); + } + [HttpGet("GetCompany/{CompanyID}")] + public async Task> GetCompany(int CompanyID) + { + var response = await _companyService.GETCompanyinformation(CompanyID); + return response!=null ? Ok(response): NotFound(); + } + [HttpPut("UpdateCompany")] + [Authorize(Roles = "Company")] + public async Task UpdateCompany([FromBody] ReadANDUpdate_CompanyDto model) + { + string CompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + var response = await _companyService.EditCompany(model,Convert.ToInt32(CompanyID)); + return response.Success && response.Value ? NoContent() + : BadRequest(response.Errors); + } + + + } +} diff --git a/Presentation/Hushian.WebApi/Controllers/v1/ConversationController.cs b/Presentation/Hushian.WebApi/Controllers/v1/ConversationController.cs new file mode 100644 index 0000000..bd57feb --- /dev/null +++ b/Presentation/Hushian.WebApi/Controllers/v1/ConversationController.cs @@ -0,0 +1,162 @@ +using Common.Dtos.Conversation; +using Common.Enums; +using Hushian.Application.Constants; +using Hushian.Application.Services; +using Hushian.Domain.Entites; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace Hushian.WebApi.Controllers.v1 +{ + [Route("api/v1/[controller]")] + [ApiController] + [Authorize] + public class ConversationController : ControllerBase + { + private readonly ConversationService _conversationService; + private readonly CompanyService _companyService; + private readonly ExperService _experService; + public ConversationController(ConversationService conversationService, CompanyService companyService) + { + _conversationService = conversationService; + _companyService = companyService; + } + + [HttpGet("MyConversation")] + [Authorize(Roles = "Company,Exper")] + public async Task MyConversation(ConversationStatus status) + { + if (User.IsInRole("Exper")) + { + string strExperID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int ExperID = Convert.ToInt32(strExperID); + var response = await _conversationService.GetConversationByExperID(ExperID, status); + return Ok(response); + } + else if (User.IsInRole("Company")) + { + string strCompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int CompanyID = Convert.ToInt32(strCompanyID); + + var response = await _conversationService.GetConversationByCompanyID(CompanyID, status); + return Ok(response); + } + return Forbid(); + + } + + [HttpGet("ConversationAwaitingOurResponse")] + [Authorize(Roles = "Company,Exper")] + public async Task ConversationAwaitingOurResponse() + { + int CompanyID = 0; + if (User.IsInRole("Exper")) + { + string strExperID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int ExperID = Convert.ToInt32(strExperID); + + CompanyID = await _experService.GetCompanyIDExper(ExperID); + } + else if (User.IsInRole("Company")) + { + string strCompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + CompanyID = Convert.ToInt32(strCompanyID); + } + + var response = await _conversationService.ConversationAwaitingOurResponse(CompanyID); + return Ok(response); + } + [HttpGet("ConversationItems/{ConversationID}")] + [Authorize(Roles = "Company,Exper,User")] + public async Task GetConversationItems(int ConversationID) + { + return Ok(await _conversationService.GetConversationItems(ConversationID)); + } + [HttpPost("NewConversationFromCurrentUser")] + public async Task NewConversationFromCurrentUser(ADD_ConversationDto conversation) + { + string UserID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + var response = await _conversationService.NewConversation(conversation); + return response.Success ? Ok(response.Value) + : BadRequest(response.Errors); + } + [HttpPost("ADDConversationResponse")] + [Authorize(Roles = "Company,User,Exper")] + public async Task ADDConversationResponse([FromBody] ADD_ConversationResponseDto ConversationItem) + { + + int? ExperID = null; + if (User.IsInRole("Exper")) + { + string strExperID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + ExperID = Convert.ToInt32(strExperID); + ConversationItem.Type = ConversationType.EU; + } + + else if (User.IsInRole("User")) + { + ConversationItem.Type = ConversationType.UE; + } + else if (User.IsInRole("Company")) + { + ConversationItem.Type = ConversationType.CU; + + } + else return Unauthorized(); + + + var Response = await _conversationService.NewConversationResponse(ConversationItem, ExperID); + return Response.Success ? Ok(Response.Value) + : BadRequest(Response.Errors); + } + [HttpPut("MarkAsReadConversationItem/{ConversationItemID}")] + [Authorize(Roles = "Company,User,Exper")] + public async Task MarkAsReadConversationItem(int ConversationItemID) + { + int? ExperID = null; + ConversationType Type = ConversationType.UE; + if (User.IsInRole("Exper")) + { + string strExperID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + ExperID = Convert.ToInt32(strExperID); + Type = ConversationType.EU; + } + + else if (User.IsInRole("User")) + { + Type = ConversationType.UE; + } + else if (User.IsInRole("Company")) + { + Type = ConversationType.CU; + } + else return Unauthorized(); + + return await _conversationService.MarkAsReadConversationItem(ConversationItemID, Type, ExperID) ? NoContent() + : BadRequest(new List() { "خطا در بروزرسانی گفتگو" }); + + } + [HttpGet("ConversationIsFinish/{ConversationID}")] + [Authorize(Roles = "Company,Exper")] + public async Task ConversationIsFinish(int ConversationID) + { + return await _conversationService.FinishConversation(ConversationID) ? NoContent() + : BadRequest(new List { "خطا در بروزرسانی وضعیت" }); + } + [HttpGet("CountQueueCompany/{CompanyID}")] + [Authorize] + public async Task> GetCountQueueCompany(int CompanyID, int GroupID) + { + return Ok(await _conversationService.GetCountQueueCompany(CompanyID, GroupID)); + } + [HttpGet("ConversationFromUserSide/{CompanyID}")] + [Authorize(Roles = "User")] + public async Task GetConversationFromUserSide(int CompanyID) + { + string strUserID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int UserID = Convert.ToInt32(strUserID); + var response = await _conversationService.GEtConversation(CompanyID, UserID); + return Ok(response) ; + } + } +} diff --git a/Presentation/Hushian.WebApi/Controllers/v1/ExperController.cs b/Presentation/Hushian.WebApi/Controllers/v1/ExperController.cs new file mode 100644 index 0000000..f716e05 --- /dev/null +++ b/Presentation/Hushian.WebApi/Controllers/v1/ExperController.cs @@ -0,0 +1,118 @@ + +using Azure; +using Common.Dtos; +using Common.Dtos.Exper; +using Hushian.Application.Constants; +using Hushian.Application.Services; +using Hushian.Domain.Entites; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using System.IdentityModel.Tokens.Jwt; + +namespace Hushian.WebApi.Controllers.v1 +{ + [Route("api/v1/[controller]")] + [ApiController] + public class ExperController : ControllerBase + { + private readonly ExperService _experService; + + + [HttpPost("AddExper")] + [Authorize(Roles = "Company")] + public async Task AddExper([FromBody] ADD_ExperDto userDto) + { + string strCompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int CompanyID = Convert.ToInt32(strCompanyID); + var response = await _experService.ADDExper(userDto, CompanyID); + return response.Success ? NoContent() + : BadRequest(response.Errors); + } + [HttpGet("GetExpersCompany/{CompanyID}")] + [Authorize] + public async Task GetExpersCompany(int CompanyID, int PageIndex = 1, int PageSize = 10) + { + var response = await _experService.GetExpersInCompany(CompanyID); + return Ok(response); + + } + + [HttpPut("EditUserYourself")] //ویرایش کاربران توسط خود + [Authorize(Roles = "Exper")] + public async Task EditUserYourself([FromBody] Update_ExperDto editUser) + { + string strExperID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int ExperID = Convert.ToInt32(strExperID); + + var response = await _experService.UpdateExper(editUser,ExperID); + return response ? NoContent() + : BadRequest(new List { "یافت نشد" }); + } + [HttpGet("GetCurrentExper")] + [Authorize(Roles = "Exper")] + public async Task GetCurrentUser() + { + string strExperID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int ExperID = Convert.ToInt32(strExperID); + + var response = await _experService.GetInfoExper(ExperID); + return response!=null ? Ok(response) : BadRequest(new List { "یافت نشد" }); + } + [HttpPut("ExperEditingFromManager/{ExperID}")] //ویرایش کارشناس توسط مدیرش + [Authorize(Roles = "Company")] + public async Task ExperEditingFromManager(int ExperID,[FromBody] Update_ExperDto editUser) + { + var response = await _experService.UpdateExper(editUser, ExperID); + return response ? NoContent() + : BadRequest(new List { "یافت نشد" }); + } + //--- + [HttpPut("ChangePasswordYourself")] //تغییر کلمه عبور کاربران توسط خود + [Authorize(Roles = "Exper")] + public async Task ChangePasswordYourself([FromBody] ChangePasswordDto item) + { + string strExperID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int ExperID = Convert.ToInt32(strExperID); + + var response = await _experService.ChangePasswordExperFromExper(item,ExperID); + return response.Success && response.Value ? NoContent() + : BadRequest(response.Errors); + } + [HttpPut("ChangePasswordFromManager/{ExperID}")] //تغییر کلمه عبور کارشناس توسط مدیرش + [Authorize(Roles = "Company")] + public async Task ChangePasswordFromManager(int ExperID,[FromBody] ChangePasswordDto item) + { + string strCompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int CompanyID = Convert.ToInt32(strCompanyID); + + var response = await _experService.ChangePasswordExperFromCompanyManaget(item, ExperID,CompanyID); + return response.Success && response.Value ? NoContent() + : BadRequest(response.Errors); + } + [HttpPut("ChangeAvailableExperFromManager/{ExperID}")] //تغییر وضعیت در دسترس بودن یا نبودن کارشناس توسط مدیرش + [Authorize(Roles = "Company")] + public async Task ChangeAvailableExperFromManager(int ExperID, bool Available) + { + string strCompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int CompanyID = Convert.ToInt32(strCompanyID); + + + var response = await _experService.ChangeAvailableExper(ExperID,CompanyID,Available); + return response ? NoContent() + : BadRequest(new List { "یافت نشد"}); + } + [HttpDelete("DeleteExperFromManager/{ExperID}")] + [Authorize(Roles = "Company")] + public async Task DeleteExperFromManager(int ExperID) + { + string strCompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int CompanyID = Convert.ToInt32(strCompanyID); + + + var response = await _experService.DeleteExper(ExperID, CompanyID); + return response ? NoContent() + : BadRequest(new List { "یافت نشد" }); + } + + } +} diff --git a/Presentation/Hushian.WebApi/Controllers/v1/GroupController.cs b/Presentation/Hushian.WebApi/Controllers/v1/GroupController.cs new file mode 100644 index 0000000..c445524 --- /dev/null +++ b/Presentation/Hushian.WebApi/Controllers/v1/GroupController.cs @@ -0,0 +1,119 @@ +using Common.Dtos.Exper; +using Common.Dtos.Group; +using Hushian.Application.Constants; +using Hushian.Application.Services; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace Hushian.WebApi.Controllers.v1 +{ + [Route("api/v1/[controller]")] + [ApiController] + public class GroupController : ControllerBase + { + private readonly GroupService _groupService; + private readonly CompanyService _companyService; + public GroupController(GroupService groupService, CompanyService companyService) + { + _groupService = groupService; + _companyService = companyService; + } + + [HttpPost("AddGroup")] + [Authorize(Roles = "Company")] + public async Task AddGroup([FromBody] ADD_GroupDto Group) + { + string strCompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int CompanyID = Convert.ToInt32(strCompanyID); + var response = await _groupService.NewGroup(Group, CompanyID); + return response.Success && response.Value ? NoContent() + : BadRequest(response.Errors); + } + [HttpPut("UpdateGroup")] + [Authorize(Roles = "Company")] + public async Task UpdateGroup([FromBody] Update_GroupDto Group) + { + string strCompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int CompanyID = Convert.ToInt32(strCompanyID); + var response = await _groupService.UpdateGroup(Group, CompanyID); + return response.Success && response.Value ? NoContent() + : BadRequest(response.Errors); + } + [HttpPut("JoinExperToGroup/{GroupID}/{ExperID}")] + [Authorize(Roles = "Company")] + public async Task JoinExperToGroup(int GroupID, int ExperID) + { + string strCompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int CompanyID = Convert.ToInt32(strCompanyID); + var response = await _groupService.JoinExperInGroup(GroupID, ExperID, CompanyID); + return response.Success && response.Value ? NoContent() + : BadRequest(response.Errors); + } + [HttpPut("UnJoinExperToGroup/{GroupID}/{ExperID}")] + [Authorize(Roles = "Company")] + public async Task UnJoinExperToGroup(int GroupID, int ExperID) + { + string strCompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int CompanyID = Convert.ToInt32(strCompanyID); + var response = await _groupService.UnJoinExperInGroup(GroupID, ExperID, CompanyID); + return response.Success && response.Value ? NoContent() + : BadRequest(response.Errors); + } + [HttpDelete("DeleteGroup/{GroupID}")] + [Authorize(Roles = "Company")] + public async Task DeleteGroup(int GroupID) + { + string strCompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int CompanyID = Convert.ToInt32(strCompanyID); + var response = await _groupService.DeleteGroup(GroupID, CompanyID); + return response.Success && response.Value ? NoContent() + : BadRequest(response.Errors); + } + [HttpGet("GetGroupsCompany")] + [Authorize] + public async Task>> GetGroups(int? CompanyID) + { + + if (!CompanyID.HasValue) + { + string strCompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + CompanyID = Convert.ToInt32(strCompanyID); + } + var response = await _groupService.GetGroupsCompany(CompanyID.Value); + return Ok(response); + } + [HttpGet("GetGroupsFromExperID")] + [Authorize] + public async Task>> GetGroups(int ExperID) + { + var response = await _groupService.GetGroupsExper(ExperID); + return Ok(response); + } + [HttpGet("GetExpersFromGroupID/{GroupID}")] + public async Task>> GetExpersGroup(int GroupID) + { + var response = await _groupService.GetExpersFromGroupID(GroupID); + return Ok(response); + } + //[HttpGet("GetOnlineExpersFromGroupID/{GroupID}")] + //public async Task> GetOnlineExpersGroup(int GroupID) + //{ + // var CompanyID = await _companyService.GetCompanyID(User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First()); + // var response = await _groupService.GetOnlineExpersGroup(GroupID, CompanyID.GetValueOrDefault()); + // return response.Success ? Ok(response.Value) + // : BadRequest(response.Errors); + //} + [HttpPut("ChangeAvailableGroupFromManager/{GroupID}")] //تغییر وضعیت در دسترس بودن یا نبودن گروه' توسط مدیرش + [Authorize(Roles = "Company")] + public async Task ChangeAvailableExperFromManager(int GroupID, bool Available) + { + string strCompanyID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First(); + int CompanyID = Convert.ToInt32(strCompanyID); + var response = await _groupService.ChangeAvailableGroup(new Common.Dtos.Exper.ChangeAvailable_GroupDto() + { Available=Available,ID=GroupID}, CompanyID); + return response? NoContent() + : BadRequest(new List { "یافت نشد"}); + } + + } +} diff --git a/Presentation/Hushian.WebApi/Controllers/v1/UserController.cs b/Presentation/Hushian.WebApi/Controllers/v1/UserController.cs new file mode 100644 index 0000000..448d07e --- /dev/null +++ b/Presentation/Hushian.WebApi/Controllers/v1/UserController.cs @@ -0,0 +1,11 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; + +namespace Hushian.WebApi.Controllers.v1 +{ + [Route("api/v1/[controller]")] + [ApiController] + public class UserController : ControllerBase + { + } +} diff --git a/Presentation/Hushian.WebApi/Controllers/v1/VerificationController.cs b/Presentation/Hushian.WebApi/Controllers/v1/VerificationController.cs new file mode 100644 index 0000000..74284fd --- /dev/null +++ b/Presentation/Hushian.WebApi/Controllers/v1/VerificationController.cs @@ -0,0 +1,42 @@ +using Common.Dtos.Verification; +using Hushian.Application.Services; +using Microsoft.AspNetCore.Mvc; + +namespace Hushian.WebApi.Controllers.v1 +{ + [Route("api/v1/[controller]")] + [ApiController] + public class VerificationController : ControllerBase + { + private readonly VerificationService _verificationService; + + public VerificationController(VerificationService verificationService) + { + _verificationService = verificationService; + } + + + //------ UserName by Exper - Mobile by Company + [HttpGet("ForgetPassword/{input}")] + public async Task> GetIDAndSendCodeForForgetPasswordByUserID(string input) + { + var response = await _verificationService.GenerateCodeByForgetPassword(input); + return response > 0 ? Ok(response) + : BadRequest(new List { "خطا در ارسال کد احراز"}); + } + [HttpGet("ReSendCode/{ID}")] + public async Task> ReSendCodeByID(int ID) + { + var response = await _verificationService.ReSendCode(ID); + return response ? NoContent() + : BadRequest(new List { "خطا در ارسال کد احراز" }); + } + [HttpPost("ConfirmedCode")] + public async Task ConfirmedCode(ConfirmedCodeDto model) + { + var response = await _verificationService.VerificationCode(model); + return response.Success ? NoContent() + : BadRequest(response.Errors); + } + } +} diff --git a/Presentation/Hushian.WebApi/Hushian.WebApi.csproj b/Presentation/Hushian.WebApi/Hushian.WebApi.csproj new file mode 100644 index 0000000..a2c4ced --- /dev/null +++ b/Presentation/Hushian.WebApi/Hushian.WebApi.csproj @@ -0,0 +1,20 @@ + + + + net9.0 + enable + enable + + + + + + + + + + + + + + diff --git a/Presentation/Hushian.WebApi/Hushian.WebApi.http b/Presentation/Hushian.WebApi/Hushian.WebApi.http new file mode 100644 index 0000000..f09806e --- /dev/null +++ b/Presentation/Hushian.WebApi/Hushian.WebApi.http @@ -0,0 +1,6 @@ +@Hushian.WebApi_HostAddress = http://localhost:5089 + +GET {{Hushian.WebApi_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/Presentation/Hushian.WebApi/Program.cs b/Presentation/Hushian.WebApi/Program.cs new file mode 100644 index 0000000..1eb405b --- /dev/null +++ b/Presentation/Hushian.WebApi/Program.cs @@ -0,0 +1,33 @@ +using Hushian.Application; +using Hushian.Persistence; +using Hushian.WebApi; + +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); +// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi +builder.Services.AddOpenApi(); + +builder.Services.ConfigureApplicationServices(builder.Configuration); +builder.Services.ConfigurePersistenceServices(builder.Configuration); +builder.Services.AddSignalR(); +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.MapOpenApi(); +} + + +app.MapHub("/chatNotificationHub"); + +app.UseHttpsRedirection(); +app.UseCors(policy => policy.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin()); +app.UseAuthentication(); +app.UseAuthorization(); +app.MapControllers(); + +app.Run(); diff --git a/Presentation/Hushian.WebApi/Properties/launchSettings.json b/Presentation/Hushian.WebApi/Properties/launchSettings.json new file mode 100644 index 0000000..aa32003 --- /dev/null +++ b/Presentation/Hushian.WebApi/Properties/launchSettings.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "http://localhost:5089", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "https://localhost:7046;http://localhost:5089", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Presentation/Hushian.WebApi/appsettings.Development.json b/Presentation/Hushian.WebApi/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/Presentation/Hushian.WebApi/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Presentation/Hushian.WebApi/appsettings.json b/Presentation/Hushian.WebApi/appsettings.json new file mode 100644 index 0000000..67f9a93 --- /dev/null +++ b/Presentation/Hushian.WebApi/appsettings.json @@ -0,0 +1,34 @@ +{ + "ConnectionStrings": { + "MainConnectionString": "Data Source=195.88.208.142;Initial Catalog=HushianDB;User ID=sa;Password=M439610m@;TrustServerCertificate=True", + "UserManagementConnectionString": "Data Source=195.88.208.142;Initial Catalog=UserManagementDB;User ID=sa;Password=M439610m@;TrustServerCertificate=True" + }, + "EmailSettings": { + "ApiKey": "SendGrid_Key_Here", + "FromName": "Leasing", + "FromAddress": "Leasing" + }, + "MessageSettings": { + "UserName": "09119660045", + "Password": "C54S2", + "From": "50004001660045" + }, + "aiSettings": { + "url": "https://api.openai.com/v1/chat/completions", + "apitoken": "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" + + }, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "JwtSettings": { + "Key": "84322CFB66934ECC86D547C5CF4F2EFC", + "Audience": "MMRbnjd", + "Issuer": "MMRbnjd", + "DurationInMinutes": 60 + }, + "AllowedHosts": "*" +} diff --git a/Presentation/HushianWebApp/App.razor b/Presentation/HushianWebApp/App.razor new file mode 100644 index 0000000..6fd3ed1 --- /dev/null +++ b/Presentation/HushianWebApp/App.razor @@ -0,0 +1,12 @@ + + + + + + + Not found + +

Sorry, there's nothing at this address.

+
+
+
diff --git a/Presentation/HushianWebApp/Components/ADDExperComponent.razor b/Presentation/HushianWebApp/Components/ADDExperComponent.razor new file mode 100644 index 0000000..3ca79dd --- /dev/null +++ b/Presentation/HushianWebApp/Components/ADDExperComponent.razor @@ -0,0 +1,82 @@ +@using Common.Dtos.User +@using Hushian.Application.Dtos +@using HushianWebApp.Service +@using HushianWebApp.Services +@inject UserService userService; + +
+ + +
+ + +
+
+ + +
+
+ + +
+
+ + + + @if (model.img != null && model.img.Length > 0) + { + Uploaded Image + } + +
+ + + +
+ + +@code { + public AddUserDto model { get; set; } = new(); + [Parameter] public EventCallback OnMultipleOfThree { get; set; } + public bool loading { get; set; } = false; +} +@functions{ + async Task NewItem() + { + if (!string.IsNullOrEmpty(model.FullName) && !string.IsNullOrEmpty(model.PhoneNumber)) + { + model.PassWord =model.UserName= model.PhoneNumber; + if (string.IsNullOrEmpty(model.Email)) model.Email = $"{model.UserName}@hushian.ir"; + + loading = true; + if (await userService.AddExper(model)) + { + loading = false; + await OnMultipleOfThree.InvokeAsync(); + } + loading = false; + } + } + protected override async Task OnParametersSetAsync() + { + model = new(); + await base.OnParametersSetAsync(); + } + private async Task OnFileChange(InputFileChangeEventArgs e) + { + var file = e.File; + using (var memoryStream = new MemoryStream()) + { + await file.OpenReadStream().CopyToAsync(memoryStream); + model.img = memoryStream.ToArray(); + } + } + private string GetImageSource() + { + if (model.img != null) + { + return $"data:image/jpeg;base64,{Convert.ToBase64String(model.img)}"; + } + return string.Empty; + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/Components/ADDGroupComponent.razor b/Presentation/HushianWebApp/Components/ADDGroupComponent.razor new file mode 100644 index 0000000..ad59629 --- /dev/null +++ b/Presentation/HushianWebApp/Components/ADDGroupComponent.razor @@ -0,0 +1,66 @@ +@using Hushian.Application.Dtos +@using HushianWebApp.Service +@inject GroupService groupService; +
+ + +
+ + +
+
+ + +
+
+ + + @if (model.img != null && model.img.Length >0) + { + Uploaded Image + } + +
+ + + +
+ +@code { + [Parameter] public ADDGroupDto model { get; set; } = new(); + [Parameter] public EventCallback OnMultipleOfThree { get; set; } + public bool loading { get; set; } = false; +} +@functions { + async Task NewItem() + { + if (!string.IsNullOrEmpty(model.Name)) + { + loading = true; + if (await groupService.AddGroup(model)) + { + loading = false; + await OnMultipleOfThree.InvokeAsync(); + } + loading = false; + } + } + + private async Task OnFileChange(InputFileChangeEventArgs e) + { + var file = e.File; + using (var memoryStream = new MemoryStream()) + { + await file.OpenReadStream().CopyToAsync(memoryStream); + model.img = memoryStream.ToArray(); + } + } + private string GetImageSource() + { + if (model.img != null) + { + return $"data:image/jpeg;base64,{Convert.ToBase64String(model.img)}"; + } + return string.Empty; + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/Components/Base/ChatBubble.razor b/Presentation/HushianWebApp/Components/Base/ChatBubble.razor new file mode 100644 index 0000000..518fa17 --- /dev/null +++ b/Presentation/HushianWebApp/Components/Base/ChatBubble.razor @@ -0,0 +1,101 @@ +@using Hushian.Application.Dtos +@inject IJSRuntime JSRuntime + +
+ + @foreach (var msg in Messages) + { + @if (!target && ((!msg.IsRead && msg.Type == Hushian.Enums.ConversationType.UE) || Messages.Last() == msg)) + { + target = true; +
+ @if (!msg.IsRead && msg.Type == Hushian.Enums.ConversationType.UE) + { +

ـــــــــــــــــــــــــ

+ } + +
+ } + + + +
+
+ @msg.text +
+ @if (msg.Type == Hushian.Enums.ConversationType.EU) + { + if (msg.IsRead) + { + + + } + else + { + + + } + } + + +
+ + } +
+ + + +@code { + bool target = false; + [Parameter] + public List Messages { get; set; } = new(); + [Parameter] public EventCallback EventCallIsRead { get; set; } + + protected override async Task OnAfterRenderAsync(bool firstRender) + { + if (firstRender) + { + await JSRuntime.InvokeVoidAsync("observeVisibility", DotNetObjectReference.Create(this)); + await JSRuntime.InvokeVoidAsync("scrollToTarget"); + + } + } + [JSInvokable] + public async Task MarkAsRead(int id) + { + var msg = Messages.FirstOrDefault(m => m.ID == id); + if (msg != null && !msg.IsRead && msg.Type==Hushian.Enums.ConversationType.UE) + { + msg.IsRead = true; + await EventCallIsRead.InvokeAsync(id); + } + await Task.CompletedTask; + } +} diff --git a/Presentation/HushianWebApp/Components/ChangePassWordComponent.razor b/Presentation/HushianWebApp/Components/ChangePassWordComponent.razor new file mode 100644 index 0000000..b72899f --- /dev/null +++ b/Presentation/HushianWebApp/Components/ChangePassWordComponent.razor @@ -0,0 +1,66 @@ +@using Common.Dtos.User +@using HushianWebApp.Service +@using HushianWebApp.Services +@inject UserService userService; +@inject NavigationManager NavigationManager +@inject AuthService authService; +@inject ILocalStorageService localStorageService; +
+ + + + + + + + + + +
    +
  • رمز عبور باید حداقل دارای یک کاراکتر باشد
  • +
  • رمز عبور باید حداقل دارای یک کاراکتر انگلیسی بزرگ باشد
  • +
  • رمز عبور باید حداقل دارای یک کاراکتر انگلیسی کوچک باشد
  • +
  • رمز عبور باید حداقل دارای یک عدد باشد
  • +
+ +
+ +
+
+ +@code { + [Inject] protected ToastService ToastService { get; set; } = default!; + public bool SpinnerVisible { get; set; } + public ChangePasswordFromUserDto dto { get; set; } = new(); + public string RePassword { get; set; } = ""; + public string Username { get; set; } = ""; + protected override async Task OnParametersSetAsync() + { + Username = await localStorageService.GetItem("Username"); + dto = new() { UserName = Username }; + await base.OnParametersSetAsync(); + } + async Task Click() + { + if (string.IsNullOrEmpty(dto.OldPassword) || string.IsNullOrEmpty(dto.NewPassword)) + return; + + if (dto.NewPassword != RePassword) + { + ToastService.Notify(new ToastMessage(ToastType.Danger, "کلمه عبور با تکرار متفاوت است")); + return; + } + SpinnerVisible = true; + var result = await userService.ChangePasswordYourself(dto); + if (result) + { + ToastService.Notify(new ToastMessage(ToastType.Success, "تغییر کلمه عبور با موفقیت انجام شد")); + + await authService.Logout(); + NavigationManager.NavigateTo("/login"); + } + else ToastService.Notify(new ToastMessage(ToastType.Danger, "خطا در تغییر کلمه عبور")); + + SpinnerVisible = false; + } +} diff --git a/Presentation/HushianWebApp/Components/EditUserYourselfComponent.razor b/Presentation/HushianWebApp/Components/EditUserYourselfComponent.razor new file mode 100644 index 0000000..46225ad --- /dev/null +++ b/Presentation/HushianWebApp/Components/EditUserYourselfComponent.razor @@ -0,0 +1,106 @@ +@using Common.Dtos.User +@using HushianWebApp.Service +@using HushianWebApp.Services +@inject UserService userService; +@inject ILocalStorageService localStorageService; +
+ + +
+ + +
+
+ +
+ +
+ + + + @if (model.img != null && model.img.Length > 0) + { + Uploaded Image + } + +
+ + @if (isAuthorizedCompanyUser) + { + + + } + +
+ +@code { + bool isAuthorizedCompanyUser = false; + [Parameter] public EventCallback OnMultipleOfThree { get; set; } + public List Roles { get; set; } = new(); + public bool loading { get; set; } = false; + [Inject] protected ToastService ToastService { get; set; } = default!; + public EditUserFromUserDto model { get; set; } = new(); + protected override async Task OnInitializedAsync() + { + var user=await userService.GetCurrentUser(); + if (user!=null) + { + model.UserName=user.UserName; + model.img = user.img; + model.FullName = user.FullName; + model.Email = user.Email; + + Roles = await localStorageService.GetItem>("Role"); + isAuthorizedCompanyUser = Roles.Contains("HushianExperCompany") && await userService.CheckAvailableExperInCompany(); + } + else + { + ToastService.Notify(new ToastMessage(ToastType.Danger,"خطا در فراخوانی اطلاعات کاربر")); + } + await base.OnInitializedAsync(); + } + private async Task OnFileChange(InputFileChangeEventArgs e) + { + var file = e.File; + using (var memoryStream = new MemoryStream()) + { + await file.OpenReadStream().CopyToAsync(memoryStream); + model.img = memoryStream.ToArray(); + } + } + private string GetImageSource() + { + if (model.img != null) + { + return $"data:image/jpeg;base64,{Convert.ToBase64String(model.img)}"; + } + return string.Empty; + } + async Task NewItem() + { + if (!string.IsNullOrEmpty(model.FullName)) + { + + if (string.IsNullOrEmpty(model.Email)) model.Email = $"{model.UserName}@hushian.ir"; + + loading = true; + if (await userService.EditUserYourself(model)) + { + loading = false; + await OnMultipleOfThree.InvokeAsync(model); + } + loading = false; + } + } + async Task FreeExper() + { + loading = true; + if (await userService.FreeExper()) + { + loading = false; + await OnMultipleOfThree.InvokeAsync(model); + } + loading = false; + } + +} diff --git a/Presentation/HushianWebApp/Components/GroupUsersComponent.razor b/Presentation/HushianWebApp/Components/GroupUsersComponent.razor new file mode 100644 index 0000000..d38a5a0 --- /dev/null +++ b/Presentation/HushianWebApp/Components/GroupUsersComponent.razor @@ -0,0 +1,75 @@ +@using Hushian.Application.Dtos +@using HushianWebApp.Service +@inject GroupService groupService; +@inject UserService userService; +@if (!Spinnervisible) +{ +
+
+ +
+
+ + + @item.FullName + + + + + +} + +
+ +
+ + +@code { + private string? ExperName; + private bool Spinnervisible = false; + + [Parameter] public int GroupID { get; set; } + public List Expers { get; set; } + = new(); + public List CoExpers { get; set; } + = new(); + protected override async Task OnParametersSetAsync() + { + Spinnervisible = true; + Expers = await groupService.GetExpersFromGroupID(GroupID); + Spinnervisible = false; + await base.OnParametersSetAsync(); + } +} +@functions { + private async Task> DataProvider(AutoCompleteDataProviderRequest request) + { + CoExpers = (await userService.GetExpersCompany(0, 0, 0)).list; + return await Task.FromResult(new AutoCompleteDataProviderResult { Data = CoExpers.Where(w => w.FullName.Contains(request.Filter.Value)), TotalCount = CoExpers.Count() }); + } + + private async Task OnAutoCompleteChanged(HushianUserDto exper) + { + Spinnervisible = true; + if (exper != null + && !Expers.Any(a => a.UserID == exper.UserID) + && await groupService.JoinExperToGroup(GroupID, exper.UserID) ) + Expers.Add(exper); + Spinnervisible = false; + } + async Task UnJoin(HushianUserDto exper) + { + Spinnervisible = true; + if (exper != null && await groupService.UnJoinExperToGroup(GroupID, exper.UserID)) + Expers.Remove(exper); + Spinnervisible = false; + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/Components/UpdateExperComponent.razor b/Presentation/HushianWebApp/Components/UpdateExperComponent.razor new file mode 100644 index 0000000..6a0f7bc --- /dev/null +++ b/Presentation/HushianWebApp/Components/UpdateExperComponent.razor @@ -0,0 +1,73 @@ +@using Common.Dtos.User +@using Hushian.Application.Dtos +@using HushianWebApp.Service +@using HushianWebApp.Services +@inject UserService userService; + +
+ + +
+ + +
+
+ + +
+
+ + + + @if (model.img != null && model.img.Length > 0) + { + Uploaded Image + } + +
+ + + +
+ + +@code { + [Parameter] public EditUserFromUserDto model { get; set; } + [Parameter] public EventCallback OnMultipleOfThree { get; set; } + public bool loading { get; set; } = false; +} +@functions{ + async Task NewItem() + { + if (!string.IsNullOrEmpty(model.FullName)) + { + if (string.IsNullOrEmpty(model.Email)) model.Email = $"{model.UserName}@hushian.ir"; + + loading = true; + if (await userService.ExperEditingFromManager(model)) + { + loading = false; + await OnMultipleOfThree.InvokeAsync(); + } + loading = false; + } + } + + private async Task OnFileChange(InputFileChangeEventArgs e) + { + var file = e.File; + using (var memoryStream = new MemoryStream()) + { + await file.OpenReadStream().CopyToAsync(memoryStream); + model.img = memoryStream.ToArray(); + } + } + private string GetImageSource() + { + if (model.img != null) + { + return $"data:image/jpeg;base64,{Convert.ToBase64String(model.img)}"; + } + return string.Empty; + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/Components/UpdateGroupComponent.razor b/Presentation/HushianWebApp/Components/UpdateGroupComponent.razor new file mode 100644 index 0000000..1c431a8 --- /dev/null +++ b/Presentation/HushianWebApp/Components/UpdateGroupComponent.razor @@ -0,0 +1,66 @@ +@using Hushian.Application.Dtos +@using HushianWebApp.Service +@inject GroupService groupService; +
+ + +
+ + +
+
+ + +
+
+ + + + @if (model.img != null && model.img.Length > 0) + { + Uploaded Image + } + +
+ + + +
+ +@code { + [Parameter] public GroupDto model { get; set; } + [Parameter] public EventCallback OnMultipleOfThree { get; set; } + public bool loading { get; set; } = false; +} +@functions { + async Task NewItem() + { + if (!string.IsNullOrEmpty(model.Name)) + { + loading = true; + if (await groupService.UpdateGroup(model)) + { + loading = false; + await OnMultipleOfThree.InvokeAsync(); + } + loading = false; + } + } + private async Task OnFileChange(InputFileChangeEventArgs e) + { + var file = e.File; + using (var memoryStream = new MemoryStream()) + { + await file.OpenReadStream().CopyToAsync(memoryStream); + model.img = memoryStream.ToArray(); + } + } + private string GetImageSource() + { + if (model.img != null) + { + return $"data:image/jpeg;base64,{Convert.ToBase64String(model.img)}"; + } + return string.Empty; + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/Components/UserGroupsComponent.razor b/Presentation/HushianWebApp/Components/UserGroupsComponent.razor new file mode 100644 index 0000000..cfba780 --- /dev/null +++ b/Presentation/HushianWebApp/Components/UserGroupsComponent.razor @@ -0,0 +1,74 @@ +@using Hushian.Application.Dtos +@using HushianWebApp.Service +@inject GroupService groupService; + +@if (!Spinnervisible) +{ +
+
+ +
+
+ + + @item.Name + + + + + +} + + +
+ +
+@code { + private string? GroupName; + private bool Spinnervisible = false; + + [Parameter] public string ExperID { get; set; } + public List Groups { get; set; } + = new(); + public List CoGroups { get; set; } + = new(); + protected override async Task OnParametersSetAsync() + { + Spinnervisible = true; + Groups = await groupService.GetGroupsFromExperID(ExperID); + Spinnervisible = false; + await base.OnParametersSetAsync(); + } +} +@functions { + private async Task> DataProvider(AutoCompleteDataProviderRequest request) + { + CoGroups = await groupService.GetGroupsCompany(); + return await Task.FromResult(new AutoCompleteDataProviderResult { Data = CoGroups.Where(w=>w.Name.Contains(request.Filter.Value)), TotalCount = CoGroups.Count() }); + } + + private async Task OnAutoCompleteChanged(GroupDto group) + { + Spinnervisible = true; + if (group != null + && !Groups.Any(a => a.ID == group.ID) + && await groupService.JoinExperToGroup(group.ID, ExperID)) + Groups.Add(group); + Spinnervisible = false; + } + async Task UnJoin(GroupDto group) + { + Spinnervisible = true; + if (group != null && await groupService.UnJoinExperToGroup(group.ID, ExperID)) + Groups.Remove(group); + Spinnervisible = false; + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/Components/UserPanel/ConversionHistoryComponent.razor b/Presentation/HushianWebApp/Components/UserPanel/ConversionHistoryComponent.razor new file mode 100644 index 0000000..06bb110 --- /dev/null +++ b/Presentation/HushianWebApp/Components/UserPanel/ConversionHistoryComponent.razor @@ -0,0 +1,41 @@ +@using Hushian.Application.Dtos +پیام های اخیر شما ... +
+ @foreach (var item in Conversations) + { +
+ + + @GetTitleCon(item.Title) + + +
    +
  • @item.ExperFullName (@item.Cdate item.Ctime)
  • +
+ @if (item.status == Hushian.Enums.ConversationStatus.InProgress && item.NoReadCount > 0) + { + @item.NoReadCount + } + + } + +
+
+ } + +
+ +@code { + [Parameter] public EventCallback OnMultipleOfThree { get; set; } + [Parameter] public List Conversations { get; set; } + string GetTitleCon(string str) + { + if (str.Length > 15) return str.Substring(0, 15) + "..."; + return str; + + } +} diff --git a/Presentation/HushianWebApp/Components/Verification.razor b/Presentation/HushianWebApp/Components/Verification.razor new file mode 100644 index 0000000..9cae14e --- /dev/null +++ b/Presentation/HushianWebApp/Components/Verification.razor @@ -0,0 +1,128 @@ +@using Common.Dtos.User +@using Common.Enums +@using HushianWebApp.Service +@inject VerificationService verificationService; +@inject NavigationManager navigation; + +
+ Hushian + + @Title +
+

+@if (type == VerificationCodeType.ForgetPassword) +{ +
+ + +
+ +
+ + + + + +
+} +else +{ +
+ + + + +
+} +
+ + +
+ + + +@code { + [Parameter] + // PhoneNumberConfirmed + public VerificationCodeType type { get; set; } + [Parameter] + public string sendValue { get; set; } + [Parameter] + public int? ID { get; set; } + public string? code { get; set; } + [Parameter] public string? Title { get; set; } + [Inject] protected ToastService ToastService { get; set; } = default!; + [Parameter] public EventCallback OnMultipleOfThree { get; set; } + public string? Value { get; set; } + public string? ReValue { get; set; } + bool loading = false; + string resendmsg = "ارسال مجدد"; + bool Disabledresendmsg = false; +} +@functions { + protected override async Task OnParametersSetAsync() + { + resendmsg = "در حال ارسال کد احراز ..."; + Disabledresendmsg = true; + if (ID == 0) + ID = await verificationService.FromUserName(sendValue, type); + ToastService.Notify(new(ToastType.Info, $"کد احراز به کاربری '{sendValue}' ارسال شد")); + + resendmsg = "ارسال مجدد"; + Disabledresendmsg = false; + + await base.OnParametersSetAsync(); + } + async Task onClickresend() + { + resendmsg = "در حال ارسال مجدد کد احراز ..."; + Disabledresendmsg = true; + if (ID == 0) + ID = await verificationService.FromUserName(sendValue, type); + else + { + await verificationService.ReSendCode(ID.Value); + } + + ToastService.Notify(new(ToastType.Info, $"کد احراز به کاربری '{sendValue}' ارسال شد")); + + resendmsg = "ارسال مجدد"; + Disabledresendmsg = false; + } + async Task onClick() + { + if (string.IsNullOrEmpty(code)) + { + ToastService.Notify(new(ToastType.Warning, $"کد ارسالی را وارد کنید")); + return; + } + + if (type == VerificationCodeType.ForgetPassword) + { + if (string.IsNullOrEmpty(Value) || string.IsNullOrEmpty(ReValue)) + { + ToastService.Notify(new(ToastType.Warning, $"کلمه عبور جدید را مشخص کنید")); + return; + } + else + { + if (Value != ReValue) + { ToastService.Notify(new(ToastType.Warning, $"کلمه عبور جدید و تکرار متفاوت هستند")); + return;} + } + + + + } + loading = true; + if (await verificationService.ConfirmedCode(new ConfirmedCodeDto() + { code = code, codeType = type, Id = ID.Value, value = Value })) + { + ToastService.Notify(new(ToastType.Success, $"احراز با موفقیت انجام شد برای ادامه ورود کنید")); + await OnMultipleOfThree.InvokeAsync(type); + + } + loading = false; + } +} + diff --git a/Presentation/HushianWebApp/Data/Dtos/ADDConversationDto.cs b/Presentation/HushianWebApp/Data/Dtos/ADDConversationDto.cs new file mode 100644 index 0000000..cf52559 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/ADDConversationDto.cs @@ -0,0 +1,17 @@ +using Hushian.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hushian.Application.Dtos +{ + public class ADDConversationDto + { + public string Question { get; set; } + public int? GroupID { get; set; } + public int? CompanyID { get; set; } + public string? ExperID { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/ADDConversationItemDto.cs b/Presentation/HushianWebApp/Data/Dtos/ADDConversationItemDto.cs new file mode 100644 index 0000000..c58dab3 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/ADDConversationItemDto.cs @@ -0,0 +1,21 @@ +using Hushian.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hushian.Application.Dtos +{ + public class ADDConversationItemDto + { + public int ConversationID { get; set; } + //public string? ExperID { get; set; } + // public ConversationType Type { get; set; } + public string text { get; set; } + public string? FileName { get; set; } + public string? FileType { get; set; } + public byte[]? FileContent { get; set; } + } + +} diff --git a/Presentation/HushianWebApp/Data/Dtos/ADDGroupDto.cs b/Presentation/HushianWebApp/Data/Dtos/ADDGroupDto.cs new file mode 100644 index 0000000..3d1294e --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/ADDGroupDto.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hushian.Application.Dtos +{ + public class ADDGroupDto + { + public string Name { get; set; } + public byte[]? img { get; set; } + public string? Info { get; set; } + public bool Available { get; set; } = true; + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/BaseDto.cs b/Presentation/HushianWebApp/Data/Dtos/BaseDto.cs new file mode 100644 index 0000000..cb0656c --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/BaseDto.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Common.Dtos +{ + public class BaseDto + { + public int Id { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/Company/AddCompanyDto.cs b/Presentation/HushianWebApp/Data/Dtos/Company/AddCompanyDto.cs new file mode 100644 index 0000000..b3ca3a3 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/Company/AddCompanyDto.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hushian.Application.Dtos.Company +{ + public class AddCompanyDto + { + public string Fullname { get; set; } + public string Info { get; set; } + // public string? UserIDManager { get; set; } + public string? Phone { get; set; } + public string? WebSite { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/Company/CompanyDto.cs b/Presentation/HushianWebApp/Data/Dtos/Company/CompanyDto.cs new file mode 100644 index 0000000..f7d9021 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/Company/CompanyDto.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hushian.Application.Dtos.Company +{ + public class CompanyDto + { + public int ID { get; set; } + public string Fullname { get; set; } + public string Info { get; set; } + public byte[]? img { get; set; } + public string? Phone { get; set; } + public string? WebSite { get; set; } + public string? Email { get; set; } + public bool Available { get; set; } + public bool allowBot { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/Company/ContentInfoDto.cs b/Presentation/HushianWebApp/Data/Dtos/Company/ContentInfoDto.cs new file mode 100644 index 0000000..c6b8fc1 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/Company/ContentInfoDto.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hushian.Application.Dtos.Company +{ + public class ContentInfoDto + { + public int ID { get; set; } + public string Content { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/ConversationDto.cs b/Presentation/HushianWebApp/Data/Dtos/ConversationDto.cs new file mode 100644 index 0000000..df94d1a --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/ConversationDto.cs @@ -0,0 +1,28 @@ +using Hushian.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hushian.Application.Dtos +{ + public class ConversationDto + { + public int ID { get; set; } + public string Title { get; set; } + public ConversationStatus status { get; set; } + public int? GroupID { get; set; } + // + public string? GroupName { get; set; } + public string UserID { get; set; } + // + public string? UserFullName { get; set; } + public string? ExperID { get; set; } + // + public string? ExperFullName { get; set; } + public string Cdate { get; set; } + public string Ctime { get; set; } + public int NoReadCount { get; set; } = 0; + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/ConversationItemDto.cs b/Presentation/HushianWebApp/Data/Dtos/ConversationItemDto.cs new file mode 100644 index 0000000..e8f0b29 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/ConversationItemDto.cs @@ -0,0 +1,23 @@ +using Hushian.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hushian.Application.Dtos +{ + public class ConversationItemDto + { + public int ID { get; set; } + public int ConversationID { get; set; } + public string? ExperID { get; set; } + public bool IsRead { get; set; } = false; + public string ExperName { get; set; } + public ConversationType Type { get; set; } + public string text { get; set; } + public string FileName { get; set; } + public string FileType { get; set; } + public byte[] FileContent { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/GroupDto.cs b/Presentation/HushianWebApp/Data/Dtos/GroupDto.cs new file mode 100644 index 0000000..15f732c --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/GroupDto.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hushian.Application.Dtos +{ + public class GroupDto + { + public int ID { get; set; } + public string Name { get; set; } + public byte[]? img { get; set; } + public string? Info { get; set; } + public bool Available { get; set; } + + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/IdName.cs b/Presentation/HushianWebApp/Data/Dtos/IdName.cs new file mode 100644 index 0000000..367e829 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/IdName.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos +{ + public class IdName + { + public T ID { get; set; } + public string Title { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/Identity/RoleDto.cs b/Presentation/HushianWebApp/Data/Dtos/Identity/RoleDto.cs new file mode 100644 index 0000000..8c3b575 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/Identity/RoleDto.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos.Identity +{ + public class RoleDto + { + public RoleDto(string id, string name, string normalizedName) + { + Id = id; + Name = name; + NormalizedName = normalizedName; + } + + public string Id { get; set; } + public string Name { get; set; } + public string NormalizedName { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/Identity/VerificationDto.cs b/Presentation/HushianWebApp/Data/Dtos/Identity/VerificationDto.cs new file mode 100644 index 0000000..a1ced7b --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/Identity/VerificationDto.cs @@ -0,0 +1,18 @@ +using Common.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos.Identity +{ + public class VerificationDto + { + public string UserId { get; set; } + public VerificationCodeType Type { get; set; } + public string Code { get; set; } + public string ToMobile { get; set; } + public string? Token { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/PagingDto.cs b/Presentation/HushianWebApp/Data/Dtos/PagingDto.cs new file mode 100644 index 0000000..827bdfc --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/PagingDto.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos +{ + public class PagingDto + { + public PagingDto(int RowCount, int pageCount, List list) + { + this.RowCount = RowCount; + this.list = list; + PageCount = pageCount; + + } + public int RowCount { get; set; } + public int PageCount { get; set; } + public List list { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/RegistrationDto.cs b/Presentation/HushianWebApp/Data/Dtos/RegistrationDto.cs new file mode 100644 index 0000000..a5027e5 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/RegistrationDto.cs @@ -0,0 +1,16 @@ +using Hushian.Application.Dtos.Company; +using Common.Dtos.User; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hushian.Application.Dtos +{ + public class RegistrationDto + { + public AddUserDto User { get; set; } + public AddCompanyDto Company { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/User/AddUserDto.cs b/Presentation/HushianWebApp/Data/Dtos/User/AddUserDto.cs new file mode 100644 index 0000000..b5b2872 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/User/AddUserDto.cs @@ -0,0 +1,21 @@ +using Common.Enums.Identity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos.User +{ + public class AddUserDto + { + public string Id { get; set; } = Guid.NewGuid().ToString(); + public string UserName { get; set; } + public string? DefultRoleID { get; set; } + public string PassWord { get; set; } + public string FullName { get; set; } + public string? Email { get; set; } + public string PhoneNumber { get; set; } + public byte[]? img { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/User/ChangeIsActieUserDto.cs b/Presentation/HushianWebApp/Data/Dtos/User/ChangeIsActieUserDto.cs new file mode 100644 index 0000000..3918e99 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/User/ChangeIsActieUserDto.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos.User +{ + public class ChangeIsActieUserDto + { + public string UserName { get; set; } + public bool IsActive { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/User/ChangePasswordDto.cs b/Presentation/HushianWebApp/Data/Dtos/User/ChangePasswordDto.cs new file mode 100644 index 0000000..b9e1b4a --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/User/ChangePasswordDto.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos.User +{ + public class ChangePasswordDto + { + public string UserName { get; set; } + public string NewPassword { get; set; } + + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/User/ChangePasswordFromUserDto.cs b/Presentation/HushianWebApp/Data/Dtos/User/ChangePasswordFromUserDto.cs new file mode 100644 index 0000000..514c76f --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/User/ChangePasswordFromUserDto.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos.User +{ + public class ChangePasswordFromUserDto + { + public string UserName { get; set; } + public string OldPassword { get; set; } + public string NewPassword { get; set; } + + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/User/ChangeRoleUserDto.cs b/Presentation/HushianWebApp/Data/Dtos/User/ChangeRoleUserDto.cs new file mode 100644 index 0000000..a82f97d --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/User/ChangeRoleUserDto.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos.User +{ + public class ChangeRoleUserDto + { + public string UserName { get; set; } + public string RoleID { get; set; } + + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/User/ConfirmedCodeDto.cs b/Presentation/HushianWebApp/Data/Dtos/User/ConfirmedCodeDto.cs new file mode 100644 index 0000000..cbd0f31 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/User/ConfirmedCodeDto.cs @@ -0,0 +1,17 @@ +using Common.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos.User +{ + public class ConfirmedCodeDto + { + public int Id { get; set; } + public string code { get; set; } + public VerificationCodeType codeType { get; set; } + public string? value { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/User/EditUserDto.cs b/Presentation/HushianWebApp/Data/Dtos/User/EditUserDto.cs new file mode 100644 index 0000000..804681e --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/User/EditUserDto.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos.User +{ + public class EditUserDto + { + public string UserName { get; set; } + public string FullName { get; set; } + public string? Email { get; set; } + public string? PhoneNumber { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/User/EditUserFromUserDto.cs b/Presentation/HushianWebApp/Data/Dtos/User/EditUserFromUserDto.cs new file mode 100644 index 0000000..879a890 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/User/EditUserFromUserDto.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos.User +{ + public class EditUserFromUserDto + { + //key + public string UserName { get; set; } + public string? FullName { get; set; } + public string? Email { get; set; } + public byte[]? img { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/User/ReadUserDto.cs b/Presentation/HushianWebApp/Data/Dtos/User/ReadUserDto.cs new file mode 100644 index 0000000..6a1a181 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/User/ReadUserDto.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos.User +{ + public class ReadUserDto + { + public string UserName { get; set; } + public string Role { get; set; } = ""; + public string FullName { get; set; } + public string? Email { get; set; } + public string? PhoneNumber { get; set; } + public bool IsActive { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/UserDto.cs b/Presentation/HushianWebApp/Data/Dtos/UserDto.cs new file mode 100644 index 0000000..4ec3724 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/UserDto.cs @@ -0,0 +1,14 @@ + +namespace Hushian.Application.Dtos +{ + public class HushianUserDto + { + public string UserID { get; set; } + public string UserName { get; set; } + public string FullName { get; set; } + public byte[]? img { get; set; } + public bool Available { get; set; } = true; + public string? Email { get; set; } + public string PhoneNumber { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Dtos/condinationDto.cs b/Presentation/HushianWebApp/Data/Dtos/condinationDto.cs new file mode 100644 index 0000000..e7acdd7 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Dtos/condinationDto.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Dtos +{ + public class condination + { + public string PropName { get; set; } + public string Operation { get; set; } + public object? Value { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Enums/ConversationStatus.cs b/Presentation/HushianWebApp/Data/Enums/ConversationStatus.cs new file mode 100644 index 0000000..1e009bd --- /dev/null +++ b/Presentation/HushianWebApp/Data/Enums/ConversationStatus.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hushian.Enums +{ + public enum ConversationStatus + { + InProgress, Finished + } +} diff --git a/Presentation/HushianWebApp/Data/Enums/ConversationType.cs b/Presentation/HushianWebApp/Data/Enums/ConversationType.cs new file mode 100644 index 0000000..08d95e2 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Enums/ConversationType.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hushian.Enums +{ + public enum ConversationType + { + EU=1, UE=2 + } +} diff --git a/Presentation/HushianWebApp/Data/Enums/Identity/Cors.cs b/Presentation/HushianWebApp/Data/Enums/Identity/Cors.cs new file mode 100644 index 0000000..3dc7dc1 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Enums/Identity/Cors.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Enums.Identity +{ + public enum Cors + { + MMRBNJD, Moadiran, Hushian + } +} diff --git a/Presentation/HushianWebApp/Data/Enums/VerificationCodeType.cs b/Presentation/HushianWebApp/Data/Enums/VerificationCodeType.cs new file mode 100644 index 0000000..904b053 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Enums/VerificationCodeType.cs @@ -0,0 +1,10 @@ +namespace Common.Enums +{ + public enum VerificationCodeType + { + PhoneNumberConfirmed, + ForgetPassword, + ChangeMobile, + Login + } +} diff --git a/Presentation/HushianWebApp/Data/Models/Identity/AuthRequest.cs b/Presentation/HushianWebApp/Data/Models/Identity/AuthRequest.cs new file mode 100644 index 0000000..5c21664 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Models/Identity/AuthRequest.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Common.Models.Identity +{ + public class AuthRequest + { + public AuthRequest(string username, string password) + { + Username = username; + Password = password; + } + + public string Username { get; set; } + public string Password { get; set; } + } + public class AuthRequestFromMobile + { + public string Mobile { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Models/Identity/AuthResponse.cs b/Presentation/HushianWebApp/Data/Models/Identity/AuthResponse.cs new file mode 100644 index 0000000..fbd0430 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Models/Identity/AuthResponse.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Common.Models.Identity +{ + public class AuthResponse + { + public string Id { get; set; } + public string UserName { get; set; } + public string Fullname { get; set; } + public List ? Roles { get; set; } + public string Token { get; set; } + public byte[]? img { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Models/ResponseBase.cs b/Presentation/HushianWebApp/Data/Models/ResponseBase.cs new file mode 100644 index 0000000..74adda3 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Models/ResponseBase.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Common.Models +{ + public class ResponseBase + { + public T? Value { get; set; } + public bool Success { get; set; }=false; + public List Errors { get; set; }=new List(); + + } +} diff --git a/Presentation/HushianWebApp/Data/Models/WindowSize.cs b/Presentation/HushianWebApp/Data/Models/WindowSize.cs new file mode 100644 index 0000000..26f0a14 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Models/WindowSize.cs @@ -0,0 +1,8 @@ +namespace HushianWebApp.Data.Models +{ + public class WindowSize + { + public int Width { get; set; } + public int Height { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Data/Models/ai/openAi/RequestModel.cs b/Presentation/HushianWebApp/Data/Models/ai/openAi/RequestModel.cs new file mode 100644 index 0000000..19b9205 --- /dev/null +++ b/Presentation/HushianWebApp/Data/Models/ai/openAi/RequestModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Models.ai.openAi +{ + public class RequestModel + { + public string model { get; set; } + public string question { get; set; } + public string Context { get; set; } + } + +} diff --git a/Presentation/HushianWebApp/HushianWebApp.csproj b/Presentation/HushianWebApp/HushianWebApp.csproj new file mode 100644 index 0000000..d396efa --- /dev/null +++ b/Presentation/HushianWebApp/HushianWebApp.csproj @@ -0,0 +1,33 @@ + + + + net9.0 + enable + enable + service-worker-assets.js + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Presentation/HushianWebApp/Layout/BeforeLayout.razor b/Presentation/HushianWebApp/Layout/BeforeLayout.razor new file mode 100644 index 0000000..e5051c5 --- /dev/null +++ b/Presentation/HushianWebApp/Layout/BeforeLayout.razor @@ -0,0 +1,29 @@ +@inherits LayoutComponentBase +
+ + +
+
+ @Body +
+
+
+ +
+ +
+

نکات امنیتی

+
    +
  • + هرگز اطلاعات حساب کاربری (نام کاربری و کلمه عبور) خود را در اختیار دیگران قرار ندهید. +
  • +
  • + پس از اتمام کار با سامانه، حتما بر روی دکمه خروج از سامانه کلیک نمایید. +
  • + +
+
+
+
+ +
\ No newline at end of file diff --git a/Presentation/HushianWebApp/Layout/EmpLayout.razor b/Presentation/HushianWebApp/Layout/EmpLayout.razor new file mode 100644 index 0000000..f52a20a --- /dev/null +++ b/Presentation/HushianWebApp/Layout/EmpLayout.razor @@ -0,0 +1,11 @@ +@inherits LayoutComponentBase +
+ + +
+ @Body + + +
+ +
\ No newline at end of file diff --git a/Presentation/HushianWebApp/Layout/MainLayout.razor b/Presentation/HushianWebApp/Layout/MainLayout.razor new file mode 100644 index 0000000..bd14c7d --- /dev/null +++ b/Presentation/HushianWebApp/Layout/MainLayout.razor @@ -0,0 +1,243 @@ +@inherits LayoutComponentBase +@using Common.Dtos.User +@using HushianWebApp.Components +@using HushianWebApp.Pages +@using HushianWebApp.Pages.Manage +@using HushianWebApp.Service +@using HushianWebApp.Services +@inject NavigationManager NavigationManager +@inject ILocalStorageService localStorageService; +@inject AuthService authService; +@inject BaseController baseController; +@inject UserService userService; + + +
+ +
+
+
+
@Fullname
+
@TitleRole
+
+ @if (img != null && img.Length > 0) + { + placeholder + + } + else + { + + } + + + + + + +
+ +
+
+ @if (isonline) + { + @if (isAuthorizedCompanyUser) + { + @Body + } + else + { +

دسترسی به شرکت برای شما یافت نشد

+ } + } + +
+
+
+ +
+ +@code { + private Modal modal = default!; + public string Info { get; set; } = ""; + private string SelectedMenu = "page2"; + public string Username { get; set; } + public string Fullname { get; set; } + public byte[]? img { get; set; } + public List Roles { get; set; } = new(); + bool isonline = false; + bool isAuthorizedCompanyUser = false; + public string TitleRole { get; set; } = ""; + protected override async Task OnInitializedAsync() + { + await CheckOnline(); + if (isonline) + { + //Roles = await localStorageService.GetItem>("Role"); + Username = await localStorageService.GetItem("Username"); + Fullname = await localStorageService.GetItem("Fullname"); + string UserID = await localStorageService.GetItem("UserID"); + img = await localStorageService.GetItem("img"); + } + + + TitleRole = Roles.Any(a => a == "HushianManagerCompany") ? "مدیر" : "کارشناس"; + + isAuthorizedCompanyUser = Roles.Contains("HushianManagerCompany") || (Roles.Contains("HushianExperCompany") && await userService.CheckAvailableExperInCompany()); + + string route = NavigationManager.Uri.Replace(NavigationManager.BaseUri, "").ToLower(); + if (route.Length > 0) + { + SelectedMenu = route switch + { + "conversation" => "page2", + "usermanagement" => "page3", + "groupmanagement" => "page4", + "settings" => "page5", + _ => "page1" + }; + + } + else SelectedMenu = "page1"; + + + await base.OnInitializedAsync(); + } + async Task OnCliclLogout() + { + await authService.Logout(); + NavigationManager.NavigateTo("/login"); + } + private async Task ChangePasword() + { + var parameters = new Dictionary(); + parameters.Add("Username", Username); + await modal.ShowAsync(title: "تغییر رمز عبور", parameters: parameters); + + } + private async Task Settings() + { + var parameters = new Dictionary(); + await modal.ShowAsync(title: "تنظیمات شرکت", parameters: parameters); + + } + private async Task EditCurrentUser() + { + var parameters = new Dictionary(); + parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create(this, CallBack)); + + await modal.ShowAsync(title: $"ویرایش کاربر {Username}", parameters: parameters); + + } + async Task CallBack(EditUserFromUserDto edit) + { + await modal.HideAsync(); + img = edit.img; + await localStorageService.RemoveItem("img"); + await localStorageService.SetItem("img", img); + + Fullname = edit.FullName; + await localStorageService.RemoveItem("Fullname"); + await localStorageService.SetItem("Fullname", Fullname); + + } + private void SetActiveMenu(string menu) + { + SelectedMenu = menu; + + if (menu == "page1") NavigationManager.NavigateTo("/"); + + else if (menu == "page2") NavigationManager.NavigateTo("/Conversation"); + + else if (menu == "page3") NavigationManager.NavigateTo("/UserManagement"); + + else if (menu == "page4") NavigationManager.NavigateTo("/GroupManagement"); + + else if (menu == "page5") NavigationManager.NavigateTo("/Settings"); + + } + + async Task CheckOnline() + { + var token = await localStorageService.GetItem("key"); + if (string.IsNullOrEmpty(token)) + { + isonline = false; + NavigationManager.NavigateTo("/login"); + } + else + { + await baseController.RemoveToken(); + await baseController.SetToken(token); + if (!await authService.IsOnline()) + { + await baseController.RemoveToken(); + isonline = false; + NavigationManager.NavigateTo("/login"); + } + else + { + Roles = await localStorageService.GetItem>("Role"); + if (Roles.Count == 1 && Roles.Contains("HushianUserCompany")) + { + isonline = false; + NavigationManager.NavigateTo("/NotFound"); + } + else + isonline = true; + + } + } + + } + private string GetImageSource() + { + if (img != null && img.Length > 0) + { + return $"data:image/jpeg;base64,{Convert.ToBase64String(img)}"; + } + return "/defprofile.jpg"; + } +} + +@code { + Sidebar sidebar = default!; + IEnumerable? navItems; + + private async Task SidebarDataProvider(SidebarDataProviderRequest request) + { + if (navItems is null) + navItems = GetNavItems(); + + return await Task.FromResult(request.ApplyTo(navItems)); + } + + private IEnumerable GetNavItems() + { + navItems = new List + { + // new NavItem { Href = "/", IconName = IconName.HouseDoorFill, Text = "خانه"}, + // new NavItem { Href = "/Conversation", IconName = IconName.ChatText, Text = " گفتگو ها"}, + new NavItem { Href = "/", IconName = IconName.ChatText, Text = " گفتگو ها"}, + new NavItem { Href = "/UserManagement", IconName = IconName.PersonBoundingBox, Text = " مدیریت کاربران"}, + new NavItem { Href = "/GroupManagement", IconName = IconName.Grid1X2, Text = " مدیریت گروه ها"}, + new NavItem { Href = "/Settings", IconName = IconName.Hammer, Text = " تنظیمات"}, + }; + + return navItems; + } + + private void ToggleSidebar() => sidebar.ToggleSidebar(); +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/Layout/MainLayout.razor.css b/Presentation/HushianWebApp/Layout/MainLayout.razor.css new file mode 100644 index 0000000..ecf25e5 --- /dev/null +++ b/Presentation/HushianWebApp/Layout/MainLayout.razor.css @@ -0,0 +1,77 @@ +.page { + position: relative; + display: flex; + flex-direction: column; +} + +main { + flex: 1; +} + +.sidebar { + background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); +} + +.top-row { + background-color: #f7f7f7; + border-bottom: 1px solid #d6d5d5; + justify-content: flex-end; + height: 3.5rem; + display: flex; + align-items: center; +} + + .top-row ::deep a, .top-row ::deep .btn-link { + white-space: nowrap; + margin-left: 1.5rem; + text-decoration: none; + } + + .top-row ::deep a:hover, .top-row ::deep .btn-link:hover { + text-decoration: underline; + } + + .top-row ::deep a:first-child { + overflow: hidden; + text-overflow: ellipsis; + } + +@media (max-width: 640.98px) { + .top-row { + justify-content: space-between; + } + + .top-row ::deep a, .top-row ::deep .btn-link { + margin-left: 0; + } +} + +@media (min-width: 641px) { + .page { + flex-direction: row; + } + + .sidebar { + width: 250px; + height: 100vh; + position: sticky; + top: 0; + } + + .top-row { + position: sticky; + top: 0; + z-index: 1; + } + + .top-row.auth ::deep a:first-child { + flex: 1; + text-align: right; + width: 0; + } + + .top-row, article { + padding-left: 2rem !important; + padding-right: 1.5rem !important; + } +} diff --git a/Presentation/HushianWebApp/Layout/NavMenu.razor b/Presentation/HushianWebApp/Layout/NavMenu.razor new file mode 100644 index 0000000..a2be1e1 --- /dev/null +++ b/Presentation/HushianWebApp/Layout/NavMenu.razor @@ -0,0 +1,55 @@ +
+ + + +
+
+ + About +
+ +
+
Page content goes here
+
+
+ +
+ +@code { + Sidebar sidebar = default!; + IEnumerable? navItems; + + private async Task SidebarDataProvider(SidebarDataProviderRequest request) + { + if (navItems is null) + navItems = GetNavItems(); + + return await Task.FromResult(request.ApplyTo(navItems)); + } + + private IEnumerable GetNavItems() + { + navItems = new List + { + new NavItem { Id = "1", Href = "/getting-started", IconName = IconName.HouseDoorFill, Text = "Getting Started"}, + + new NavItem { Id = "2", IconName = IconName.LayoutSidebarInset, Text = "Content", IconColor = IconColor.Primary }, + new NavItem { Id = "3", Href = "/icons", IconName = IconName.PersonSquare, Text = "Icons", ParentId="2"}, + + new NavItem { Id = "4", IconName = IconName.ExclamationTriangleFill, Text = "Components", IconColor = IconColor.Success }, + new NavItem { Id = "5", Href = "/alerts", IconName = IconName.CheckCircleFill, Text = "Alerts", ParentId="4"}, + new NavItem { Id = "6", Href = "/breadcrumb", IconName = IconName.SegmentedNav, Text = "Breadcrumb", ParentId="4"}, + new NavItem { Id = "7", Href = "/sidebar", IconName = IconName.LayoutSidebarInset, Text = "Sidebar", ParentId="4"}, + + new NavItem { Id = "8", IconName = IconName.WindowPlus, Text = "Forms", IconColor = IconColor.Danger }, + new NavItem { Id = "9", Href = "/autocomplete", IconName = IconName.InputCursorText, Text = "Auto Complete", ParentId="8"}, + new NavItem { Id = "10", Href = "/currency-input", IconName = IconName.CurrencyDollar, Text = "Currency Input", ParentId="8"}, + new NavItem { Id = "11", Href = "/number-input", IconName = IconName.InputCursor, Text = "Number Input", ParentId="8"}, + new NavItem { Id = "12", Href = "/switch", IconName = IconName.ToggleOn, Text = "Switch", ParentId="8"}, + }; + + return navItems; + } + + private void ToggleSidebar() => sidebar.ToggleSidebar(); +} diff --git a/Presentation/HushianWebApp/Layout/UserPanelLayout.razor b/Presentation/HushianWebApp/Layout/UserPanelLayout.razor new file mode 100644 index 0000000..0b7b562 --- /dev/null +++ b/Presentation/HushianWebApp/Layout/UserPanelLayout.razor @@ -0,0 +1,4 @@ +@inherits LayoutComponentBase + + @Body + \ No newline at end of file diff --git a/Presentation/HushianWebApp/Pages/Auth/ForgetPassword.razor b/Presentation/HushianWebApp/Pages/Auth/ForgetPassword.razor new file mode 100644 index 0000000..aef1638 --- /dev/null +++ b/Presentation/HushianWebApp/Pages/Auth/ForgetPassword.razor @@ -0,0 +1,101 @@ +@page "/ForgetPassword" +@layout BeforeLayout +@using Common.Enums +@using HushianWebApp.Components +@inject NavigationManager navigationManager; + + +هوشیان / بازیابی کلمه عبور + +
+ + +
+ Hushian + + بازیابی کلمه عبور + +
+ + + +
+
+ +
+ + +
+ +
+ + @*
+ +
captcha
+ +
*@ + +
+ + + برگشت + +
+ +
+ + +
+ +@code { + public string Username { get; set; } + private Modal modal = default!; + [Inject] protected ToastService ToastService { get; set; } = default!; + public bool Loading { get; set; } + +} +@functions { + async Task onClickforgetpass() + { + if (string.IsNullOrEmpty(Username)) + { + ToastService.Notify(new(ToastType.Primary, $"برای فراموشی رمز نیاز نام کاربری /موبایل را وارد کنید")); + return; + } + + Loading = true; + await forgetpass(); + Loading = false; + } + async Task forgetpass() + { + var parameters = new Dictionary(); + parameters.Add("type", VerificationCodeType.ForgetPassword); + parameters.Add("sendValue", Username); + parameters.Add("ID", 0); + parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create(this, CallBackVer)); + parameters.Add("Title", "بازیابی کلمه عبور"); + await modal.ShowAsync(title: "احراز", parameters: parameters); + } + async Task CallBackVer(VerificationCodeType type) + { + await modal.HideAsync(); + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/Pages/Auth/Login.razor b/Presentation/HushianWebApp/Pages/Auth/Login.razor new file mode 100644 index 0000000..0354e1f --- /dev/null +++ b/Presentation/HushianWebApp/Pages/Auth/Login.razor @@ -0,0 +1,124 @@ +@page "/Login" +@using Common.Enums +@using Common.Models.Identity +@using HushianWebApp.Components +@using HushianWebApp.Service +@layout BeforeLayout + +@inject AuthService auth; +@inject NavigationManager navigationManager; +هوشیان / ورود بخش شرکت ها + + +
+ Hushian + + ورود + به هوشیان +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ + + +
+
+
+ +
+
+ فراموشی کلمه‌ عبور +
+ + + +
+
+
+
+ + +
+
+ + ثبت نام + + +
+ +
+@code { + [Inject] protected ToastService ToastService { get; set; } = default!; + private ConfirmDialog dialog = default!; + + private Modal modal = default!; + public string username { get; set; } + public string Password { get; set; } + public bool Loading { get; set; } +} +@functions { + + + + async Task onClick() + { + + if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(Password)) return; + Loading = true; + var msg = await auth.login(new AuthRequest(username, Password)); + if (msg == "PhoneNumberNotConfirmed") + { + var confirmation = await dialog.ShowAsync( + title: "احراز کاربری", + message1: "کاربری/ موبایل شما فعال نشده برای ورود باید احراز کنید", + message2: "انجام بدیم؟"); + if (!confirmation) + { + Loading = false; + return; + } + await verification(); + } + else if (msg == "ok") + { + navigationManager.NavigateTo("/"); + } + + + + Loading = false; + } + async Task verification() + { + var parameters = new Dictionary(); + parameters.Add("type", VerificationCodeType.PhoneNumberConfirmed); + parameters.Add("sendValue", username); + parameters.Add("ID", 0); + parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create(this, CallBackVer)); + parameters.Add("Title", "کاربری/ موبایل شما فعال نشده برای ورود باید احراز کنید"); + await modal.ShowAsync(title: "احراز", parameters: parameters); + } + + async Task CallBackVer(VerificationCodeType type) + { + await modal.HideAsync(); + } +} diff --git a/Presentation/HushianWebApp/Pages/Auth/Register.razor b/Presentation/HushianWebApp/Pages/Auth/Register.razor new file mode 100644 index 0000000..8c666ed --- /dev/null +++ b/Presentation/HushianWebApp/Pages/Auth/Register.razor @@ -0,0 +1,197 @@ +@page "/Register" +@using Common.Enums +@using HushianWebApp.Components +@using HushianWebApp.Service +@layout BeforeLayout +@inject CompanyService companyService; +@inject NavigationManager navigationManager; + + +هوشیان / ثبت نام +
+ Hushian + حساب کاربری خود را در هوشیان بسازید +
+
+
+ + + +
+
+ کاربر گرامی، لطفاً توجه فرمایید که شماره‌همراه واردشده به نام خودتان باشد . +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ + + +
+
+
+
+
+ +
+ +
+
+ + + +
+
+
+
+ + + +@*
+ + +
+ captcha + + +
+ + +
*@ + +
+ + +
+ +
+ + +@code { + [Inject] protected ToastService ToastService { get; set; } = default!; + public string Orgcap { get; set; } = ""; + public string imgcap { get; set; } = ""; + public string CapUser { get; set; } + private Modal modal = default!; + public bool Loading { get; set; } + public string FullName { get; set; } + public string Password { get; set; } + public string RePassword { get; set; } + //mobile + public string PhoneNumber { get; set; } + public string? Email { get { return $"{PhoneNumber}@hushian.ir"; } } + public string? WebSite { get { return $"{PhoneNumber}.ir"; } } +} +@functions { + protected override async Task OnInitializedAsync() + { + Orgcap = CaptchaService.GetCaptchaWord(4); + imgcap = CaptchaService.GenerateCaptchaBase64(Orgcap); + await base.OnInitializedAsync(); + } + async Task onClick() + { + //-----------validate + if (string.IsNullOrEmpty(FullName)) + { + ToastService.Notify(new ToastMessage(ToastType.Danger, "نام نمی تواند خالی باشد")); + return; + } + if (FullName.Length < 5) + { + ToastService.Notify(new ToastMessage(ToastType.Danger, "نام را کامل وارد کنید")); + return; + } + if (Password.Length < 5) + { + ToastService.Notify(new ToastMessage(ToastType.Danger, "کلمه عبور باید بیشتر از 4کاراکتر باشد")); + return; + } + if (Password != RePassword) + { + ToastService.Notify(new ToastMessage(ToastType.Danger, "کلمه عبور و تکرار آن یکسان نیست")); + return; + } + if (!PhoneNumber.StartsWith("09") || PhoneNumber.Length!=11) + { + ToastService.Notify(new ToastMessage(ToastType.Danger, "فرمت موبایل صحیح نمی باشد")); + return; + } + if (!string.IsNullOrEmpty(Email) && (!Email.Contains("@") || !Email.Contains(".") || Email.Length < 4)) + { + ToastService.Notify(new ToastMessage(ToastType.Danger, "فرمت ایمیل صحیح نمی باشد")); + return; + } + if (!string.IsNullOrEmpty(WebSite) && (!WebSite.Contains(".") || WebSite.Length < 4)) + { + ToastService.Notify(new ToastMessage(ToastType.Danger, "فرمت وب سایت صحیح نمی باشد")); + return; + } + //------------------- + Loading = true; + var ID = await companyService.RegisterCompany(new Hushian.Application.Dtos.RegistrationDto() + { + Company = new() + { + Fullname = FullName, + Info = "" , + WebSite = WebSite + }, + User = new() + { + Email = Email, + FullName = FullName, + PhoneNumber = PhoneNumber, + UserName = PhoneNumber, + PassWord = Password + } + }); + Loading = false; + if (ID > 0) + { + var parameters = new Dictionary(); + parameters.Add("type", VerificationCodeType.PhoneNumberConfirmed); + parameters.Add("sendValue", PhoneNumber); + parameters.Add("ID", ID); + parameters.Add("Title", "ثبت نام با موفقیت انجام شد برای استفاده کاربری را احذار کنید"); + parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create(this, CallBackVer)); + await modal.ShowAsync(title: "احراز", parameters: parameters); + } + + } + async Task CallBackVer(VerificationCodeType type) + { + await modal.HideAsync(); + navigationManager.NavigateTo("Login"); + } +} diff --git a/Presentation/HushianWebApp/Pages/Conversation.razor b/Presentation/HushianWebApp/Pages/Conversation.razor new file mode 100644 index 0000000..762a1d7 --- /dev/null +++ b/Presentation/HushianWebApp/Pages/Conversation.razor @@ -0,0 +1,424 @@ +@page "/Conversation" +@page "/" +@inject IJSRuntime JS + +@using Hushian.Application.Dtos +@using HushianWebApp.Data.Models +@using HushianWebApp.Service +@using HushianWebApp.Services +@inject ILocalStorageService localStorageService; +@inject NavigationManager navigationManager; +@inject ConversationService conversationService; + + + @Content + + + +
+
+ +
+ +
+ گفتگو های اخیر +
+ + + +
+ + + + + + + + + + + + + + +
+ + +
+ + @if (isSelectedInbox1) + { + @foreach (var item in Inbox1Items) + { +
+ +
+
+ @item.UserFullName + @item.Cdate + @item.Ctime +
+
@item.Title
+
+ @if (item.NoReadCount > 0) + { + @item.NoReadCount + } + +
+ + + + } + } + + @if (isSelectedInbox2) + { + @foreach (var item in Inbox2Items) + { +
+ +
+
+ @item.UserFullName + @item.Cdate + @item.Ctime +
+
@item.Title
+
+ @if (item.NoReadCount>0) + { + @item.NoReadCount + } + + +
+ + } + } + + @if (isSelectedInbox3) + { + @foreach (var item in Inbox3Items) + { +
+ +
+
+ @item.UserFullName + @item.Cdate + @item.Ctime +
+
@item.Title
+
+ +
+ + } + } + +
+
+ + + + @if (maximomeallowsize < width) + { + @Content + } + + +
+
+ + +@code { + private Modal modal = default!; + int maximomeallowsize = 700; + private int width; + private int height; + public RenderFragment Content { get; set; } + private DotNetObjectReference? objRef; + int colmdB = 9; + bool chatloading = false; + bool convloading = false; + public string MsgInput { get; set; } + bool isSelectedInbox1 = false; + bool isSelectedInbox2 = true; + bool isSelectedInbox3 = false; + + public int countInbox1 { get { return Inbox1Items.Count(); } } + public int countInbox2 { get { return Inbox2Items.Count(); } } + + public List Inbox1Items { get; set; } + = new() ; + public List Inbox2Items { get; set; } + = new(); + public List Inbox3Items { get; set; } + = new(); + + public ConversationDto? SelectedConversation { get; set; } = null; + public List? SelectedConversationItems { get; set; } + = null; + public string SelectedChatUserName { get; set; } = "مهدی ربیع نژاد"; + public List Roles { get; set; } + public string UserID = ""; + async Task OnclickInbox(int ID) + { + switch (ID) + { + case 1: + isSelectedInbox1 = true; + isSelectedInbox2 = false; + isSelectedInbox3 = false; + break; + + case 2: + isSelectedInbox2 = true; + isSelectedInbox1 = false; + isSelectedInbox3 = false; + break; + + case 3: + isSelectedInbox3 = true; + isSelectedInbox2 = false; + isSelectedInbox1 = false; + break; + } + SelectedConversation = null; + SelectedConversationItems = null; + + } + async Task SendMsg() + { + if (!string.IsNullOrEmpty(MsgInput) && SelectedConversationItems!=null) + { + await conversationService.ADDConversationItemFromCompanySide(SelectedConversationItems[0].ConversationID, MsgInput); + SelectedConversationItems?.Add(new() { text = MsgInput, Type = Hushian.Enums.ConversationType.EU }); + SelectedConversation.Title = MsgInput; + await Task.Yield(); + await JS.InvokeVoidAsync("scrollToBottom", "B1"); + MsgInput = string.Empty; + } + } + private async Task HandleKeyDown(KeyboardEventArgs e) + { + if (e.Key == "Enter") + { + await SendMsg(); + } + } + async Task onClickSelectedCon(int InboxID,ConversationDto conversationDto) + { + // پر کردن SelectedCon + // مقدار دادن به SelectedChatUserName + chatloading = true; + SelectedChatUserName = "در حال گفتگو با "+ conversationDto.UserFullName; + SelectedConversation = conversationDto; + SelectedConversationItems = await conversationService.GetConversationItems(conversationDto.ID); + chatloading = false; + + if (maximomeallowsize > width) + { + //await LoadSessionB(12); + await modal.ShowAsync(); + } + + + } +} +@functions{ + protected override async Task OnInitializedAsync() + { + Roles = await localStorageService.GetItem>("Role"); + + + + UserID= await localStorageService.GetItem("UserID"); + convloading = true; + await LoadSessionB(); + Inbox1Items =await conversationService.ConversationAwaitingOurResponse(); + Inbox2Items =await conversationService.MyConversationIsInProgress(); + Inbox3Items =await conversationService.MyConversationIsFinished(); + convloading = false; + await base.OnInitializedAsync(); + } + async Task IsrEADaCTION(int id) + { + if( await conversationService.MarkAsReadConversationItemAsync(id)) + { + if (isSelectedInbox1) Inbox1Items = await conversationService.ConversationAwaitingOurResponse(); + + else if (isSelectedInbox2) Inbox2Items = await conversationService.MyConversationIsInProgress(); + + else + { + Inbox1Items = await conversationService.ConversationAwaitingOurResponse(); + Inbox2Items = await conversationService.MyConversationIsInProgress(); + } + } + + } + protected override async Task OnAfterRenderAsync(bool firstRender) + { + if (firstRender) + { + objRef = DotNetObjectReference.Create(this); + await JS.InvokeVoidAsync("registerResizeCallback", objRef); + + await GetWindowSize(); + } + } + [JSInvokable] + public async Task OnResize() + { + await GetWindowSize(); + + if (maximomeallowsize < width) + { + await modal.HideAsync(); + await LoadSessionB(9); + } + + else await LoadSessionB(12); + + StateHasChanged(); + } + private async Task GetWindowSize() + { + var size = await JS.InvokeAsync("getWindowSize"); + width = size.Width; + height = size.Height; + } + async Task LoadSessionB(int md=9) + { + Content = @
+
+ @if (SelectedConversation!=null) + { +

@SelectedChatUserName

+ + @if ( SelectedConversation.status==Hushian.Enums.ConversationStatus.InProgress) + { + + + + } + else if (SelectedConversation.status == Hushian.Enums.ConversationStatus.Finished + && (Roles.Contains("HushianManagerCompany") || SelectedConversation.ExperID == UserID)) + { + + } + + } + +
+ +
+ @if (SelectedConversationItems != null) + { + + } + else + { +
+ + +

+ هوشیان +

+
+ + + } + +
+ + + + + @if (SelectedConversation != null && SelectedConversation.status!=Hushian.Enums.ConversationStatus.Finished && SelectedConversationItems != null) + { + +
+ + + + + +
+ } + + +
+ ; + } +} + + \ No newline at end of file diff --git a/Presentation/HushianWebApp/Pages/Error/NotFound.razor b/Presentation/HushianWebApp/Pages/Error/NotFound.razor new file mode 100644 index 0000000..a19d0f9 --- /dev/null +++ b/Presentation/HushianWebApp/Pages/Error/NotFound.razor @@ -0,0 +1,6 @@ +

NotFound

+@page "/NotFound" +@layout EmpLayout +@code { + +} diff --git a/Presentation/HushianWebApp/Pages/Error/Unhandled.razor b/Presentation/HushianWebApp/Pages/Error/Unhandled.razor new file mode 100644 index 0000000..72f865b --- /dev/null +++ b/Presentation/HushianWebApp/Pages/Error/Unhandled.razor @@ -0,0 +1,7 @@ +@layout EmpLayout +@page "/Unhandled" +

خطای کنترل نشده

+ +@code { + +} diff --git a/Presentation/HushianWebApp/Pages/FromUserSide/ChatBoxComponent.razor b/Presentation/HushianWebApp/Pages/FromUserSide/ChatBoxComponent.razor new file mode 100644 index 0000000..398e656 --- /dev/null +++ b/Presentation/HushianWebApp/Pages/FromUserSide/ChatBoxComponent.razor @@ -0,0 +1,27 @@ +@using Hushian.Application.Dtos + +
+ +
+ سلام + +
+ + +
+
+
+ جهت خرید در سایت در هنگام درج اطلاعات به‌خصوص کد اقتصادی دقت نمائید صورتحساب شما بر همین اساس ارسال خواهد شد در هنگام درج اطلاعات به‌خصوص کد اقتصادی دقت نمائید صورتحساب شما بر همین اساس ارسال خواهد شد ثبت نام نموده و سپس از منو فروشگاه اقدام به انتخاب محصول مورد نظر خود نمائید.

+ +
+ + +
+ + +@code { + [Parameter] public List Conversations { get; set; } + [Parameter] public List SelectedConversationItems { get; set; } +} diff --git a/Presentation/HushianWebApp/Pages/FromUserSide/GCComponent.razor b/Presentation/HushianWebApp/Pages/FromUserSide/GCComponent.razor new file mode 100644 index 0000000..f14e395 --- /dev/null +++ b/Presentation/HushianWebApp/Pages/FromUserSide/GCComponent.razor @@ -0,0 +1,53 @@ +@inject ConversationService conversationService +@using Hushian.Application.Dtos +@using HushianWebApp.Service +@if (groups.Where(w => w.Available).Count() > 0) +{ + @Content + +} + + +@code { + [Parameter] + public List groups { get; set; } + [Parameter] public EventCallback OnMultipleOfThree { get; set; } + [Parameter] public int CompanyID { get; set; } + async Task onClickSelectedGroup(int ID) + { + await OnMultipleOfThree.InvokeAsync(ID); + } + RenderFragment Content { get; set; } + List ints = new(); + protected override async Task OnParametersSetAsync() + { + foreach (var g in groups.Where(w => w.Available)) + { + ints.Add(new() + { + k=g.ID, + v = await conversationService.GetCountQueueCompany(CompanyID, g.ID) + }); + } + + Content =@
+ گروه های فعال
+ + @foreach (var g in groups.Where(w=>w.Available)) + { + + + } +
+ ; + await base.OnParametersSetAsync(); + } + public class kv + { + public int k { get; set; } + public int v { get; set; } + } +} diff --git a/Presentation/HushianWebApp/Pages/FromUserSide/LoginComponent.razor b/Presentation/HushianWebApp/Pages/FromUserSide/LoginComponent.razor new file mode 100644 index 0000000..84f89b8 --- /dev/null +++ b/Presentation/HushianWebApp/Pages/FromUserSide/LoginComponent.razor @@ -0,0 +1,70 @@ +@using HushianWebApp.Service +@inject AuthService AuthService +
+ نیاز برای ارتباط با کارشناسان وارد شود +
+
+ + + @if (ID==0) + { + +
+ +
+ + +
+ +
+ } + else{ + + +
+ +
+ + +
+ +
+ } + +
+ + +@code { + private bool visible = false; + [Parameter] public EventCallback OnMultipleOfThree { get; set; } + public string Username { get; set; } + public int ID { get; set; } = 0; + public string Code { get; set; } = string.Empty; +} +@functions{ + async Task Login() + { + visible = true; + ID= await AuthService.login(Username); + visible = false; + } + async Task ver() + { + visible = true; + if(await AuthService.Verificationlogin(ID, Code)) + await OnMultipleOfThree.InvokeAsync(); + visible = false; + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/Pages/FromUserSide/UserPanel.razor b/Presentation/HushianWebApp/Pages/FromUserSide/UserPanel.razor new file mode 100644 index 0000000..2c6a990 --- /dev/null +++ b/Presentation/HushianWebApp/Pages/FromUserSide/UserPanel.razor @@ -0,0 +1,243 @@ +@using Hushian.Application.Dtos +@using Hushian.Application.Dtos.Company +@using HushianWebApp.Components.UserPanel +@using HushianWebApp.Service +@using HushianWebApp.Services +@inject IJSRuntime JSRuntime +@inject CompanyService companyService +@inject GroupService groupService +@inject ILocalStorageService localStorageService; +@inject AuthService authService; +@inject BaseController baseController; +@inject ConversationService conversationService +@layout UserPanelLayout +@page "/UserPanel/{CompanyID:int}" +@page "/UserPanel/{CompanyID:int}/{ConversationID:int?}" + +
+
+ + @CompanyName / @groups.FirstOrDefault(f => f.ID == SelectedGroup)?.Name / @SelectedConversation?.ExperFullName
+ + پاسخگویی سوالات شما هستیم +
+ +
+
+ + @if (!IsLogin) + { + + } + @if (IsLogin) + { + @if (SelectedConversation == null) + { + + @GCContent + + @if (Conversations.Count > 0) + { + @ConversationsContent + } + + + } + else + { + + } + + + + } + +
+ @if (IsLogin && (Conversations.Count == 0 && SelectedConversation == null) || (Conversations.Count > 0 && SelectedConversation != null && SelectedConversation.status == Hushian.Enums.ConversationStatus.InProgress)) + { +
+ + + + + +
+ } + +
+ +@code { + #region Parameter + [Parameter] public int CompanyID { get; set; } + [Parameter] public int? ConversationID { get; set; } + #endregion + #region Fild + public ConversationDto? SelectedConversation { get; set; } = null; + public List Conversations { get; set; } = new(); + public List? SelectedConversationItems { get; set; } = null; + public RenderFragment GCContent { get; set; } + public RenderFragment ConversationsContent { get; set; } + List groups = new List(); + public CompanyDto company { get; set; } = new(); + int CountQueueCompany = 0; + public string CompanyName { get; set; } = "هوشیان"; + public bool IsLogin { get; set; } = false; + public int? SelectedGroup { get; set; } + public string InputMessage { get; set; } + public bool Sending { get; set; } = false; + #endregion +} +@functions { + + protected override async Task OnParametersSetAsync() + { + if (ConversationID.HasValue && ConversationID > 0 && Conversations.Count > 0) + await SelectedConv(ConversationID.Value); + + await base.OnParametersSetAsync(); + } + protected override async Task OnInitializedAsync() + { + await CheckOnline(); + await base.OnInitializedAsync(); + } + async Task CheckOnline() + { + var token = await localStorageService.GetItem("key"); + if (string.IsNullOrEmpty(token)) + { + IsLogin = false; + } + else + { + await baseController.RemoveToken(); + await baseController.SetToken(token); + if (!await authService.IsOnline()) + { + await baseController.RemoveToken(); + IsLogin = false; + } + else + { + IsLogin = true; + await Login(); + } + + } + + } + async Task CallBackSelectedGroup(int ID) + { + SelectedGroup = ID; + StateHasChanged(); + } + async Task Login() + { + // اینجا منطق ورود کاربر را پیاده‌سازی کنید + IsLogin = true; + var _company = await companyService.GetCompany(CompanyID); + if (_company == null) + { + // not Founf Company + } + else + { + if (!_company.Available) + { + // not Available Company + } + else + { + CompanyName = _company.Fullname; + company = _company; + + var _groups = await groupService.GetGroupsCompany(CompanyID); + if (_groups != null) + { + CountQueueCompany = await conversationService.GetCountQueueCompany(CompanyID); + groups = _groups; + GCContent =@ + ; + Conversations = await conversationService.MyConversationUserSide(CompanyID); + if (Conversations.Count > 0) + ConversationsContent =@ + ; + } + else + { + // ex Groups Company + } + + } + + } + StateHasChanged(); + } + async Task SelectedConv(int ID) + { + + if (Conversations.Any(f => f.ID == ID)) + { + SelectedConversation = Conversations.FirstOrDefault(f => f.ID == ID); + SelectedConversationItems = await conversationService.GetConversationItems(ID); + SelectedGroup = SelectedConversation.GroupID; + StateHasChanged(); + } + + } + private void CloseChat() + { + // می‌توان اینجا حالت مخفی‌سازی کامپوننت را تنظیم کرد + } + private void GoBack() + { + // برگشت به منوی قبلی یا وضعیت قبلی + } + async Task OnClickSendMssage() + { + Sending = true; + if (SelectedConversation != null) + { + var item = new ADDConversationItemDto() + { + ConversationID = SelectedConversation.ID, + text = InputMessage + }; + } + else + { + var Item = new ADDConversationDto() + { + CompanyID = CompanyID, + GroupID = SelectedGroup, + Question = InputMessage + }; + } + Sending = false; + } +} + + + diff --git a/Presentation/HushianWebApp/Pages/Home.razor b/Presentation/HushianWebApp/Pages/Home.razor new file mode 100644 index 0000000..fead316 --- /dev/null +++ b/Presentation/HushianWebApp/Pages/Home.razor @@ -0,0 +1,7 @@ + + +Home + +

Hello, world!

+ +Welcome to your new app. diff --git a/Presentation/HushianWebApp/Pages/Manage/GroupManagement.razor b/Presentation/HushianWebApp/Pages/Manage/GroupManagement.razor new file mode 100644 index 0000000..e05577f --- /dev/null +++ b/Presentation/HushianWebApp/Pages/Manage/GroupManagement.razor @@ -0,0 +1,153 @@ +@page "/GroupManagement" + + +@using Hushian.Application.Dtos +@using HushianWebApp.Components +@using HushianWebApp.Service +@using HushianWebApp.Services +@inject ILocalStorageService localStorageService; +@inject NavigationManager navigationManager; +@inject GroupService groupService; + + + + + + + @if (context.img?.Length!=0) + { + Uploaded Image + } + else + { + + } + + + @context.ID + + + + @context.Name + + + + @context.Info + + + + + + + + + + + + + + + +@code { + private ConfirmDialog dialog = default!; + + Dictionary parameters = new Dictionary(); + Grid grid = default!; + private Modal modal = default!; + string title = "گروه جدید"; + public List list = new(); + private async Task> DataProvider(GridDataProviderRequest request) + { + if(list.Count <= 0) + list = await groupService.GetGroupsCompany(); + + int skip = (request.PageNumber - 1) * request.PageSize; + + return await Task.FromResult(request.ApplyTo(list != null ? list.Skip(skip).Take(request.PageSize).ToList() : new())); + } + protected override async Task OnInitializedAsync() + { + parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create(this, CallBack)); + + if (!(await localStorageService.GetItem>("Role")).Any(a => a == "HushianManagerCompany")) + navigationManager.NavigateTo("/NotFound"); + await base.OnInitializedAsync(); + } + private async Task OnRowClick(GridRowEventArgs args) + { + Dictionary eparameters = new Dictionary(); + eparameters.Add("model", args.Item); + eparameters.Add("OnMultipleOfThree", EventCallback.Factory.Create(this, CallBack)); + + + await modal.ShowAsync($"ویرایش گروه {args.Item.Name}", parameters: eparameters); + + + } + private async Task SwitchChanged(GroupDto model, bool value) + { + if (model.Available != value) + { + if (await groupService.ChangeAvailableGroupFromManager(model.ID, value)) + model.Available = value; + } + + + } + private async Task DeleteGroup(int GroupID, string name) + { + var confirmation = await dialog.ShowAsync( + title: $"مطمئنی می‌خوای {name} حذف کنی؟", + message1: "پس از حذف، نمی‌توان آن را به حالت اولیه برگرداند.", + message2: "می‌خوای ادامه بدی؟", new ConfirmDialogOptions() + { + YesButtonColor = ButtonColor.Danger, + YesButtonText = "بله", + NoButtonText = "نه !" + }); + + if (!confirmation) return; + + + if (await groupService.DeleteGroupFromManager(GroupID)) + { + list = await groupService.GetGroupsCompany(); + await grid.RefreshDataAsync(); + } + } + async Task CallBack() + { + await modal.HideAsync(); + list = await groupService.GetGroupsCompany(); + await grid.RefreshDataAsync(); + } + private string GetImageSource(byte[]? img) + { + if (img != null) + { + return $"data:image/jpeg;base64,{Convert.ToBase64String(img)}"; + } + return string.Empty; + } + async Task showGroupsComponent(int GroupID, string name) + { + Dictionary eparameters = new Dictionary(); + eparameters.Add("GroupID", GroupID); + + modal.Size = ModalSize.Small; + await modal.ShowAsync($"کارشناسان گروه {name}", parameters: eparameters); + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/Pages/Manage/Settings.razor b/Presentation/HushianWebApp/Pages/Manage/Settings.razor new file mode 100644 index 0000000..cde5dda --- /dev/null +++ b/Presentation/HushianWebApp/Pages/Manage/Settings.razor @@ -0,0 +1,166 @@ +@page "/Settings" +@using Hushian.Application.Dtos.Company +@using HushianWebApp.Components +@using HushianWebApp.Service +@using HushianWebApp.Services +@inject ILocalStorageService localStorageService; +@inject NavigationManager navigationManager; +@inject CompanyService companyService; + + +
+
+ + +
+
+
+ تغییر کلمه عبور +
+ +
+
+ + @if (ALLOWcompanyinfo) + { + +
+
+
+ اطلاعات شرکت +
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + @if (dto.img != null && dto.img.Length > 0) + { + Uploaded Image + } +
+
+ +
+
+
+ } + + + +
+
+
+ بخش پایین چپ +
+ +
+
+ + +
+
+
+ بخش پایین راست +
+ +
+
+ +
+
+ +@code { + [Inject] protected ToastService ToastService { get; set; } = default!; + + bool ALLOWcompanyinfo = true; + public bool loading { get; set; } = false; + public CompanyDto dto { get; set; } + = new(); + protected override async Task OnInitializedAsync() + { + if (!(await localStorageService.GetItem>("Role")).Any(a => a == "HushianManagerCompany")) + navigationManager.NavigateTo("/NotFound"); + + dto=await companyService.GetCompany(); + await base.OnInitializedAsync(); + } + private async Task OnFileChange(InputFileChangeEventArgs e) + { + var file = e.File; + using (var memoryStream = new MemoryStream()) + { + await file.OpenReadStream().CopyToAsync(memoryStream); + dto.img = memoryStream.ToArray(); + } + } + private string GetImageSource() + { + if (dto.img != null) + { + return $"data:image/jpeg;base64,{Convert.ToBase64String(dto.img)}"; + } + return string.Empty; + } + async Task updateItem() + { + if (await companyService.UpdateCompany(dto)) + ToastService.Notify(new ToastMessage(ToastType.Success, "تغییر اطلاعات شرکت با موفقیت انجام شد")); + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/Pages/Manage/UserManagment.razor b/Presentation/HushianWebApp/Pages/Manage/UserManagment.razor new file mode 100644 index 0000000..e464dc3 --- /dev/null +++ b/Presentation/HushianWebApp/Pages/Manage/UserManagment.razor @@ -0,0 +1,155 @@ +@page "/UserManagement" + +@using Common.Dtos.User +@using Hushian.Application.Dtos +@using HushianWebApp.Components +@using HushianWebApp.Service +@using HushianWebApp.Services +@inject ILocalStorageService localStorageService; +@inject NavigationManager navigationManager; +@inject UserService userService; + + + + + + + + + @if (context.img?.Length != 0) + { + Uploaded Image + } + else + { + + } + + + @context.UserName + + + + @context.FullName + + + + @context.Email + + + @* + @context.PhoneNumber + *@ + + + + + + + + + + + + + + +@code { + private ConfirmDialog dialog = default!; + + Dictionary parameters = new Dictionary(); + Grid grid = default!; + private Modal modal = default!; + string title = "کارشناس جدید"; + protected override async Task OnInitializedAsync() + { + parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create(this, CallBack)); + + if (!(await localStorageService.GetItem>("Role")).Any(a =>a== "HushianManagerCompany") ) + navigationManager.NavigateTo("/NotFound"); + await base.OnInitializedAsync(); + } + private async Task> DataProvider(GridDataProviderRequest request) + { + var employees = await userService.GetExpersCompany(0, request.PageNumber, request.PageSize); + return await Task.FromResult(request.ApplyTo(employees != null ? employees.list : new())); + } + async Task CallBack() + { + await modal.HideAsync(); + await grid.RefreshDataAsync(); + } + private async Task OnRowClick(GridRowEventArgs args) + { + var editmodel = new EditUserFromUserDto() + { + Email = args.Item.Email, + FullName = args.Item.FullName, + UserName = args.Item.UserName, + img = args.Item.img + }; + Dictionary eparameters = new Dictionary(); + eparameters.Add("model", editmodel); + eparameters.Add("OnMultipleOfThree", EventCallback.Factory.Create(this, CallBack)); + + await modal.ShowAsync($"ویرایش کارشناس {args.Item.FullName}", parameters: eparameters); + + } + private async Task SwitchChanged(HushianUserDto model,bool value) + { + if (model.Available != value) + { + if (await userService.ChangeAvailableExperFromManager(model.UserID, value)) + model.Available = value; + } + + + } + private async Task DeleteExper(string ExperID,string name) + { + var confirmation = await dialog.ShowAsync( + title: $"مطمئنی می‌خوای {name} حذف کنی؟", + message1: "پس از حذف، نمی‌توان آن را به حالت اولیه برگرداند.", + message2: "می‌خوای ادامه بدی؟",new ConfirmDialogOptions() + { + YesButtonColor=ButtonColor.Danger, + YesButtonText="بله", + NoButtonText="نه !" + }); + + if (!confirmation) return; + + + if (await userService.DeleteExperFromManager(ExperID)) + await grid.RefreshDataAsync(); + } + private string GetImageSource(byte[]? img) + { + if (img != null) + { + return $"data:image/jpeg;base64,{Convert.ToBase64String(img)}"; + } + return string.Empty; + } + async Task showGroupsComponent(string ExperID, string name) + { + Dictionary eparameters = new Dictionary(); + eparameters.Add("ExperID", ExperID); + + modal.Size = ModalSize.Small; + await modal.ShowAsync($"گروه های کارشناس {name}", parameters: eparameters); + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/Program.cs b/Presentation/HushianWebApp/Program.cs new file mode 100644 index 0000000..b441412 --- /dev/null +++ b/Presentation/HushianWebApp/Program.cs @@ -0,0 +1,21 @@ +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +using HushianWebApp; +using HushianWebApp.Services; +using HushianWebApp.Service; + +var builder = WebAssemblyHostBuilder.CreateDefault(args); +builder.RootComponents.Add("#app"); +builder.RootComponents.Add("head::after"); + +builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5137/api/") }); +builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddBlazorBootstrap(); +await builder.Build().RunAsync(); diff --git a/Presentation/HushianWebApp/Properties/launchSettings.json b/Presentation/HushianWebApp/Properties/launchSettings.json new file mode 100644 index 0000000..df30f32 --- /dev/null +++ b/Presentation/HushianWebApp/Properties/launchSettings.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "applicationUrl": "http://localhost:5165", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "applicationUrl": "https://localhost:7118;http://localhost:5165", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Presentation/HushianWebApp/Service/AuthService.cs b/Presentation/HushianWebApp/Service/AuthService.cs new file mode 100644 index 0000000..d82e623 --- /dev/null +++ b/Presentation/HushianWebApp/Service/AuthService.cs @@ -0,0 +1,128 @@ +using BlazorBootstrap; +using Common.Dtos.User; +using Common.Models.Auth; +using Common.Models.Auth.CompanySide; +using Common.Models.Auth.UserSide; +using Common.Models.Identity; +using HushianWebApp.Services; +using Microsoft.AspNetCore.Components; +using System.Net.Http.Json; + +namespace HushianWebApp.Service +{ + public class AuthService + { + private readonly BaseController _baseController; + private readonly NavigationManager _NavigationManager; + private readonly ILocalStorageService _localStorage; + private readonly ToastService _ToastService; + public AuthService(BaseController baseController, NavigationManager navigationManager, ILocalStorageService localStorage, ToastService toastService) + { + _baseController = baseController; + _NavigationManager = navigationManager; + _localStorage = localStorage; + _ToastService = toastService; + } + + public async Task IsOnline() + { + return await _baseController.IsOnline(); + } + public async Task login(AuthRequestFromCompanySide authRequest) + { + var response = await _baseController.PostLogin("v1/Auth/loginCompanySide", authRequest); + if (response.Item2.IsSuccessStatusCode) + { + var responsevalue = await response.Item2.Content.ReadFromJsonAsync(); + + + await _localStorage.RemoveItem("C/ID"); + await _localStorage.SetItem("C/ID", responsevalue.Id); + await _localStorage.RemoveItem("C/CompanyId"); + await _localStorage.SetItem("C/CompanyId", responsevalue.CompanyId.GetValueOrDefault()); + await _localStorage.RemoveItem("C/Fullname"); + await _localStorage.SetItem("C/Fullname", responsevalue.Fullname); + await _localStorage.RemoveItem("C/MobileOrUserName"); + await _localStorage.SetItem("C/MobileOrUserName", responsevalue.MobileOrUserName); + await _localStorage.RemoveItem("C/Role"); + await _localStorage.SetItem("C/Role", responsevalue.Role); + await _localStorage.RemoveItem("C/img"); + await _localStorage.SetItem("C/img", responsevalue.img); + await _localStorage.RemoveItem("C/key"); + await _localStorage.SetItem("C/key", responsevalue.Token); + + _NavigationManager.NavigateTo("/"); + } + return response.Item1; + + + } + public async Task login(AuthRequestFromUserSide model) + { + var response = await _baseController.Post($"v1/User/AuthenticationFromUser",model); + if (response.IsSuccessStatusCode) + return await response.Content.ReadFromJsonAsync(); + else if (response.StatusCode == System.Net.HttpStatusCode.BadRequest) + { + var Errors = await response.Content.ReadFromJsonAsync>(); + _ToastService.Notify(new ToastMessage(ToastType.Danger, Errors[0].Split(':').Length == 2 ? Errors[0].Split(':')[1] : Errors[0])); + + } + else if (!response.IsSuccessStatusCode) + { + + _NavigationManager.NavigateTo("Unhandled"); + } + + return 0; + } + public async Task Verificationlogin(int ID,string code) + { + var response = await _baseController.Put($"v1/Auth/UserLoginVerification/{ID}/{code}"); + + if (response.IsSuccessStatusCode) + { + var responsevalue = await response.Content.ReadFromJsonAsync(); + await _localStorage.RemoveItem("U/ID"); + await _localStorage.SetItem("U/ID", responsevalue.Id); + await _localStorage.RemoveItem("U/CompanyId"); + await _localStorage.SetItem("U/CompanyId", responsevalue.CompanyId.GetValueOrDefault()); + await _localStorage.RemoveItem("U/Fullname"); + await _localStorage.SetItem("U/Fullname", responsevalue.Fullname); + await _localStorage.RemoveItem("U/MobileOrUserName"); + await _localStorage.SetItem("U/MobileOrUserName", responsevalue.MobileOrUserName); + await _localStorage.RemoveItem("U/Role"); + await _localStorage.SetItem("U/Role", responsevalue.Role); + await _localStorage.RemoveItem("U/img"); + await _localStorage.SetItem("U/img", responsevalue.img); + await _localStorage.RemoveItem("U/key"); + await _localStorage.SetItem("U/key", responsevalue.Token); + + return true; + } + + return false; + + + } + public async Task Logout () + { + await _localStorage.RemoveItem("C/ID"); + await _localStorage.RemoveItem("C/CompanyId"); + await _localStorage.RemoveItem("C/Fullname"); + await _localStorage.RemoveItem("C/MobileOrUserName"); + await _localStorage.RemoveItem("C/Role"); + await _localStorage.RemoveItem("C/img"); + await _localStorage.RemoveItem("C/key"); + + await _localStorage.RemoveItem("U/ID"); + await _localStorage.RemoveItem("U/CompanyId"); + await _localStorage.RemoveItem("U/Fullname"); + await _localStorage.RemoveItem("U/MobileOrUserName"); + await _localStorage.RemoveItem("U/Role"); + await _localStorage.RemoveItem("U/img"); + await _localStorage.RemoveItem("U/key"); + + } + } +} diff --git a/Presentation/HushianWebApp/Service/BaseController.cs b/Presentation/HushianWebApp/Service/BaseController.cs new file mode 100644 index 0000000..733b080 --- /dev/null +++ b/Presentation/HushianWebApp/Service/BaseController.cs @@ -0,0 +1,155 @@ +using BlazorBootstrap; +using HushianWebApp.Services; +using Microsoft.AspNetCore.Components; +using System.Net; +using System.Net.Http.Json; +using System.Text; +using static System.Runtime.InteropServices.JavaScript.JSType; + +namespace HushianWebApp.Service +{ + public class BaseController + { + private readonly HttpClient _Http; + private readonly NavigationManager _NavigationManager; + private readonly ToastService _ToastService; + public BaseController(HttpClient http, NavigationManager navigationManager, ToastService toastService) + { + _Http = http; + _NavigationManager = navigationManager; + _ToastService = toastService; + } + + public async Task IsOnline() + { + var result = await _Http.GetAsync("v1/Auth/IsOnline"); + return result.IsSuccessStatusCode; + } + public async Task SetToken(string token) + { + _Http.DefaultRequestHeaders.Add("Authorization", + $"Bearer {token}"); + } + public async Task RemoveToken() + { + if (_Http.DefaultRequestHeaders.Any(t => t.Key == "Authorization")) + _Http.DefaultRequestHeaders.Remove("Authorization"); + } + public async Task Get(string route) + { + var result = await _Http.GetAsync(route); + return await Check(result); + + } + public async Task Delete(string route) + { + var result = await _Http.DeleteAsync(route); + return await Check(result); + } + public async Task Post(string route, object mode) + { + var result = await _Http.PostAsJsonAsync(route, mode); + return await Check(result); + + } + public async Task> PostLogin(string route, object mode) + { + var result = await _Http.PostAsJsonAsync(route, mode); + if (result.IsSuccessStatusCode) + { + return Tuple.Create( "ok",result); + } + else if (result.StatusCode == System.Net.HttpStatusCode.BadRequest) + { + try + { + var Errors = await result.Content.ReadFromJsonAsync>(); + if (Errors.Count > 0) + { + _ToastService.Notify(new ToastMessage(ToastType.Danger, Errors[0])); + } + else _ToastService.Notify(new ToastMessage(ToastType.Danger, "خطا در اجرای عملیات")); + + return Tuple.Create(Errors[0], result); + + } + catch (Exception) + { + _ToastService.Notify(new ToastMessage(ToastType.Danger, "خطا در اجرای عملیات")); + return Tuple.Create("error", result); + } + } + else if (!result.IsSuccessStatusCode) + { + + _NavigationManager.NavigateTo("Unhandled"); + return Tuple.Create("Unhandled", result); + } + return Tuple.Create("no", result); + + } + public async Task Post(string route,bool redirectToLogin=true) + { + var jsonString = "{\"appid\":1,\"platformid\":1,\"rating\":3}"; + var httpContent = new StringContent(jsonString, Encoding.UTF8, "application/json"); + var result = await _Http.PostAsync(route, httpContent); + + return await Check(result, redirectToLogin); + } + public async Task Put(string route, object mode) + { + var result = await _Http.PutAsJsonAsync(route, mode); + return await Check(result); + } + public async Task Put(string route) + { + var jsonString = "{\"appid\":1,\"platformid\":1,\"rating\":3}"; + var httpContent = new StringContent(jsonString, Encoding.UTF8, "application/json"); + var result = await _Http.PutAsync(route, httpContent); + return await Check(result); + } + private async Task Check(HttpResponseMessage result, bool redirectToLogin = true) + { + if (result.StatusCode == System.Net.HttpStatusCode.Unauthorized && redirectToLogin) + _NavigationManager.NavigateTo("Login"); + else if (result.StatusCode == System.Net.HttpStatusCode.BadRequest) + { + try + { + var Errors = await result.Content.ReadFromJsonAsync>(); + if (Errors.Count > 0) + { + if (Errors[0] == "PhoneNumberNotConfirmed") + { + _ToastService.Notify(new ToastMessage(ToastType.Danger, "این کاربری احراز نشده اگر مالک آن هستید احراز کنید")); + + } + else + { + + _ToastService.Notify(new ToastMessage(ToastType.Danger, Errors[0].Split(':').Length==2 ? Errors[0].Split(':')[1] : Errors[0])); + } + } + else _ToastService.Notify(new ToastMessage(ToastType.Danger, "خطا در اجرای عملیات")); + + } + catch (Exception) + { + _ToastService.Notify(new ToastMessage(ToastType.Danger, "خطا در اجرای عملیات")); + } + } + else if (result.StatusCode == System.Net.HttpStatusCode.Forbidden) + _ToastService.Notify(new ToastMessage(ToastType.Danger, "به این بخش دسترسی ندارید")); + else if (result.StatusCode == System.Net.HttpStatusCode.NotFound) + _ToastService.Notify(new ToastMessage(ToastType.Danger, "یافت نشد")); + else if (!result.IsSuccessStatusCode) + { + + _NavigationManager.NavigateTo("Unhandled"); + } + + return result; + + } + } +} diff --git a/Presentation/HushianWebApp/Service/CaptchaService.cs b/Presentation/HushianWebApp/Service/CaptchaService.cs new file mode 100644 index 0000000..5c02d9b --- /dev/null +++ b/Presentation/HushianWebApp/Service/CaptchaService.cs @@ -0,0 +1,28 @@ +using System; +using System.Drawing; +using System.Drawing.Imaging; +using System.IO; +using System.Text; + +namespace HushianWebApp.Service +{ + public static class CaptchaService + { + public static string GetCaptchaWord(int length) + { + var random = new Random(DateTime.Now.Millisecond); + + // const string chars = "ABCDEFGHJKLMNPQRSTUWYZabcdefghijkmnpqrstuwz23456789*#!$%="; + const string chars = "ABCDEFGHJKLMNPQRSTUWYZabcdefghijkmnpqrstuwz23456789"; + string cw = new(Enumerable.Repeat(chars, length) + .Select(s => s[random.Next(s.Length)]) + .ToArray()); + + return cw; + } + public static string GenerateCaptchaBase64(string text, int width = 120, int height = 40) + { + return ""; + } + } +} diff --git a/Presentation/HushianWebApp/Service/CompanyService.cs b/Presentation/HushianWebApp/Service/CompanyService.cs new file mode 100644 index 0000000..01cd68e --- /dev/null +++ b/Presentation/HushianWebApp/Service/CompanyService.cs @@ -0,0 +1,63 @@ +using Common.Dtos.Company; +using System.Net.Http.Json; + +namespace HushianWebApp.Service +{ + public class CompanyService + { + private readonly BaseController _baseController; + const string BaseRoute = "v1/Company/"; + public CompanyService(BaseController baseController) + { + _baseController = baseController; + } + + public async Task RegisterCompany(RegisterCompanyDto request) + { + var response = await _baseController.Post($"{BaseRoute}NewCompany", request); + if (response.IsSuccessStatusCode) + { + return await response.Content.ReadFromJsonAsync(); + } + return 0; + } + public async Task GetCompany(int CompanyID) + { + var response = await _baseController.Get($"{BaseRoute}GetCompany/{CompanyID}"); + if (response.IsSuccessStatusCode) + { + return await response.Content.ReadFromJsonAsync(); + } + return null; + } + public async Task UpdateCompany(ReadANDUpdate_CompanyDto dto) + { + var response = await _baseController.Put($"{BaseRoute}UpdateCompany",dto); + return response.IsSuccessStatusCode; + } + //public async Task AddContentInfo(string str) + //{ + // var response = await _baseController.Post($"{BaseRoute}AddContentInfo?ContentInfo={str}"); + // return response.IsSuccessStatusCode; + //} + //public async Task DeleteContentInfo(int ID) + //{ + // var response = await _baseController.Delete($"{BaseRoute}DeleteContentInfo/{ID}"); + // return response.IsSuccessStatusCode; + //} + //public async Task UpdateContentInfo(int ID, string str) + //{ + // var response = await _baseController.Put($"{BaseRoute}UpdateContentInfo/{ID}?ContentInfo={str}"); + // return response.IsSuccessStatusCode; + //} + //public async Task?> GetContentInfos() + //{ + // var response = await _baseController.Get($"{BaseRoute}GetContentInfos"); + // if (response.IsSuccessStatusCode) + // { + // return await response.Content.ReadFromJsonAsync?>(); + // } + // return null; + //} + } +} diff --git a/Presentation/HushianWebApp/Service/ConversationService.cs b/Presentation/HushianWebApp/Service/ConversationService.cs new file mode 100644 index 0000000..5651aff --- /dev/null +++ b/Presentation/HushianWebApp/Service/ConversationService.cs @@ -0,0 +1,93 @@ +using Hushian.Application.Dtos; +using System.Net.Http.Json; + +namespace HushianWebApp.Service +{ + public class ConversationService + { + private readonly BaseController _baseController; + const string BaseRoute = "v1/Conversation/"; + + public ConversationService(BaseController baseController) + { + _baseController = baseController; + } + + public async Task > MyConversationIsFinished() + { + var response = await _baseController.Get($"{BaseRoute}MyConversationIsFinished"); + if (response.IsSuccessStatusCode) + return await response.Content.ReadFromJsonAsync>(); + + return new() ; + } + public async Task> MyConversationIsInProgress() + { + var response = await _baseController.Get($"{BaseRoute}MyConversationIsInProgress"); + if (response.IsSuccessStatusCode) + return await response.Content.ReadFromJsonAsync>(); + + return new(); + } + public async Task> ConversationAwaitingOurResponse() + { + var response = await _baseController.Get($"{BaseRoute}ConversationAwaitingOurResponse"); + if (response.IsSuccessStatusCode) + return await response.Content.ReadFromJsonAsync>(); + + return new(); + } + public async Task MarkAsReadConversationItemAsync(int ID) + { + var response = await _baseController.Put($"{BaseRoute}MarkAsReadConversationItem/{ID}"); + return response.IsSuccessStatusCode; + + } + public async Task> GetConversationItems(int ConversationID) + { + var response = await _baseController.Get($"{BaseRoute}ConversationItems/{ConversationID}"); + if (response.IsSuccessStatusCode) + return await response.Content.ReadFromJsonAsync>(); + + return new(); + } + public async Task ADDConversationItemFromCompanySide(int ConversationID,string text) + { + var response = await _baseController.Post($"{BaseRoute}ADDConversationItemFromCompanySide/{ConversationID}",new ADDConversationItemDto() + { + ConversationID = ConversationID, + text=text + }); + /* if (response.IsSuccessStatusCode) + return await response.Content.ReadFromJsonAsync>(); + + // return new();*/ + } + public async Task ConversationIsFinish(int ConversationID) + { + var response = await _baseController.Put($"{BaseRoute}ConversationIsFinish/{ConversationID}"); + return response.IsSuccessStatusCode; + } + public async Task ConversationIsStart(int ConversationID) + { + var response = await _baseController.Put($"{BaseRoute}ConversationIsStart/{ConversationID}"); + return response.IsSuccessStatusCode; + } + public async Task GetCountQueueCompany(int CompanyID,int GroupID=0) + { + var response = await _baseController.Get($"{BaseRoute}CountQueueCompany/{CompanyID}?GroupID={GroupID}"); + if (response.IsSuccessStatusCode) + return await response.Content.ReadFromJsonAsync(); + + return -1; + } + public async Task> MyConversationUserSide(int CompanyID) + { + var response = await _baseController.Get($"{BaseRoute}ConversationFromUserSide/{CompanyID}"); + if (response.IsSuccessStatusCode) + return await response.Content.ReadFromJsonAsync>(); + + return new(); + } + } +} diff --git a/Presentation/HushianWebApp/Service/GroupService.cs b/Presentation/HushianWebApp/Service/GroupService.cs new file mode 100644 index 0000000..f7cfe20 --- /dev/null +++ b/Presentation/HushianWebApp/Service/GroupService.cs @@ -0,0 +1,94 @@ +using Common.Dtos.Exper; +using Common.Dtos.Group; +using System.Net.Http.Json; + +namespace HushianWebApp.Service +{ + public class GroupService + { + private readonly BaseController _baseController; + const string BaseRoute = "v1/Group/"; + + public GroupService(BaseController baseController) + { + _baseController = baseController; + } + public async Task AddGroup(ADD_GroupDto Group) + { + var response = await _baseController.Post($"{BaseRoute}AddGroup",Group); + return response.IsSuccessStatusCode; + } + + public async Task UpdateGroup(Update_GroupDto Group) + { + var response = await _baseController.Put($"{BaseRoute}UpdateGroup", Group); + return response.IsSuccessStatusCode; + } + public async Task JoinExperToGroup(int GroupID, string ExperID) + { + var response = await _baseController.Put($"{BaseRoute}JoinExperToGroup/{GroupID}/{ExperID}"); + return response.IsSuccessStatusCode; + } + public async Task UnJoinExperToGroup(int GroupID, string ExperID) + { + var response = await _baseController.Put($"{BaseRoute}UnJoinExperToGroup/{GroupID}/{ExperID}"); + return response.IsSuccessStatusCode; + } + public async Task DeleteGroupFromManager(int GroupID) + { + var response = await _baseController.Delete ($"{BaseRoute}DeleteGroup/{GroupID}"); + return response.IsSuccessStatusCode; + } + public async Task?> GetGroupsCompany() + { + var response = await _baseController.Get($"{BaseRoute}GetGroupsCompany"); + if (response.IsSuccessStatusCode) + { + return await response.Content.ReadFromJsonAsync>(); + } + return null; + } + public async Task?> GetGroupsCompany(int CompanyID) + { + var response = await _baseController.Get($"{BaseRoute}GetGroupsCompany?CompanyID={CompanyID}"); + if (response.IsSuccessStatusCode) + { + return await response.Content.ReadFromJsonAsync>(); + } + return null; + } + public async Task?> GetGroupsFromExperID(string ExperID) + { + var response = await _baseController.Get($"{BaseRoute}GetGroupsFromExperID?ExperID={ExperID}"); + if (response.IsSuccessStatusCode) + { + return await response.Content.ReadFromJsonAsync>(); + } + return new(); + } + public async Task> GetExpersFromGroupID(int GroupID) + { + var response = await _baseController.Get($"{BaseRoute}GetExpersFromGroupID/{GroupID}"); + if (response.IsSuccessStatusCode) + { + return await response.Content.ReadFromJsonAsync>(); + } + return new(); + } + public async Task ChangeAvailableGroupFromManager(int GroupID, bool Available) + { + var response = await _baseController.Put($"{BaseRoute}ChangeAvailableGroupFromManager/{GroupID}?Available={Available}"); + return response.IsSuccessStatusCode; + } + + //public async Task?> GetOnlineExpersFromGroupID(int GroupID) + //{ + // var response = await _baseController.Get($"{BaseRoute}GetOnlineExpersFromGroupID/{GroupID}"); + // if (response.IsSuccessStatusCode) + // { + // return await response.Content.ReadFromJsonAsync>(); + // } + // return null; + //} + } +} diff --git a/Presentation/HushianWebApp/Service/LocalStorageService.cs b/Presentation/HushianWebApp/Service/LocalStorageService.cs new file mode 100644 index 0000000..fde2889 --- /dev/null +++ b/Presentation/HushianWebApp/Service/LocalStorageService.cs @@ -0,0 +1,42 @@ +using Microsoft.JSInterop; +using System.Text.Json; + +namespace HushianWebApp.Services +{ + public interface ILocalStorageService + { + Task GetItem(string key); + Task SetItem(string key, T value); + Task RemoveItem(string key); + } + + public class LocalStorageService : ILocalStorageService + { + private IJSRuntime _jsRuntime; + + public LocalStorageService(IJSRuntime jsRuntime) + { + _jsRuntime = jsRuntime; + } + + public async Task GetItem(string key) + { + var json = await _jsRuntime.InvokeAsync("localStorage.getItem", key); + + if (json == null) + return default; + + return JsonSerializer.Deserialize(json); + } + + public async Task SetItem(string key, T value) + { + await _jsRuntime.InvokeVoidAsync("localStorage.setItem", key, JsonSerializer.Serialize(value)); + } + + public async Task RemoveItem(string key) + { + await _jsRuntime.InvokeVoidAsync("localStorage.removeItem", key); + } + } +} diff --git a/Presentation/HushianWebApp/Service/UserService.cs b/Presentation/HushianWebApp/Service/UserService.cs new file mode 100644 index 0000000..255878b --- /dev/null +++ b/Presentation/HushianWebApp/Service/UserService.cs @@ -0,0 +1,108 @@ +using System.Net.Http.Json; + +namespace HushianWebApp.Service +{ + public class UserService + { + private readonly BaseController _baseController; + const string BaseRoute = "v1/User/"; + + public UserService(BaseController baseController) + { + _baseController = baseController; + } + public async Task AddExper(AddUserDto request) + { + var response = await _baseController.Post($"{BaseRoute}AddExper", request); + return response.IsSuccessStatusCode; + } + public async Task?> GetExpersCompany(int CompanyID, int PageIndex = 1, int PageSize = 10) + { + string route = $"{BaseRoute}GetExpersCompany?CompanyID={CompanyID}&PageIndex={PageIndex}&PageSize={PageSize}"; + + var response = await _baseController.Get(route); + if (response.IsSuccessStatusCode) + { + return await response.Content.ReadFromJsonAsync>(); + } + return null; + } + public async Task?> GetOnlineExpersCompany(int CompanyID) + { + string route = $"{BaseRoute}GetOnlineExpersCompany?CompanyID={CompanyID}"; + + var response = await _baseController.Get(route); + if (response.IsSuccessStatusCode) + { + return await response.Content.ReadFromJsonAsync>(); + } + return null; + } + //-------------------------------------------------------------------------------------------------------------- + public async Task?> GetUsersCompanyFromManager(int PageIndex = 1, int PageSize = 10) + { + string route = $"{BaseRoute}GetUsersCompany?PageIndex={PageIndex}&PageSize={PageSize}"; + + var response = await _baseController.Get(route); + if (response.IsSuccessStatusCode) + { + return await response.Content.ReadFromJsonAsync>(); + } + return null; + } + public async Task EditUserYourself(EditUserFromUserDto request) //ویرایش کاربران توسط خود + { + var response = await _baseController.Put($"{BaseRoute}EditUserYourself", request); + return response.IsSuccessStatusCode; + } + public async Task GetCurrentUser() //ویرایش کاربران توسط خود + { + var response = await _baseController.Get($"{BaseRoute}GetCurrentUser"); + if (response.IsSuccessStatusCode) + { + return await response.Content.ReadFromJsonAsync(); + } + return null; + } + public async Task ExperEditingFromManager(EditUserFromUserDto request) //ویرایش کاربران توسط مدیرش + { + var response = await _baseController.Put($"{BaseRoute}ExperEditingFromManager", request); + return response.IsSuccessStatusCode; + } + + public async Task ChangePasswordYourself(ChangePasswordFromUserDto request) //تغییر کلمه عبور کاربران توسط خود + { + var response = await _baseController.Put($"{BaseRoute}ChangePasswordYourself", request); + return response.IsSuccessStatusCode; + } + public async Task CheckAvailableExperInCompany(string? ExperID=null) + { + string route = $"{BaseRoute}CheckAvailableExperInCompany"; + if (!string.IsNullOrEmpty(ExperID)) + route += $"?ExperID={ExperID}"; + var response = await _baseController.Get(route); + return response.IsSuccessStatusCode; + } + + + public async Task ChangeAvailableExperFromManager(string ExperID,bool Available) + { + var response = await _baseController.Put($"{BaseRoute}ChangeAvailableExperFromManager/{ExperID}?Available={Available}"); + return response.IsSuccessStatusCode; + } + + public async TaskDeleteExperFromManager(string ExperID) + { + var response = await _baseController.Delete($"{BaseRoute}DeleteExperFromManager/{ExperID}"); + return response.IsSuccessStatusCode; + } + + public async Task FreeExper() + { + var response = await _baseController.Delete($"{BaseRoute}FreeExper"); + return response.IsSuccessStatusCode; + } + + + } +} diff --git a/Presentation/HushianWebApp/Service/VerificationService.cs b/Presentation/HushianWebApp/Service/VerificationService.cs new file mode 100644 index 0000000..3023cb9 --- /dev/null +++ b/Presentation/HushianWebApp/Service/VerificationService.cs @@ -0,0 +1,52 @@ +using Common.Dtos.User; +using Common.Enums; +using System.Net.Http.Json; + +namespace HushianWebApp.Service +{ + public class VerificationService + { + private readonly BaseController _baseController; + + public VerificationService(BaseController baseController) + { + _baseController = baseController; + } + + public async Task FromUserName(string mobile, VerificationCodeType type) + { + + string route = type switch + { + VerificationCodeType.PhoneNumberConfirmed => "PhoneNumberConfirmedFromUserName", + VerificationCodeType.ForgetPassword => "ForgetPasswordFromUserName", + VerificationCodeType.ChangeMobile => throw new NotImplementedException(), + VerificationCodeType.Login => throw new NotImplementedException(), + _ => throw new NotImplementedException() + }; + var response = await _baseController.Get($"v1/Verification/{route}/{mobile}"); + if (response.IsSuccessStatusCode) + { + return await response.Content.ReadFromJsonAsync(); + } + else + { + return 0; + } + + + } + public async Task ConfirmedCode(ConfirmedCodeDto dto) + { + var response = await _baseController.Post($"v1/Verification/ConfirmedCode", dto); + return response.IsSuccessStatusCode; + + } + public async Task ReSendCode(int ID) + { + var response = await _baseController.Get($"v1/Verification/ReSendCode/{ID}"); + return response.IsSuccessStatusCode; + + } + } +} diff --git a/Presentation/HushianWebApp/_Imports.razor b/Presentation/HushianWebApp/_Imports.razor new file mode 100644 index 0000000..c25964f --- /dev/null +++ b/Presentation/HushianWebApp/_Imports.razor @@ -0,0 +1,11 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.AspNetCore.Components.WebAssembly.Http +@using Microsoft.JSInterop +@using HushianWebApp +@using HushianWebApp.Layout +@using BlazorBootstrap; \ No newline at end of file diff --git a/Presentation/HushianWebApp/wwwroot/Before/assets/fonts/woff/IRANSansX-Regular.woff b/Presentation/HushianWebApp/wwwroot/Before/assets/fonts/woff/IRANSansX-Regular.woff new file mode 100644 index 0000000..5cf63c1 Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/Before/assets/fonts/woff/IRANSansX-Regular.woff differ diff --git a/Presentation/HushianWebApp/wwwroot/Before/assets/images/Hushian-logo.svg b/Presentation/HushianWebApp/wwwroot/Before/assets/images/Hushian-logo.svg new file mode 100644 index 0000000..0dd7e79 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/assets/images/Hushian-logo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Presentation/HushianWebApp/wwwroot/Before/assets/images/Patt.svg b/Presentation/HushianWebApp/wwwroot/Before/assets/images/Patt.svg new file mode 100644 index 0000000..4e44816 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/assets/images/Patt.svg @@ -0,0 +1,2354 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Presentation/HushianWebApp/wwwroot/Before/assets/images/refresh-icon.svg b/Presentation/HushianWebApp/wwwroot/Before/assets/images/refresh-icon.svg new file mode 100644 index 0000000..828dfd9 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/assets/images/refresh-icon.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/Presentation/HushianWebApp/wwwroot/Before/assets/images/top-BG.svg b/Presentation/HushianWebApp/wwwroot/Before/assets/images/top-BG.svg new file mode 100644 index 0000000..5f52fc1 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/assets/images/top-BG.svg @@ -0,0 +1,163 @@ + + + + +bg02 +Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Presentation/HushianWebApp/wwwroot/Before/assets/style/style6249.css b/Presentation/HushianWebApp/wwwroot/Before/assets/style/style6249.css new file mode 100644 index 0000000..0b47e0d --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/assets/style/style6249.css @@ -0,0 +1,4193 @@ +*, +::before, +::after { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + +::backdrop { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + +/* Chrome, Safari, Edge, Opera */ +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +/* Firefox */ +input[type=number] { + -moz-appearance: textfield; +} + +/* +! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com +*/ + +/* +1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) +2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) +*/ + +*, +::before, +::after { + box-sizing: border-box; + /* 1 */ + border-width: 0; + /* 2 */ + border-style: solid; + /* 2 */ + border-color: #e5e7eb; + /* 2 */ +} + +::before, +::after { + --tw-content: ""; +} + +/* +1. Use a consistent sensible line-height in all browsers. +2. Prevent adjustments of font size after orientation changes in iOS. +3. Use a more readable tab size. +4. Use the user's configured `sans` font-family by default. +5. Use the user's configured `sans` font-feature-settings by default. +6. Use the user's configured `sans` font-variation-settings by default. +7. Disable tap highlights on iOS +*/ + +html, +:host { + line-height: 1.5; + /* 1 */ + -webkit-text-size-adjust: 100%; + /* 2 */ + -moz-tab-size: 4; + /* 3 */ + -o-tab-size: 4; + tab-size: 4; + /* 3 */ + font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + /* 4 */ + font-feature-settings: normal; + /* 5 */ + font-variation-settings: normal; + /* 6 */ + -webkit-tap-highlight-color: transparent; + /* 7 */ +} + +/* +1. Remove the margin in all browsers. +2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. +*/ + +body { + margin: 0; + /* 1 */ + line-height: inherit; + /* 2 */ +} + +/* +1. Add the correct height in Firefox. +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) +3. Ensure horizontal rules are visible by default. +*/ + +hr { + height: 0; + /* 1 */ + color: inherit; + /* 2 */ + border-top-width: 1px; + /* 3 */ +} + +/* +Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +} + +/* +Remove the default font size and weight for headings. +*/ + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/* +Reset links to optimize for opt-in styling instead of opt-out. +*/ + +a { + color: inherit; + text-decoration: inherit; +} + +/* +Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/* +1. Use the user's configured `mono` font-family by default. +2. Use the user's configured `mono` font-feature-settings by default. +3. Use the user's configured `mono` font-variation-settings by default. +4. Correct the odd `em` font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, + "Liberation Mono", "Courier New", monospace; + /* 1 */ + font-feature-settings: normal; + /* 2 */ + font-variation-settings: normal; + /* 3 */ + font-size: 1em; + /* 4 */ +} + +/* +Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/* +Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) +2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +3. Remove gaps between table borders by default. +*/ + +table { + text-indent: 0; + /* 1 */ + border-color: inherit; + /* 2 */ + border-collapse: collapse; + /* 3 */ +} + +/* +1. Change the font styles in all browsers. +2. Remove the margin in Firefox and Safari. +3. Remove default padding in all browsers. +*/ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; + /* 1 */ + font-feature-settings: inherit; + /* 1 */ + font-variation-settings: inherit; + /* 1 */ + font-size: 100%; + /* 1 */ + font-weight: inherit; + /* 1 */ + line-height: inherit; + /* 1 */ + letter-spacing: inherit; + /* 1 */ + color: inherit; + /* 1 */ + margin: 0; + /* 2 */ + padding: 0; + /* 3 */ +} + +/* +Remove the inheritance of text transform in Edge and Firefox. +*/ + +button, +select { + text-transform: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Remove default button styles. +*/ + +button, +input:where([type="button"]), +input:where([type="reset"]), +input:where([type="submit"]) { + -webkit-appearance: button; + /* 1 */ + background-color: transparent; + /* 2 */ + background-image: none; + /* 2 */ +} + +/* +Use the modern Firefox focus style for all focusable elements. +*/ + +:-moz-focusring { + outline: auto; +} + +/* +Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/* +Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/* +Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/* +1. Correct the odd appearance in Chrome and Safari. +2. Correct the outline style in Safari. +*/ + +[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + outline-offset: -2px; + /* 2 */ +} + +/* +Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Change font properties to `inherit` in Safari. +*/ + +::-webkit-file-upload-button { + -webkit-appearance: button; + /* 1 */ + font: inherit; + /* 2 */ +} + +/* +Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +} + +/* +Removes the default spacing and border for appropriate elements. +*/ + +blockquote, +dl, +dd, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +figure, +p, +pre { + margin: 0; +} + +fieldset { + margin: 0; + padding: 0; +} + +legend { + padding: 0; +} + +ol, +ul, +menu { + list-style: none; + margin: 0; + padding: 0; +} + +/* +Reset default styling for dialogs. +*/ + +dialog { + padding: 0; +} + +/* +Prevent resizing textareas horizontally by default. +*/ + +textarea { + resize: vertical; +} + +/* +1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +2. Set the default placeholder color to the user's configured gray 400 color. +*/ + +input::-moz-placeholder, +textarea::-moz-placeholder { + opacity: 1; + /* 1 */ + color: #9ca3af; + /* 2 */ +} + +input::placeholder, +textarea::placeholder { + opacity: 1; + /* 1 */ + color: #9ca3af; + /* 2 */ +} + +/* +Set the default cursor for buttons. +*/ + +button, +[role="button"] { + cursor: pointer; +} + +/* +Make sure disabled buttons don't get the pointer cursor. +*/ + +:disabled { + cursor: default; +} + +/* +1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) +2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; + /* 1 */ + vertical-align: middle; + /* 2 */ +} + +/* +Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + +img, +video { + max-width: 100%; + height: auto; +} + +/* Make elements with the HTML hidden attribute stay hidden by default */ + +[hidden]:where(:not([hidden="until-found"])) { + display: none; +} + +.container { + width: 100%; +} + +@media (min-width: 640px) { + .container { + max-width: 640px; + } +} + +@media (min-width: 768px) { + .container { + max-width: 768px; + } +} + +@media (min-width: 1024px) { + .container { + max-width: 1024px; + } +} + +@media (min-width: 1280px) { + .container { + max-width: 1280px; + } +} + +@media (min-width: 1536px) { + .container { + max-width: 1536px; + } +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + +.not-sr-only { + position: static; + width: auto; + height: auto; + padding: 0; + margin: 0; + overflow: visible; + clip: auto; + white-space: normal; +} + +.pointer-events-none { + pointer-events: none; +} + +.pointer-events-auto { + pointer-events: auto; +} + +.\!visible { + visibility: visible !important; +} + +.visible { + visibility: visible; +} + +.invisible { + visibility: hidden; +} + + +.static { + position: static; +} + +.fixed { + position: fixed; +} + +.absolute { + position: absolute; +} + +.relative { + position: relative; +} + +.sticky { + position: sticky; +} + +.-inset-1 { + inset: -0.25rem; +} + +.end-1 { + inset-inline-end: 0.25rem; +} + +.left-0 { + left: 0px; +} + +.right-24 { + right: 6rem; +} + +.top-0 { + top: 0px; +} + +.isolate { + isolation: isolate; +} + +.isolation-auto { + isolation: auto; +} + +.z-10 { + z-index: 10; +} + +.z-20 { + z-index: 20; +} + +.order-2 { + order: 2; +} + +.row-span-1 { + grid-row: span 1 / span 1; +} + +.float-start { + float: inline-start; +} + +.float-end { + float: inline-end; +} + +.float-right { + float: right; +} + +.float-left { + float: left; +} + +.float-none { + float: none; +} + +.clear-start { + clear: inline-start; +} + +.clear-end { + clear: inline-end; +} + +.clear-left { + clear: left; +} + +.clear-right { + clear: right; +} + +.clear-both { + clear: both; +} + +.clear-none { + clear: none; +} + +.mx-auto { + margin-left: auto; + margin-right: auto; +} +.lg\:mb-0 { + margin-bottom: 0; +} + +.mb-1 { + margin-bottom: 0.25rem; +} + +.mb-2 { + margin-bottom: 0.5rem; +} + +.mb-3 { + margin-bottom: 0.75rem; +} + +.mb-4 { + margin-bottom: 1rem; +} + +.mr-4 { + margin-right: 1rem; +} + +.mt-0 { + margin-top: 0px; +} + +.mt-1 { + margin-top: 0.25rem; +} + +.mt-2 { + margin-top: 0.5rem; +} + +.box-border { + box-sizing: border-box; +} + +.box-content { + box-sizing: content-box; +} + +.line-clamp-none { + overflow: visible; + display: block; + -webkit-box-orient: horizontal; + -webkit-line-clamp: none; +} + +.block { + display: block; +} + +.inline-block { + display: inline-block; +} + +.inline { + display: inline; +} + +.flex { + display: flex; +} + +.inline-flex { + display: inline-flex; +} + +.table { + display: table; +} + +.inline-table { + display: inline-table; +} + +.table-caption { + display: table-caption; +} + +.table-cell { + display: table-cell; +} + +.table-column { + display: table-column; +} + +.table-column-group { + display: table-column-group; +} + +.table-footer-group { + display: table-footer-group; +} + +.table-header-group { + display: table-header-group; +} + +.table-row-group { + display: table-row-group; +} + +.table-row { + display: table-row; +} + +.flow-root { + display: flow-root; +} + +.grid { + display: grid; +} + +.inline-grid { + display: inline-grid; +} + +.contents { + display: contents; +} + +.list-item { + display: list-item; +} + +.hidden { + display: none; +} + +.h-8 { + height: 2rem; +} + +.h-\[30\%\] { + height: 30%; +} + +.h-full { + height: 100%; +} + +.min-h-\[600px\] { + min-height: 600px; +} + +.min-h-\[700px\] { + min-height: 700px; +} + +.w-\[this-is\\\\\] { + width: this-is\\; +} + +.w-\[this-is\] { + width: this-is; +} + +.w-\[weird-and-invalid\] { + width: weird-and-invalid; +} + +.w-full { + width: 100%; +} + +.w-50 { + width: 50%; +} + +.min-w-\[85px\] { + min-width: 85px; +} + +.max-w-screen-lg { + max-width: 1024px; +} + +.max-w-screen-xl { + max-width: 1280px; +} + +.max-w-\[960px\] { + max-width: 960px; +} + +.flex-1 { + flex: 1 1 0%; +} + +.flex-shrink { + flex-shrink: 1; +} + +.shrink { + flex-shrink: 1; +} + +.shrink-0 { + flex-shrink: 0; +} + +.flex-grow { + flex-grow: 1; +} + +.grow { + flex-grow: 1; +} + +.table-auto { + table-layout: auto; +} + +.table-fixed { + table-layout: fixed; +} + +.caption-top { + caption-side: top; +} + +.caption-bottom { + caption-side: bottom; +} + +.border-collapse { + border-collapse: collapse; +} + +.border-separate { + border-collapse: separate; +} + +.\!transform { + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) + rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) + scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important; +} + +.transform { + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) + rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) + scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.transform-cpu { + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) + rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) + scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.transform-gpu { + transform: translate3d(var(--tw-translate-x), var(--tw-translate-y), 0) + rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) + scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.transform-none { + transform: none; +} + +.cursor-pointer { + cursor: pointer; +} + +.touch-auto { + touch-action: auto; +} + +.touch-none { + touch-action: none; +} + +.touch-pan-x { + --tw-pan-x: pan-x; + touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); +} + +.touch-pan-left { + --tw-pan-x: pan-left; + touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); +} + +.touch-pan-right { + --tw-pan-x: pan-right; + touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); +} + +.touch-pan-y { + --tw-pan-y: pan-y; + touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); +} + +.touch-pan-up { + --tw-pan-y: pan-up; + touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); +} + +.touch-pan-down { + --tw-pan-y: pan-down; + touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); +} + +.touch-pinch-zoom { + --tw-pinch-zoom: pinch-zoom; + touch-action: var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom); +} + +.touch-manipulation { + touch-action: manipulation; +} + +.select-none { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +.select-text { + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.select-all { + -webkit-user-select: all; + -moz-user-select: all; + user-select: all; +} + +.select-auto { + -webkit-user-select: auto; + -moz-user-select: auto; + user-select: auto; +} + +.resize-none { + resize: none; +} + +.resize-y { + resize: vertical; +} + +.resize-x { + resize: horizontal; +} + +.resize { + resize: both; +} + +.snap-none { + scroll-snap-type: none; +} + +.snap-x { + scroll-snap-type: x var(--tw-scroll-snap-strictness); +} + +.snap-y { + scroll-snap-type: y var(--tw-scroll-snap-strictness); +} + +.snap-both { + scroll-snap-type: both var(--tw-scroll-snap-strictness); +} + +.snap-mandatory { + --tw-scroll-snap-strictness: mandatory; +} + +.snap-proximity { + --tw-scroll-snap-strictness: proximity; +} + +.snap-start { + scroll-snap-align: start; +} + +.snap-end { + scroll-snap-align: end; +} + +.snap-center { + scroll-snap-align: center; +} + +.snap-align-none { + scroll-snap-align: none; +} + +.snap-normal { + scroll-snap-stop: normal; +} + +.snap-always { + scroll-snap-stop: always; +} + +.list-inside { + list-style-position: inside; +} + +.list-outside { + list-style-position: outside; +} + +.list-disc { + list-style-type: disc; +} + +.validation-summary-errors ui { + list-style-type: disc; +} + +.validation-summary-errors ui > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); +} + +.validation-summary-errors ui { + padding-left: 0.5rem; + padding-right: 0.5rem; +} + +.appearance-none { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.appearance-auto { + -webkit-appearance: auto; + -moz-appearance: auto; + appearance: auto; +} + +.break-before-auto { + -moz-column-break-before: auto; + break-before: auto; +} + +.break-before-avoid { + -moz-column-break-before: avoid; + break-before: avoid; +} + +.break-before-all { + -moz-column-break-before: all; + break-before: all; +} + +.break-before-avoid-page { + -moz-column-break-before: avoid; + break-before: avoid-page; +} + +.break-before-page { + -moz-column-break-before: page; + break-before: page; +} + +.break-before-left { + -moz-column-break-before: left; + break-before: left; +} + +.break-before-right { + -moz-column-break-before: right; + break-before: right; +} + +.break-before-column { + -moz-column-break-before: column; + break-before: column; +} + +.break-inside-auto { + -moz-column-break-inside: auto; + break-inside: auto; +} + +.break-inside-avoid { + -moz-column-break-inside: avoid; + break-inside: avoid; +} + +.break-inside-avoid-page { + break-inside: avoid-page; +} + +.break-inside-avoid-column { + -moz-column-break-inside: avoid; + break-inside: avoid-column; +} + +.break-after-auto { + -moz-column-break-after: auto; + break-after: auto; +} + +.break-after-avoid { + -moz-column-break-after: avoid; + break-after: avoid; +} + +.break-after-all { + -moz-column-break-after: all; + break-after: all; +} + +.break-after-avoid-page { + -moz-column-break-after: avoid; + break-after: avoid-page; +} + +.break-after-page { + -moz-column-break-after: page; + break-after: page; +} + +.break-after-left { + -moz-column-break-after: left; + break-after: left; +} + +.break-after-right { + -moz-column-break-after: right; + break-after: right; +} + +.break-after-column { + -moz-column-break-after: column; + break-after: column; +} + +.grid-flow-row { + grid-auto-flow: row; +} + +.grid-flow-col { + grid-auto-flow: column; +} + +.grid-flow-dense { + grid-auto-flow: dense; +} + +.grid-flow-row-dense { + grid-auto-flow: row dense; +} + +.grid-flow-col-dense { + grid-auto-flow: column dense; +} + +.grid-rows-3 { + grid-template-rows: repeat(3, minmax(0, 1fr)); +} + +.flex-row { + flex-direction: row; +} + +.flex-row-reverse { + flex-direction: row-reverse; +} + +.flex-col { + flex-direction: column; +} + +.flex-col-reverse { + flex-direction: column-reverse; +} + +.flex-wrap { + flex-wrap: wrap; +} + +.flex-wrap-reverse { + flex-wrap: wrap-reverse; +} + +.flex-nowrap { + flex-wrap: nowrap; +} + +.place-content-center { + place-content: center; +} + +.place-content-start { + place-content: start; +} + +.place-content-end { + place-content: end; +} + +.place-content-between { + place-content: space-between; +} + +.place-content-around { + place-content: space-around; +} + +.place-content-evenly { + place-content: space-evenly; +} + +.place-content-baseline { + place-content: baseline; +} + +.place-content-stretch { + place-content: stretch; +} + +.place-items-start { + place-items: start; +} + +.place-items-end { + place-items: end; +} + +.place-items-center { + place-items: center; +} + +.place-items-baseline { + place-items: baseline; +} + +.place-items-stretch { + place-items: stretch; +} + +.content-normal { + align-content: normal; +} + +.content-center { + align-content: center; +} + +.content-start { + align-content: flex-start; +} + +.content-end { + align-content: flex-end; +} + +.content-between { + align-content: space-between; +} + +.content-around { + align-content: space-around; +} + +.content-evenly { + align-content: space-evenly; +} + +.content-baseline { + align-content: baseline; +} + +.content-stretch { + align-content: stretch; +} + +.items-start { + align-items: flex-start; +} + +.items-end { + align-items: flex-end; +} + +.items-center { + align-items: center; +} + +.items-baseline { + align-items: baseline; +} + +.items-stretch { + align-items: stretch; +} + +.justify-normal { + justify-content: normal; +} + +.justify-start { + justify-content: flex-start; +} + +.justify-end { + justify-content: flex-end; +} + +.justify-center { + justify-content: center; +} + +.justify-between { + justify-content: space-between; +} + +.justify-around { + justify-content: space-around; +} + +.justify-evenly { + justify-content: space-evenly; +} + +.justify-stretch { + justify-content: stretch; +} + +.justify-items-start { + justify-items: start; +} + +.justify-items-end { + justify-items: end; +} + +.justify-items-center { + justify-items: center; +} + +.justify-items-stretch { + justify-items: stretch; +} + +.gap-1 { + gap: 0.25rem; +} + +.gap-2 { + gap: 0.5rem; +} + +.gap-3 { + gap: 0.75rem; +} + +.gap-4 { + gap: 1rem; +} + +.gap-5 { + gap: 1.25rem; +} + +.space-x-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.5rem * var(--tw-space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); +} + +.space-x-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.75rem * var(--tw-space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); +} + +.space-y-1 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); +} + +.space-y-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); +} + +.space-y-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)); +} + +.space-y-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(1rem * var(--tw-space-y-reverse)); +} + +.space-y-5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(1.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(1.25rem * var(--tw-space-y-reverse)); +} + +.space-y-reverse > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 1; +} + +.space-x-reverse > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 1; +} + +.divide-x > :not([hidden]) ~ :not([hidden]) { + --tw-divide-x-reverse: 0; + border-right-width: calc(1px * var(--tw-divide-x-reverse)); + border-left-width: calc(1px * calc(1 - var(--tw-divide-x-reverse))); +} + +.divide-y > :not([hidden]) ~ :not([hidden]) { + --tw-divide-y-reverse: 0; + border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))); + border-bottom-width: calc(1px * var(--tw-divide-y-reverse)); +} + +.divide-y-reverse > :not([hidden]) ~ :not([hidden]) { + --tw-divide-y-reverse: 1; +} + +.divide-x-reverse > :not([hidden]) ~ :not([hidden]) { + --tw-divide-x-reverse: 1; +} + +.divide-solid > :not([hidden]) ~ :not([hidden]) { + border-style: solid; +} + +.divide-dashed > :not([hidden]) ~ :not([hidden]) { + border-style: dashed; +} + +.divide-dotted > :not([hidden]) ~ :not([hidden]) { + border-style: dotted; +} + +.divide-double > :not([hidden]) ~ :not([hidden]) { + border-style: double; +} + +.divide-none > :not([hidden]) ~ :not([hidden]) { + border-style: none; +} + +.place-self-auto { + place-self: auto; +} + +.place-self-start { + place-self: start; +} + +.place-self-end { + place-self: end; +} + +.place-self-center { + place-self: center; +} + +.place-self-stretch { + place-self: stretch; +} + +.self-auto { + align-self: auto; +} + +.self-start { + align-self: flex-start; +} + +.self-end { + align-self: flex-end; +} + +.self-center { + align-self: center; +} + +.self-stretch { + align-self: stretch; +} + +.self-baseline { + align-self: baseline; +} + +.justify-self-auto { + justify-self: auto; +} + +.justify-self-start { + justify-self: start; +} + +.justify-self-end { + justify-self: end; +} + +.justify-self-center { + justify-self: center; +} + +.justify-self-stretch { + justify-self: stretch; +} + +.overflow-auto { + overflow: auto; +} + +.overflow-hidden { + overflow: hidden; +} + +.overflow-clip { + overflow: clip; +} + +.overflow-visible { + overflow: visible; +} + +.overflow-scroll { + overflow: scroll; +} + +.overflow-x-auto { + overflow-x: auto; +} + +.overflow-y-auto { + overflow-y: auto; +} + +.overflow-x-hidden { + overflow-x: hidden; +} + +.overflow-y-hidden { + overflow-y: hidden; +} + +.overflow-x-clip { + overflow-x: clip; +} + +.overflow-y-clip { + overflow-y: clip; +} + +.overflow-x-visible { + overflow-x: visible; +} + +.overflow-y-visible { + overflow-y: visible; +} + +.overflow-x-scroll { + overflow-x: scroll; +} + +.overflow-y-scroll { + overflow-y: scroll; +} + +.overscroll-auto { + overscroll-behavior: auto; +} + +.overscroll-contain { + overscroll-behavior: contain; +} + +.overscroll-none { + overscroll-behavior: none; +} + +.overscroll-y-auto { + overscroll-behavior-y: auto; +} + +.overscroll-y-contain { + overscroll-behavior-y: contain; +} + +.overscroll-y-none { + overscroll-behavior-y: none; +} + +.overscroll-x-auto { + overscroll-behavior-x: auto; +} + +.overscroll-x-contain { + overscroll-behavior-x: contain; +} + +.overscroll-x-none { + overscroll-behavior-x: none; +} + +.scroll-auto { + scroll-behavior: auto; +} + +.scroll-smooth { + scroll-behavior: smooth; +} + +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.overflow-ellipsis { + text-overflow: ellipsis; +} + +.text-ellipsis { + text-overflow: ellipsis; +} + +.text-clip { + text-overflow: clip; +} + +.hyphens-none { + -webkit-hyphens: none; + hyphens: none; +} + +.hyphens-manual { + -webkit-hyphens: manual; + hyphens: manual; +} + +.hyphens-auto { + -webkit-hyphens: auto; + hyphens: auto; +} + +.whitespace-normal { + white-space: normal; +} + +.whitespace-nowrap { + white-space: nowrap; +} + +.whitespace-pre { + white-space: pre; +} + +.whitespace-pre-line { + white-space: pre-line; +} + +.whitespace-pre-wrap { + white-space: pre-wrap; +} + +.whitespace-break-spaces { + white-space: break-spaces; +} + +.text-wrap { + text-wrap: wrap; +} + +.text-nowrap { + text-wrap: nowrap; +} + +.text-balance { + text-wrap: balance; +} + +.text-pretty { + text-wrap: pretty; +} + +.break-normal { + overflow-wrap: normal; + word-break: normal; +} + +.break-words { + overflow-wrap: break-word; +} + +.break-all { + word-break: break-all; +} + +.break-keep { + word-break: keep-all; +} + +.rounded { + border-radius: 0.25rem; +} + +.rounded-lg { + border-radius: 0.5rem; +} + +.rounded-md { + border-radius: 0.375rem; +} + +.rounded-b { + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} + +.rounded-e { + border-start-end-radius: 0.25rem; + border-end-end-radius: 0.25rem; +} + +.rounded-l { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} + +.rounded-r { + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; +} + +.rounded-s { + border-start-start-radius: 0.25rem; + border-end-start-radius: 0.25rem; +} + +.rounded-t { + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; +} + +.rounded-bl { + border-bottom-left-radius: 0.25rem; +} + +.rounded-br { + border-bottom-right-radius: 0.25rem; +} + +.rounded-ee { + border-end-end-radius: 0.25rem; +} + +.rounded-es { + border-end-start-radius: 0.25rem; +} + +.rounded-se { + border-start-end-radius: 0.25rem; +} + +.rounded-ss { + border-start-start-radius: 0.25rem; +} + +.rounded-tl { + border-top-left-radius: 0.25rem; +} + +.rounded-tr { + border-top-right-radius: 0.25rem; +} + +.border { + border-width: 1px; +} + +.border-0 { + border-width: 0px; +} + +.border-x { + border-left-width: 1px; + border-right-width: 1px; +} + +.border-y { + border-top-width: 1px; + border-bottom-width: 1px; +} + +.border-b { + border-bottom-width: 1px; +} + +.border-e { + border-inline-end-width: 1px; +} + +.border-l { + border-left-width: 1px; +} + +.border-r { + border-right-width: 1px; +} + +.border-s { + border-inline-start-width: 1px; +} + +.border-t { + border-top-width: 1px; +} + +.border-solid { + border-style: solid; +} + +.border-dashed { + border-style: dashed; +} + +.border-dotted { + border-style: dotted; +} + +.border-double { + border-style: double; +} + +.border-hidden { + border-style: hidden; +} + +.border-none { + border-style: none; +} + +.border-gray-200 { + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity, 1)); +} + +.border-primary { + --tw-border-opacity: 1; + border-color: rgb(0 77 107 / var(--tw-border-opacity, 1)); +} + +.border-slate-300 { + --tw-border-opacity: 1; + border-color: rgb(203 213 225 / var(--tw-border-opacity, 1)); +} + +.border-transparent { + border-color: transparent; +} + +.bg-\[rgb\(255\2c 0\2c 0\)\] { + --tw-bg-opacity: 1; + background-color: rgb(255 0 0 / var(--tw-bg-opacity, 1)); +} + +.bg-gray-100 { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)); +} + +.bg-gray-300 { + --tw-bg-opacity: 1; + background-color: rgb(209 213 219 / var(--tw-bg-opacity, 1)); +} + +.bg-gray-50 { + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1)); +} + +.bg-green-100 { + --tw-bg-opacity: 1; + background-color: rgb(220 252 231 / var(--tw-bg-opacity, 1)); +} + +.bg-green-200 { + --tw-bg-opacity: 1; + background-color: rgb(187 247 208 / var(--tw-bg-opacity, 1)); +} + +.bg-main-500 { + --tw-bg-opacity: 1; + background-color: rgb(237 240 242 / var(--tw-bg-opacity, 1)); +} + +.bg-primary { + --tw-bg-opacity: 1; + background-color: rgb(0 77 107 / var(--tw-bg-opacity, 1)); +} + +.bg-red-100 { + --tw-bg-opacity: 1; + background-color: rgb(254 226 226 / var(--tw-bg-opacity, 1)); +} + +.bg-red-200 { + --tw-bg-opacity: 1; + background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1)); +} + +.bg-red-400 { + --tw-bg-opacity: 1; + background-color: rgb(248 113 113 / var(--tw-bg-opacity, 1)); +} + +.bg-slate-50 { + --tw-bg-opacity: 1; + background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1)); +} + +.bg-transparent { + background-color: transparent; +} + +.bg-white { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); +} + +.bg-yellow-300 { + --tw-bg-opacity: 1; + background-color: rgb(253 224 71 / var(--tw-bg-opacity, 1)); +} + +.bg-yellow-400 { + --tw-bg-opacity: 1; + background-color: rgb(250 204 21 / var(--tw-bg-opacity, 1)); +} + +.bg-opacity-20 { + --tw-bg-opacity: 0.2; +} + +.bg-opacity-30 { + --tw-bg-opacity: 0.3; +} + +.decoration-slice { + -webkit-box-decoration-break: slice; + box-decoration-break: slice; +} + +.decoration-clone { + -webkit-box-decoration-break: clone; + box-decoration-break: clone; +} + +.box-decoration-slice { + -webkit-box-decoration-break: slice; + box-decoration-break: slice; +} + +.box-decoration-clone { + -webkit-box-decoration-break: clone; + box-decoration-break: clone; +} + +.bg-fixed { + background-attachment: fixed; +} + +.bg-local { + background-attachment: local; +} + +.bg-scroll { + background-attachment: scroll; +} + +.bg-clip-border { + background-clip: border-box; +} + +.bg-clip-padding { + background-clip: padding-box; +} + +.bg-clip-content { + background-clip: content-box; +} + +.bg-clip-text { + -webkit-background-clip: text; + background-clip: text; +} + +.bg-repeat { + background-repeat: repeat; +} + +.bg-no-repeat { + background-repeat: no-repeat; +} + +.bg-repeat-x { + background-repeat: repeat-x; +} + +.bg-repeat-y { + background-repeat: repeat-y; +} + +.bg-repeat-round { + background-repeat: round; +} + +.bg-repeat-space { + background-repeat: space; +} + +.bg-origin-border { + background-origin: border-box; +} + +.bg-origin-padding { + background-origin: padding-box; +} + +.bg-origin-content { + background-origin: content-box; +} + +.object-contain { + -o-object-fit: contain; + object-fit: contain; +} + +.object-cover { + -o-object-fit: cover; + object-fit: cover; +} + +.object-fill { + -o-object-fit: fill; + object-fit: fill; +} + +.object-none { + -o-object-fit: none; + object-fit: none; +} + +.object-scale-down { + -o-object-fit: scale-down; + object-fit: scale-down; +} + +.p-1 { + padding: 0.25rem; +} + +.p-2 { + padding: 0.5rem; +} + +.p-3 { + padding: 0.75rem; +} + +.p-5 { + padding: 1.25rem; +} + +.pl-1 { + padding-left: 0.25rem; +} + +.px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; +} + +.px-1\.5 { + padding-left: 0.375rem; + padding-right: 0.375rem; +} + +.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} + +.px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; +} + +.px-4 { + padding-left: 1rem; + padding-right: 1rem; +} + +.px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; +} + +.py-1 { + padding-top: 0.25rem; + padding-bottom: 0.25rem; +} + +.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.py-2\.5 { + padding-top: 0.625rem; + padding-bottom: 0.625rem; +} + +.py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; +} + +.py-4 { + padding-top: 1rem; + padding-bottom: 1rem; +} + +.py-5 { + padding-top: 1.25rem; + padding-bottom: 1.25rem; +} + +.pl-1 { + padding-left: 0.25rem; +} + +.pl-2 { + padding-left: 0.5rem; +} + +.pt-1 { + padding-top: 0.25rem; +} + +.text-left { + text-align: left; +} + +.text-center { + text-align: center; +} + +.text-right { + text-align: right; +} + +.text-justify { + text-align: justify; +} + +.text-start { + text-align: start; +} + +.text-end { + text-align: end; +} + +.align-baseline { + vertical-align: baseline; +} + +.align-top { + vertical-align: top; +} + +.align-middle { + vertical-align: middle; +} + +.align-bottom { + vertical-align: bottom; +} + +.align-text-top { + vertical-align: text-top; +} + +.align-text-bottom { + vertical-align: text-bottom; +} + +.align-sub { + vertical-align: sub; +} + +.align-super { + vertical-align: super; +} + +.text-lg { + font-size: 1.125rem; + line-height: 1.75rem; +} + +.text-sm { + font-size: 0.875rem; + line-height: 1.25rem; +} + +.text-xl { + font-size: 1.25rem; + line-height: 1.75rem; +} + +.text-xs { + font-size: 0.75rem; + line-height: 1.5rem; +} + +.font-bold { + font-weight: 700; +} + +.font-extrabold { + font-weight: 800; +} + +.font-light { + font-weight: 300; +} + +.font-medium { + font-weight: 500; +} + +.uppercase { + text-transform: uppercase; +} + +.lowercase { + text-transform: lowercase; +} + +.capitalize { + text-transform: capitalize; +} + +.normal-case { + text-transform: none; +} + +.italic { + font-style: italic; +} + +.not-italic { + font-style: normal; +} + +.normal-nums { + font-variant-numeric: normal; +} + +.ordinal { + --tw-ordinal: ordinal; + font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) + var(--tw-numeric-figure) var(--tw-numeric-spacing) + var(--tw-numeric-fraction); +} + +.slashed-zero { + --tw-slashed-zero: slashed-zero; + font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) + var(--tw-numeric-figure) var(--tw-numeric-spacing) + var(--tw-numeric-fraction); +} + +.lining-nums { + --tw-numeric-figure: lining-nums; + font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) + var(--tw-numeric-figure) var(--tw-numeric-spacing) + var(--tw-numeric-fraction); +} + +.oldstyle-nums { + --tw-numeric-figure: oldstyle-nums; + font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) + var(--tw-numeric-figure) var(--tw-numeric-spacing) + var(--tw-numeric-fraction); +} + +.proportional-nums { + --tw-numeric-spacing: proportional-nums; + font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) + var(--tw-numeric-figure) var(--tw-numeric-spacing) + var(--tw-numeric-fraction); +} + +.tabular-nums { + --tw-numeric-spacing: tabular-nums; + font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) + var(--tw-numeric-figure) var(--tw-numeric-spacing) + var(--tw-numeric-fraction); +} + +.diagonal-fractions { + --tw-numeric-fraction: diagonal-fractions; + font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) + var(--tw-numeric-figure) var(--tw-numeric-spacing) + var(--tw-numeric-fraction); +} + +.stacked-fractions { + --tw-numeric-fraction: stacked-fractions; + font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) + var(--tw-numeric-figure) var(--tw-numeric-spacing) + var(--tw-numeric-fraction); +} + +.text-\[\#336699\]\/\[\.35\] { + color: rgb(51 102 153 / 0.35); +} + +.text-black { + --tw-text-opacity: 1; + color: rgb(0 0 0 / var(--tw-text-opacity, 1)); +} + +.text-blue-500 { + --tw-text-opacity: 1; + color: rgb(59 130 246 / var(--tw-text-opacity, 1)); +} + +.text-gray-400 { + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity, 1)); +} + +.text-gray-500 { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity, 1)); +} + +.text-gray-600 { + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity, 1)); +} + +.text-green-500 { + --tw-text-opacity: 1; + color: rgb(0 167 150 / var(--tw-text-opacity, 1)); +} + +.text-green-600 { + --tw-text-opacity: 1; + color: rgb(22 163 74 / var(--tw-text-opacity, 1)); +} + +.text-primary { + --tw-text-opacity: 1; + color: rgb(0 77 107 / var(--tw-text-opacity, 1)); +} + +.text-red-600 { + --tw-text-opacity: 1; + color: rgb(220 38 38 / var(--tw-text-opacity, 1)); +} + +.text-slate-500 { + --tw-text-opacity: 1; + color: rgb(100 116 139 / var(--tw-text-opacity, 1)); +} + +.text-slate-600 { + --tw-text-opacity: 1; + color: rgb(71 85 105 / var(--tw-text-opacity, 1)); +} + +.text-slate-700 { + --tw-text-opacity: 1; + color: rgb(51 65 85 / var(--tw-text-opacity, 1)); +} + +.text-slate-900 { + --tw-text-opacity: 1; + color: rgb(15 23 42 / var(--tw-text-opacity, 1)); +} + +.text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); +} + +.text-yellow-800 { + --tw-text-opacity: 1; + color: rgb(133 77 14 / var(--tw-text-opacity, 1)); +} + +.underline { + text-decoration-line: underline; +} + +.overline { + text-decoration-line: overline; +} + +.line-through { + text-decoration-line: line-through; +} + +.no-underline { + text-decoration-line: none; +} + +.decoration-solid { + text-decoration-style: solid; +} + +.decoration-double { + text-decoration-style: double; +} + +.decoration-dotted { + text-decoration-style: dotted; +} + +.decoration-dashed { + text-decoration-style: dashed; +} + +.decoration-wavy { + text-decoration-style: wavy; +} + +.antialiased { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.subpixel-antialiased { + -webkit-font-smoothing: auto; + -moz-osx-font-smoothing: auto; +} + +.bg-blend-normal { + background-blend-mode: normal; +} + +.bg-blend-multiply { + background-blend-mode: multiply; +} + +.bg-blend-screen { + background-blend-mode: screen; +} + +.bg-blend-overlay { + background-blend-mode: overlay; +} + +.bg-blend-darken { + background-blend-mode: darken; +} + +.bg-blend-lighten { + background-blend-mode: lighten; +} + +.bg-blend-color-dodge { + background-blend-mode: color-dodge; +} + +.bg-blend-color-burn { + background-blend-mode: color-burn; +} + +.bg-blend-hard-light { + background-blend-mode: hard-light; +} + +.bg-blend-soft-light { + background-blend-mode: soft-light; +} + +.bg-blend-difference { + background-blend-mode: difference; +} + +.bg-blend-exclusion { + background-blend-mode: exclusion; +} + +.bg-blend-hue { + background-blend-mode: hue; +} + +.bg-blend-saturation { + background-blend-mode: saturation; +} + +.bg-blend-color { + background-blend-mode: color; +} + +.bg-blend-luminosity { + background-blend-mode: luminosity; +} + +.mix-blend-normal { + mix-blend-mode: normal; +} + +.mix-blend-multiply { + mix-blend-mode: multiply; +} + +.mix-blend-screen { + mix-blend-mode: screen; +} + +.mix-blend-overlay { + mix-blend-mode: overlay; +} + +.mix-blend-darken { + mix-blend-mode: darken; +} + +.mix-blend-lighten { + mix-blend-mode: lighten; +} + +.mix-blend-color-dodge { + mix-blend-mode: color-dodge; +} + +.mix-blend-color-burn { + mix-blend-mode: color-burn; +} + +.mix-blend-hard-light { + mix-blend-mode: hard-light; +} + +.mix-blend-soft-light { + mix-blend-mode: soft-light; +} + +.mix-blend-difference { + mix-blend-mode: difference; +} + +.mix-blend-exclusion { + mix-blend-mode: exclusion; +} + +.mix-blend-hue { + mix-blend-mode: hue; +} + +.mix-blend-saturation { + mix-blend-mode: saturation; +} + +.mix-blend-color { + mix-blend-mode: color; +} + +.mix-blend-luminosity { + mix-blend-mode: luminosity; +} + +.mix-blend-plus-darker { + mix-blend-mode: plus-darker; +} + +.mix-blend-plus-lighter { + mix-blend-mode: plus-lighter; +} + +.\!shadow { + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1) !important; + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), + 0 1px 2px -1px var(--tw-shadow-color) !important; + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), + var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important; +} + +.shadow { + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), + 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), + var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.outline-none { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.outline { + outline-style: solid; +} + +.outline-dashed { + outline-style: dashed; +} + +.outline-dotted { + outline-style: dotted; +} + +.outline-double { + outline-style: double; +} + +.ring { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 + var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 + calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), + var(--tw-shadow, 0 0 #0000); +} + +.ring-inset { + --tw-ring-inset: inset; +} + +.blur { + --tw-blur: blur(8px); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) + var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) + var(--tw-sepia) var(--tw-drop-shadow); +} + +.drop-shadow { + --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) + drop-shadow(0 1px 1px rgb(0 0 0 / 0.06)); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) + var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) + var(--tw-sepia) var(--tw-drop-shadow); +} + +.grayscale { + --tw-grayscale: grayscale(100%); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) + var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) + var(--tw-sepia) var(--tw-drop-shadow); +} + +.invert { + --tw-invert: invert(100%); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) + var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) + var(--tw-sepia) var(--tw-drop-shadow); +} + +.sepia { + --tw-sepia: sepia(100%); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) + var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) + var(--tw-sepia) var(--tw-drop-shadow); +} + +.\!filter { + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) + var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) + var(--tw-sepia) var(--tw-drop-shadow) !important; +} + +.filter { + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) + var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) + var(--tw-sepia) var(--tw-drop-shadow); +} + +.filter-none { + filter: none; +} + +.backdrop-blur { + --tw-backdrop-blur: blur(8px); + -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) + var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) + var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) + var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) + var(--tw-backdrop-sepia); + backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) + var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) + var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) + var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) + var(--tw-backdrop-sepia); +} + +.backdrop-grayscale { + --tw-backdrop-grayscale: grayscale(100%); + -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) + var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) + var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) + var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) + var(--tw-backdrop-sepia); + backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) + var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) + var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) + var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) + var(--tw-backdrop-sepia); +} + +.backdrop-invert { + --tw-backdrop-invert: invert(100%); + -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) + var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) + var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) + var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) + var(--tw-backdrop-sepia); + backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) + var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) + var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) + var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) + var(--tw-backdrop-sepia); +} + +.backdrop-sepia { + --tw-backdrop-sepia: sepia(100%); + -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) + var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) + var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) + var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) + var(--tw-backdrop-sepia); + backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) + var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) + var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) + var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) + var(--tw-backdrop-sepia); +} + +.backdrop-filter { + -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) + var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) + var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) + var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) + var(--tw-backdrop-sepia); + backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) + var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) + var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) + var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) + var(--tw-backdrop-sepia); +} + +.backdrop-filter-none { + -webkit-backdrop-filter: none; + backdrop-filter: none; +} + +.transition { + transition-property: color, background-color, border-color, + text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, + -webkit-backdrop-filter; + transition-property: color, background-color, border-color, + text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, + backdrop-filter; + transition-property: color, background-color, border-color, + text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, + backdrop-filter, -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.transition-all { + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.ease-in { + transition-timing-function: cubic-bezier(0.4, 0, 1, 1); +} + +.ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); +} + +.ease-out { + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); +} + +.contain-none { + contain: none; +} + +.contain-content { + contain: content; +} + +.contain-strict { + contain: strict; +} + +.contain-size { + --tw-contain-size: size; + contain: var(--tw-contain-size) var(--tw-contain-layout) + var(--tw-contain-paint) var(--tw-contain-style); +} + +.contain-inline-size { + --tw-contain-size: inline-size; + contain: var(--tw-contain-size) var(--tw-contain-layout) + var(--tw-contain-paint) var(--tw-contain-style); +} + +.contain-layout { + --tw-contain-layout: layout; + contain: var(--tw-contain-size) var(--tw-contain-layout) + var(--tw-contain-paint) var(--tw-contain-style); +} + +.contain-paint { + --tw-contain-paint: paint; + contain: var(--tw-contain-size) var(--tw-contain-layout) + var(--tw-contain-paint) var(--tw-contain-style); +} + +.contain-style { + --tw-contain-style: style; + contain: var(--tw-contain-size) var(--tw-contain-layout) + var(--tw-contain-paint) var(--tw-contain-style); +} + +.content-\[\'this-is-also-valid\]-weirdly-enough\'\] { + --tw-content: "this-is-also-valid]-weirdly-enough"; + content: var(--tw-content); +} + +.forced-color-adjust-auto { + forced-color-adjust: auto; +} + +.forced-color-adjust-none { + forced-color-adjust: none; +} + +@font-face { + font-family: iranSans; + font-style: normal; + font-weight: 100; + src: url("../fonts/woff/IRANSansX-Regular.woff") format("woff"); +} + +* { + font-family: iranSans; +} + +html { + height: 100%; +} + +.main .bg-main { + background-image: url(../images/top-BG.svg); + background-position: top; + background-repeat: no-repeat; + background-size: contain; +} + +@media (min-width: 1024px) { + .main .bg-main { + background-image: url(../images/Patt.svg); + background-position: left; + } +} + +.hide-arrow[type="number"]::-webkit-inner-spin-button, +.hide-arrow[type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; +} + +input:-webkit-autofill, +input:-webkit-autofill:hover, +input:-webkit-autofill:focus, +input:-webkit-autofill:active { + -webkit-box-shadow: 0 0 0 30px rgb(248 250 252 / var(--tw-bg-opacity, 1)) + inset !important; +} + +.main { + display: flex; + height: 100%; + align-items: center; + justify-content: center; +} + +.container { + display: flex; + flex-direction: column; + gap: 2rem; + border-radius: 0.5rem; + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); + padding: 2rem; + text-align: center; + --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), + 0 2px 4px -2px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), + var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.main .container { + background-image: url(../images/top-BG.svg); + background-position: top; + background-repeat: no-repeat; + background-size: contain; +} + +@media (min-width: 1024px) { + .main .container { + background-image: url(../images/Patt.svg); + background-position: left; + } +} + +@media (min-width: 500px) { + .container { + max-width: 400px; + } +} + +@media (min-width: 768px) { + .container { + max-width: 400px; + overflow: hidden; + } +} + +@media (min-width: 1024px) { + .container { + min-height: 600px; + max-width: 960px; + flex-direction: row; + } +} + +.right-side { + display: flex; + width: 100%; + flex-direction: column; + gap: 1.25rem; +} + +@media (min-width: 1024px) { + .right-side { + max-width: 320px; + flex: 1 1 0%; + } +} + +.left-side { + display: flex; + height: 100%; + width: 100%; + flex: 1 1 0%; + flex-direction: column; + align-items: center; + justify-content: flex-end; + align-self: flex-end; + overflow: hidden; +} + +.form { + display: flex; + width: 100%; + flex-direction: column; +} + +.form > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(1.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(1.25rem * var(--tw-space-y-reverse)); +} + +.form { + text-align: start; + font-size: 0.75rem; + line-height: 1rem; +} + +.form-result { + display: flex; + width: 100%; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 1.25rem; +} + +@media (min-width: 1024px) { + .form-result { + max-width: 320px; + flex: 1 1 0%; + } +} + +.header-form { + display: flex; + width: 100%; + flex-direction: column; + align-items: center; + justify-content: center; + border-bottom-width: 1px; + padding-top: 1.25rem; + padding-bottom: 1.25rem; + font-size: 1.25rem; + line-height: 1.75rem; + font-weight: 800; + --tw-text-opacity: 1; +} + +.input-form { + display: block; + width: 100%; + border-radius: 0.375rem; + --tw-border-opacity: 1; + border-color: rgb(203 213 225 / var(--tw-border-opacity, 1)); + --tw-bg-opacity: 1; + background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1)); + padding: 0.625rem; + --tw-text-opacity: 1; + color: rgb(15 23 42 / var(--tw-text-opacity, 1)); +} + +.input-form:focus { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.input-form-otp { + display: block; + width: 100%; + border-radius: 0.375rem; + --tw-border-opacity: 1; + border-color: rgb(203 213 225 / var(--tw-border-opacity, 1)); + --tw-bg-opacity: 1; + background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1)); + padding: 0.625rem; + text-align: center; + font-size: 0.875rem; + line-height: 1.25rem; + letter-spacing: 10px; + --tw-text-opacity: 1; + color: rgb(15 23 42 / var(--tw-text-opacity, 1)); +} + +.input-form-otp:focus { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.btn-primary { + display: flex; + align-items: center; + justify-content: center; + border-color: rgb(0 77 107 / var(--tw-border-opacity, 1)); + background-color: rgb(0 77 107 / var(--tw-border-opacity, 1)); + border-radius: 0.375rem; + border-width: 1px; + padding-left: 1.25rem; + padding-right: 1.25rem; + padding-top: 0.625rem; + padding-bottom: 0.625rem; + font-size: 0.875rem; + line-height: 1.25rem; + font-weight: 500; + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.btn-primary:hover { + --tw-bg-opacity: 1; + background-color: rgb(0 55 77 / var(--tw-bg-opacity, 1)); + --tw-text-opacity: 1; +} + +@media (min-width: 1024px) { + .btn-primary { + --tw-border-opacity: 1; + border-color: rgb(0 77 107 / var(--tw-border-opacity, 1)); + padding-left: 1.25rem; + padding-right: 1.25rem; + padding-top: 0.625rem; + padding-bottom: 0.625rem; + } +} + +@media (min-width: 1024px) { + .text-xs { + font-size: 0.75rem !important; + } +} + +.btn-primary-profile { + border-color: #e5e7eb !important; + padding: 0.25rem !important; + --tw-text-opacity: 1; + color: rgb(0 77 107 / var(--tw-border-opacity, 1)) !important; + background-color: rgb(255 255 255 / var(--tw-text-opacity, 1)) !important; +} + +.btn-primary-profile:hover { + color: rgb(255 255 255 / var(--tw-text-opacity, 1)) !important; + background-color: rgb(0 77 107 / var(--tw-border-opacity, 1)) !important; +} + +@media (min-width: 1024px) { + .btn-primary-profile { + --tw-border-opacity: 1; + border-color: rgb(0 77 107 / var(--tw-border-opacity, 1)) !important; + padding-left: 0.75rem !important; + padding-right: 0.75rem !important; + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } +} + +.btn-red { + border-radius: 0.375rem; + border-width: 1px; + padding: 0.25rem; + font-size: 0.875rem; + line-height: 1.25rem; + --tw-bg-opacity: 1; + font-weight: 500; + --tw-text-opacity: 1; + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.btn-red:hover { + --tw-bg-opacity: 0.87; + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); +} + +.btn-red-profile { + --tw-text-opacity: 1; + color: rgb(239 68 68 / var(--tw-bg-opacity, 1)) !important; + background-color: rgb(255 255 255 / var(--tw-text-opacity, 1)) !important; +} + +.btn-red-profile:hover { + color: rgb(255 255 255 / var(--tw-text-opacity, 1)) !important; + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)) !important; +} + +@media (min-width: 1024px) { + .btn-red { + --tw-border-opacity: 1; + border-color: rgb(239 68 68 / var(--tw-border-opacity, 1)); + padding-left: 0.75rem; + padding-right: 0.75rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + } +} + +.btn-outline { + display: flex; + width: 100%; + align-items: center; + justify-content: center; + border-radius: 0.375rem; + border-width: 1px; + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity, 1)); + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); + padding-left: 1.25rem; + padding-right: 1.25rem; + padding-top: 0.625rem; + padding-bottom: 0.625rem; + font-size: 0.875rem; + line-height: 1.25rem; + font-weight: 500; + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity, 1)); +} + +.btn-outline:hover { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)); +} + +.btn-outline:focus { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.container-input { + display: flex; + width: 100%; + gap: 4px; + align-items: center; + justify-content: center; + border-radius: 0.375rem; + border-width: 1px; + --tw-border-opacity: 1; + border-color: rgb(203 213 225 / var(--tw-border-opacity, 1)); + --tw-bg-opacity: 1; + background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1)); + --tw-text-opacity: 1; + color: rgb(15 23 42 / var(--tw-text-opacity, 1)); +} + +.container-input:hover { + --tw-border-opacity: 1; + border-color: rgb(31 41 55 / var(--tw-border-opacity, 1)); +} + +.input-validation-error { + border: 1px solid; + --tw-border-opacity: 1; + border-color: rgb(239 68 68 / var(--tw-border-opacity, 1)); +} + +.dntCaptcha { + position: relative; + display: flex; + margin-bottom: 15px; + width: 100%; + height: 38px; + border-radius: 0.375rem; + border-width: 1px; + --tw-border-opacity: 1; + border-color: rgb(203 213 225 / var(--tw-border-opacity, 1)); + --tw-bg-opacity: 1; + background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1)); + --tw-text-opacity: 1; + align-items: center; + color: rgb(15 23 42 / var(--tw-text-opacity, 1)); + justify-content: space-between; + padding: 0px 0px 0px 4px; +} + +.btn-refresh { + order: 3; + padding: 12px !important; + width: 20px; + height: 20px; + background-image: url("../images/refresh-icon.svg"); + background-repeat: no-repeat; + background-position: center; + cursor: pointer; + border-radius: 0.25rem; + padding: 0.25rem; + --tw-text-opacity: 1; + color: rgb(100 116 139 / var(--tw-text-opacity, 1)); + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; + fill: rgba(0, 77, 107, 0.1); +} + +.btn-refresh:hover { + background-color: rgba(0, 77, 107, 0.1); + color: rgb(0 0 0 / var(--tw-text-opacity, 1)); +} + +#dntCaptchaImg { + height: 100%; + order: 2; + margin: 0 0 0 5px !important; +} + +.rtl { + direction: rtl; +} + +.justify-between { + justify-content: space-between !important; +} + +.profile { + display: flex; + height: 100%; + width: 100%; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 0.5rem; + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)); + padding: 0.5rem; +} + +@media (min-width: 1024px) { + .profile { + padding: 0 0 20px 0; + } +} + +.profile-list { + width: 100%; + border-radius: 0.375rem; + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), + 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), + var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +@media (min-width: 500px) { + .profile-list { + max-width: 700px; + } +} + +@media (min-width: 768px) { + .profile-list { + max-width: 700px; + overflow: hidden; + } +} + +@media (min-width: 1024px) { + .profile-list { + max-width: 960px; + } +} + +.profile-title { + display: flex; + border-top-left-radius: 0.375rem; + border-top-right-radius: 0.375rem; + border-bottom-width: 1px; + --tw-border-opacity: 1; + border-color: rgb(243 244 246 / var(--tw-border-opacity, 1)); + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1)); + padding-left: 0.75rem; + padding-right: 0.75rem; + padding-top: 1rem; + padding-bottom: 1rem; + justify-content: space-between; +} + +.profile-item { + display: flex; + min-height: 70px; + align-items: center; + gap: 0.75rem; + padding: 0.75rem; + font-size: 0.875rem; + line-height: 1.25rem; + justify-content: space-between; +} + +.password-list div { + margin: 0 0 0 -10px; +} + +div::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 6px #f5f5f5; + border-radius: 10px; + background-color: #f5f5f5; +} + +div::-webkit-scrollbar { + width: 5px; +} + +div::-webkit-scrollbar-thumb { + border-radius: 10px; + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); +} + +@media (min-width: 640px) { + .sm\:container { + width: 100%; + } + + @media (min-width: 640px) { + .sm\:container { + max-width: 640px; + } + } + + @media (min-width: 768px) { + .sm\:container { + max-width: 768px; + } + } + + @media (min-width: 1024px) { + .sm\:container { + max-width: 1024px; + } + } + + @media (min-width: 1280px) { + .sm\:container { + max-width: 1280px; + } + } + + @media (min-width: 1536px) { + .sm\:container { + max-width: 1536px; + } + } +} + +.hover\:border-gray-800:hover { + --tw-border-opacity: 1; + border-color: rgb(31 41 55 / var(--tw-border-opacity, 1)); +} + +.hover\:bg-gray-100:hover { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)); +} + +.hover\:bg-primary:hover { + --tw-bg-opacity: 1; + background-color: rgb(0 77 107 / var(--tw-bg-opacity, 1)); +} + +.hover\:bg-primary-600:hover { + --tw-bg-opacity: 1; + background-color: rgb(0 55 77 / var(--tw-bg-opacity, 1)); +} + +.hover\:bg-opacity-10:hover { + --tw-bg-opacity: 0.1; +} + +.hover\:font-bold:hover { + font-weight: 700; +} + +.hover\:text-black:hover { + --tw-text-opacity: 1; + color: rgb(0 0 0 / var(--tw-text-opacity, 1)); +} + +.hover\:text-gray-700:hover { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity, 1)); +} + +.hover\:text-primary:hover { + --tw-text-opacity: 1; + color: rgb(0 77 107 / var(--tw-text-opacity, 1)); +} + +.hover\:underline:hover { + text-decoration-line: underline; +} + +.before\:hover\:text-center:hover::before { + content: var(--tw-content); + text-align: center; +} + +.hover\:before\:text-center:hover::before { + content: var(--tw-content); + text-align: center; +} + +.focus\:border-blue-500:focus { + --tw-border-opacity: 1; + border-color: rgb(59 130 246 / var(--tw-border-opacity, 1)); +} + +.focus\:border-gray-800:focus { + --tw-border-opacity: 1; + border-color: rgb(31 41 55 / var(--tw-border-opacity, 1)); +} + +.focus\:outline-none:focus { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.focus\:ring-0:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 + var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 + calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), + var(--tw-shadow, 0 0 #0000); +} + +.focus\:ring-4:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 + var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 + calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), + var(--tw-shadow, 0 0 #0000); +} + +.focus\:ring-blue-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1)); +} + +.focus\:hover\:text-center:hover:focus { + text-align: center; +} + +.hover\:focus\:text-center:focus:hover { + text-align: center; +} + +.field-validation-error { + display: block; +} + +.group.otp-error .group-\[\.otp-error\]\:flex { + display: flex; +} + +.group.otp-resend .group-\[\.otp-resend\]\:flex { + display: flex; +} + +.group.register-invalid .group-\[\.register-invalid\]\:flex { + display: flex; +} + +.container-input .input-validation-error { + border: solid 1px !important; + --tw-border-opacity: 1 !important; + border-color: rgb(239 68 68 / var(--tw-border-opacity, 1)) !important; +} + +.field-validation-error { + bottom: -18px; + right: 0; + --tw-text-opacity: 1; + color: rgb(239 68 68 / var(--tw-text-opacity, 1)); +} + +@media not all and (min-width: 1024px) { + .max-lg\:w-full { + width: 100%; + } +} + +@media (max-width: 500px) { + .max-\[500px\]\:w-full { + width: 100%; + } +} + +@media (min-width: 500px) { + .min-\[500px\]\:block { + display: block; + } + + .min-\[500px\]\:min-w-\[400px\] { + min-width: 400px; + } + + .min-\[500px\]\:p-5 { + padding: 1.25rem; + } + + .min-\[500px\]\:py-6 { + padding-top: 1.5rem; + padding-bottom: 1.5rem; + } +} + +@media (min-width: 640px) { + .sm\:underline { + text-decoration-line: underline; + } +} + +@media (min-width: 768px) { + .md\:order-1 { + order: 1; + } + + .md\:me-0 { + margin-inline-end: 0px; + } + + .md\:flex { + display: flex; + } + + .md\:h-screen { + height: 100vh; + } + + .md\:w-auto { + width: auto; + } + + .md\:flex-row { + flex-direction: row; + } + + .md\:space-x-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0px * var(--tw-space-x-reverse)); + margin-left: calc(0px * calc(1 - var(--tw-space-x-reverse))); + } + + .md\:p-5 { + padding: 1.25rem; + } +} + +@media (min-width: 1024px) { + .lg\:mt-10 { + margin-top: 2.5rem; + } + + .lg\:block { + display: block; + } + + .lg\:flex { + display: flex; + } + + .lg\:hidden { + display: none; + } + + .lg\:h-screen { + height: 100vh; + } + + .lg\:max-h-\[700px\] { + max-height: 700px; + } + + .lg\:min-w-\[95px\] { + min-width: 95px; + } + + .lg\:max-w-\[320px\] { + max-width: 320px; + } + + .lg\:max-w-\[960px\] { + max-width: 960px; + } + + .lg\:flex-1 { + flex: 1 1 0%; + } + + .lg\:flex-none { + flex: none; + } + + .lg\:flex-row { + flex-direction: row; + } + + .lg\:gap-6 { + gap: 1.5rem; + } + + .lg\:overflow-hidden { + overflow: hidden; + } + + .lg\:border-b-0 { + border-bottom-width: 0px; + } + + .lg\:py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + } + + .lg\:px-0 { + padding-left: 0px; + padding-right: 0px; + } + + .lg\:transition-all { + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; + } +} + +.rtl\:space-x-reverse:where([dir="rtl"], [dir="rtl"] *) + > :not([hidden]) + ~ :not([hidden]) { + --tw-space-x-reverse: 1; +} + +.dark\:bg-gray-900:where(.dark, .dark *) { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1)); +} + +.dark\:text-white:where(.dark, .dark *) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); +} + +.dark\:placeholder-slate-400:where(.dark, .dark *)::-moz-placeholder { + --tw-placeholder-opacity: 1; + color: rgb(148 163 184 / var(--tw-placeholder-opacity, 1)); +} + +.dark\:placeholder-slate-400:where(.dark, .dark *)::placeholder { + --tw-placeholder-opacity: 1; + color: rgb(148 163 184 / var(--tw-placeholder-opacity, 1)); +} + +.dark\:focus\:border-blue-500:focus:where(.dark, .dark *) { + --tw-border-opacity: 1; + border-color: rgb(59 130 246 / var(--tw-border-opacity, 1)); +} + +.dark\:focus\:ring-blue-500:focus:where(.dark, .dark *) { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1)); +} + +@media (min-width: 1024px) { + .dark\:lg\:hover\:\[paint-order\:markers\]:hover:where(.dark, .dark *) { + paint-order: markers; + } +} + +.peer:checked ~ .peer-checked\:bg-primary { + --tw-bg-opacity: 1; + background-color: rgb(0 77 107 / var(--tw-bg-opacity, 1)); +} + +.peer:checked ~ .peer-checked\:after\:translate-x-full::after { + content: var(--tw-content); + --tw-translate-x: 100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) + rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) + scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.peer:checked ~ .peer-checked\:after\:border-white::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-color: rgb(255 255 255 / var(--tw-border-opacity, 1)); +} + +.peer:focus ~ .peer-focus\:outline-none { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.peer:focus ~ .peer-focus\:ring-4 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 + var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 + calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), + var(--tw-shadow, 0 0 #0000); +} + +.peer:focus ~ .peer-focus\:ring-blue-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(147 197 253 / var(--tw-ring-opacity, 1)); +} + +.peer:checked + ~ .rtl\:peer-checked\:after\:-translate-x-full:where( + [dir="rtl"], + [dir="rtl"] * + )::after { + content: var(--tw-content); + --tw-translate-x: -100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) + rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) + scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + +.not-sr-only { + position: static; + width: auto; + height: auto; + padding: 0; + margin: 0; + overflow: visible; + clip: auto; + white-space: normal; +} + +.w-11 { + width: 2.75rem; +} + +.h-6 { + height: 1.5rem; +} + +.bg-gray-200 { + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1)); +} + +.rounded-full { + border-radius: 9999px; +} + +.after\:rounded-full::after { + content: var(--tw-content); + border-radius: 9999px; +} + +.after\:h-5::after { + content: var(--tw-content); + height: 1.25rem; +} + +.after\:w-5::after { + content: var(--tw-content); + width: 1.25rem; +} + +.after\:border::after { + content: var(--tw-content); + border-width: 1px; +} + +.after\:bg-white::after { + content: var(--tw-content); + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); +} + +.after\:start-\[2px\]::after { + content: var(--tw-content); + inset-inline-start: 2px; +} + +.after\:top-\[2px\]::after { + content: var(--tw-content); + top: 2px; +} + +.after\:absolute::after { + content: var(--tw-content); + position: absolute; +} + +.after\:content-\[\'\'\]::after { + --tw-content: ""; + content: var(--tw-content); +} + +.after\:transition-all::after { + content: var(--tw-content); + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.leading-5 { + line-height: 1.25rem; +} + +.leading-6 { + line-height: 1.5rem; +} + +.bg-blue-400 { + background-color: rgb(96 165 250 / var(--tw-bg-opacity, 1)); +} + +.text-blue-900 { + --tw-text-opacity: 1; + color: rgb(30 58 138 / var(--tw-text-opacity, 1)); +} + +.pr-5 { + padding: 0 32px 0 0; +} + +.checkbox { + position: relative; + height: 1.5rem; + width: 2.75rem; + border-radius: 9999px; + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1)); +} + +.checkbox::after { + position: absolute; + top: 2px; + inset-inline-start: 2px; + height: 1.25rem; + width: 1.25rem; + border-radius: 9999px; + border-width: 1px; + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity, 1)); + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); + content: var(--tw-content); + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.peer:focus ~ .checkbox { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 + var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 + calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), + var(--tw-shadow, 0 0 #0000); + --tw-ring-opacity: 1; + --tw-ring-color: rgb(147 197 253 / var(--tw-ring-opacity, 1)); +} + +.checkbox-active { + --tw-bg-opacity: 1; + background-color: rgb(0 77 107 / var(--tw-bg-opacity, 1)); +} + +.checkbox-active::after { + --tw-translate-x: 100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) + rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) + scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + --tw-border-opacity: 1; + border-color: rgb(255 255 255 / var(--tw-border-opacity, 1)); + --tw-content: ""; + content: var(--tw-content); +} + +.checkbox-active:where([dir="rtl"], [dir="rtl"] *)::after { + content: var(--tw-content); + --tw-translate-x: -100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) + rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) + scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.checkbox-disable { + position: relative; + height: 1.5rem; + width: 2.75rem; + border-radius: 9999px; + background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)); + --tw-bg-opacity: 0.6; +} + +.checkbox-disable::after { + position: absolute; + top: 2px; + inset-inline-start: 2px; + height: 1.25rem; + width: 1.25rem; + border-radius: 9999px; + border-width: 1px; + --tw-border-opacity: 1; + border-color: rgb(243 244 246 / var(--tw-border-opacity, 1)); + content: var(--tw-content); + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); +} + +.mx-1 { + margin-left: 0.25rem; + margin-right: 0.25rem; +} + +.text-red-500 { + --tw-text-opacity: 1; + color: rgb(239 68 68 / var(--tw-text-opacity, 1)); +} diff --git a/Presentation/HushianWebApp/wwwroot/Before/favicon.ico b/Presentation/HushianWebApp/wwwroot/Before/favicon.ico new file mode 100644 index 0000000..0e7e666 Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/Before/favicon.ico differ diff --git a/Presentation/HushianWebApp/wwwroot/Before/js/site3c3c.js b/Presentation/HushianWebApp/wwwroot/Before/js/site3c3c.js new file mode 100644 index 0000000..b9fed12 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/js/site3c3c.js @@ -0,0 +1,30 @@ +function showPassword(e, elementId) { + let inputElem = document.getElementById(elementId); + if (inputElem.type === "password") { + inputElem.type = "text"; + if (e.target.classList.contains('mdi')) { + e.target.classList.add('mdi-eye-off'); + e.target.classList.remove('mdi-eye'); + } + else { + let child = e.target.children[0]; + if (child) { + child.classList.add('mdi-eye-off'); + child.classList.remove('mdi-eye'); + } + } + } else { + inputElem.type = "password"; + if (e.target.classList.contains('mdi')) { + e.target.classList.add('mdi-eye'); + e.target.classList.remove('mdi-eye-off'); + } + else { + let child = e.target.children[0]; + if (child) { + child.classList.add('mdi-eye'); + child.classList.remove('mdi-eye-off'); + } + } + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/wwwroot/Before/js/vk.js b/Presentation/HushianWebApp/wwwroot/Before/js/vk.js new file mode 100644 index 0000000..e150305 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/js/vk.js @@ -0,0 +1,174 @@ +let Keyboard = window.SimpleKeyboard.default; +let keyboard; +let currentInputClass; + +function setOptions() { + keyboard.setOptions({ + layout: { + default: [ + "q w e r t y u i o p", + "a s d f g h j k l {backspace}", + "{shift} z x c v b n m", + "{numbers} {space} {spchars}" + ], + shift: [ + "Q W E R T Y U I O P", + "A S D F G H J K L {backspace}", + "{shift} Z X C V B N M", + "{numbers} {space} {spchars}" + ], + numbers: ["1 2 3", "4 5 6", "7 8 9", "{abc} 0 {backspace}"], + spchars: [ + '! @ # $ % ^ & * ( ) _ +', + '~ - = ` \' " [ ] { }', + '< > ? | \\ / : ; , .', + '{numbers} {space} {abc}' + ] + }, + display: { + "{numbers}": "123", + "{escape}": "esc ⎋", + "{tab}": "tab ⇥", + "{backspace}": "⌫", + "{capslock}": "caps lock ⇪", + "{shift}": "⇧", + "{controlleft}": "ctrl ⌃", + "{controlright}": "ctrl ⌃", + "{altleft}": "alt ⌥", + "{altright}": "alt ⌥", + "{metaleft}": "cmd ⌘", + "{metaright}": "cmd ⌘", + "{abc}": "abc", + "{space}": "␣", + "{ent}": "↵", + "{spchars}": "#@$" + } + }); +} + +let selectedElem; + +function onChange(input) { + selectedElem.value = input; +} + +function onKeyPress(button) { + if (button === '{clear}') { + keyboard.setInput(''); + selectedElem.value = ''; + return; + } + let currentLayout = keyboard.options.layoutName; + if (currentLayout === 'numeric') { + return; + } + if (button === "{shift}") { + handleShift(); + } + if (button === "{numbers}") { + handleNumbers(); + } + if (button === "{abc}") { + handleAbc(); + } + if (button === "{spchars}") { + handleSpecialChars(); + } +} + +function handleShift() { + let currentLayout = keyboard.options.layoutName; + let shiftToggle = currentLayout === "default" ? "shift" : "default"; + + keyboard.setOptions({ + layoutName: shiftToggle + }); +} + +function handleNumbers() { + let currentLayout = keyboard.options.layoutName; + let numbersToggle = currentLayout !== "numbers" ? "numbers" : "default"; + + keyboard.setOptions({ + layoutName: numbersToggle + }); +} + +function handleAbc() { + keyboard.setOptions({ + layoutName: "default" + }); +} + +function handleSpecialChars() { + let currentLayout = keyboard.options.layoutName; + let spCharsToggle = currentLayout !== "spchars" ? "spchars" : "default"; + + keyboard.setOptions({ + layoutName: spCharsToggle + }); +} + +function toggleKeyboard(e, inputElemClassName, maxLength) { + + for (let item of document.getElementsByClassName('vr-keyboard-section')) { + item.innerHTML = ''; + } + document.getElementById(inputElemClassName + "_con").innerHTML = '
'; + + if (selectedElem) { + selectedElem.removeEventListener('input', () => { }); + } + if (currentInputClass === inputElemClassName) { + currentInputClass = ''; + } + else { + currentInputClass = inputElemClassName; + + keyboard = new Keyboard({ + onChange: input => onChange(input), + onKeyPress: button => onKeyPress(button) + }); + setOptions(); + keyboard.setOptions({ + maxLength: maxLength + }); + + selectedElem = document.querySelector(`.${inputElemClassName}`); + keyboard.setInput(selectedElem.value); + selectedElem.addEventListener("input", event => { + keyboard.setInput(event.target.value); + }); + } + + let keyboardConElem = document.querySelector('.simple-keyboard-con'); + if (e.target.classList.contains('mdi')) { + if (e.target.classList.contains('mdi-keyboard')) { + document.querySelectorAll('.mdi-keyboard-off').forEach(e => { + e.classList.remove('mdi-keyboard-off'); + e.classList.add('mdi-keyboard'); + }); + keyboardConElem.style.display = 'block'; + e.target.classList.add('mdi-keyboard-off'); + e.target.classList.remove('mdi-keyboard'); + } + else { + keyboardConElem.style.display = 'none'; + e.target.classList.add('mdi-keyboard'); + e.target.classList.remove('mdi-keyboard-off'); + } + } + else { + let child = e.target.children[0]; + if (child) { + if (child.classList.contains('mdi-keyboard')) { + child.classList.add('mdi-keyboard-off'); + child.classList.remove('mdi-keyboard'); + } + else { + child.classList.add('mdi-keyboard'); + child.classList.remove('mdi-keyboard-off'); + } + } + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/wwwroot/Before/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js b/Presentation/HushianWebApp/wwwroot/Before/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js new file mode 100644 index 0000000..d8d803c --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js @@ -0,0 +1,8 @@ +/** + * @license + * Unobtrusive validation support library for jQuery and jQuery Validate + * Copyright (c) .NET Foundation. All rights reserved. + * Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + * @version v4.0.0 + */ +!function(a){"function"==typeof define&&define.amd?define("jquery.validate.unobtrusive",["jquery-validation"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery-validation")):jQuery.validator.unobtrusive=a(jQuery)}(function(s){var a,o=s.validator,d="unobtrusiveValidation";function l(a,e,n){a.rules[e]=n,a.message&&(a.messages[e]=a.message)}function u(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function n(a){return a.substr(0,a.lastIndexOf(".")+1)}function m(a,e){return a=0===a.indexOf("*.")?a.replace("*.",e):a}function f(a){var e=s(this),n="__jquery_unobtrusive_validation_form_reset";if(!e.data(n)){e.data(n,!0);try{e.data("validator").resetForm()}finally{e.removeData(n)}e.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors"),e.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}}function p(n){function a(a,e){(a=r[a])&&s.isFunction(a)&&a.apply(n,e)}var e=s(n),t=e.data(d),i=s.proxy(f,n),r=o.unobtrusive.options||{};return t||(t={options:{errorClass:r.errorClass||"input-validation-error",errorElement:r.errorElement||"span",errorPlacement:function(){!function(a,e){var e=s(this).find("[data-valmsg-for='"+u(e[0].name)+"']"),n=(n=e.attr("data-valmsg-replace"))?!1!==s.parseJSON(n):null;e.removeClass("field-validation-valid").addClass("field-validation-error"),a.data("unobtrusiveContainer",e),n?(e.empty(),a.removeClass("input-validation-error").appendTo(e)):a.hide()}.apply(n,arguments),a("errorPlacement",arguments)},invalidHandler:function(){!function(a,e){var n=s(this).find("[data-valmsg-summary=true]"),t=n.find("ul");t&&t.length&&e.errorList.length&&(t.empty(),n.addClass("validation-summary-errors").removeClass("validation-summary-valid"),s.each(e.errorList,function(){s("
  • ").html(this.message).appendTo(t)}))}.apply(n,arguments),a("invalidHandler",arguments)},messages:{},rules:{},success:function(){!function(a){var e,n=a.data("unobtrusiveContainer");n&&(e=(e=n.attr("data-valmsg-replace"))?s.parseJSON(e):null,n.addClass("field-validation-valid").removeClass("field-validation-error"),a.removeData("unobtrusiveContainer"),e&&n.empty())}.apply(n,arguments),a("success",arguments)}},attachValidation:function(){e.off("reset."+d,i).on("reset."+d,i).validate(this.options)},validate:function(){return e.validate(),e.valid()}},e.data(d,t)),t}return o.unobtrusive={adapters:[],parseElement:function(t,a){var e,i,r,o=s(t),d=o.parents("form")[0];d&&((e=p(d)).options.rules[t.name]=i={},e.options.messages[t.name]=r={},s.each(this.adapters,function(){var a="data-val-"+this.name,e=o.attr(a),n={};void 0!==e&&(a+="-",s.each(this.params,function(){n[this]=o.attr(a+this)}),this.adapt({element:t,form:d,message:e,params:n,rules:i,messages:r}))}),s.extend(i,{__dummy__:!0}),a||e.attachValidation())},parse:function(a){var a=s(a),e=a.parents().addBack().filter("form").add(a.find("form")).has("[data-val=true]");a.find("[data-val=true]").each(function(){o.unobtrusive.parseElement(this,!0)}),e.each(function(){var a=p(this);a&&a.attachValidation()})}},(a=o.unobtrusive.adapters).add=function(a,e,n){return n||(n=e,e=[]),this.push({name:a,params:e,adapt:n}),this},a.addBool=function(e,n){return this.add(e,function(a){l(a,n||e,!0)})},a.addMinMax=function(a,t,i,r,e,n){return this.add(a,[e||"min",n||"max"],function(a){var e=a.params.min,n=a.params.max;e&&n?l(a,r,[e,n]):e?l(a,t,e):n&&l(a,i,n)})},a.addSingleVal=function(e,n,t){return this.add(e,[n||"val"],function(a){l(a,t||e,a.params[n])})},o.addMethod("__dummy__",function(a,e,n){return!0}),o.addMethod("regex",function(a,e,n){return!!this.optional(e)||(e=new RegExp(n).exec(a))&&0===e.index&&e[0].length===a.length}),o.addMethod("nonalphamin",function(a,e,n){var t;return t=n?(t=a.match(/\W/g))&&t.length>=n:t}),o.methods.extension?(a.addSingleVal("accept","mimtype"),a.addSingleVal("extension","extension")):a.addSingleVal("extension","extension","accept"),a.addSingleVal("regex","pattern"),a.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),a.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),a.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),a.add("equalto",["other"],function(a){var e=n(a.element.name),e=m(a.params.other,e);l(a,"equalTo",s(a.form).find(":input").filter("[name='"+u(e)+"']")[0])}),a.add("required",function(a){"INPUT"===a.element.tagName.toUpperCase()&&"CHECKBOX"===a.element.type.toUpperCase()||l(a,"required",!0)}),a.add("remote",["url","type","additionalfields"],function(t){var i={url:t.params.url,type:t.params.type||"GET",data:{}},r=n(t.element.name);s.each((t.params.additionalfields||t.element.name).replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g),function(a,e){var n=m(e,r);i.data[n]=function(){var a=s(t.form).find(":input").filter("[name='"+u(n)+"']");return a.is(":checkbox")?a.filter(":checked").val()||a.filter(":hidden").val()||"":a.is(":radio")?a.filter(":checked").val()||"":a.val()}}),l(t,"remote",i)}),a.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&l(a,"minlength",a.params.min),a.params.nonalphamin&&l(a,"nonalphamin",a.params.nonalphamin),a.params.regex&&l(a,"regex",a.params.regex)}),a.add("fileextensions",["extensions"],function(a){l(a,"extension",a.params.extensions)}),s(function(){o.unobtrusive.parse(document)}),o.unobtrusive}); \ No newline at end of file diff --git a/Presentation/HushianWebApp/wwwroot/Before/lib/jquery-validation/dist/jquery.validate.min.js b/Presentation/HushianWebApp/wwwroot/Before/lib/jquery-validation/dist/jquery.validate.min.js new file mode 100644 index 0000000..442a413 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/lib/jquery-validation/dist/jquery.validate.min.js @@ -0,0 +1,4 @@ +/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022 + * https://jqueryvalidation.org/ + * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */ +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a}); \ No newline at end of file diff --git a/Presentation/HushianWebApp/wwwroot/Before/lib/jquery.unobtrusive-ajax/jquery.unobtrusive-ajax.min.js b/Presentation/HushianWebApp/wwwroot/Before/lib/jquery.unobtrusive-ajax/jquery.unobtrusive-ajax.min.js new file mode 100644 index 0000000..ae780ac --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/lib/jquery.unobtrusive-ajax/jquery.unobtrusive-ajax.min.js @@ -0,0 +1,16 @@ +// Unobtrusive Ajax support library for jQuery +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// @version v3.2.6 +// +// Microsoft grants you the right to use these script files for the sole +// purpose of either: (i) interacting through your browser with the Microsoft +// website or online service, subject to the applicable licensing or use +// terms; or (ii) using the files as included with a Microsoft product subject +// to that product's license terms. Microsoft reserves all other rights to the +// files not expressly granted by Microsoft, whether by implication, estoppel +// or otherwise. Insofar as a script file is dual licensed under GPL, +// Microsoft neither took the code under GPL nor distributes it thereunder but +// under the terms set out in this paragraph. All notices and licenses +// below are for informational purposes only. +!function(t){function a(t,a){for(var e=window,r=(t||"").split(".");e&&r.length;)e=e[r.shift()];return"function"==typeof e?e:(a.push(t),Function.constructor.apply(null,a))}function e(t){return"GET"===t||"POST"===t}function r(t,a){e(a)||t.setRequestHeader("X-HTTP-Method-Override",a)}function n(a,e,r){var n;r.indexOf("application/x-javascript")===-1&&(n=(a.getAttribute("data-ajax-mode")||"").toUpperCase(),t(a.getAttribute("data-ajax-update")).each(function(a,r){switch(n){case"BEFORE":t(r).prepend(e);break;case"AFTER":t(r).append(e);break;case"REPLACE-WITH":t(r).replaceWith(e);break;default:t(r).html(e)}}))}function i(i,u){var o,c,d,s;if(o=i.getAttribute("data-ajax-confirm"),!o||window.confirm(o)){c=t(i.getAttribute("data-ajax-loading")),s=parseInt(i.getAttribute("data-ajax-loading-duration"),10)||0,t.extend(u,{type:i.getAttribute("data-ajax-method")||void 0,url:i.getAttribute("data-ajax-url")||void 0,cache:"true"===(i.getAttribute("data-ajax-cache")||"").toLowerCase(),beforeSend:function(t){var e;return r(t,d),e=a(i.getAttribute("data-ajax-begin"),["xhr"]).apply(i,arguments),e!==!1&&c.show(s),e},complete:function(){c.hide(s),a(i.getAttribute("data-ajax-complete"),["xhr","status"]).apply(i,arguments)},success:function(t,e,r){n(i,t,r.getResponseHeader("Content-Type")||"text/html"),a(i.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(i,arguments)},error:function(){a(i.getAttribute("data-ajax-failure"),["xhr","status","error"]).apply(i,arguments)}}),u.data.push({name:"X-Requested-With",value:"XMLHttpRequest"}),d=u.type.toUpperCase(),e(d)||(u.type="POST",u.data.push({name:"X-HTTP-Method-Override",value:d}));var p=t(i);if(p.is("form")&&"multipart/form-data"==p.attr("enctype")){var f=new FormData;t.each(u.data,function(t,a){f.append(a.name,a.value)}),t("input[type=file]",p).each(function(){var a=this;t.each(a.files,function(t,e){f.append(a.name,e)})}),t.extend(u,{processData:!1,contentType:!1,data:f})}t.ajax(u)}}function u(a){var e=t(a).data(d);return!e||!e.validate||e.validate()}var o="unobtrusiveAjaxClick",c="unobtrusiveAjaxClickTarget",d="unobtrusiveValidation";t(document).on("click","a[data-ajax=true]",function(t){t.preventDefault(),i(this,{url:this.href,type:"GET",data:[]})}),t(document).on("click","form[data-ajax=true] input[type=image]",function(a){var e=a.target.name,r=t(a.target),n=t(r.parents("form")[0]),i=r.offset();n.data(o,[{name:e+".x",value:Math.round(a.pageX-i.left)},{name:e+".y",value:Math.round(a.pageY-i.top)}]),setTimeout(function(){n.removeData(o)},0)}),t(document).on("click","form[data-ajax=true] :submit",function(a){var e=a.currentTarget.name,r=t(a.target),n=t(r.parents("form")[0]);n.data(o,e?[{name:e,value:a.currentTarget.value}]:[]),n.data(c,r),setTimeout(function(){n.removeData(o),n.removeData(c)},0)}),t(document).on("submit","form[data-ajax=true]",function(a){var e=t(this).data(o)||[],r=t(this).data(c),n=r&&(r.hasClass("cancel")||void 0!==r.attr("formnovalidate"));a.preventDefault(),(n||u(this))&&i(this,{url:this.action,type:this.method||"GET",data:e.concat(t(this).serializeArray())})})}(jQuery); \ No newline at end of file diff --git a/Presentation/HushianWebApp/wwwroot/Before/lib/jquery/dist/jquery.min7b85.js b/Presentation/HushianWebApp/wwwroot/Before/lib/jquery/dist/jquery.min7b85.js new file mode 100644 index 0000000..c4c6022 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/lib/jquery/dist/jquery.min7b85.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
    ",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 00&&s(a.width)/e.offsetWidth||1,p=e.offsetHeight>0&&s(a.height)/e.offsetHeight||1);var u=(n(e)?t(e):window).visualViewport,l=!c()&&i,d=(a.left+(l&&u?u.offsetLeft:0))/f,h=(a.top+(l&&u?u.offsetTop:0))/p,m=a.width/f,v=a.height/p;return{width:m,height:v,top:h,right:d+m,bottom:h+v,left:d,x:d,y:h}}function u(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function l(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function h(e){return p(d(e)).left+u(e).scrollLeft}function m(e){return t(e).getComputedStyle(e)}function v(e){var t=m(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function y(e,n,o){void 0===o&&(o=!1);var i,a,f=r(n),c=r(n)&&function(e){var t=e.getBoundingClientRect(),n=s(t.width)/e.offsetWidth||1,r=s(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(n),m=d(n),y=p(e,c,o),g={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(f||!f&&!o)&&(("body"!==l(n)||v(m))&&(g=(i=n)!==t(i)&&r(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:u(i)),r(n)?((b=p(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):m&&(b.x=h(m))),{x:y.left+g.scrollLeft-b.x,y:y.top+g.scrollTop-b.y,width:y.width,height:y.height}}function g(e){var t=p(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function b(e){return"html"===l(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||d(e)}function x(e){return["html","body","#document"].indexOf(l(e))>=0?e.ownerDocument.body:r(e)&&v(e)?e:x(b(e))}function w(e,n){var r;void 0===n&&(n=[]);var o=x(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=t(o),s=i?[a].concat(a.visualViewport||[],v(o)?o:[]):o,f=n.concat(s);return i?f:f.concat(w(b(s)))}function O(e){return["table","td","th"].indexOf(l(e))>=0}function j(e){return r(e)&&"fixed"!==m(e).position?e.offsetParent:null}function E(e){for(var n=t(e),i=j(e);i&&O(i)&&"static"===m(i).position;)i=j(i);return i&&("html"===l(i)||"body"===l(i)&&"static"===m(i).position)?n:i||function(e){var t=/firefox/i.test(f());if(/Trident/i.test(f())&&r(e)&&"fixed"===m(e).position)return null;var n=b(e);for(o(n)&&(n=n.host);r(n)&&["html","body"].indexOf(l(n))<0;){var i=m(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||n}var D="top",A="bottom",L="right",P="left",M="auto",k=[D,A,L,P],W="start",B="end",H="viewport",T="popper",R=k.reduce((function(e,t){return e.concat([t+"-"+W,t+"-"+B])}),[]),S=[].concat(k,[M]).reduce((function(e,t){return e.concat([t,t+"-"+W,t+"-"+B])}),[]),V=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function C(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function N(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function I(e,r,o){return r===H?N(function(e,n){var r=t(e),o=d(e),i=r.visualViewport,a=o.clientWidth,s=o.clientHeight,f=0,p=0;if(i){a=i.width,s=i.height;var u=c();(u||!u&&"fixed"===n)&&(f=i.offsetLeft,p=i.offsetTop)}return{width:a,height:s,x:f+h(e),y:p}}(e,o)):n(r)?function(e,t){var n=p(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(r,o):N(function(e){var t,n=d(e),r=u(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=i(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=i(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-r.scrollLeft+h(e),c=-r.scrollTop;return"rtl"===m(o||n).direction&&(f+=i(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:f,y:c}}(d(e)))}function _(e,t,o,s){var f="clippingParents"===t?function(e){var t=w(b(e)),o=["absolute","fixed"].indexOf(m(e).position)>=0&&r(e)?E(e):e;return n(o)?t.filter((function(e){return n(e)&&C(e,o)&&"body"!==l(e)})):[]}(e):[].concat(t),c=[].concat(f,[o]),p=c[0],u=c.reduce((function(t,n){var r=I(e,n,s);return t.top=i(r.top,t.top),t.right=a(r.right,t.right),t.bottom=a(r.bottom,t.bottom),t.left=i(r.left,t.left),t}),I(e,p,s));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function F(e){return e.split("-")[0]}function U(e){return e.split("-")[1]}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?F(o):null,a=o?U(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case D:t={x:s,y:n.y-r.height};break;case A:t={x:s,y:n.y+n.height};break;case L:t={x:n.x+n.width,y:f};break;case P:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?z(i):null;if(null!=c){var p="y"===c?"height":"width";switch(a){case W:t[c]=t[c]-(n[p]/2-r[p]/2);break;case B:t[c]=t[c]+(n[p]/2-r[p]/2)}}return t}function Y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function J(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,a=r.strategy,s=void 0===a?e.strategy:a,f=r.boundary,c=void 0===f?"clippingParents":f,u=r.rootBoundary,l=void 0===u?H:u,h=r.elementContext,m=void 0===h?T:h,v=r.altBoundary,y=void 0!==v&&v,g=r.padding,b=void 0===g?0:g,x=Y("number"!=typeof b?b:G(b,k)),w=m===T?"reference":T,O=e.rects.popper,j=e.elements[y?w:m],E=_(n(j)?j:j.contextElement||d(e.elements.popper),c,l,s),P=p(e.elements.reference),M=X({reference:P,element:O,strategy:"absolute",placement:i}),W=N(Object.assign({},O,M)),B=m===T?W:P,R={top:E.top-B.top+x.top,bottom:B.bottom-E.bottom+x.bottom,left:E.left-B.left+x.left,right:B.right-E.right+x.right},S=e.modifiersData.offset;if(m===T&&S){var V=S[i];Object.keys(R).forEach((function(e){var t=[L,A].indexOf(e)>=0?1:-1,n=[D,A].indexOf(e)>=0?"y":"x";R[e]+=V[n]*t}))}return R}var K={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[P,L].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],f=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function fe(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var ce={start:"end",end:"start"};function pe(e){return e.replace(/start|end/g,(function(e){return ce[e]}))}function ue(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=void 0===f?S:f,p=U(r),u=p?s?R:R.filter((function(e){return U(e)===p})):k,l=u.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=u);var d=l.reduce((function(t,n){return t[n]=J(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[F(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}var le={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,v=t.options.placement,y=F(v),g=f||(y===v||!h?[fe(v)]:function(e){if(F(e)===M)return[];var t=fe(e);return[pe(e),t,pe(t)]}(v)),b=[v].concat(g).reduce((function(e,n){return e.concat(F(n)===M?ue(t,{placement:n,boundary:p,rootBoundary:u,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,O=new Map,j=!0,E=b[0],k=0;k=0,S=R?"width":"height",V=J(t,{placement:B,boundary:p,rootBoundary:u,altBoundary:l,padding:c}),q=R?T?L:P:T?A:D;x[S]>w[S]&&(q=fe(q));var C=fe(q),N=[];if(i&&N.push(V[H]<=0),s&&N.push(V[q]<=0,V[C]<=0),N.every((function(e){return e}))){E=B,j=!1;break}O.set(B,N)}if(j)for(var I=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},_=h?3:1;_>0;_--){if("break"===I(_))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function de(e,t,n){return i(e,a(t,n))}var he={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=void 0===o||o,f=n.altAxis,c=void 0!==f&&f,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.padding,h=n.tether,m=void 0===h||h,v=n.tetherOffset,y=void 0===v?0:v,b=J(t,{boundary:p,rootBoundary:u,padding:d,altBoundary:l}),x=F(t.placement),w=U(t.placement),O=!w,j=z(x),M="x"===j?"y":"x",k=t.modifiersData.popperOffsets,B=t.rects.reference,H=t.rects.popper,T="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,R="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(k){if(s){var q,C="y"===j?D:P,N="y"===j?A:L,I="y"===j?"height":"width",_=k[j],X=_+b[C],Y=_-b[N],G=m?-H[I]/2:0,K=w===W?B[I]:H[I],Q=w===W?-H[I]:-B[I],Z=t.elements.arrow,$=m&&Z?g(Z):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[C],ne=ee[N],re=de(0,B[I],$[I]),oe=O?B[I]/2-G-re-te-R.mainAxis:K-re-te-R.mainAxis,ie=O?-B[I]/2+G+re+ne+R.mainAxis:Q+re+ne+R.mainAxis,ae=t.elements.arrow&&E(t.elements.arrow),se=ae?"y"===j?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(q=null==S?void 0:S[j])?q:0,ce=_+ie-fe,pe=de(m?a(X,_+oe-fe-se):X,_,m?i(Y,ce):Y);k[j]=pe,V[j]=pe-_}if(c){var ue,le="x"===j?D:P,he="x"===j?A:L,me=k[M],ve="y"===M?"height":"width",ye=me+b[le],ge=me-b[he],be=-1!==[D,P].indexOf(x),xe=null!=(ue=null==S?void 0:S[M])?ue:0,we=be?ye:me-B[ve]-H[ve]-xe+R.altAxis,Oe=be?me+B[ve]+H[ve]-xe-R.altAxis:ge,je=m&&be?function(e,t,n){var r=de(e,t,n);return r>n?n:r}(we,me,Oe):de(m?we:ye,me,m?Oe:ge);k[M]=je,V[M]=je-me}t.modifiersData[r]=V}},requiresIfExists:["offset"]};var me={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=F(n.placement),f=z(s),c=[P,L].indexOf(s)>=0?"height":"width";if(i&&a){var p=function(e,t){return Y("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,k))}(o.padding,n),u=g(i),l="y"===f?D:P,d="y"===f?A:L,h=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],m=a[f]-n.rects.reference[f],v=E(i),y=v?"y"===f?v.clientHeight||0:v.clientWidth||0:0,b=h/2-m/2,x=p[l],w=y-u[c]-p[d],O=y/2-u[c]/2+b,j=de(x,O,w),M=f;n.modifiersData[r]=((t={})[M]=j,t.centerOffset=j-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&C(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ve(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ye(e){return[D,L,A,P].some((function(t){return e[t]>=0}))}var ge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=J(t,{elementContext:"reference"}),s=J(t,{altBoundary:!0}),f=ve(a,r),c=ve(s,o,i),p=ye(f),u=ye(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}},be=Z({defaultModifiers:[ee,te,oe,ie]}),xe=[ee,te,oe,ie,ae,le,he,me,ge],we=Z({defaultModifiers:xe});e.applyStyles=ie,e.arrow=me,e.computeStyles=oe,e.createPopper=we,e.createPopperLite=be,e.defaultModifiers=xe,e.detectOverflow=J,e.eventListeners=ee,e.flip=le,e.hide=ge,e.offset=ae,e.popperGenerator=Z,e.popperOffsets=te,e.preventOverflow=he,Object.defineProperty(e,"__esModule",{value:!0})})); +//# sourceMappingURL=popper.min.js.map diff --git a/Presentation/HushianWebApp/wwwroot/Before/lib/simple-keyboard/index9ade.js b/Presentation/HushianWebApp/wwwroot/Before/lib/simple-keyboard/index9ade.js new file mode 100644 index 0000000..d6c8918 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/lib/simple-keyboard/index9ade.js @@ -0,0 +1,13 @@ +/*! + * + * simple-keyboard v2.28.46 + * https://github.com/hodgef/simple-keyboard + * + * Copyright (c) Francisco Hodge (https://github.com/hodgef) + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ +!function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define("SimpleKeyboard",[],e):"object"===typeof exports?exports.SimpleKeyboard=e():t.SimpleKeyboard=e()}(window,(function(){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},__webpack_require__.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)__webpack_require__.d(n,o,function(e){return t[e]}.bind(null,o));return n},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(t,e,n){t.exports=n(2)},function(t,e,n){},function(t,e,n){"use strict";n.r(e);n(1);function _createForOfIteratorHelper(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"===typeof t)return _arrayLikeToArray(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(t,e)}(t))){var e=0,F=function(){};return{s:F,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,i=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return i=t.done,t},e:function(t){s=!0,o=t},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw o}}}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n0?s=this.removeAt(s,n,o):"{space}"===t?s=this.addStringAt(s," ",n,o):"{tab}"!==t||"boolean"===typeof i.tabCharOnTab&&!1===i.tabCharOnTab?"{enter}"!==t&&"{numpadenter}"!==t||!i.newLineOnEnter?t.includes("numpad")&&Number.isInteger(Number(t[t.length-2]))?s=this.addStringAt(s,t[t.length-2],n,o):"{numpaddivide}"===t?s=this.addStringAt(s,"/",n,o):"{numpadmultiply}"===t?s=this.addStringAt(s,"*",n,o):"{numpadsubtract}"===t?s=this.addStringAt(s,"-",n,o):"{numpadadd}"===t?s=this.addStringAt(s,"+",n,o):"{numpaddecimal}"===t?s=this.addStringAt(s,".",n,o):"{"===t||"}"===t?s=this.addStringAt(s,t,n,o):t.includes("{")||t.includes("}")||(s=this.addStringAt(s,t,n,o)):s=this.addStringAt(s,"\n",n,o):s=this.addStringAt(s,"\t",n,o),s}},{key:"updateCaretPos",value:function(t,e){var n=this.updateCaretPosAction(t,e);this.dispatch((function(t){t.caretPosition=n}))}},{key:"updateCaretPosAction",value:function(t,e){var n=this.getOptions(),o=this.getCaretPosition();return e?o>0&&(o-=t):o+=t,n.debug&&console.log("Caret at:",o,"(".concat(this.keyboardDOMClass,")")),o}},{key:"addStringAt",value:function(t,e,n,o){var i;return n||0===n?(i=[t.slice(0,n),e,t.slice(n)].join(""),this.isMaxLengthReached()||o&&this.updateCaretPos(e.length)):i=t+e,i}},{key:"removeAt",value:function(t,e,n){var o;if(0===this.getCaretPosition())return t;var i=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;return e&&e>=0?t.substring(e-2,e).match(i)?(o=t.substr(0,e-2)+t.substr(e),n&&this.updateCaretPos(2,!0)):(o=t.substr(0,e-1)+t.substr(e),n&&this.updateCaretPos(1,!0)):t.slice(-2).match(i)?(o=t.slice(0,-2),n&&this.updateCaretPos(2,!0)):(o=t.slice(0,-1),n&&this.updateCaretPos(1,!0)),o}},{key:"handleMaxLength",value:function(t,e){var n=this.getOptions(),o=n.maxLength,i=t[n.inputName],s=e.length-1>=o;if(e.length<=i.length)return!1;if(Number.isInteger(o))return n.debug&&console.log("maxLength (num) reached:",s),s?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if("object"===_typeof(o)){var a=i.length===o[n.inputName];return n.debug&&console.log("maxLength (obj) reached:",a),a?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1)}}},{key:"isMaxLengthReached",value:function(){return Boolean(this.maxLengthReached)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return window.PointerEvent}},{key:"camelCase",value:function(t){return!!t&&t.toLowerCase().trim().split(/[.\-_\s]/g).reduce((function(t,e){return e.length?t+e[0].toUpperCase()+e.slice(1):t}))}}])&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),Utilities}();function PhysicalKeyboard_defineProperties(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,o=new Array(e);n1?n:n[0]),e}},{key:"inputPatternIsValid",value:function(t){var e,n=this.options.inputPattern;if((e=n instanceof RegExp?n:n[this.options.inputName])&&t){var o=e.test(t);return this.options.debug&&console.log('inputPattern ("'.concat(e,'"): ').concat(o?"passed":"did not pass!")),o}return!0}},{key:"setEventListeners",value:function(){!this.isFirstKeyboardInstance&&this.allKeyboardInstances||(this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")")),document.addEventListener("keyup",this.handleKeyUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd))}},{key:"handleKeyUp",value:function(t){this.caretEventHandler(t),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(t)}},{key:"handleKeyDown",value:function(t){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(t)}},{key:"handleMouseUp",value:function(t){this.caretEventHandler(t)}},{key:"handleTouchEnd",value:function(t){this.caretEventHandler(t)}},{key:"caretEventHandler",value:function(t){var e;t.target.tagName&&(e=t.target.tagName.toLowerCase()),this.dispatch((function(n){n.isMouseHold&&(n.isMouseHold=!1),"textarea"!==e&&"input"!==e||n.options.disableCaretPositioning?n.options.disableCaretPositioning&&(n.caretPosition=null):(n.caretPosition=t.target.selectionStart,n.options.debug&&console.log("Caret at: ",t.target.selectionStart,t.target.tagName.toLowerCase(),"(".concat(n.keyboardDOMClass,")")))}))}},{key:"recurseButtons",value:function(t){var e=this;if(!t)return!1;Object.keys(this.buttonElements).forEach((function(n){return e.buttonElements[n].forEach(t)}))}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName)),document.removeEventListener("keyup",this.handleKeyUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleTouchEnd),document.onpointerup=null,document.ontouchend=null,document.ontouchcancel=null,document.onmouseup=null;var deleteButton=function(t){t.onpointerdown=null,t.onpointerup=null,t.onpointercancel=null,t.ontouchstart=null,t.ontouchend=null,t.ontouchcancel=null,t.onclick=null,t.onmousedown=null,t.onmouseup=null,t.remove(),t=null};this.recurseButtons(deleteButton),this.recurseButtons=null,deleteButton=null,this.keyboardDOM.onpointerdown=null,this.keyboardDOM.ontouchstart=null,this.keyboardDOM.onmousedown=null,this.clear(),window.SimpleKeyboardInstances[this.currentInstanceName]=null,delete window.SimpleKeyboardInstances[this.currentInstanceName],this.initialized=!1}},{key:"getButtonThemeClasses",value:function(t){var e=this.options.buttonTheme,n=[];return Array.isArray(e)&&e.forEach((function(e){if(e.class&&"string"===typeof e.class&&e.buttons&&"string"===typeof e.buttons){var o=e.class.split(" ");e.buttons.split(" ").includes(t)&&(n=[].concat(_toConsumableArray(n),_toConsumableArray(o)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',e)})),n}},{key:"setDOMButtonAttributes",value:function(t,e){var n=this.options.buttonAttributes;Array.isArray(n)&&n.forEach((function(n){n.attribute&&"string"===typeof n.attribute&&n.value&&"string"===typeof n.value&&n.buttons&&"string"===typeof n.buttons?n.buttons.split(" ").includes(t)&&e(n.attribute,n.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',n)}))}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(t){if(t.target.classList.contains("hg-button"))return t.preventDefault(),t.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.setEventListeners(),"function"===typeof this.options.onInit&&this.options.onInit()}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),"function"===typeof this.options.beforeFirstRender&&this.options.beforeFirstRender(),this.isFirstKeyboardInstance&&this.utilities.pointerEventsSupported()&&!this.options.useTouchEvents&&!this.options.useMouseEvents&&this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){"function"===typeof this.options.beforeRender&&this.options.beforeRender()}},{key:"onRender",value:function(){"function"===typeof this.options.onRender&&this.options.onRender()}},{key:"onModulesLoaded",value:function(){"function"===typeof this.options.onModulesLoaded&&this.options.onModulesLoaded()}},{key:"loadModules",value:function(){var t=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach((function(e){var n=new e;if(n.constructor.name&&"Function"!==n.constructor.name){var o="module-".concat(t.utilities.camelCase(n.constructor.name));t.keyboardPluginClasses=t.keyboardPluginClasses+" ".concat(o)}n.init(t)})),this.keyboardPluginClasses=this.keyboardPluginClasses+" modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(t,e){return!!this.modules[t]&&this.modules[t][e]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(t,e,n,o){var i=this,s=Array.from(t.children),a=0;return s.length&&n.forEach((function(n,r){var u=o[r];if(!u||!(u>n))return!1;var c=n-a,l=u-a,h=document.createElement("div");h.className+="hg-button-container";var d="".concat(i.options.layoutName,"-r").concat(e,"c").concat(r);h.setAttribute("data-skUID",d);var p=s.splice(c,l-c+1);a=l-c,p.forEach((function(t){return h.appendChild(t)})),s.splice(c,0,h),t.innerHTML="",s.forEach((function(e){return t.appendChild(e)})),i.options.debug&&console.log("rowDOMContainer",p,c,l,a+1)})),t}},{key:"render",value:function(){var t=this;this.clear(),this.initialized||this.beforeFirstRender(),this.beforeRender();var e="hg-layout-".concat(this.options.layoutName),n=this.options.layout||{default:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w e r t y u i o p [ ] \\","{lock} a s d f g h j k l ; ' {enter}","{shift} z x c v b n m , . / {shift}",".com @ {space}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W E R T Y U I O P { } |",'{lock} A S D F G H J K L : " {enter}',"{shift} Z X C V B N M < > ? {shift}",".com @ {space}"]},o=this.options.useTouchEvents||!1,i=o?"hg-touch-events":"",s=this.options.useMouseEvents||!1,a=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,e,this.keyboardPluginClasses,i),n[this.options.layoutName].forEach((function(e,n){var i=e.split(" "),r=document.createElement("div");r.className+="hg-row";var u=[],c=[];i.forEach((function(e,i){var l,h=!a&&e.includes("[")&&e.length>1,d=!a&&e.includes("]")&&e.length>1;h&&(u.push(i),e=e.replace(/\[/g,"")),d&&(c.push(i),e=e.replace(/\]/g,""));var p=t.utilities.getButtonClass(e),f=t.utilities.getButtonDisplayName(e,t.options.display,t.options.mergeDisplay),y=t.options.useButtonTag?"button":"div",b=document.createElement(y);b.className+="hg-button ".concat(p),(l=b.classList).add.apply(l,_toConsumableArray(t.getButtonThemeClasses(e))),t.setDOMButtonAttributes(e,(function(t,e){b.setAttribute(t,e)})),t.activeButtonClass="hg-activeButton",!t.utilities.pointerEventsSupported()||o||s?o?(b.ontouchstart=function(n){t.handleButtonClicked(e),t.handleButtonMouseDown(e,n)},b.ontouchend=function(){t.handleButtonMouseUp(e)},b.ontouchcancel=function(){t.handleButtonMouseUp(e)}):(b.onclick=function(){t.isMouseHold=!1,t.handleButtonClicked(e)},b.onmousedown=function(n){t.handleButtonMouseDown(e,n)},b.onmouseup=function(){t.handleButtonMouseUp(e)}):(b.onpointerdown=function(n){t.handleButtonClicked(e),t.handleButtonMouseDown(e,n)},b.onpointerup=function(){t.handleButtonMouseUp(e)},b.onpointercancel=function(){t.handleButtonMouseUp(e)}),b.setAttribute("data-skBtn",e);var m="".concat(t.options.layoutName,"-r").concat(n,"b").concat(i);b.setAttribute("data-skBtnUID",m);var g=document.createElement("span");g.innerHTML=f,b.appendChild(g),t.buttonElements[e]||(t.buttonElements[e]=[]),t.buttonElements[e].push(b),r.appendChild(b)})),r=t.parseRowDOMContainers(r,n,u,c),t.keyboardDOM.appendChild(r)})),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||o||s?o?(document.ontouchend=function(){return t.handleButtonMouseUp()},document.ontouchcancel=function(){return t.handleButtonMouseUp()},this.keyboardDOM.ontouchstart=function(e){return t.handleKeyboardContainerMouseDown(e)}):o||(document.onmouseup=function(){return t.handleButtonMouseUp()},this.keyboardDOM.onmousedown=function(e){return t.handleKeyboardContainerMouseDown(e)}):(document.onpointerup=function(){return t.handleButtonMouseUp()},this.keyboardDOM.onpointerdown=function(e){return t.handleKeyboardContainerMouseDown(e)}),this.onInit())}}])&&Keyboard_defineProperties(t.prototype,e),n&&Keyboard_defineProperties(t,n),SimpleKeyboard}();e.default=s}])})); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/Presentation/HushianWebApp/wwwroot/Before/lib/simple-keyboard/indexb10f.css b/Presentation/HushianWebApp/wwwroot/Before/lib/simple-keyboard/indexb10f.css new file mode 100644 index 0000000..898fdc0 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/lib/simple-keyboard/indexb10f.css @@ -0,0 +1,12 @@ +/*! + * + * simple-keyboard v2.28.46 + * https://github.com/hodgef/simple-keyboard + * + * Copyright (c) Francisco Hodge (https://github.com/hodgef) + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */.hg-theme-default{width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden;touch-action:manipulation}.hg-theme-default .hg-button span{pointer-events:none}.hg-theme-default button.hg-button{border-width:0;outline:0;font-size:inherit}.hg-theme-default{font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:#ececec;padding:5px;border-radius:5px}.hg-theme-default .hg-button{display:inline-block;flex-grow:1}.hg-theme-default .hg-row{display:flex}.hg-theme-default .hg-row:not(:last-child){margin-bottom:5px}.hg-theme-default .hg-row .hg-button-container,.hg-theme-default .hg-row .hg-button:not(:last-child){margin-right:5px}.hg-theme-default .hg-row>div:last-child{margin-right:0}.hg-theme-default .hg-row .hg-button-container{display:flex}.hg-theme-default .hg-button{box-shadow:0 0 3px -1px rgba(0,0,0,.3);height:40px;border-radius:5px;box-sizing:border-box;padding:5px;background:#fff;border-bottom:1px solid #b5b5b5;cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.hg-theme-default .hg-button.hg-activeButton{background:#efefef}.hg-theme-default.hg-layout-numeric .hg-button{width:33.3%;height:60px;align-items:center;display:flex;justify-content:center}.hg-theme-default .hg-button.hg-button-numpadadd,.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.hg-theme-default .hg-button.hg-button-com{max-width:85px}.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.hg-theme-default .hg-button.hg-selectedButton{background:rgba(5,25,70,.53);color:#fff}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px} +/*# sourceMappingURL=index.css.map */ \ No newline at end of file diff --git a/Presentation/HushianWebApp/wwwroot/Before/lib/sweetalert2/sweetalert.min.css b/Presentation/HushianWebApp/wwwroot/Before/lib/sweetalert2/sweetalert.min.css new file mode 100644 index 0000000..7b0bf53 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/lib/sweetalert2/sweetalert.min.css @@ -0,0 +1,943 @@ +body.swal2-shown { + overflow-y: hidden +} + +body.swal2-iosfix { + position: fixed; + left: 0; + right: 0 +} + +.swal2-container { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + position: fixed; + top: 0; + left: 0; + bottom: 0; + right: 0; + padding: 10px; + background-color: transparent; + z-index: 1060 +} + + .swal2-container.swal2-fade { + -webkit-transition: background-color .1s; + transition: background-color .1s + } + + .swal2-container.swal2-shown { + background-color: rgba(0,0,0,.4) + } + +.swal2-modal { + background-color: #fff; + font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; + border-radius: 5px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + text-align: center; + margin: auto; + overflow-x: hidden; + overflow-y: auto; + display: none; + position: relative; + max-width: 100% +} + + .swal2-modal:focus { + outline: 0 + } + + .swal2-modal.swal2-loading { + overflow-y: hidden + } + + .swal2-modal .swal2-title { + color: #595959; + font-size: 30px; + text-align: center; + font-weight: 600; + text-transform: none; + position: relative; + margin: 0 0 .4em; + padding: 0; + display: block; + word-wrap: break-word + } + + .swal2-modal .swal2-buttonswrapper { + margin-top: 15px + } + + .swal2-modal .swal2-buttonswrapper:not(.swal2-loading) .swal2-styled[disabled] { + opacity: .4; + cursor: no-drop + } + + .swal2-modal .swal2-buttonswrapper.swal2-loading .swal2-styled.swal2-confirm { + -webkit-box-sizing: border-box; + box-sizing: border-box; + border: 4px solid transparent; + border-color: transparent; + width: 40px; + height: 40px; + padding: 0; + margin: 7.5px; + vertical-align: top; + background-color: transparent !important; + color: transparent; + cursor: default; + border-radius: 100%; + -webkit-animation: rotate-loading 1.5s linear 0s infinite normal; + animation: rotate-loading 1.5s linear 0s infinite normal; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none + } + + .swal2-modal .swal2-buttonswrapper.swal2-loading .swal2-styled.swal2-cancel { + margin-left: 30px; + margin-right: 30px + } + + .swal2-modal .swal2-buttonswrapper.swal2-loading :not(.swal2-styled).swal2-confirm::after { + display: inline-block; + content: ''; + margin-left: 5px; + vertical-align: -1px; + height: 15px; + width: 15px; + border: 3px solid #999; + -webkit-box-shadow: 1px 1px 1px #fff; + box-shadow: 1px 1px 1px #fff; + border-right-color: transparent; + border-radius: 50%; + -webkit-animation: rotate-loading 1.5s linear 0s infinite normal; + animation: rotate-loading 1.5s linear 0s infinite normal + } + + .swal2-modal .swal2-styled { + border: 0; + border-radius: 3px; + -webkit-box-shadow: none; + box-shadow: none; + color: #fff; + cursor: pointer; + font-size: 17px; + font-weight: 500; + margin: 15px 5px 0; + padding: 10px 32px + } + + .swal2-modal .swal2-styled:focus { + outline: 0; + -webkit-box-shadow: 0 0 0 2px #fff,0 0 0 4px rgba(50,100,150,.4); + box-shadow: 0 0 0 2px #fff,0 0 0 4px rgba(50,100,150,.4) + } + + .swal2-modal .swal2-image { + margin: 20px auto; + max-width: 100% + } + + .swal2-modal .swal2-close { + background: 0 0; + border: 0; + margin: 0; + padding: 0; + width: 38px; + height: 40px; + font-size: 36px; + line-height: 40px; + font-family: serif; + position: absolute; + top: 5px; + right: 8px; + cursor: pointer; + color: #ccc; + -webkit-transition: color .1s ease; + transition: color .1s ease + } + + .swal2-modal .swal2-close:hover { + color: #d55 + } + + .swal2-modal > .swal2-checkbox, .swal2-modal > .swal2-file, .swal2-modal > .swal2-input, .swal2-modal > .swal2-radio, .swal2-modal > .swal2-select, .swal2-modal > .swal2-textarea { + display: none + } + + .swal2-modal .swal2-content { + font-size: 18px; + text-align: center; + font-weight: 300; + position: relative; + float: none; + margin: 0; + padding: 0; + line-height: normal; + color: #545454; + word-wrap: break-word + } + + .swal2-modal .swal2-checkbox, .swal2-modal .swal2-file, .swal2-modal .swal2-input, .swal2-modal .swal2-radio, .swal2-modal .swal2-select, .swal2-modal .swal2-textarea { + margin: 20px auto + } + + .swal2-modal .swal2-file, .swal2-modal .swal2-input, .swal2-modal .swal2-textarea { + width: 100%; + -webkit-box-sizing: border-box; + box-sizing: border-box; + font-size: 18px; + border-radius: 3px; + border: 1px solid #d9d9d9; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.06); + box-shadow: inset 0 1px 1px rgba(0,0,0,.06); + -webkit-transition: border-color .3s,-webkit-box-shadow .3s; + transition: border-color .3s,-webkit-box-shadow .3s; + transition: border-color .3s,box-shadow .3s; + transition: border-color .3s,box-shadow .3s,-webkit-box-shadow .3s + } + + .swal2-modal .swal2-file.swal2-inputerror, .swal2-modal .swal2-input.swal2-inputerror, .swal2-modal .swal2-textarea.swal2-inputerror { + border-color: #f27474 !important; + -webkit-box-shadow: 0 0 2px #f27474 !important; + box-shadow: 0 0 2px #f27474 !important + } + + .swal2-modal .swal2-file:focus, .swal2-modal .swal2-input:focus, .swal2-modal .swal2-textarea:focus { + outline: 0; + border: 1px solid #b4dbed; + -webkit-box-shadow: 0 0 3px #c4e6f5; + box-shadow: 0 0 3px #c4e6f5 + } + + .swal2-modal .swal2-file::-webkit-input-placeholder, .swal2-modal .swal2-input::-webkit-input-placeholder, .swal2-modal .swal2-textarea::-webkit-input-placeholder { + color: #ccc + } + + .swal2-modal .swal2-file:-ms-input-placeholder, .swal2-modal .swal2-input:-ms-input-placeholder, .swal2-modal .swal2-textarea:-ms-input-placeholder { + color: #ccc + } + + .swal2-modal .swal2-file::placeholder, .swal2-modal .swal2-input::placeholder, .swal2-modal .swal2-textarea::placeholder { + color: #ccc + } + + .swal2-modal .swal2-range input { + float: left; + width: 80% + } + + .swal2-modal .swal2-range output { + float: right; + width: 20%; + font-size: 20px; + font-weight: 600; + text-align: center + } + + .swal2-modal .swal2-range input, .swal2-modal .swal2-range output { + height: 43px; + line-height: 43px; + vertical-align: middle; + margin: 20px auto; + padding: 0 + } + + .swal2-modal .swal2-input { + height: 43px; + padding: 0 12px + } + + .swal2-modal .swal2-input[type=number] { + max-width: 150px + } + + .swal2-modal .swal2-file { + font-size: 20px + } + + .swal2-modal .swal2-textarea { + height: 108px; + padding: 12px + } + + .swal2-modal .swal2-select { + color: #545454; + font-size: inherit; + padding: 5px 10px; + min-width: 40%; + max-width: 100% + } + + .swal2-modal .swal2-radio { + border: 0 + } + + .swal2-modal .swal2-radio label:not(:first-child) { + margin-left: 20px + } + + .swal2-modal .swal2-radio input, .swal2-modal .swal2-radio span { + vertical-align: middle + } + + .swal2-modal .swal2-radio input { + margin: 0 3px 0 0 + } + + .swal2-modal .swal2-checkbox { + color: #545454 + } + + .swal2-modal .swal2-checkbox input, .swal2-modal .swal2-checkbox span { + vertical-align: middle + } + + .swal2-modal .swal2-validationerror { + background-color: #f0f0f0; + margin: 0 -20px; + overflow: hidden; + padding: 10px; + color: gray; + font-size: 16px; + font-weight: 300; + display: none + } + + .swal2-modal .swal2-validationerror::before { + content: '!'; + display: inline-block; + width: 24px; + height: 24px; + border-radius: 50%; + background-color: #ea7d7d; + color: #fff; + line-height: 24px; + text-align: center; + margin-right: 10px + } + +@supports (-ms-accelerator:true) { + .swal2-range input { + width: 100% !important + } + + .swal2-range output { + display: none + } +} + +@media all and (-ms-high-contrast:none),(-ms-high-contrast:active) { + .swal2-range input { + width: 100% !important + } + + .swal2-range output { + display: none + } +} + +.swal2-icon { + width: 80px; + height: 80px; + border: 4px solid transparent; + border-radius: 50%; + margin: 20px auto 30px; + padding: 0; + position: relative; + -webkit-box-sizing: content-box; + box-sizing: content-box; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none +} + + .swal2-icon.swal2-error { + border-color: #f27474 + } + + .swal2-icon.swal2-error .swal2-x-mark { + position: relative; + display: block + } + + .swal2-icon.swal2-error [class^=swal2-x-mark-line] { + position: absolute; + height: 5px; + width: 47px; + background-color: #f27474; + display: block; + top: 37px; + border-radius: 2px + } + + .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + -webkit-transform: rotate(45deg); + transform: rotate(45deg); + left: 17px + } + + .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + right: 16px + } + + .swal2-icon.swal2-warning { + font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; + color: #f8bb86; + border-color: #facea8; + font-size: 60px; + line-height: 80px; + text-align: center + } + + .swal2-icon.swal2-info { + font-family: 'Open Sans',sans-serif; + color: #3fc3ee; + border-color: #9de0f6; + font-size: 60px; + line-height: 80px; + text-align: center + } + + .swal2-icon.swal2-question { + font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; + color: #87adbd; + border-color: #c9dae1; + font-size: 60px; + line-height: 80px; + text-align: center + } + + .swal2-icon.swal2-success { + border-color: #a5dc86 + } + + .swal2-icon.swal2-success [class^=swal2-success-circular-line] { + border-radius: 50%; + position: absolute; + width: 60px; + height: 120px; + -webkit-transform: rotate(45deg); + transform: rotate(45deg) + } + + .swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left] { + border-radius: 120px 0 0 120px; + top: -7px; + left: -33px; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + -webkit-transform-origin: 60px 60px; + transform-origin: 60px 60px + } + + .swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right] { + border-radius: 0 120px 120px 0; + top: -11px; + left: 30px; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + -webkit-transform-origin: 0 60px; + transform-origin: 0 60px + } + + .swal2-icon.swal2-success .swal2-success-ring { + width: 80px; + height: 80px; + border: 4px solid rgba(165,220,134,.2); + border-radius: 50%; + -webkit-box-sizing: content-box; + box-sizing: content-box; + position: absolute; + left: -4px; + top: -4px; + z-index: 2 + } + + .swal2-icon.swal2-success .swal2-success-fix { + width: 7px; + height: 90px; + position: absolute; + left: 28px; + top: 8px; + z-index: 1; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg) + } + + .swal2-icon.swal2-success [class^=swal2-success-line] { + height: 5px; + background-color: #a5dc86; + display: block; + border-radius: 2px; + position: absolute; + z-index: 2 + } + + .swal2-icon.swal2-success [class^=swal2-success-line][class$=tip] { + width: 25px; + left: 14px; + top: 46px; + -webkit-transform: rotate(45deg); + transform: rotate(45deg) + } + + .swal2-icon.swal2-success [class^=swal2-success-line][class$=long] { + width: 47px; + right: 8px; + top: 38px; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg) + } + +.swal2-progresssteps { + font-weight: 600; + margin: 0 0 20px; + padding: 0 +} + + .swal2-progresssteps li { + display: inline-block; + position: relative + } + + .swal2-progresssteps .swal2-progresscircle { + background: #3085d6; + border-radius: 2em; + color: #fff; + height: 2em; + line-height: 2em; + text-align: center; + width: 2em; + z-index: 20 + } + + .swal2-progresssteps .swal2-progresscircle:first-child { + margin-left: 0 + } + + .swal2-progresssteps .swal2-progresscircle:last-child { + margin-right: 0 + } + + .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep { + background: #3085d6 + } + + .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progresscircle { + background: #add8e6 + } + + .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progressline { + background: #add8e6 + } + + .swal2-progresssteps .swal2-progressline { + background: #3085d6; + height: .4em; + margin: 0 -1px; + z-index: 10 + } + +[class^=swal2] { + -webkit-tap-highlight-color: transparent +} + +@-webkit-keyframes showSweetAlert { + 0% { + -webkit-transform: scale(.7); + transform: scale(.7) + } + + 45% { + -webkit-transform: scale(1.05); + transform: scale(1.05) + } + + 80% { + -webkit-transform: scale(.95); + transform: scale(.95) + } + + 100% { + -webkit-transform: scale(1); + transform: scale(1) + } +} + +@keyframes showSweetAlert { + 0% { + -webkit-transform: scale(.7); + transform: scale(.7) + } + + 45% { + -webkit-transform: scale(1.05); + transform: scale(1.05) + } + + 80% { + -webkit-transform: scale(.95); + transform: scale(.95) + } + + 100% { + -webkit-transform: scale(1); + transform: scale(1) + } +} + +@-webkit-keyframes hideSweetAlert { + 0% { + -webkit-transform: scale(1); + transform: scale(1); + opacity: 1 + } + + 100% { + -webkit-transform: scale(.5); + transform: scale(.5); + opacity: 0 + } +} + +@keyframes hideSweetAlert { + 0% { + -webkit-transform: scale(1); + transform: scale(1); + opacity: 1 + } + + 100% { + -webkit-transform: scale(.5); + transform: scale(.5); + opacity: 0 + } +} + +.swal2-show { + -webkit-animation: showSweetAlert .3s; + animation: showSweetAlert .3s +} + + .swal2-show.swal2-noanimation { + -webkit-animation: none; + animation: none + } + +.swal2-hide { + -webkit-animation: hideSweetAlert .15s forwards; + animation: hideSweetAlert .15s forwards +} + + .swal2-hide.swal2-noanimation { + -webkit-animation: none; + animation: none + } + +@-webkit-keyframes animate-success-tip { + 0% { + width: 0; + left: 1px; + top: 19px + } + + 54% { + width: 0; + left: 1px; + top: 19px + } + + 70% { + width: 50px; + left: -8px; + top: 37px + } + + 84% { + width: 17px; + left: 21px; + top: 48px + } + + 100% { + width: 25px; + left: 14px; + top: 45px + } +} + +@keyframes animate-success-tip { + 0% { + width: 0; + left: 1px; + top: 19px + } + + 54% { + width: 0; + left: 1px; + top: 19px + } + + 70% { + width: 50px; + left: -8px; + top: 37px + } + + 84% { + width: 17px; + left: 21px; + top: 48px + } + + 100% { + width: 25px; + left: 14px; + top: 45px + } +} + +@-webkit-keyframes animate-success-long { + 0% { + width: 0; + right: 46px; + top: 54px + } + + 65% { + width: 0; + right: 46px; + top: 54px + } + + 84% { + width: 55px; + right: 0; + top: 35px + } + + 100% { + width: 47px; + right: 8px; + top: 38px + } +} + +@keyframes animate-success-long { + 0% { + width: 0; + right: 46px; + top: 54px + } + + 65% { + width: 0; + right: 46px; + top: 54px + } + + 84% { + width: 55px; + right: 0; + top: 35px + } + + 100% { + width: 47px; + right: 8px; + top: 38px + } +} + +@-webkit-keyframes rotatePlaceholder { + 0% { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg) + } + + 5% { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg) + } + + 12% { + -webkit-transform: rotate(-405deg); + transform: rotate(-405deg) + } + + 100% { + -webkit-transform: rotate(-405deg); + transform: rotate(-405deg) + } +} + +@keyframes rotatePlaceholder { + 0% { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg) + } + + 5% { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg) + } + + 12% { + -webkit-transform: rotate(-405deg); + transform: rotate(-405deg) + } + + 100% { + -webkit-transform: rotate(-405deg); + transform: rotate(-405deg) + } +} + +.swal2-animate-success-line-tip { + -webkit-animation: animate-success-tip .75s; + animation: animate-success-tip .75s +} + +.swal2-animate-success-line-long { + -webkit-animation: animate-success-long .75s; + animation: animate-success-long .75s +} + +.swal2-success.swal2-animate-success-icon .swal2-success-circular-line-right { + -webkit-animation: rotatePlaceholder 4.25s ease-in; + animation: rotatePlaceholder 4.25s ease-in +} + +@-webkit-keyframes animate-error-icon { + 0% { + -webkit-transform: rotateX(100deg); + transform: rotateX(100deg); + opacity: 0 + } + + 100% { + -webkit-transform: rotateX(0); + transform: rotateX(0); + opacity: 1 + } +} + +@keyframes animate-error-icon { + 0% { + -webkit-transform: rotateX(100deg); + transform: rotateX(100deg); + opacity: 0 + } + + 100% { + -webkit-transform: rotateX(0); + transform: rotateX(0); + opacity: 1 + } +} + +.swal2-animate-error-icon { + -webkit-animation: animate-error-icon .5s; + animation: animate-error-icon .5s +} + +@-webkit-keyframes animate-x-mark { + 0% { + -webkit-transform: scale(.4); + transform: scale(.4); + margin-top: 26px; + opacity: 0 + } + + 50% { + -webkit-transform: scale(.4); + transform: scale(.4); + margin-top: 26px; + opacity: 0 + } + + 80% { + -webkit-transform: scale(1.15); + transform: scale(1.15); + margin-top: -6px + } + + 100% { + -webkit-transform: scale(1); + transform: scale(1); + margin-top: 0; + opacity: 1 + } +} + +@keyframes animate-x-mark { + 0% { + -webkit-transform: scale(.4); + transform: scale(.4); + margin-top: 26px; + opacity: 0 + } + + 50% { + -webkit-transform: scale(.4); + transform: scale(.4); + margin-top: 26px; + opacity: 0 + } + + 80% { + -webkit-transform: scale(1.15); + transform: scale(1.15); + margin-top: -6px + } + + 100% { + -webkit-transform: scale(1); + transform: scale(1); + margin-top: 0; + opacity: 1 + } +} + +.swal2-animate-x-mark { + -webkit-animation: animate-x-mark .5s; + animation: animate-x-mark .5s +} + +@-webkit-keyframes rotate-loading { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0) + } + + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg) + } +} + +@keyframes rotate-loading { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0) + } + + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg) + } +} diff --git a/Presentation/HushianWebApp/wwwroot/Before/lib/tippyjs/tippy-bundle.umd.min1222.js b/Presentation/HushianWebApp/wwwroot/Before/lib/tippyjs/tippy-bundle.umd.min1222.js new file mode 100644 index 0000000..9f4f8bc --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/Before/lib/tippyjs/tippy-bundle.umd.min1222.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t=t||self).tippy=e(t.Popper)}(this,(function(t){"use strict";var e="undefined"!=typeof window&&"undefined"!=typeof document,n=!!e&&!!window.msCrypto,r={passive:!0,capture:!0},o=function(){return document.body};function i(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function a(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function s(t,e){return"function"==typeof t?t.apply(void 0,e):t}function u(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout((function(){t(r)}),e)};var n}function p(t,e){var n=Object.assign({},t);return e.forEach((function(t){delete n[t]})),n}function c(t){return[].concat(t)}function f(t,e){-1===t.indexOf(e)&&t.push(e)}function l(t){return t.split("-")[0]}function d(t){return[].slice.call(t)}function v(t){return Object.keys(t).reduce((function(e,n){return void 0!==t[n]&&(e[n]=t[n]),e}),{})}function m(){return document.createElement("div")}function g(t){return["Element","Fragment"].some((function(e){return a(t,e)}))}function h(t){return a(t,"MouseEvent")}function b(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function y(t){return g(t)?[t]:function(t){return a(t,"NodeList")}(t)?d(t):Array.isArray(t)?t:d(document.querySelectorAll(t))}function w(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function x(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function E(t){var e,n=c(t)[0];return null!=n&&null!=(e=n.ownerDocument)&&e.body?n.ownerDocument:document}function O(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[r](e,n)}))}function C(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var T={isTouch:!1},A=0;function L(){T.isTouch||(T.isTouch=!0,window.performance&&document.addEventListener("mousemove",D))}function D(){var t=performance.now();t-A<20&&(T.isTouch=!1,document.removeEventListener("mousemove",D)),A=t}function k(){var t=document.activeElement;if(b(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var R=Object.assign({appendTo:o,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),P=Object.keys(R);function j(t){var e=(t.plugins||[]).reduce((function(e,n){var r,o=n.name,i=n.defaultValue;o&&(e[o]=void 0!==t[o]?t[o]:null!=(r=R[o])?r:i);return e}),{});return Object.assign({},t,e)}function M(t,e){var n=Object.assign({},e,{content:s(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(j(Object.assign({},R,{plugins:e}))):P).reduce((function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e}),{})}(t,e.plugins));return n.aria=Object.assign({},R.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}function V(t,e){t.innerHTML=e}function I(t){var e=m();return!0===t?e.className="tippy-arrow":(e.className="tippy-svg-arrow",g(t)?e.appendChild(t):V(e,t)),e}function S(t,e){g(e.content)?(V(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?V(t,e.content):t.textContent=e.content)}function B(t){var e=t.firstElementChild,n=d(e.children);return{box:e,content:n.find((function(t){return t.classList.contains("tippy-content")})),arrow:n.find((function(t){return t.classList.contains("tippy-arrow")||t.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(t){return t.classList.contains("tippy-backdrop")}))}}function N(t){var e=m(),n=m();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=m();function o(n,r){var o=B(e),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||S(a,t.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(I(r.arrow))):i.appendChild(I(r.arrow)):s&&i.removeChild(s)}return r.className="tippy-content",r.setAttribute("data-state","hidden"),S(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props),{popper:e,onUpdate:o}}N.$$tippy=!0;var H=1,U=[],_=[];function z(e,a){var p,g,b,y,A,L,D,k,P=M(e,Object.assign({},R,j(v(a)))),V=!1,I=!1,S=!1,N=!1,z=[],F=u(wt,P.interactiveDebounce),W=H++,X=(k=P.plugins).filter((function(t,e){return k.indexOf(t)===e})),Y={id:W,reference:e,popper:m(),popperInstance:null,props:P,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:X,clearDelayTimeouts:function(){clearTimeout(p),clearTimeout(g),cancelAnimationFrame(b)},setProps:function(t){if(Y.state.isDestroyed)return;at("onBeforeUpdate",[Y,t]),bt();var n=Y.props,r=M(e,Object.assign({},n,v(t),{ignoreAttributes:!0}));Y.props=r,ht(),n.interactiveDebounce!==r.interactiveDebounce&&(pt(),F=u(wt,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?c(n.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");ut(),it(),J&&J(n,r);Y.popperInstance&&(Ct(),At().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));at("onAfterUpdate",[Y,t])},setContent:function(t){Y.setProps({content:t})},show:function(){var t=Y.state.isVisible,e=Y.state.isDestroyed,n=!Y.state.isEnabled,r=T.isTouch&&!Y.props.touch,a=i(Y.props.duration,0,R.duration);if(t||e||n||r)return;if(et().hasAttribute("disabled"))return;if(at("onShow",[Y],!1),!1===Y.props.onShow(Y))return;Y.state.isVisible=!0,tt()&&($.style.visibility="visible");it(),dt(),Y.state.isMounted||($.style.transition="none");if(tt()){var u=rt(),p=u.box,c=u.content;w([p,c],0)}L=function(){var t;if(Y.state.isVisible&&!N){if(N=!0,$.offsetHeight,$.style.transition=Y.props.moveTransition,tt()&&Y.props.animation){var e=rt(),n=e.box,r=e.content;w([n,r],a),x([n,r],"visible")}st(),ut(),f(_,Y),null==(t=Y.popperInstance)||t.forceUpdate(),at("onMount",[Y]),Y.props.animation&&tt()&&function(t,e){mt(t,e)}(a,(function(){Y.state.isShown=!0,at("onShown",[Y])}))}},function(){var t,e=Y.props.appendTo,n=et();t=Y.props.interactive&&e===o||"parent"===e?n.parentNode:s(e,[n]);t.contains($)||t.appendChild($);Y.state.isMounted=!0,Ct()}()},hide:function(){var t=!Y.state.isVisible,e=Y.state.isDestroyed,n=!Y.state.isEnabled,r=i(Y.props.duration,1,R.duration);if(t||e||n)return;if(at("onHide",[Y],!1),!1===Y.props.onHide(Y))return;Y.state.isVisible=!1,Y.state.isShown=!1,N=!1,V=!1,tt()&&($.style.visibility="hidden");if(pt(),vt(),it(!0),tt()){var o=rt(),a=o.box,s=o.content;Y.props.animation&&(w([a,s],r),x([a,s],"hidden"))}st(),ut(),Y.props.animation?tt()&&function(t,e){mt(t,(function(){!Y.state.isVisible&&$.parentNode&&$.parentNode.contains($)&&e()}))}(r,Y.unmount):Y.unmount()},hideWithInteractivity:function(t){nt().addEventListener("mousemove",F),f(U,F),F(t)},enable:function(){Y.state.isEnabled=!0},disable:function(){Y.hide(),Y.state.isEnabled=!1},unmount:function(){Y.state.isVisible&&Y.hide();if(!Y.state.isMounted)return;Tt(),At().forEach((function(t){t._tippy.unmount()})),$.parentNode&&$.parentNode.removeChild($);_=_.filter((function(t){return t!==Y})),Y.state.isMounted=!1,at("onHidden",[Y])},destroy:function(){if(Y.state.isDestroyed)return;Y.clearDelayTimeouts(),Y.unmount(),bt(),delete e._tippy,Y.state.isDestroyed=!0,at("onDestroy",[Y])}};if(!P.render)return Y;var q=P.render(Y),$=q.popper,J=q.onUpdate;$.setAttribute("data-tippy-root",""),$.id="tippy-"+Y.id,Y.popper=$,e._tippy=Y,$._tippy=Y;var G=X.map((function(t){return t.fn(Y)})),K=e.hasAttribute("aria-expanded");return ht(),ut(),it(),at("onCreate",[Y]),P.showOnCreate&&Lt(),$.addEventListener("mouseenter",(function(){Y.props.interactive&&Y.state.isVisible&&Y.clearDelayTimeouts()})),$.addEventListener("mouseleave",(function(){Y.props.interactive&&Y.props.trigger.indexOf("mouseenter")>=0&&nt().addEventListener("mousemove",F)})),Y;function Q(){var t=Y.props.touch;return Array.isArray(t)?t:[t,0]}function Z(){return"hold"===Q()[0]}function tt(){var t;return!(null==(t=Y.props.render)||!t.$$tippy)}function et(){return D||e}function nt(){var t=et().parentNode;return t?E(t):document}function rt(){return B($)}function ot(t){return Y.state.isMounted&&!Y.state.isVisible||T.isTouch||y&&"focus"===y.type?0:i(Y.props.delay,t?0:1,R.delay)}function it(t){void 0===t&&(t=!1),$.style.pointerEvents=Y.props.interactive&&!t?"":"none",$.style.zIndex=""+Y.props.zIndex}function at(t,e,n){var r;(void 0===n&&(n=!0),G.forEach((function(n){n[t]&&n[t].apply(n,e)})),n)&&(r=Y.props)[t].apply(r,e)}function st(){var t=Y.props.aria;if(t.content){var n="aria-"+t.content,r=$.id;c(Y.props.triggerTarget||e).forEach((function(t){var e=t.getAttribute(n);if(Y.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else{var o=e&&e.replace(r,"").trim();o?t.setAttribute(n,o):t.removeAttribute(n)}}))}}function ut(){!K&&Y.props.aria.expanded&&c(Y.props.triggerTarget||e).forEach((function(t){Y.props.interactive?t.setAttribute("aria-expanded",Y.state.isVisible&&t===et()?"true":"false"):t.removeAttribute("aria-expanded")}))}function pt(){nt().removeEventListener("mousemove",F),U=U.filter((function(t){return t!==F}))}function ct(t){if(!T.isTouch||!S&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!Y.props.interactive||!C($,n)){if(c(Y.props.triggerTarget||e).some((function(t){return C(t,n)}))){if(T.isTouch)return;if(Y.state.isVisible&&Y.props.trigger.indexOf("click")>=0)return}else at("onClickOutside",[Y,t]);!0===Y.props.hideOnClick&&(Y.clearDelayTimeouts(),Y.hide(),I=!0,setTimeout((function(){I=!1})),Y.state.isMounted||vt())}}}function ft(){S=!0}function lt(){S=!1}function dt(){var t=nt();t.addEventListener("mousedown",ct,!0),t.addEventListener("touchend",ct,r),t.addEventListener("touchstart",lt,r),t.addEventListener("touchmove",ft,r)}function vt(){var t=nt();t.removeEventListener("mousedown",ct,!0),t.removeEventListener("touchend",ct,r),t.removeEventListener("touchstart",lt,r),t.removeEventListener("touchmove",ft,r)}function mt(t,e){var n=rt().box;function r(t){t.target===n&&(O(n,"remove",r),e())}if(0===t)return e();O(n,"remove",A),O(n,"add",r),A=r}function gt(t,n,r){void 0===r&&(r=!1),c(Y.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),z.push({node:e,eventType:t,handler:n,options:r})}))}function ht(){var t;Z()&&(gt("touchstart",yt,{passive:!0}),gt("touchend",xt,{passive:!0})),(t=Y.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(gt(t,yt),t){case"mouseenter":gt("mouseleave",xt);break;case"focus":gt(n?"focusout":"blur",Et);break;case"focusin":gt("focusout",Et)}}))}function bt(){z.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,o=t.options;e.removeEventListener(n,r,o)})),z=[]}function yt(t){var e,n=!1;if(Y.state.isEnabled&&!Ot(t)&&!I){var r="focus"===(null==(e=y)?void 0:e.type);y=t,D=t.currentTarget,ut(),!Y.state.isVisible&&h(t)&&U.forEach((function(e){return e(t)})),"click"===t.type&&(Y.props.trigger.indexOf("mouseenter")<0||V)&&!1!==Y.props.hideOnClick&&Y.state.isVisible?n=!0:Lt(t),"click"===t.type&&(V=!n),n&&!r&&Dt(t)}}function wt(t){var e=t.target,n=et().contains(e)||$.contains(e);"mousemove"===t.type&&n||function(t,e){var n=e.clientX,r=e.clientY;return t.every((function(t){var e=t.popperRect,o=t.popperState,i=t.props.interactiveBorder,a=l(o.placement),s=o.modifiersData.offset;if(!s)return!0;var u="bottom"===a?s.top.y:0,p="top"===a?s.bottom.y:0,c="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=e.top-r+u>i,v=r-e.bottom-p>i,m=e.left-n+c>i,g=n-e.right-f>i;return d||v||m||g}))}(At().concat($).map((function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:P}:null})).filter(Boolean),t)&&(pt(),Dt(t))}function xt(t){Ot(t)||Y.props.trigger.indexOf("click")>=0&&V||(Y.props.interactive?Y.hideWithInteractivity(t):Dt(t))}function Et(t){Y.props.trigger.indexOf("focusin")<0&&t.target!==et()||Y.props.interactive&&t.relatedTarget&&$.contains(t.relatedTarget)||Dt(t)}function Ot(t){return!!T.isTouch&&Z()!==t.type.indexOf("touch")>=0}function Ct(){Tt();var n=Y.props,r=n.popperOptions,o=n.placement,i=n.offset,a=n.getReferenceClientRect,s=n.moveTransition,u=tt()?B($).arrow:null,p=a?{getBoundingClientRect:a,contextElement:a.contextElement||et()}:e,c=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(tt()){var n=rt().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];tt()&&u&&c.push({name:"arrow",options:{element:u,padding:3}}),c.push.apply(c,(null==r?void 0:r.modifiers)||[]),Y.popperInstance=t.createPopper(p,$,Object.assign({},r,{placement:o,onFirstUpdate:L,modifiers:c}))}function Tt(){Y.popperInstance&&(Y.popperInstance.destroy(),Y.popperInstance=null)}function At(){return d($.querySelectorAll("[data-tippy-root]"))}function Lt(t){Y.clearDelayTimeouts(),t&&at("onTrigger",[Y,t]),dt();var e=ot(!0),n=Q(),r=n[0],o=n[1];T.isTouch&&"hold"===r&&o&&(e=o),e?p=setTimeout((function(){Y.show()}),e):Y.show()}function Dt(t){if(Y.clearDelayTimeouts(),at("onUntrigger",[Y,t]),Y.state.isVisible){if(!(Y.props.trigger.indexOf("mouseenter")>=0&&Y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&V)){var e=ot(!1);e?g=setTimeout((function(){Y.state.isVisible&&Y.hide()}),e):b=requestAnimationFrame((function(){Y.hide()}))}}else vt()}}function F(t,e){void 0===e&&(e={});var n=R.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",L,r),window.addEventListener("blur",k);var o=Object.assign({},e,{plugins:n}),i=y(t).reduce((function(t,e){var n=e&&z(e,o);return n&&t.push(n),t}),[]);return g(t)?i[0]:i}F.defaultProps=R,F.setDefaultProps=function(t){Object.keys(t).forEach((function(e){R[e]=t[e]}))},F.currentInput=T;var W=Object.assign({},t.applyStyles,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}}),X={mouseover:"mouseenter",focusin:"focus",click:"click"};var Y={name:"animateFill",defaultValue:!1,fn:function(t){var e;if(null==(e=t.props.render)||!e.$$tippy)return{};var n=B(t.popper),r=n.box,o=n.content,i=t.props.animateFill?function(){var t=m();return t.className="tippy-backdrop",x([t],"hidden"),t}():null;return{onCreate:function(){i&&(r.insertBefore(i,r.firstElementChild),r.setAttribute("data-animatefill",""),r.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(i){var t=r.style.transitionDuration,e=Number(t.replace("ms",""));o.style.transitionDelay=Math.round(e/10)+"ms",i.style.transitionDuration=t,x([i],"visible")}},onShow:function(){i&&(i.style.transitionDuration="0ms")},onHide:function(){i&&x([i],"hidden")}}}};var q={clientX:0,clientY:0},$=[];function J(t){var e=t.clientX,n=t.clientY;q={clientX:e,clientY:n}}var G={name:"followCursor",defaultValue:!1,fn:function(t){var e=t.reference,n=E(t.props.triggerTarget||e),r=!1,o=!1,i=!0,a=t.props;function s(){return"initial"===t.props.followCursor&&t.state.isVisible}function u(){n.addEventListener("mousemove",f)}function p(){n.removeEventListener("mousemove",f)}function c(){r=!0,t.setProps({getReferenceClientRect:null}),r=!1}function f(n){var r=!n.target||e.contains(n.target),o=t.props.followCursor,i=n.clientX,a=n.clientY,s=e.getBoundingClientRect(),u=i-s.left,p=a-s.top;!r&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=e.getBoundingClientRect(),n=i,r=a;"initial"===o&&(n=t.left+u,r=t.top+p);var s="horizontal"===o?t.top:r,c="vertical"===o?t.right:n,f="horizontal"===o?t.bottom:r,l="vertical"===o?t.left:n;return{width:c-l,height:f-s,top:s,right:c,bottom:f,left:l}}})}function l(){t.props.followCursor&&($.push({instance:t,doc:n}),function(t){t.addEventListener("mousemove",J)}(n))}function d(){0===($=$.filter((function(e){return e.instance!==t}))).filter((function(t){return t.doc===n})).length&&function(t){t.removeEventListener("mousemove",J)}(n)}return{onCreate:l,onDestroy:d,onBeforeUpdate:function(){a=t.props},onAfterUpdate:function(e,n){var i=n.followCursor;r||void 0!==i&&a.followCursor!==i&&(d(),i?(l(),!t.state.isMounted||o||s()||u()):(p(),c()))},onMount:function(){t.props.followCursor&&!o&&(i&&(f(q),i=!1),s()||u())},onTrigger:function(t,e){h(e)&&(q={clientX:e.clientX,clientY:e.clientY}),o="focus"===e.type},onHidden:function(){t.props.followCursor&&(c(),p(),i=!0)}}}};var K={name:"inlinePositioning",defaultValue:!1,fn:function(t){var e,n=t.reference;var r=-1,o=!1,i=[],a={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(o){var a=o.state;t.props.inlinePositioning&&(-1!==i.indexOf(a.placement)&&(i=[]),e!==a.placement&&-1===i.indexOf(a.placement)&&(i.push(a.placement),t.setProps({getReferenceClientRect:function(){return function(t){return function(t,e,n,r){if(n.length<2||null===t)return e;if(2===n.length&&r>=0&&n[0].left>n[1].right)return n[r]||e;switch(t){case"top":case"bottom":var o=n[0],i=n[n.length-1],a="top"===t,s=o.top,u=i.bottom,p=a?o.left:i.left,c=a?o.right:i.right;return{top:s,bottom:u,left:p,right:c,width:c-p,height:u-s};case"left":case"right":var f=Math.min.apply(Math,n.map((function(t){return t.left}))),l=Math.max.apply(Math,n.map((function(t){return t.right}))),d=n.filter((function(e){return"left"===t?e.left===f:e.right===l})),v=d[0].top,m=d[d.length-1].bottom;return{top:v,bottom:m,left:f,right:l,width:l-f,height:m-v};default:return e}}(l(t),n.getBoundingClientRect(),d(n.getClientRects()),r)}(a.placement)}})),e=a.placement)}};function s(){var e;o||(e=function(t,e){var n;return{popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat(((null==(n=t.popperOptions)?void 0:n.modifiers)||[]).filter((function(t){return t.name!==e.name})),[e])})}}(t.props,a),o=!0,t.setProps(e),o=!1)}return{onCreate:s,onAfterUpdate:s,onTrigger:function(e,n){if(h(n)){var o=d(t.reference.getClientRects()),i=o.find((function(t){return t.left-2<=n.clientX&&t.right+2>=n.clientX&&t.top-2<=n.clientY&&t.bottom+2>=n.clientY})),a=o.indexOf(i);r=a>-1?a:r}},onHidden:function(){r=-1}}}};var Q={name:"sticky",defaultValue:!1,fn:function(t){var e=t.reference,n=t.popper;function r(e){return!0===t.props.sticky||t.props.sticky===e}var o=null,i=null;function a(){var s=r("reference")?(t.popperInstance?t.popperInstance.state.elements.reference:e).getBoundingClientRect():null,u=r("popper")?n.getBoundingClientRect():null;(s&&Z(o,s)||u&&Z(i,u))&&t.popperInstance&&t.popperInstance.update(),o=s,i=u,t.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){t.props.sticky&&a()}}}};function Z(t,e){return!t||!e||(t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||t.left!==e.left)}return e&&function(t){var e=document.createElement("style");e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var n=document.head,r=document.querySelector("head>style,head>link");r?n.insertBefore(e,r):n.appendChild(e)}('.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}'),F.setDefaultProps({plugins:[Y,G,K,Q],render:N}),F.createSingleton=function(t,e){var n;void 0===e&&(e={});var r,o=t,i=[],a=[],s=e.overrides,u=[],f=!1;function l(){a=o.map((function(t){return c(t.props.triggerTarget||t.reference)})).reduce((function(t,e){return t.concat(e)}),[])}function d(){i=o.map((function(t){return t.reference}))}function v(t){o.forEach((function(e){t?e.enable():e.disable()}))}function g(t){return o.map((function(e){var n=e.setProps;return e.setProps=function(o){n(o),e.reference===r&&t.setProps(o)},function(){e.setProps=n}}))}function h(t,e){var n=a.indexOf(e);if(e!==r){r=e;var u=(s||[]).concat("content").reduce((function(t,e){return t[e]=o[n].props[e],t}),{});t.setProps(Object.assign({},u,{getReferenceClientRect:"function"==typeof u.getReferenceClientRect?u.getReferenceClientRect:function(){var t;return null==(t=i[n])?void 0:t.getBoundingClientRect()}}))}}v(!1),d(),l();var b={fn:function(){return{onDestroy:function(){v(!0)},onHidden:function(){r=null},onClickOutside:function(t){t.props.showOnCreate&&!f&&(f=!0,r=null)},onShow:function(t){t.props.showOnCreate&&!f&&(f=!0,h(t,i[0]))},onTrigger:function(t,e){h(t,e.currentTarget)}}}},y=F(m(),Object.assign({},p(e,["overrides"]),{plugins:[b].concat(e.plugins||[]),triggerTarget:a,popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],[W])})})),w=y.show;y.show=function(t){if(w(),!r&&null==t)return h(y,i[0]);if(!r||null!=t){if("number"==typeof t)return i[t]&&h(y,i[t]);if(o.indexOf(t)>=0){var e=t.reference;return h(y,e)}return i.indexOf(t)>=0?h(y,t):void 0}},y.showNext=function(){var t=i[0];if(!r)return y.show(0);var e=i.indexOf(r);y.show(i[e+1]||t)},y.showPrevious=function(){var t=i[i.length-1];if(!r)return y.show(t);var e=i.indexOf(r),n=i[e-1]||t;y.show(n)};var x=y.setProps;return y.setProps=function(t){s=t.overrides||s,x(t)},y.setInstances=function(t){v(!0),u.forEach((function(t){return t()})),o=t,v(!1),d(),l(),u=g(y),y.setProps({triggerTarget:a})},u=g(y),y},F.delegate=function(t,e){var n=[],o=[],i=!1,a=e.target,s=p(e,["target"]),u=Object.assign({},s,{trigger:"manual",touch:!1}),f=Object.assign({touch:R.touch},s,{showOnCreate:!0}),l=F(t,u);function d(t){if(t.target&&!i){var n=t.target.closest(a);if(n){var r=n.getAttribute("data-tippy-trigger")||e.trigger||R.trigger;if(!n._tippy&&!("touchstart"===t.type&&"boolean"==typeof f.touch||"touchstart"!==t.type&&r.indexOf(X[t.type])<0)){var s=F(n,f);s&&(o=o.concat(s))}}}}function v(t,e,r,o){void 0===o&&(o=!1),t.addEventListener(e,r,o),n.push({node:t,eventType:e,handler:r,options:o})}return c(l).forEach((function(t){var e=t.destroy,a=t.enable,s=t.disable;t.destroy=function(t){void 0===t&&(t=!0),t&&o.forEach((function(t){t.destroy()})),o=[],n.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,o=t.options;e.removeEventListener(n,r,o)})),n=[],e()},t.enable=function(){a(),o.forEach((function(t){return t.enable()})),i=!1},t.disable=function(){s(),o.forEach((function(t){return t.disable()})),i=!0},function(t){var e=t.reference;v(e,"touchstart",d,r),v(e,"mouseover",d),v(e,"focusin",d),v(e,"click",d)}(t)})),l},F.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,r=e.duration;_.forEach((function(t){var e=!1;if(n&&(e=b(n)?t.reference===n:t.popper===n.popper),!e){var o=t.props.duration;t.setProps({duration:r}),t.hide(),t.state.isDestroyed||t.setProps({duration:o})}}))},F.roundArrow='',F})); +//# sourceMappingURL=tippy-bundle.umd.min.js.map diff --git a/Presentation/HushianWebApp/wwwroot/background.jpg b/Presentation/HushianWebApp/wwwroot/background.jpg new file mode 100644 index 0000000..92f4734 Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/background.jpg differ diff --git a/Presentation/HushianWebApp/wwwroot/css/app.css b/Presentation/HushianWebApp/wwwroot/css/app.css new file mode 100644 index 0000000..e0e71d1 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/css/app.css @@ -0,0 +1,144 @@ +html, body { + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; +} + +h1:focus { + outline: none; +} + +a, .btn-link { + color: #0071c1; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus { + box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb; +} + +.content { + padding-top: 1.1rem; +} + +.valid.modified:not([type=checkbox]) { + outline: 1px solid #26b050; +} + +.invalid { + outline: 1px solid red; +} + +.validation-message { + color: red; +} + +#blazor-error-ui { + color-scheme: light only; + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + box-sizing: border-box; + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + + #blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; + } + +.blazor-error-boundary { + background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; + padding: 1rem 1rem 1rem 3.7rem; + color: white; +} + + .blazor-error-boundary::after { + content: "An error has occurred." + } + +.loading-progress { + position: relative; + display: block; + width: 8rem; + height: 8rem; + margin: 20vh auto 1rem auto; +} + + .loading-progress circle { + fill: none; + stroke: #e0e0e0; + stroke-width: 0.6rem; + transform-origin: 50% 50%; + transform: rotate(-90deg); + } + + .loading-progress circle:last-child { + stroke: #1b6ec2; + stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%; + transition: stroke-dasharray 0.05s ease-in-out; + } + +.loading-progress-text { + position: absolute; + text-align: center; + font-weight: bold; + inset: calc(20vh + 3.25rem) 0 auto 0.2rem; +} + + .loading-progress-text:after { + content: var(--blazor-load-percentage-text, "Loading"); + } + +code { + color: #c02d76; +} + +.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder { + color: var(--bs-secondary-color); + text-align: end; +} + +.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { + text-align: start; +} + +.loader { + --r1: 154%; + --r2: 68.5%; + width: 60px; + aspect-ratio: 1; + border-radius: 50%; + background: radial-gradient(var(--r1) var(--r2) at top,#0000 79.5%,#269af2 80%), radial-gradient(var(--r1) var(--r2) at bottom,#269af2 79.5%,#0000 80%), radial-gradient(var(--r1) var(--r2) at top,#0000 79.5%,#269af2 80%), #ccc; + background-size: 50.5% 220%; + background-position: -100% 0%,0% 0%,100% 0%; + background-repeat: no-repeat; + animation: l9 2s infinite linear; + position: relative; + display: block; + margin: 20vh auto 1rem auto; +} + +@keyframes l9 { + 33% { + background-position: 0% 33%,100% 33%,200% 33% + } + + 66% { + background-position: -100% 66%,0% 66%,100% 66% + } + + 100% { + background-position: 0% 100%,100% 100%,200% 100% + } +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/wwwroot/defprofile.jpg b/Presentation/HushianWebApp/wwwroot/defprofile.jpg new file mode 100644 index 0000000..2d7f3ab Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/defprofile.jpg differ diff --git a/Presentation/HushianWebApp/wwwroot/favicon.png b/Presentation/HushianWebApp/wwwroot/favicon.png new file mode 100644 index 0000000..8422b59 Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/favicon.png differ diff --git a/Presentation/HushianWebApp/wwwroot/fonts/bootstrap-icons.woff2 b/Presentation/HushianWebApp/wwwroot/fonts/bootstrap-icons.woff2 new file mode 100644 index 0000000..177cf3f Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/fonts/bootstrap-icons.woff2 differ diff --git a/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu4WxKOzY.woff2 b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu4WxKOzY.woff2 new file mode 100644 index 0000000..a7f32b6 Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu4WxKOzY.woff2 differ diff --git a/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu4mxK.woff2 b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu4mxK.woff2 new file mode 100644 index 0000000..2d7b215 Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu4mxK.woff2 differ diff --git a/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu5mxKOzY.woff2 b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu5mxKOzY.woff2 new file mode 100644 index 0000000..a4962e9 Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu5mxKOzY.woff2 differ diff --git a/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu72xKOzY.woff2 b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu72xKOzY.woff2 new file mode 100644 index 0000000..e3d708f Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu72xKOzY.woff2 differ diff --git a/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu7GxKOzY.woff2 b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu7GxKOzY.woff2 new file mode 100644 index 0000000..20c87e6 Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu7GxKOzY.woff2 differ diff --git a/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu7WxKOzY.woff2 b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu7WxKOzY.woff2 new file mode 100644 index 0000000..cfd043d Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu7WxKOzY.woff2 differ diff --git a/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu7mxKOzY.woff2 b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu7mxKOzY.woff2 new file mode 100644 index 0000000..47ce460 Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/fonts/roboto/KFOmCnqEu92Fr1Mu7mxKOzY.woff2 differ diff --git a/Presentation/HushianWebApp/wwwroot/fonts/vazir/vazir-regular.eot b/Presentation/HushianWebApp/wwwroot/fonts/vazir/vazir-regular.eot new file mode 100644 index 0000000..1359456 Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/fonts/vazir/vazir-regular.eot differ diff --git a/Presentation/HushianWebApp/wwwroot/fonts/vazir/vazir-regular.ttf b/Presentation/HushianWebApp/wwwroot/fonts/vazir/vazir-regular.ttf new file mode 100644 index 0000000..7fd8033 Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/fonts/vazir/vazir-regular.ttf differ diff --git a/Presentation/HushianWebApp/wwwroot/fonts/vazir/vazir-regular.woff b/Presentation/HushianWebApp/wwwroot/fonts/vazir/vazir-regular.woff new file mode 100644 index 0000000..c397650 Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/fonts/vazir/vazir-regular.woff differ diff --git a/Presentation/HushianWebApp/wwwroot/fonts/vazir/vazir-regular.woff2 b/Presentation/HushianWebApp/wwwroot/fonts/vazir/vazir-regular.woff2 new file mode 100644 index 0000000..cb95c4f Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/fonts/vazir/vazir-regular.woff2 differ diff --git a/Presentation/HushianWebApp/wwwroot/funCus.js b/Presentation/HushianWebApp/wwwroot/funCus.js new file mode 100644 index 0000000..e830699 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/funCus.js @@ -0,0 +1,4 @@ +function scrollToTarget() { + const target = document.getElementById("target"); + target.scrollIntoView({ behavior: "smooth" }); // اسکرول نرم +} \ No newline at end of file diff --git a/Presentation/HushianWebApp/wwwroot/icon-192.png b/Presentation/HushianWebApp/wwwroot/icon-192.png new file mode 100644 index 0000000..166f56d Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/icon-192.png differ diff --git a/Presentation/HushianWebApp/wwwroot/icon-512.png b/Presentation/HushianWebApp/wwwroot/icon-512.png new file mode 100644 index 0000000..c2dd484 Binary files /dev/null and b/Presentation/HushianWebApp/wwwroot/icon-512.png differ diff --git a/Presentation/HushianWebApp/wwwroot/index.html b/Presentation/HushianWebApp/wwwroot/index.html new file mode 100644 index 0000000..289b99d --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/index.html @@ -0,0 +1,59 @@ + + + + + + + Hushian + + + + + + + + + + + + + + + + +
    +
    +
    +
    + + + +
    + An unhandled error has occurred. + Reload + 🗙 +
    + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Presentation/HushianWebApp/wwwroot/manifest.webmanifest b/Presentation/HushianWebApp/wwwroot/manifest.webmanifest new file mode 100644 index 0000000..10ac6d5 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/manifest.webmanifest @@ -0,0 +1,22 @@ +{ + "name": "HushianWebApp", + "short_name": "HushianWebApp", + "id": "./", + "start_url": "./", + "display": "standalone", + "background_color": "#ffffff", + "theme_color": "#03173d", + "prefer_related_applications": false, + "icons": [ + { + "src": "icon-512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "icon-192.png", + "type": "image/png", + "sizes": "192x192" + } + ] +} diff --git a/Presentation/HushianWebApp/wwwroot/sample-data/weather.json b/Presentation/HushianWebApp/wwwroot/sample-data/weather.json new file mode 100644 index 0000000..b745973 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/sample-data/weather.json @@ -0,0 +1,27 @@ +[ + { + "date": "2022-01-06", + "temperatureC": 1, + "summary": "Freezing" + }, + { + "date": "2022-01-07", + "temperatureC": 14, + "summary": "Bracing" + }, + { + "date": "2022-01-08", + "temperatureC": -13, + "summary": "Freezing" + }, + { + "date": "2022-01-09", + "temperatureC": -16, + "summary": "Balmy" + }, + { + "date": "2022-01-10", + "temperatureC": -2, + "summary": "Chilly" + } +] diff --git a/Presentation/HushianWebApp/wwwroot/scroll-visibility.js b/Presentation/HushianWebApp/wwwroot/scroll-visibility.js new file mode 100644 index 0000000..63156b8 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/scroll-visibility.js @@ -0,0 +1,16 @@ +window.observeVisibility = (dotNetRef) => { + const elements = document.querySelectorAll(".chat-bubble[data-id]"); + const observer = new IntersectionObserver(entries => { + entries.forEach(entry => { + if (entry.isIntersecting) { + const id = entry.target.getAttribute("data-id"); + dotNetRef.invokeMethodAsync("MarkAsRead", parseInt(id)); + observer.unobserve(entry.target); // دیگه دوباره نخونه + } + }); + }, { + threshold: 0.6 // 60٪ از پیام دیده بشه + }); + + elements.forEach(el => observer.observe(el)); +}; diff --git a/Presentation/HushianWebApp/wwwroot/service-worker.js b/Presentation/HushianWebApp/wwwroot/service-worker.js new file mode 100644 index 0000000..fe614da --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/service-worker.js @@ -0,0 +1,4 @@ +// In development, always fetch from the network and do not enable offline support. +// This is because caching would make development more difficult (changes would not +// be reflected on the first load after each change). +self.addEventListener('fetch', () => { }); diff --git a/Presentation/HushianWebApp/wwwroot/service-worker.published.js b/Presentation/HushianWebApp/wwwroot/service-worker.published.js new file mode 100644 index 0000000..1f7f543 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/service-worker.published.js @@ -0,0 +1,55 @@ +// Caution! Be sure you understand the caveats before publishing an application with +// offline support. See https://aka.ms/blazor-offline-considerations + +self.importScripts('./service-worker-assets.js'); +self.addEventListener('install', event => event.waitUntil(onInstall(event))); +self.addEventListener('activate', event => event.waitUntil(onActivate(event))); +self.addEventListener('fetch', event => event.respondWith(onFetch(event))); + +const cacheNamePrefix = 'offline-cache-'; +const cacheName = `${cacheNamePrefix}${self.assetsManifest.version}`; +const offlineAssetsInclude = [ /\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/, /\.blat$/, /\.dat$/ ]; +const offlineAssetsExclude = [ /^service-worker\.js$/ ]; + +// Replace with your base path if you are hosting on a subfolder. Ensure there is a trailing '/'. +const base = "/"; +const baseUrl = new URL(base, self.origin); +const manifestUrlList = self.assetsManifest.assets.map(asset => new URL(asset.url, baseUrl).href); + +async function onInstall(event) { + console.info('Service worker: Install'); + + // Fetch and cache all matching items from the assets manifest + const assetsRequests = self.assetsManifest.assets + .filter(asset => offlineAssetsInclude.some(pattern => pattern.test(asset.url))) + .filter(asset => !offlineAssetsExclude.some(pattern => pattern.test(asset.url))) + .map(asset => new Request(asset.url, { integrity: asset.hash, cache: 'no-cache' })); + await caches.open(cacheName).then(cache => cache.addAll(assetsRequests)); +} + +async function onActivate(event) { + console.info('Service worker: Activate'); + + // Delete unused caches + const cacheKeys = await caches.keys(); + await Promise.all(cacheKeys + .filter(key => key.startsWith(cacheNamePrefix) && key !== cacheName) + .map(key => caches.delete(key))); +} + +async function onFetch(event) { + let cachedResponse = null; + if (event.request.method === 'GET') { + // For all navigation requests, try to serve index.html from cache, + // unless that request is for an offline resource. + // If you need some URLs to be server-rendered, edit the following check to exclude those URLs + const shouldServeIndexHtml = event.request.mode === 'navigate' + && !manifestUrlList.some(url => url === event.request.url); + + const request = shouldServeIndexHtml ? 'index.html' : event.request; + const cache = await caches.open(cacheName); + cachedResponse = await cache.match(request); + } + + return cachedResponse || fetch(event.request); +}