diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fc7d0ef..845a70c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,7 +12,7 @@ jobs: - uses: NuGet/setup-nuget@v1 - uses: actions/setup-dotnet@v3 with: - dotnet-version: '8.0.x' + dotnet-version: '9.0.x' - name: read common.props id: commonProps diff --git a/Directory.Build.props b/Directory.Build.props index ee55437..bb62cde 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ <Project> <PropertyGroup> - <AbpVersion>8.3.2</AbpVersion> + <AbpVersion>9.0.2</AbpVersion> </PropertyGroup> </Project> \ No newline at end of file diff --git a/common.props b/common.props index 61ddb4c..2413626 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ <Project> <PropertyGroup> <LangVersion>latest</LangVersion> - <Version>2.2.0</Version> + <Version>2.3.0</Version> <NoWarn>$(NoWarn);CS1591</NoWarn> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <Authors>EasyAbp Team</Authors> diff --git a/sample/MyAbpApp/src/MyAbpApp.Application.Contracts/MyAbpApp.Application.Contracts.csproj b/sample/MyAbpApp/src/MyAbpApp.Application.Contracts/MyAbpApp.Application.Contracts.csproj index 223158b..4c24302 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Application.Contracts/MyAbpApp.Application.Contracts.csproj +++ b/sample/MyAbpApp/src/MyAbpApp.Application.Contracts/MyAbpApp.Application.Contracts.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>MyAbpApp</RootNamespace> </PropertyGroup> diff --git a/sample/MyAbpApp/src/MyAbpApp.Application/MyAbpApp.Application.csproj b/sample/MyAbpApp/src/MyAbpApp.Application/MyAbpApp.Application.csproj index 341cb03..3c5b8f1 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Application/MyAbpApp.Application.csproj +++ b/sample/MyAbpApp/src/MyAbpApp.Application/MyAbpApp.Application.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>MyAbpApp</RootNamespace> </PropertyGroup> diff --git a/sample/MyAbpApp/src/MyAbpApp.DbMigrator/MyAbpApp.DbMigrator.csproj b/sample/MyAbpApp/src/MyAbpApp.DbMigrator/MyAbpApp.DbMigrator.csproj index 7d69858..4dfe538 100644 --- a/sample/MyAbpApp/src/MyAbpApp.DbMigrator/MyAbpApp.DbMigrator.csproj +++ b/sample/MyAbpApp/src/MyAbpApp.DbMigrator/MyAbpApp.DbMigrator.csproj @@ -4,7 +4,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> </PropertyGroup> <ItemGroup> @@ -18,9 +18,9 @@ <ItemGroup> <PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" /> - <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> - <PackageReference Include="Serilog.Sinks.File" Version="5.0.0" /> - <PackageReference Include="Serilog.Sinks.Console" Version="5.0.0" /> + <PackageReference Include="Serilog.Sinks.Async" Version="2.0.0" /> + <PackageReference Include="Serilog.Sinks.File" Version="6.0.0" /> + <PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" /> </ItemGroup> <ItemGroup> diff --git a/sample/MyAbpApp/src/MyAbpApp.Domain.Shared/MyAbpApp.Domain.Shared.csproj b/sample/MyAbpApp/src/MyAbpApp.Domain.Shared/MyAbpApp.Domain.Shared.csproj index 3b47f38..27f9f9f 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Domain.Shared/MyAbpApp.Domain.Shared.csproj +++ b/sample/MyAbpApp/src/MyAbpApp.Domain.Shared/MyAbpApp.Domain.Shared.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>MyAbpApp</RootNamespace> <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> </PropertyGroup> @@ -27,7 +27,7 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.4" /> + <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.0" /> </ItemGroup> <ItemGroup> diff --git a/sample/MyAbpApp/src/MyAbpApp.Domain/MyAbpApp.Domain.csproj b/sample/MyAbpApp/src/MyAbpApp.Domain/MyAbpApp.Domain.csproj index 7759622..d411db7 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Domain/MyAbpApp.Domain.csproj +++ b/sample/MyAbpApp/src/MyAbpApp.Domain/MyAbpApp.Domain.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>MyAbpApp</RootNamespace> </PropertyGroup> diff --git a/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/Migrations/20241229100601_UpgradedToAbp_9_0.Designer.cs b/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/Migrations/20241229100601_UpgradedToAbp_9_0.Designer.cs new file mode 100644 index 0000000..90423c6 --- /dev/null +++ b/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/Migrations/20241229100601_UpgradedToAbp_9_0.Designer.cs @@ -0,0 +1,2675 @@ +// <auto-generated /> +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using MyAbpApp.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace MyAbpApp.Migrations +{ + [DbContext(typeof(MyAbpAppDbContext))] + [Migration("20241229100601_UpgradedToAbp_9_0")] + partial class UpgradedToAbp_9_0 + { + /// <inheritdoc /> + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "9.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)") + .HasColumnName("ApplicationName"); + + b.Property<string>("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property<string>("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientId"); + + b.Property<string>("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property<string>("ClientName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("ClientName"); + + b.Property<string>("Comments") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Comments"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<string>("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("CorrelationId"); + + b.Property<string>("Exceptions") + .HasColumnType("nvarchar(max)"); + + b.Property<int>("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property<DateTime>("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<string>("HttpMethod") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("HttpMethod"); + + b.Property<int?>("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property<Guid?>("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); + + b.Property<string>("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property<Guid?>("ImpersonatorUserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); + + b.Property<string>("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property<string>("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("TenantName"); + + b.Property<string>("Url") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Url"); + + b.Property<Guid?>("UserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); + + b.Property<string>("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<Guid>("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property<int>("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property<DateTime>("ExecutionTime") + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); + + b.Property<string>("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<string>("MethodName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("MethodName"); + + b.Property<string>("Parameters") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasColumnName("Parameters"); + + b.Property<string>("ServiceName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ServiceName"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<Guid>("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property<DateTime>("ChangeTime") + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); + + b.Property<byte>("ChangeType") + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); + + b.Property<string>("EntityId") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityId"); + + b.Property<Guid?>("EntityTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property<string>("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<Guid>("EntityChangeId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("NewValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("NewValue"); + + b.Property<string>("OriginalValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("OriginalValue"); + + b.Property<string>("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("PropertyName"); + + b.Property<string>("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<DateTime>("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<bool>("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property<string>("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("nvarchar(max)"); + + b.Property<string>("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<DateTime?>("LastTryTime") + .HasColumnType("datetime2"); + + b.Property<DateTime>("NextTryTime") + .HasColumnType("datetime2"); + + b.Property<byte>("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint") + .HasDefaultValue((byte)15); + + b.Property<short>("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<string>("DefaultValue") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<string>("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<string>("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<string>("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<string>("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<bool>("IsAvailableToHost") + .HasColumnType("bit"); + + b.Property<bool>("IsVisibleToClients") + .HasColumnType("bit"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<string>("ParentName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<string>("ValueType") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<string>("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<string>("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property<Guid>("Id") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<string>("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<bool>("IsStatic") + .HasColumnType("bit"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<string>("Regex") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property<string>("RegexDescription") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<bool>("Required") + .HasColumnType("bit"); + + b.Property<int>("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property<Guid>("Id") + .HasColumnType("uniqueidentifier"); + + b.Property<Guid?>("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property<Guid>("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property<Guid?>("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property<Guid>("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property<Guid>("Id") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<int>("EntityVersion") + .HasColumnType("int"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<bool>("IsDefault") + .HasColumnType("bit") + .HasColumnName("IsDefault"); + + b.Property<bool>("IsPublic") + .HasColumnType("bit") + .HasColumnName("IsPublic"); + + b.Property<bool>("IsStatic") + .HasColumnType("bit") + .HasColumnName("IsStatic"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<string>("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property<Guid>("Id") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<string>("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property<Guid>("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property<Guid>("Id") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Action") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property<string>("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property<string>("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property<string>("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<string>("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<DateTime>("CreationTime") + .HasColumnType("datetime2"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<string>("Identity") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property<string>("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<Guid?>("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property<Guid>("Id") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("DeviceInfo") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<string>("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property<DateTime?>("LastAccessed") + .HasColumnType("datetime2"); + + b.Property<string>("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<DateTime>("SignedIn") + .HasColumnType("datetime2"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property<Guid>("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property<Guid>("Id") + .HasColumnType("uniqueidentifier"); + + b.Property<int>("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<DateTime>("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property<Guid?>("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property<Guid?>("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property<DateTime?>("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property<string>("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property<bool>("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property<int>("EntityVersion") + .HasColumnType("int"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<bool>("IsActive") + .HasColumnType("bit") + .HasColumnName("IsActive"); + + b.Property<bool>("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property<bool>("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property<DateTime?>("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property<Guid?>("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property<DateTimeOffset?>("LastPasswordChangeTime") + .HasColumnType("datetimeoffset"); + + b.Property<bool>("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property<DateTimeOffset?>("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property<string>("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property<string>("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property<string>("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property<string>("PasswordHash") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("PasswordHash"); + + b.Property<string>("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property<bool>("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property<string>("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property<bool>("ShouldChangePasswordOnNextLogin") + .HasColumnType("bit"); + + b.Property<string>("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property<bool>("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property<string>("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property<Guid>("Id") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<string>("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property<Guid>("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property<Guid>("Id") + .HasColumnType("uniqueidentifier"); + + b.Property<DateTime>("EndTime") + .HasColumnType("datetime2"); + + b.Property<Guid>("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property<DateTime>("StartTime") + .HasColumnType("datetime2"); + + b.Property<Guid>("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property<Guid>("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<string>("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property<Guid>("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property<Guid>("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property<DateTime>("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property<Guid?>("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property<Guid>("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property<Guid>("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property<Guid>("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property<string>("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property<Guid>("Id") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("nvarchar(95)") + .HasColumnName("Code"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<DateTime>("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property<Guid?>("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property<Guid?>("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property<DateTime?>("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property<string>("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("DisplayName"); + + b.Property<int>("EntityVersion") + .HasColumnType("int"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<bool>("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property<DateTime?>("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property<Guid?>("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property<Guid?>("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property<Guid>("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property<Guid>("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property<DateTime>("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property<Guid?>("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("AllowedAccessTokenSigningAlgorithms") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<DateTime>("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property<Guid?>("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property<Guid?>("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property<DateTime?>("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property<string>("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property<string>("DisplayName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<bool>("Enabled") + .HasColumnType("bit"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<bool>("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property<DateTime?>("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property<Guid?>("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<bool>("ShowInDiscoveryDocument") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.ToTable("IdentityServerApiResources", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => + { + b.Property<Guid>("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Type") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("ApiResourceId", "Type"); + + b.ToTable("IdentityServerApiResourceClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.Property<Guid>("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Key") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property<string>("Value") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("ApiResourceId", "Key", "Value"); + + b.ToTable("IdentityServerApiResourceProperties", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => + { + b.Property<Guid>("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Scope") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("ApiResourceId", "Scope"); + + b.ToTable("IdentityServerApiResourceScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => + { + b.Property<Guid>("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Type") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property<string>("Value") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.Property<string>("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property<DateTime?>("Expiration") + .HasColumnType("datetime2"); + + b.HasKey("ApiResourceId", "Type", "Value"); + + b.ToTable("IdentityServerApiResourceSecrets", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<DateTime>("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property<Guid?>("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property<Guid?>("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property<DateTime?>("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property<string>("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property<string>("DisplayName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<bool>("Emphasize") + .HasColumnType("bit"); + + b.Property<bool>("Enabled") + .HasColumnType("bit"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<bool>("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property<DateTime?>("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property<Guid?>("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<bool>("Required") + .HasColumnType("bit"); + + b.Property<bool>("ShowInDiscoveryDocument") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.ToTable("IdentityServerApiScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => + { + b.Property<Guid>("ApiScopeId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Type") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("ApiScopeId", "Type"); + + b.ToTable("IdentityServerApiScopeClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => + { + b.Property<Guid>("ApiScopeId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Key") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property<string>("Value") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("ApiScopeId", "Key", "Value"); + + b.ToTable("IdentityServerApiScopeProperties", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<int>("AbsoluteRefreshTokenLifetime") + .HasColumnType("int"); + + b.Property<int>("AccessTokenLifetime") + .HasColumnType("int"); + + b.Property<int>("AccessTokenType") + .HasColumnType("int"); + + b.Property<bool>("AllowAccessTokensViaBrowser") + .HasColumnType("bit"); + + b.Property<bool>("AllowOfflineAccess") + .HasColumnType("bit"); + + b.Property<bool>("AllowPlainTextPkce") + .HasColumnType("bit"); + + b.Property<bool>("AllowRememberConsent") + .HasColumnType("bit"); + + b.Property<string>("AllowedIdentityTokenSigningAlgorithms") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property<bool>("AlwaysIncludeUserClaimsInIdToken") + .HasColumnType("bit"); + + b.Property<bool>("AlwaysSendClientClaims") + .HasColumnType("bit"); + + b.Property<int>("AuthorizationCodeLifetime") + .HasColumnType("int"); + + b.Property<bool>("BackChannelLogoutSessionRequired") + .HasColumnType("bit"); + + b.Property<string>("BackChannelLogoutUri") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property<string>("ClientClaimsPrefix") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<string>("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<string>("ClientName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<string>("ClientUri") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<int?>("ConsentLifetime") + .HasColumnType("int"); + + b.Property<DateTime>("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property<Guid?>("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property<Guid?>("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property<DateTime?>("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property<string>("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property<int>("DeviceCodeLifetime") + .HasColumnType("int"); + + b.Property<bool>("EnableLocalLogin") + .HasColumnType("bit"); + + b.Property<bool>("Enabled") + .HasColumnType("bit"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<bool>("FrontChannelLogoutSessionRequired") + .HasColumnType("bit"); + + b.Property<string>("FrontChannelLogoutUri") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property<int>("IdentityTokenLifetime") + .HasColumnType("int"); + + b.Property<bool>("IncludeJwtId") + .HasColumnType("bit"); + + b.Property<bool>("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property<DateTime?>("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property<Guid?>("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property<string>("LogoUri") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property<string>("PairWiseSubjectSalt") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<string>("ProtocolType") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<int>("RefreshTokenExpiration") + .HasColumnType("int"); + + b.Property<int>("RefreshTokenUsage") + .HasColumnType("int"); + + b.Property<bool>("RequireClientSecret") + .HasColumnType("bit"); + + b.Property<bool>("RequireConsent") + .HasColumnType("bit"); + + b.Property<bool>("RequirePkce") + .HasColumnType("bit"); + + b.Property<bool>("RequireRequestObject") + .HasColumnType("bit"); + + b.Property<int>("SlidingRefreshTokenLifetime") + .HasColumnType("int"); + + b.Property<bool>("UpdateAccessTokenClaimsOnRefresh") + .HasColumnType("bit"); + + b.Property<string>("UserCodeType") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property<int?>("UserSsoLifetime") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("IdentityServerClients", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => + { + b.Property<Guid>("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Type") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property<string>("Value") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.HasKey("ClientId", "Type", "Value"); + + b.ToTable("IdentityServerClientClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => + { + b.Property<Guid>("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Origin") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.HasKey("ClientId", "Origin"); + + b.ToTable("IdentityServerClientCorsOrigins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => + { + b.Property<Guid>("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("GrantType") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.HasKey("ClientId", "GrantType"); + + b.ToTable("IdentityServerClientGrantTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => + { + b.Property<Guid>("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Provider") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("ClientId", "Provider"); + + b.ToTable("IdentityServerClientIdPRestrictions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => + { + b.Property<Guid>("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("PostLogoutRedirectUri") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("ClientId", "PostLogoutRedirectUri"); + + b.ToTable("IdentityServerClientPostLogoutRedirectUris", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => + { + b.Property<Guid>("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Key") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property<string>("Value") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("ClientId", "Key", "Value"); + + b.ToTable("IdentityServerClientProperties", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => + { + b.Property<Guid>("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("RedirectUri") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("ClientId", "RedirectUri"); + + b.ToTable("IdentityServerClientRedirectUris", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => + { + b.Property<Guid>("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Scope") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("ClientId", "Scope"); + + b.ToTable("IdentityServerClientScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => + { + b.Property<Guid>("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Type") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property<string>("Value") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.Property<string>("Description") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property<DateTime?>("Expiration") + .HasColumnType("datetime2"); + + b.HasKey("ClientId", "Type", "Value"); + + b.ToTable("IdentityServerClientSecrets", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<DateTime>("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property<Guid?>("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property<string>("Data") + .IsRequired() + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); + + b.Property<string>("Description") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<string>("DeviceCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<DateTime>("Expiration") + .HasColumnType("datetime2"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<string>("SessionId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property<string>("SubjectId") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<string>("UserCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("DeviceCode") + .IsUnique(); + + b.HasIndex("Expiration"); + + b.HasIndex("UserCode"); + + b.ToTable("IdentityServerDeviceFlowCodes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => + { + b.Property<string>("Key") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<string>("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<DateTime?>("ConsumedTime") + .HasColumnType("datetime2"); + + b.Property<DateTime>("CreationTime") + .HasColumnType("datetime2"); + + b.Property<string>("Data") + .IsRequired() + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); + + b.Property<string>("Description") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<DateTime?>("Expiration") + .HasColumnType("datetime2"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<Guid>("Id") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("SessionId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property<string>("SubjectId") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<string>("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Key"); + + b.HasIndex("Expiration"); + + b.HasIndex("SubjectId", "ClientId", "Type"); + + b.HasIndex("SubjectId", "SessionId", "Type"); + + b.ToTable("IdentityServerPersistedGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<DateTime>("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property<Guid?>("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property<Guid?>("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property<DateTime?>("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property<string>("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property<string>("DisplayName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<bool>("Emphasize") + .HasColumnType("bit"); + + b.Property<bool>("Enabled") + .HasColumnType("bit"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<bool>("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property<DateTime?>("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property<Guid?>("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property<bool>("Required") + .HasColumnType("bit"); + + b.Property<bool>("ShowInDiscoveryDocument") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.ToTable("IdentityServerIdentityResources", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => + { + b.Property<Guid>("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Type") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("IdentityResourceId", "Type"); + + b.ToTable("IdentityServerIdentityResourceClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => + { + b.Property<Guid>("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Key") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property<string>("Value") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("IdentityResourceId", "Key", "Value"); + + b.ToTable("IdentityServerIdentityResourceProperties", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<string>("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<string>("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<bool>("IsEnabled") + .HasColumnType("bit"); + + b.Property<byte>("MultiTenancySide") + .HasColumnType("tinyint"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<string>("ParentName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<string>("Providers") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<string>("StateCheckers") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<string>("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<Guid?>("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[TenantId] IS NOT NULL"); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<string>("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<string>("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property<Guid>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property<string>("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property<string>("Description") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property<string>("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property<string>("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<bool>("IsEncrypted") + .HasColumnType("bit"); + + b.Property<bool>("IsInherited") + .HasColumnType("bit"); + + b.Property<bool>("IsVisibleToClients") + .HasColumnType("bit"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property<string>("Providers") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property<Guid>("Id") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property<DateTime>("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property<Guid?>("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property<Guid?>("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property<DateTime?>("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property<int>("EntityVersion") + .HasColumnType("int"); + + b.Property<string>("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property<bool>("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property<DateTime?>("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property<Guid?>("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property<string>("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("NormalizedName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property<Guid>("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property<string>("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property<string>("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("UserClaims") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Properties") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Scopes") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Secrets") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) + .WithMany("UserClaims") + .HasForeignKey("ApiScopeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) + .WithMany("Properties") + .HasForeignKey("ApiScopeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("Claims") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("AllowedCorsOrigins") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("AllowedGrantTypes") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("IdentityProviderRestrictions") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("PostLogoutRedirectUris") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("Properties") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("RedirectUris") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("AllowedScopes") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("ClientSecrets") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) + .WithMany("UserClaims") + .HasForeignKey("IdentityResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => + { + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) + .WithMany("Properties") + .HasForeignKey("IdentityResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => + { + b.Navigation("Properties"); + + b.Navigation("Scopes"); + + b.Navigation("Secrets"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => + { + b.Navigation("AllowedCorsOrigins"); + + b.Navigation("AllowedGrantTypes"); + + b.Navigation("AllowedScopes"); + + b.Navigation("Claims"); + + b.Navigation("ClientSecrets"); + + b.Navigation("IdentityProviderRestrictions"); + + b.Navigation("PostLogoutRedirectUris"); + + b.Navigation("Properties"); + + b.Navigation("RedirectUris"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/Migrations/20241229100601_UpgradedToAbp_9_0.cs b/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/Migrations/20241229100601_UpgradedToAbp_9_0.cs new file mode 100644 index 0000000..d0c378f --- /dev/null +++ b/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/Migrations/20241229100601_UpgradedToAbp_9_0.cs @@ -0,0 +1,50 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace MyAbpApp.Migrations +{ + /// <inheritdoc /> + public partial class UpgradedToAbp_9_0 : Migration + { + /// <inheritdoc /> + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn<string>( + name: "IpAddresses", + table: "AbpSessions", + type: "nvarchar(2048)", + maxLength: 2048, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(256)", + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AddColumn<string>( + name: "ExtraProperties", + table: "AbpSessions", + type: "nvarchar(max)", + nullable: true); + } + + /// <inheritdoc /> + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ExtraProperties", + table: "AbpSessions"); + + migrationBuilder.AlterColumn<string>( + name: "IpAddresses", + table: "AbpSessions", + type: "nvarchar(256)", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(2048)", + oldMaxLength: 2048, + oldNullable: true); + } + } +} diff --git a/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/Migrations/MyAbpAppDbContextModelSnapshot.cs b/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/Migrations/MyAbpAppDbContextModelSnapshot.cs index 3907748..9394bf4 100644 --- a/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/Migrations/MyAbpAppDbContextModelSnapshot.cs +++ b/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/Migrations/MyAbpAppDbContextModelSnapshot.cs @@ -19,7 +19,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("ProductVersion", "9.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); @@ -718,9 +718,13 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property<string>("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + b.Property<string>("IpAddresses") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.Property<DateTime?>("LastAccessed") .HasColumnType("datetime2"); @@ -1804,8 +1808,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasMaxLength(200) .HasColumnType("nvarchar(200)"); - b.Property<DateTime?>("Expiration") - .IsRequired() + b.Property<DateTime>("Expiration") .HasColumnType("datetime2"); b.Property<string>("ExtraProperties") diff --git a/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/MyAbpApp.EntityFrameworkCore.csproj b/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/MyAbpApp.EntityFrameworkCore.csproj index fc2d77e..d8e6aa6 100644 --- a/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/MyAbpApp.EntityFrameworkCore.csproj +++ b/sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/MyAbpApp.EntityFrameworkCore.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>MyAbpApp</RootNamespace> </PropertyGroup> @@ -21,7 +21,7 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.4"> + <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0"> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> <PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets> </PackageReference> diff --git a/sample/MyAbpApp/src/MyAbpApp.HttpApi.Client/MyAbpApp.HttpApi.Client.csproj b/sample/MyAbpApp/src/MyAbpApp.HttpApi.Client/MyAbpApp.HttpApi.Client.csproj index 92a9510..bbdfd30 100644 --- a/sample/MyAbpApp/src/MyAbpApp.HttpApi.Client/MyAbpApp.HttpApi.Client.csproj +++ b/sample/MyAbpApp/src/MyAbpApp.HttpApi.Client/MyAbpApp.HttpApi.Client.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>MyAbpApp</RootNamespace> </PropertyGroup> diff --git a/sample/MyAbpApp/src/MyAbpApp.HttpApi/MyAbpApp.HttpApi.csproj b/sample/MyAbpApp/src/MyAbpApp.HttpApi/MyAbpApp.HttpApi.csproj index 849d567..ad1a754 100644 --- a/sample/MyAbpApp/src/MyAbpApp.HttpApi/MyAbpApp.HttpApi.csproj +++ b/sample/MyAbpApp/src/MyAbpApp.HttpApi/MyAbpApp.HttpApi.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>MyAbpApp</RootNamespace> </PropertyGroup> diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/MyAbpApp.Web.csproj b/sample/MyAbpApp/src/MyAbpApp.Web/MyAbpApp.Web.csproj index f7a6a69..22a9d3a 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/MyAbpApp.Web.csproj +++ b/sample/MyAbpApp/src/MyAbpApp.Web/MyAbpApp.Web.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>MyAbpApp.Web</RootNamespace> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> @@ -33,8 +33,8 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Serilog.AspNetCore" Version="8.0.0" /> - <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> + <PackageReference Include="Serilog.AspNetCore" Version="8.0.2" /> + <PackageReference Include="Serilog.Sinks.Async" Version="2.0.0" /> </ItemGroup> <ItemGroup> @@ -42,7 +42,7 @@ <ProjectReference Include="..\MyAbpApp.Application\MyAbpApp.Application.csproj" /> <ProjectReference Include="..\MyAbpApp.HttpApi\MyAbpApp.HttpApi.csproj" /> <ProjectReference Include="..\MyAbpApp.EntityFrameworkCore\MyAbpApp.EntityFrameworkCore.csproj" /> - <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="3.3.2" /> + <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="4.0.3" /> <PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" /> <PackageReference Include="Volo.Abp.Swashbuckle" Version="$(AbpVersion)" /> <PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="$(AbpVersion)" /> diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/MyAbpAppWebModule.cs b/sample/MyAbpApp/src/MyAbpApp.Web/MyAbpAppWebModule.cs index 5cbc919..458827b 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/MyAbpAppWebModule.cs +++ b/sample/MyAbpApp/src/MyAbpApp.Web/MyAbpAppWebModule.cs @@ -216,7 +216,7 @@ public override void OnApplicationInitialization(ApplicationInitializationContex } app.UseCorrelationId(); - app.UseStaticFiles(); + app.MapAbpStaticAssets(); app.UseRouting(); app.UseAuthentication(); app.UseJwtTokenMiddleware(); diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/Program.cs b/sample/MyAbpApp/src/MyAbpApp.Web/Program.cs index e26bca8..7e9d023 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/Program.cs +++ b/sample/MyAbpApp/src/MyAbpApp.Web/Program.cs @@ -1,54 +1,56 @@ using System; -using Microsoft.AspNetCore.Hosting; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Events; -namespace MyAbpApp.Web +namespace MyAbpApp.Web; + +public class Program { - public class Program + public async static Task<int> Main(string[] args) { - public static int Main(string[] args) - { - Log.Logger = new LoggerConfiguration() + Log.Logger = new LoggerConfiguration() #if DEBUG - .MinimumLevel.Debug() + .MinimumLevel.Debug() #else - .MinimumLevel.Information() + .MinimumLevel.Information() #endif - .MinimumLevel.Override("Microsoft", LogEventLevel.Information) - .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning) - .Enrich.FromLogContext() - .WriteTo.Async(c => c.File("Logs/logs.txt")) -#if DEBUG - .WriteTo.Async(c => c.Console()) -#endif - .CreateLogger(); + .MinimumLevel.Override("Microsoft", LogEventLevel.Information) + .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning) + .Enrich.FromLogContext() + .WriteTo.Async(c => c.File("Logs/logs.txt")) + .WriteTo.Async(c => c.Console()) + .CreateLogger(); - try - { - Log.Information("Starting web host."); - CreateHostBuilder(args).Build().Run(); - return 0; - } - catch (Exception ex) - { - Log.Fatal(ex, "Host terminated unexpectedly!"); - return 1; - } - finally + try + { + Log.Information("Starting web host."); + var builder = WebApplication.CreateBuilder(args); + builder.Host.AddAppSettingsSecretsJson() + .UseAutofac() + .UseSerilog(); + await builder.AddApplicationAsync<MyAbpAppWebModule>(); + var app = builder.Build(); + await app.InitializeApplicationAsync(); + await app.RunAsync(); + return 0; + } + catch (Exception ex) + { + if (ex is HostAbortedException) { - Log.CloseAndFlush(); + throw; } - } - internal static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup<Startup>(); - }) - .UseAutofac() - .UseSerilog(); + Log.Fatal(ex, "Host terminated unexpectedly!"); + return 1; + } + finally + { + Log.CloseAndFlush(); + } } -} +} \ No newline at end of file diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/Startup.cs b/sample/MyAbpApp/src/MyAbpApp.Web/Startup.cs deleted file mode 100644 index 79b21a3..0000000 --- a/sample/MyAbpApp/src/MyAbpApp.Web/Startup.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; - -namespace MyAbpApp.Web -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { - services.AddApplication<MyAbpAppWebModule>(); - } - - public void Configure(IApplicationBuilder app) - { - app.InitializeApplication(); - } - } -} diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/package.json b/sample/MyAbpApp/src/MyAbpApp.Web/package.json index 345d8fe..51dccd7 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/package.json +++ b/sample/MyAbpApp/src/MyAbpApp.Web/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~3.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.0.3" } } \ No newline at end of file diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/css/all.css b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/css/all.css index c093364..ffdf0f0 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/css/all.css +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/css/all.css @@ -1,5 +1,5 @@ /*! - * Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2024 Fonticons, Inc. */ @@ -7,14 +7,12 @@ font-family: var(--fa-style-family, "Font Awesome 6 Free"); font-weight: var(--fa-style, 900); } -.fa-solid, -.fa-regular, -.fa-brands, .fas, .far, .fab, -.fa-sharp-solid, -.fa-classic, +.fa-solid, +.fa-regular, +.fa-brands, .fa { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; @@ -24,15 +22,24 @@ line-height: 1; text-rendering: auto; } -.fas, +.fas::before, +.far::before, +.fab::before, +.fa-solid::before, +.fa-regular::before, +.fa-brands::before, +.fa::before { + content: var(--fa); } + .fa-classic, +.fas, .fa-solid, .far, .fa-regular { font-family: 'Font Awesome 6 Free'; } -.fab, -.fa-brands { +.fa-brands, +.fab { font-family: 'Font Awesome 6 Brands'; } .fa-1x { @@ -325,5870 +332,5891 @@ /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */ -.fa-0::before { - content: "\30"; } +.fa-0 { + --fa: "\30"; } + +.fa-1 { + --fa: "\31"; } + +.fa-2 { + --fa: "\32"; } + +.fa-3 { + --fa: "\33"; } + +.fa-4 { + --fa: "\34"; } + +.fa-5 { + --fa: "\35"; } -.fa-1::before { - content: "\31"; } +.fa-6 { + --fa: "\36"; } -.fa-2::before { - content: "\32"; } +.fa-7 { + --fa: "\37"; } -.fa-3::before { - content: "\33"; } +.fa-8 { + --fa: "\38"; } -.fa-4::before { - content: "\34"; } +.fa-9 { + --fa: "\39"; } -.fa-5::before { - content: "\35"; } +.fa-fill-drip { + --fa: "\f576"; } -.fa-6::before { - content: "\36"; } +.fa-arrows-to-circle { + --fa: "\e4bd"; } -.fa-7::before { - content: "\37"; } +.fa-circle-chevron-right { + --fa: "\f138"; } -.fa-8::before { - content: "\38"; } +.fa-chevron-circle-right { + --fa: "\f138"; } -.fa-9::before { - content: "\39"; } +.fa-at { + --fa: "\40"; } -.fa-fill-drip::before { - content: "\f576"; } +.fa-trash-can { + --fa: "\f2ed"; } -.fa-arrows-to-circle::before { - content: "\e4bd"; } +.fa-trash-alt { + --fa: "\f2ed"; } -.fa-circle-chevron-right::before { - content: "\f138"; } +.fa-text-height { + --fa: "\f034"; } -.fa-chevron-circle-right::before { - content: "\f138"; } +.fa-user-xmark { + --fa: "\f235"; } -.fa-at::before { - content: "\40"; } +.fa-user-times { + --fa: "\f235"; } -.fa-trash-can::before { - content: "\f2ed"; } +.fa-stethoscope { + --fa: "\f0f1"; } -.fa-trash-alt::before { - content: "\f2ed"; } +.fa-message { + --fa: "\f27a"; } -.fa-text-height::before { - content: "\f034"; } +.fa-comment-alt { + --fa: "\f27a"; } -.fa-user-xmark::before { - content: "\f235"; } +.fa-info { + --fa: "\f129"; } -.fa-user-times::before { - content: "\f235"; } +.fa-down-left-and-up-right-to-center { + --fa: "\f422"; } -.fa-stethoscope::before { - content: "\f0f1"; } +.fa-compress-alt { + --fa: "\f422"; } -.fa-message::before { - content: "\f27a"; } +.fa-explosion { + --fa: "\e4e9"; } -.fa-comment-alt::before { - content: "\f27a"; } +.fa-file-lines { + --fa: "\f15c"; } -.fa-info::before { - content: "\f129"; } +.fa-file-alt { + --fa: "\f15c"; } -.fa-down-left-and-up-right-to-center::before { - content: "\f422"; } +.fa-file-text { + --fa: "\f15c"; } -.fa-compress-alt::before { - content: "\f422"; } +.fa-wave-square { + --fa: "\f83e"; } -.fa-explosion::before { - content: "\e4e9"; } +.fa-ring { + --fa: "\f70b"; } -.fa-file-lines::before { - content: "\f15c"; } +.fa-building-un { + --fa: "\e4d9"; } -.fa-file-alt::before { - content: "\f15c"; } +.fa-dice-three { + --fa: "\f527"; } -.fa-file-text::before { - content: "\f15c"; } +.fa-calendar-days { + --fa: "\f073"; } -.fa-wave-square::before { - content: "\f83e"; } +.fa-calendar-alt { + --fa: "\f073"; } -.fa-ring::before { - content: "\f70b"; } +.fa-anchor-circle-check { + --fa: "\e4aa"; } -.fa-building-un::before { - content: "\e4d9"; } +.fa-building-circle-arrow-right { + --fa: "\e4d1"; } -.fa-dice-three::before { - content: "\f527"; } +.fa-volleyball { + --fa: "\f45f"; } -.fa-calendar-days::before { - content: "\f073"; } +.fa-volleyball-ball { + --fa: "\f45f"; } -.fa-calendar-alt::before { - content: "\f073"; } +.fa-arrows-up-to-line { + --fa: "\e4c2"; } -.fa-anchor-circle-check::before { - content: "\e4aa"; } +.fa-sort-down { + --fa: "\f0dd"; } -.fa-building-circle-arrow-right::before { - content: "\e4d1"; } +.fa-sort-desc { + --fa: "\f0dd"; } -.fa-volleyball::before { - content: "\f45f"; } +.fa-circle-minus { + --fa: "\f056"; } -.fa-volleyball-ball::before { - content: "\f45f"; } +.fa-minus-circle { + --fa: "\f056"; } -.fa-arrows-up-to-line::before { - content: "\e4c2"; } +.fa-door-open { + --fa: "\f52b"; } -.fa-sort-down::before { - content: "\f0dd"; } +.fa-right-from-bracket { + --fa: "\f2f5"; } -.fa-sort-desc::before { - content: "\f0dd"; } +.fa-sign-out-alt { + --fa: "\f2f5"; } -.fa-circle-minus::before { - content: "\f056"; } +.fa-atom { + --fa: "\f5d2"; } -.fa-minus-circle::before { - content: "\f056"; } +.fa-soap { + --fa: "\e06e"; } -.fa-door-open::before { - content: "\f52b"; } +.fa-icons { + --fa: "\f86d"; } -.fa-right-from-bracket::before { - content: "\f2f5"; } +.fa-heart-music-camera-bolt { + --fa: "\f86d"; } -.fa-sign-out-alt::before { - content: "\f2f5"; } +.fa-microphone-lines-slash { + --fa: "\f539"; } -.fa-atom::before { - content: "\f5d2"; } +.fa-microphone-alt-slash { + --fa: "\f539"; } -.fa-soap::before { - content: "\e06e"; } +.fa-bridge-circle-check { + --fa: "\e4c9"; } -.fa-icons::before { - content: "\f86d"; } +.fa-pump-medical { + --fa: "\e06a"; } -.fa-heart-music-camera-bolt::before { - content: "\f86d"; } +.fa-fingerprint { + --fa: "\f577"; } -.fa-microphone-lines-slash::before { - content: "\f539"; } +.fa-hand-point-right { + --fa: "\f0a4"; } -.fa-microphone-alt-slash::before { - content: "\f539"; } +.fa-magnifying-glass-location { + --fa: "\f689"; } -.fa-bridge-circle-check::before { - content: "\e4c9"; } +.fa-search-location { + --fa: "\f689"; } -.fa-pump-medical::before { - content: "\e06a"; } +.fa-forward-step { + --fa: "\f051"; } -.fa-fingerprint::before { - content: "\f577"; } +.fa-step-forward { + --fa: "\f051"; } -.fa-hand-point-right::before { - content: "\f0a4"; } +.fa-face-smile-beam { + --fa: "\f5b8"; } -.fa-magnifying-glass-location::before { - content: "\f689"; } +.fa-smile-beam { + --fa: "\f5b8"; } -.fa-search-location::before { - content: "\f689"; } +.fa-flag-checkered { + --fa: "\f11e"; } -.fa-forward-step::before { - content: "\f051"; } +.fa-football { + --fa: "\f44e"; } -.fa-step-forward::before { - content: "\f051"; } +.fa-football-ball { + --fa: "\f44e"; } -.fa-face-smile-beam::before { - content: "\f5b8"; } +.fa-school-circle-exclamation { + --fa: "\e56c"; } -.fa-smile-beam::before { - content: "\f5b8"; } +.fa-crop { + --fa: "\f125"; } -.fa-flag-checkered::before { - content: "\f11e"; } +.fa-angles-down { + --fa: "\f103"; } -.fa-football::before { - content: "\f44e"; } +.fa-angle-double-down { + --fa: "\f103"; } -.fa-football-ball::before { - content: "\f44e"; } +.fa-users-rectangle { + --fa: "\e594"; } -.fa-school-circle-exclamation::before { - content: "\e56c"; } +.fa-people-roof { + --fa: "\e537"; } -.fa-crop::before { - content: "\f125"; } +.fa-people-line { + --fa: "\e534"; } -.fa-angles-down::before { - content: "\f103"; } +.fa-beer-mug-empty { + --fa: "\f0fc"; } -.fa-angle-double-down::before { - content: "\f103"; } +.fa-beer { + --fa: "\f0fc"; } -.fa-users-rectangle::before { - content: "\e594"; } +.fa-diagram-predecessor { + --fa: "\e477"; } -.fa-people-roof::before { - content: "\e537"; } +.fa-arrow-up-long { + --fa: "\f176"; } -.fa-people-line::before { - content: "\e534"; } +.fa-long-arrow-up { + --fa: "\f176"; } -.fa-beer-mug-empty::before { - content: "\f0fc"; } +.fa-fire-flame-simple { + --fa: "\f46a"; } -.fa-beer::before { - content: "\f0fc"; } +.fa-burn { + --fa: "\f46a"; } -.fa-diagram-predecessor::before { - content: "\e477"; } +.fa-person { + --fa: "\f183"; } -.fa-arrow-up-long::before { - content: "\f176"; } +.fa-male { + --fa: "\f183"; } -.fa-long-arrow-up::before { - content: "\f176"; } +.fa-laptop { + --fa: "\f109"; } -.fa-fire-flame-simple::before { - content: "\f46a"; } +.fa-file-csv { + --fa: "\f6dd"; } -.fa-burn::before { - content: "\f46a"; } +.fa-menorah { + --fa: "\f676"; } -.fa-person::before { - content: "\f183"; } +.fa-truck-plane { + --fa: "\e58f"; } -.fa-male::before { - content: "\f183"; } +.fa-record-vinyl { + --fa: "\f8d9"; } -.fa-laptop::before { - content: "\f109"; } +.fa-face-grin-stars { + --fa: "\f587"; } -.fa-file-csv::before { - content: "\f6dd"; } +.fa-grin-stars { + --fa: "\f587"; } -.fa-menorah::before { - content: "\f676"; } +.fa-bong { + --fa: "\f55c"; } -.fa-truck-plane::before { - content: "\e58f"; } +.fa-spaghetti-monster-flying { + --fa: "\f67b"; } -.fa-record-vinyl::before { - content: "\f8d9"; } +.fa-pastafarianism { + --fa: "\f67b"; } -.fa-face-grin-stars::before { - content: "\f587"; } +.fa-arrow-down-up-across-line { + --fa: "\e4af"; } -.fa-grin-stars::before { - content: "\f587"; } +.fa-spoon { + --fa: "\f2e5"; } -.fa-bong::before { - content: "\f55c"; } +.fa-utensil-spoon { + --fa: "\f2e5"; } -.fa-spaghetti-monster-flying::before { - content: "\f67b"; } +.fa-jar-wheat { + --fa: "\e517"; } -.fa-pastafarianism::before { - content: "\f67b"; } +.fa-envelopes-bulk { + --fa: "\f674"; } -.fa-arrow-down-up-across-line::before { - content: "\e4af"; } +.fa-mail-bulk { + --fa: "\f674"; } -.fa-spoon::before { - content: "\f2e5"; } +.fa-file-circle-exclamation { + --fa: "\e4eb"; } -.fa-utensil-spoon::before { - content: "\f2e5"; } +.fa-circle-h { + --fa: "\f47e"; } -.fa-jar-wheat::before { - content: "\e517"; } +.fa-hospital-symbol { + --fa: "\f47e"; } -.fa-envelopes-bulk::before { - content: "\f674"; } +.fa-pager { + --fa: "\f815"; } -.fa-mail-bulk::before { - content: "\f674"; } +.fa-address-book { + --fa: "\f2b9"; } -.fa-file-circle-exclamation::before { - content: "\e4eb"; } +.fa-contact-book { + --fa: "\f2b9"; } -.fa-circle-h::before { - content: "\f47e"; } +.fa-strikethrough { + --fa: "\f0cc"; } -.fa-hospital-symbol::before { - content: "\f47e"; } +.fa-k { + --fa: "\4b"; } -.fa-pager::before { - content: "\f815"; } +.fa-landmark-flag { + --fa: "\e51c"; } -.fa-address-book::before { - content: "\f2b9"; } +.fa-pencil { + --fa: "\f303"; } -.fa-contact-book::before { - content: "\f2b9"; } +.fa-pencil-alt { + --fa: "\f303"; } -.fa-strikethrough::before { - content: "\f0cc"; } +.fa-backward { + --fa: "\f04a"; } -.fa-k::before { - content: "\4b"; } +.fa-caret-right { + --fa: "\f0da"; } -.fa-landmark-flag::before { - content: "\e51c"; } +.fa-comments { + --fa: "\f086"; } -.fa-pencil::before { - content: "\f303"; } +.fa-paste { + --fa: "\f0ea"; } -.fa-pencil-alt::before { - content: "\f303"; } +.fa-file-clipboard { + --fa: "\f0ea"; } -.fa-backward::before { - content: "\f04a"; } +.fa-code-pull-request { + --fa: "\e13c"; } -.fa-caret-right::before { - content: "\f0da"; } +.fa-clipboard-list { + --fa: "\f46d"; } -.fa-comments::before { - content: "\f086"; } +.fa-truck-ramp-box { + --fa: "\f4de"; } -.fa-paste::before { - content: "\f0ea"; } +.fa-truck-loading { + --fa: "\f4de"; } -.fa-file-clipboard::before { - content: "\f0ea"; } +.fa-user-check { + --fa: "\f4fc"; } -.fa-code-pull-request::before { - content: "\e13c"; } +.fa-vial-virus { + --fa: "\e597"; } -.fa-clipboard-list::before { - content: "\f46d"; } +.fa-sheet-plastic { + --fa: "\e571"; } -.fa-truck-ramp-box::before { - content: "\f4de"; } +.fa-blog { + --fa: "\f781"; } -.fa-truck-loading::before { - content: "\f4de"; } +.fa-user-ninja { + --fa: "\f504"; } -.fa-user-check::before { - content: "\f4fc"; } +.fa-person-arrow-up-from-line { + --fa: "\e539"; } -.fa-vial-virus::before { - content: "\e597"; } +.fa-scroll-torah { + --fa: "\f6a0"; } -.fa-sheet-plastic::before { - content: "\e571"; } +.fa-torah { + --fa: "\f6a0"; } -.fa-blog::before { - content: "\f781"; } +.fa-broom-ball { + --fa: "\f458"; } -.fa-user-ninja::before { - content: "\f504"; } +.fa-quidditch { + --fa: "\f458"; } -.fa-person-arrow-up-from-line::before { - content: "\e539"; } +.fa-quidditch-broom-ball { + --fa: "\f458"; } -.fa-scroll-torah::before { - content: "\f6a0"; } +.fa-toggle-off { + --fa: "\f204"; } -.fa-torah::before { - content: "\f6a0"; } +.fa-box-archive { + --fa: "\f187"; } -.fa-broom-ball::before { - content: "\f458"; } +.fa-archive { + --fa: "\f187"; } -.fa-quidditch::before { - content: "\f458"; } +.fa-person-drowning { + --fa: "\e545"; } -.fa-quidditch-broom-ball::before { - content: "\f458"; } +.fa-arrow-down-9-1 { + --fa: "\f886"; } -.fa-toggle-off::before { - content: "\f204"; } +.fa-sort-numeric-desc { + --fa: "\f886"; } -.fa-box-archive::before { - content: "\f187"; } +.fa-sort-numeric-down-alt { + --fa: "\f886"; } -.fa-archive::before { - content: "\f187"; } +.fa-face-grin-tongue-squint { + --fa: "\f58a"; } -.fa-person-drowning::before { - content: "\e545"; } +.fa-grin-tongue-squint { + --fa: "\f58a"; } -.fa-arrow-down-9-1::before { - content: "\f886"; } +.fa-spray-can { + --fa: "\f5bd"; } -.fa-sort-numeric-desc::before { - content: "\f886"; } +.fa-truck-monster { + --fa: "\f63b"; } -.fa-sort-numeric-down-alt::before { - content: "\f886"; } +.fa-w { + --fa: "\57"; } -.fa-face-grin-tongue-squint::before { - content: "\f58a"; } +.fa-earth-africa { + --fa: "\f57c"; } -.fa-grin-tongue-squint::before { - content: "\f58a"; } +.fa-globe-africa { + --fa: "\f57c"; } -.fa-spray-can::before { - content: "\f5bd"; } +.fa-rainbow { + --fa: "\f75b"; } -.fa-truck-monster::before { - content: "\f63b"; } +.fa-circle-notch { + --fa: "\f1ce"; } -.fa-w::before { - content: "\57"; } +.fa-tablet-screen-button { + --fa: "\f3fa"; } -.fa-earth-africa::before { - content: "\f57c"; } +.fa-tablet-alt { + --fa: "\f3fa"; } -.fa-globe-africa::before { - content: "\f57c"; } +.fa-paw { + --fa: "\f1b0"; } -.fa-rainbow::before { - content: "\f75b"; } +.fa-cloud { + --fa: "\f0c2"; } -.fa-circle-notch::before { - content: "\f1ce"; } +.fa-trowel-bricks { + --fa: "\e58a"; } -.fa-tablet-screen-button::before { - content: "\f3fa"; } +.fa-face-flushed { + --fa: "\f579"; } -.fa-tablet-alt::before { - content: "\f3fa"; } +.fa-flushed { + --fa: "\f579"; } -.fa-paw::before { - content: "\f1b0"; } +.fa-hospital-user { + --fa: "\f80d"; } -.fa-cloud::before { - content: "\f0c2"; } +.fa-tent-arrow-left-right { + --fa: "\e57f"; } -.fa-trowel-bricks::before { - content: "\e58a"; } +.fa-gavel { + --fa: "\f0e3"; } -.fa-face-flushed::before { - content: "\f579"; } +.fa-legal { + --fa: "\f0e3"; } -.fa-flushed::before { - content: "\f579"; } +.fa-binoculars { + --fa: "\f1e5"; } -.fa-hospital-user::before { - content: "\f80d"; } +.fa-microphone-slash { + --fa: "\f131"; } -.fa-tent-arrow-left-right::before { - content: "\e57f"; } +.fa-box-tissue { + --fa: "\e05b"; } -.fa-gavel::before { - content: "\f0e3"; } +.fa-motorcycle { + --fa: "\f21c"; } -.fa-legal::before { - content: "\f0e3"; } +.fa-bell-concierge { + --fa: "\f562"; } -.fa-binoculars::before { - content: "\f1e5"; } +.fa-concierge-bell { + --fa: "\f562"; } -.fa-microphone-slash::before { - content: "\f131"; } +.fa-pen-ruler { + --fa: "\f5ae"; } -.fa-box-tissue::before { - content: "\e05b"; } +.fa-pencil-ruler { + --fa: "\f5ae"; } -.fa-motorcycle::before { - content: "\f21c"; } +.fa-people-arrows { + --fa: "\e068"; } -.fa-bell-concierge::before { - content: "\f562"; } +.fa-people-arrows-left-right { + --fa: "\e068"; } -.fa-concierge-bell::before { - content: "\f562"; } +.fa-mars-and-venus-burst { + --fa: "\e523"; } -.fa-pen-ruler::before { - content: "\f5ae"; } +.fa-square-caret-right { + --fa: "\f152"; } -.fa-pencil-ruler::before { - content: "\f5ae"; } +.fa-caret-square-right { + --fa: "\f152"; } -.fa-people-arrows::before { - content: "\e068"; } +.fa-scissors { + --fa: "\f0c4"; } -.fa-people-arrows-left-right::before { - content: "\e068"; } +.fa-cut { + --fa: "\f0c4"; } -.fa-mars-and-venus-burst::before { - content: "\e523"; } +.fa-sun-plant-wilt { + --fa: "\e57a"; } -.fa-square-caret-right::before { - content: "\f152"; } +.fa-toilets-portable { + --fa: "\e584"; } -.fa-caret-square-right::before { - content: "\f152"; } +.fa-hockey-puck { + --fa: "\f453"; } -.fa-scissors::before { - content: "\f0c4"; } +.fa-table { + --fa: "\f0ce"; } -.fa-cut::before { - content: "\f0c4"; } +.fa-magnifying-glass-arrow-right { + --fa: "\e521"; } -.fa-sun-plant-wilt::before { - content: "\e57a"; } +.fa-tachograph-digital { + --fa: "\f566"; } -.fa-toilets-portable::before { - content: "\e584"; } +.fa-digital-tachograph { + --fa: "\f566"; } -.fa-hockey-puck::before { - content: "\f453"; } +.fa-users-slash { + --fa: "\e073"; } -.fa-table::before { - content: "\f0ce"; } +.fa-clover { + --fa: "\e139"; } -.fa-magnifying-glass-arrow-right::before { - content: "\e521"; } +.fa-reply { + --fa: "\f3e5"; } -.fa-tachograph-digital::before { - content: "\f566"; } +.fa-mail-reply { + --fa: "\f3e5"; } -.fa-digital-tachograph::before { - content: "\f566"; } +.fa-star-and-crescent { + --fa: "\f699"; } -.fa-users-slash::before { - content: "\e073"; } +.fa-house-fire { + --fa: "\e50c"; } -.fa-clover::before { - content: "\e139"; } +.fa-square-minus { + --fa: "\f146"; } -.fa-reply::before { - content: "\f3e5"; } +.fa-minus-square { + --fa: "\f146"; } -.fa-mail-reply::before { - content: "\f3e5"; } +.fa-helicopter { + --fa: "\f533"; } -.fa-star-and-crescent::before { - content: "\f699"; } +.fa-compass { + --fa: "\f14e"; } -.fa-house-fire::before { - content: "\e50c"; } +.fa-square-caret-down { + --fa: "\f150"; } -.fa-square-minus::before { - content: "\f146"; } +.fa-caret-square-down { + --fa: "\f150"; } -.fa-minus-square::before { - content: "\f146"; } +.fa-file-circle-question { + --fa: "\e4ef"; } -.fa-helicopter::before { - content: "\f533"; } +.fa-laptop-code { + --fa: "\f5fc"; } -.fa-compass::before { - content: "\f14e"; } +.fa-swatchbook { + --fa: "\f5c3"; } -.fa-square-caret-down::before { - content: "\f150"; } +.fa-prescription-bottle { + --fa: "\f485"; } -.fa-caret-square-down::before { - content: "\f150"; } +.fa-bars { + --fa: "\f0c9"; } -.fa-file-circle-question::before { - content: "\e4ef"; } +.fa-navicon { + --fa: "\f0c9"; } -.fa-laptop-code::before { - content: "\f5fc"; } +.fa-people-group { + --fa: "\e533"; } -.fa-swatchbook::before { - content: "\f5c3"; } +.fa-hourglass-end { + --fa: "\f253"; } -.fa-prescription-bottle::before { - content: "\f485"; } +.fa-hourglass-3 { + --fa: "\f253"; } -.fa-bars::before { - content: "\f0c9"; } +.fa-heart-crack { + --fa: "\f7a9"; } -.fa-navicon::before { - content: "\f0c9"; } +.fa-heart-broken { + --fa: "\f7a9"; } -.fa-people-group::before { - content: "\e533"; } +.fa-square-up-right { + --fa: "\f360"; } -.fa-hourglass-end::before { - content: "\f253"; } +.fa-external-link-square-alt { + --fa: "\f360"; } -.fa-hourglass-3::before { - content: "\f253"; } +.fa-face-kiss-beam { + --fa: "\f597"; } -.fa-heart-crack::before { - content: "\f7a9"; } +.fa-kiss-beam { + --fa: "\f597"; } -.fa-heart-broken::before { - content: "\f7a9"; } +.fa-film { + --fa: "\f008"; } -.fa-square-up-right::before { - content: "\f360"; } +.fa-ruler-horizontal { + --fa: "\f547"; } -.fa-external-link-square-alt::before { - content: "\f360"; } +.fa-people-robbery { + --fa: "\e536"; } -.fa-face-kiss-beam::before { - content: "\f597"; } +.fa-lightbulb { + --fa: "\f0eb"; } -.fa-kiss-beam::before { - content: "\f597"; } +.fa-caret-left { + --fa: "\f0d9"; } -.fa-film::before { - content: "\f008"; } +.fa-circle-exclamation { + --fa: "\f06a"; } -.fa-ruler-horizontal::before { - content: "\f547"; } +.fa-exclamation-circle { + --fa: "\f06a"; } -.fa-people-robbery::before { - content: "\e536"; } +.fa-school-circle-xmark { + --fa: "\e56d"; } -.fa-lightbulb::before { - content: "\f0eb"; } +.fa-arrow-right-from-bracket { + --fa: "\f08b"; } -.fa-caret-left::before { - content: "\f0d9"; } +.fa-sign-out { + --fa: "\f08b"; } -.fa-circle-exclamation::before { - content: "\f06a"; } +.fa-circle-chevron-down { + --fa: "\f13a"; } -.fa-exclamation-circle::before { - content: "\f06a"; } +.fa-chevron-circle-down { + --fa: "\f13a"; } -.fa-school-circle-xmark::before { - content: "\e56d"; } +.fa-unlock-keyhole { + --fa: "\f13e"; } -.fa-arrow-right-from-bracket::before { - content: "\f08b"; } +.fa-unlock-alt { + --fa: "\f13e"; } -.fa-sign-out::before { - content: "\f08b"; } +.fa-cloud-showers-heavy { + --fa: "\f740"; } -.fa-circle-chevron-down::before { - content: "\f13a"; } +.fa-headphones-simple { + --fa: "\f58f"; } -.fa-chevron-circle-down::before { - content: "\f13a"; } +.fa-headphones-alt { + --fa: "\f58f"; } -.fa-unlock-keyhole::before { - content: "\f13e"; } +.fa-sitemap { + --fa: "\f0e8"; } -.fa-unlock-alt::before { - content: "\f13e"; } +.fa-circle-dollar-to-slot { + --fa: "\f4b9"; } -.fa-cloud-showers-heavy::before { - content: "\f740"; } +.fa-donate { + --fa: "\f4b9"; } -.fa-headphones-simple::before { - content: "\f58f"; } +.fa-memory { + --fa: "\f538"; } -.fa-headphones-alt::before { - content: "\f58f"; } +.fa-road-spikes { + --fa: "\e568"; } -.fa-sitemap::before { - content: "\f0e8"; } +.fa-fire-burner { + --fa: "\e4f1"; } -.fa-circle-dollar-to-slot::before { - content: "\f4b9"; } +.fa-flag { + --fa: "\f024"; } -.fa-donate::before { - content: "\f4b9"; } +.fa-hanukiah { + --fa: "\f6e6"; } -.fa-memory::before { - content: "\f538"; } +.fa-feather { + --fa: "\f52d"; } -.fa-road-spikes::before { - content: "\e568"; } +.fa-volume-low { + --fa: "\f027"; } -.fa-fire-burner::before { - content: "\e4f1"; } +.fa-volume-down { + --fa: "\f027"; } -.fa-flag::before { - content: "\f024"; } +.fa-comment-slash { + --fa: "\f4b3"; } -.fa-hanukiah::before { - content: "\f6e6"; } +.fa-cloud-sun-rain { + --fa: "\f743"; } -.fa-feather::before { - content: "\f52d"; } +.fa-compress { + --fa: "\f066"; } -.fa-volume-low::before { - content: "\f027"; } +.fa-wheat-awn { + --fa: "\e2cd"; } -.fa-volume-down::before { - content: "\f027"; } +.fa-wheat-alt { + --fa: "\e2cd"; } -.fa-comment-slash::before { - content: "\f4b3"; } +.fa-ankh { + --fa: "\f644"; } -.fa-cloud-sun-rain::before { - content: "\f743"; } +.fa-hands-holding-child { + --fa: "\e4fa"; } -.fa-compress::before { - content: "\f066"; } +.fa-asterisk { + --fa: "\2a"; } -.fa-wheat-awn::before { - content: "\e2cd"; } +.fa-square-check { + --fa: "\f14a"; } -.fa-wheat-alt::before { - content: "\e2cd"; } +.fa-check-square { + --fa: "\f14a"; } -.fa-ankh::before { - content: "\f644"; } +.fa-peseta-sign { + --fa: "\e221"; } -.fa-hands-holding-child::before { - content: "\e4fa"; } +.fa-heading { + --fa: "\f1dc"; } -.fa-asterisk::before { - content: "\2a"; } +.fa-header { + --fa: "\f1dc"; } -.fa-square-check::before { - content: "\f14a"; } +.fa-ghost { + --fa: "\f6e2"; } -.fa-check-square::before { - content: "\f14a"; } +.fa-list { + --fa: "\f03a"; } -.fa-peseta-sign::before { - content: "\e221"; } +.fa-list-squares { + --fa: "\f03a"; } -.fa-heading::before { - content: "\f1dc"; } +.fa-square-phone-flip { + --fa: "\f87b"; } -.fa-header::before { - content: "\f1dc"; } +.fa-phone-square-alt { + --fa: "\f87b"; } -.fa-ghost::before { - content: "\f6e2"; } +.fa-cart-plus { + --fa: "\f217"; } -.fa-list::before { - content: "\f03a"; } +.fa-gamepad { + --fa: "\f11b"; } -.fa-list-squares::before { - content: "\f03a"; } +.fa-circle-dot { + --fa: "\f192"; } -.fa-square-phone-flip::before { - content: "\f87b"; } +.fa-dot-circle { + --fa: "\f192"; } -.fa-phone-square-alt::before { - content: "\f87b"; } +.fa-face-dizzy { + --fa: "\f567"; } -.fa-cart-plus::before { - content: "\f217"; } +.fa-dizzy { + --fa: "\f567"; } -.fa-gamepad::before { - content: "\f11b"; } +.fa-egg { + --fa: "\f7fb"; } -.fa-circle-dot::before { - content: "\f192"; } +.fa-house-medical-circle-xmark { + --fa: "\e513"; } -.fa-dot-circle::before { - content: "\f192"; } +.fa-campground { + --fa: "\f6bb"; } -.fa-face-dizzy::before { - content: "\f567"; } +.fa-folder-plus { + --fa: "\f65e"; } -.fa-dizzy::before { - content: "\f567"; } +.fa-futbol { + --fa: "\f1e3"; } -.fa-egg::before { - content: "\f7fb"; } +.fa-futbol-ball { + --fa: "\f1e3"; } -.fa-house-medical-circle-xmark::before { - content: "\e513"; } +.fa-soccer-ball { + --fa: "\f1e3"; } -.fa-campground::before { - content: "\f6bb"; } +.fa-paintbrush { + --fa: "\f1fc"; } -.fa-folder-plus::before { - content: "\f65e"; } +.fa-paint-brush { + --fa: "\f1fc"; } -.fa-futbol::before { - content: "\f1e3"; } +.fa-lock { + --fa: "\f023"; } -.fa-futbol-ball::before { - content: "\f1e3"; } +.fa-gas-pump { + --fa: "\f52f"; } -.fa-soccer-ball::before { - content: "\f1e3"; } +.fa-hot-tub-person { + --fa: "\f593"; } -.fa-paintbrush::before { - content: "\f1fc"; } +.fa-hot-tub { + --fa: "\f593"; } -.fa-paint-brush::before { - content: "\f1fc"; } +.fa-map-location { + --fa: "\f59f"; } -.fa-lock::before { - content: "\f023"; } +.fa-map-marked { + --fa: "\f59f"; } -.fa-gas-pump::before { - content: "\f52f"; } +.fa-house-flood-water { + --fa: "\e50e"; } -.fa-hot-tub-person::before { - content: "\f593"; } +.fa-tree { + --fa: "\f1bb"; } -.fa-hot-tub::before { - content: "\f593"; } +.fa-bridge-lock { + --fa: "\e4cc"; } -.fa-map-location::before { - content: "\f59f"; } +.fa-sack-dollar { + --fa: "\f81d"; } -.fa-map-marked::before { - content: "\f59f"; } +.fa-pen-to-square { + --fa: "\f044"; } -.fa-house-flood-water::before { - content: "\e50e"; } +.fa-edit { + --fa: "\f044"; } -.fa-tree::before { - content: "\f1bb"; } +.fa-car-side { + --fa: "\f5e4"; } -.fa-bridge-lock::before { - content: "\e4cc"; } +.fa-share-nodes { + --fa: "\f1e0"; } -.fa-sack-dollar::before { - content: "\f81d"; } +.fa-share-alt { + --fa: "\f1e0"; } -.fa-pen-to-square::before { - content: "\f044"; } +.fa-heart-circle-minus { + --fa: "\e4ff"; } -.fa-edit::before { - content: "\f044"; } +.fa-hourglass-half { + --fa: "\f252"; } -.fa-car-side::before { - content: "\f5e4"; } +.fa-hourglass-2 { + --fa: "\f252"; } -.fa-share-nodes::before { - content: "\f1e0"; } +.fa-microscope { + --fa: "\f610"; } -.fa-share-alt::before { - content: "\f1e0"; } +.fa-sink { + --fa: "\e06d"; } -.fa-heart-circle-minus::before { - content: "\e4ff"; } +.fa-bag-shopping { + --fa: "\f290"; } -.fa-hourglass-half::before { - content: "\f252"; } +.fa-shopping-bag { + --fa: "\f290"; } -.fa-hourglass-2::before { - content: "\f252"; } +.fa-arrow-down-z-a { + --fa: "\f881"; } -.fa-microscope::before { - content: "\f610"; } +.fa-sort-alpha-desc { + --fa: "\f881"; } -.fa-sink::before { - content: "\e06d"; } +.fa-sort-alpha-down-alt { + --fa: "\f881"; } -.fa-bag-shopping::before { - content: "\f290"; } +.fa-mitten { + --fa: "\f7b5"; } -.fa-shopping-bag::before { - content: "\f290"; } +.fa-person-rays { + --fa: "\e54d"; } -.fa-arrow-down-z-a::before { - content: "\f881"; } +.fa-users { + --fa: "\f0c0"; } -.fa-sort-alpha-desc::before { - content: "\f881"; } +.fa-eye-slash { + --fa: "\f070"; } -.fa-sort-alpha-down-alt::before { - content: "\f881"; } +.fa-flask-vial { + --fa: "\e4f3"; } -.fa-mitten::before { - content: "\f7b5"; } +.fa-hand { + --fa: "\f256"; } -.fa-person-rays::before { - content: "\e54d"; } +.fa-hand-paper { + --fa: "\f256"; } -.fa-users::before { - content: "\f0c0"; } +.fa-om { + --fa: "\f679"; } -.fa-eye-slash::before { - content: "\f070"; } +.fa-worm { + --fa: "\e599"; } -.fa-flask-vial::before { - content: "\e4f3"; } +.fa-house-circle-xmark { + --fa: "\e50b"; } -.fa-hand::before { - content: "\f256"; } +.fa-plug { + --fa: "\f1e6"; } -.fa-hand-paper::before { - content: "\f256"; } +.fa-chevron-up { + --fa: "\f077"; } -.fa-om::before { - content: "\f679"; } +.fa-hand-spock { + --fa: "\f259"; } -.fa-worm::before { - content: "\e599"; } +.fa-stopwatch { + --fa: "\f2f2"; } -.fa-house-circle-xmark::before { - content: "\e50b"; } +.fa-face-kiss { + --fa: "\f596"; } -.fa-plug::before { - content: "\f1e6"; } +.fa-kiss { + --fa: "\f596"; } -.fa-chevron-up::before { - content: "\f077"; } +.fa-bridge-circle-xmark { + --fa: "\e4cb"; } -.fa-hand-spock::before { - content: "\f259"; } +.fa-face-grin-tongue { + --fa: "\f589"; } -.fa-stopwatch::before { - content: "\f2f2"; } +.fa-grin-tongue { + --fa: "\f589"; } -.fa-face-kiss::before { - content: "\f596"; } +.fa-chess-bishop { + --fa: "\f43a"; } -.fa-kiss::before { - content: "\f596"; } +.fa-face-grin-wink { + --fa: "\f58c"; } -.fa-bridge-circle-xmark::before { - content: "\e4cb"; } +.fa-grin-wink { + --fa: "\f58c"; } -.fa-face-grin-tongue::before { - content: "\f589"; } +.fa-ear-deaf { + --fa: "\f2a4"; } -.fa-grin-tongue::before { - content: "\f589"; } +.fa-deaf { + --fa: "\f2a4"; } -.fa-chess-bishop::before { - content: "\f43a"; } +.fa-deafness { + --fa: "\f2a4"; } -.fa-face-grin-wink::before { - content: "\f58c"; } +.fa-hard-of-hearing { + --fa: "\f2a4"; } -.fa-grin-wink::before { - content: "\f58c"; } +.fa-road-circle-check { + --fa: "\e564"; } -.fa-ear-deaf::before { - content: "\f2a4"; } +.fa-dice-five { + --fa: "\f523"; } -.fa-deaf::before { - content: "\f2a4"; } +.fa-square-rss { + --fa: "\f143"; } -.fa-deafness::before { - content: "\f2a4"; } +.fa-rss-square { + --fa: "\f143"; } -.fa-hard-of-hearing::before { - content: "\f2a4"; } +.fa-land-mine-on { + --fa: "\e51b"; } -.fa-road-circle-check::before { - content: "\e564"; } +.fa-i-cursor { + --fa: "\f246"; } -.fa-dice-five::before { - content: "\f523"; } +.fa-stamp { + --fa: "\f5bf"; } -.fa-square-rss::before { - content: "\f143"; } +.fa-stairs { + --fa: "\e289"; } -.fa-rss-square::before { - content: "\f143"; } +.fa-i { + --fa: "\49"; } -.fa-land-mine-on::before { - content: "\e51b"; } +.fa-hryvnia-sign { + --fa: "\f6f2"; } -.fa-i-cursor::before { - content: "\f246"; } +.fa-hryvnia { + --fa: "\f6f2"; } -.fa-stamp::before { - content: "\f5bf"; } +.fa-pills { + --fa: "\f484"; } -.fa-stairs::before { - content: "\e289"; } +.fa-face-grin-wide { + --fa: "\f581"; } -.fa-i::before { - content: "\49"; } +.fa-grin-alt { + --fa: "\f581"; } -.fa-hryvnia-sign::before { - content: "\f6f2"; } +.fa-tooth { + --fa: "\f5c9"; } -.fa-hryvnia::before { - content: "\f6f2"; } +.fa-v { + --fa: "\56"; } -.fa-pills::before { - content: "\f484"; } +.fa-bangladeshi-taka-sign { + --fa: "\e2e6"; } -.fa-face-grin-wide::before { - content: "\f581"; } +.fa-bicycle { + --fa: "\f206"; } -.fa-grin-alt::before { - content: "\f581"; } +.fa-staff-snake { + --fa: "\e579"; } -.fa-tooth::before { - content: "\f5c9"; } +.fa-rod-asclepius { + --fa: "\e579"; } -.fa-v::before { - content: "\56"; } +.fa-rod-snake { + --fa: "\e579"; } -.fa-bangladeshi-taka-sign::before { - content: "\e2e6"; } +.fa-staff-aesculapius { + --fa: "\e579"; } -.fa-bicycle::before { - content: "\f206"; } +.fa-head-side-cough-slash { + --fa: "\e062"; } -.fa-staff-snake::before { - content: "\e579"; } +.fa-truck-medical { + --fa: "\f0f9"; } -.fa-rod-asclepius::before { - content: "\e579"; } +.fa-ambulance { + --fa: "\f0f9"; } -.fa-rod-snake::before { - content: "\e579"; } +.fa-wheat-awn-circle-exclamation { + --fa: "\e598"; } -.fa-staff-aesculapius::before { - content: "\e579"; } +.fa-snowman { + --fa: "\f7d0"; } -.fa-head-side-cough-slash::before { - content: "\e062"; } +.fa-mortar-pestle { + --fa: "\f5a7"; } -.fa-truck-medical::before { - content: "\f0f9"; } +.fa-road-barrier { + --fa: "\e562"; } -.fa-ambulance::before { - content: "\f0f9"; } +.fa-school { + --fa: "\f549"; } -.fa-wheat-awn-circle-exclamation::before { - content: "\e598"; } +.fa-igloo { + --fa: "\f7ae"; } -.fa-snowman::before { - content: "\f7d0"; } +.fa-joint { + --fa: "\f595"; } -.fa-mortar-pestle::before { - content: "\f5a7"; } +.fa-angle-right { + --fa: "\f105"; } -.fa-road-barrier::before { - content: "\e562"; } +.fa-horse { + --fa: "\f6f0"; } -.fa-school::before { - content: "\f549"; } +.fa-q { + --fa: "\51"; } -.fa-igloo::before { - content: "\f7ae"; } +.fa-g { + --fa: "\47"; } -.fa-joint::before { - content: "\f595"; } +.fa-notes-medical { + --fa: "\f481"; } -.fa-angle-right::before { - content: "\f105"; } +.fa-temperature-half { + --fa: "\f2c9"; } -.fa-horse::before { - content: "\f6f0"; } +.fa-temperature-2 { + --fa: "\f2c9"; } -.fa-q::before { - content: "\51"; } +.fa-thermometer-2 { + --fa: "\f2c9"; } -.fa-g::before { - content: "\47"; } +.fa-thermometer-half { + --fa: "\f2c9"; } -.fa-notes-medical::before { - content: "\f481"; } +.fa-dong-sign { + --fa: "\e169"; } -.fa-temperature-half::before { - content: "\f2c9"; } +.fa-capsules { + --fa: "\f46b"; } -.fa-temperature-2::before { - content: "\f2c9"; } +.fa-poo-storm { + --fa: "\f75a"; } -.fa-thermometer-2::before { - content: "\f2c9"; } +.fa-poo-bolt { + --fa: "\f75a"; } -.fa-thermometer-half::before { - content: "\f2c9"; } +.fa-face-frown-open { + --fa: "\f57a"; } -.fa-dong-sign::before { - content: "\e169"; } +.fa-frown-open { + --fa: "\f57a"; } -.fa-capsules::before { - content: "\f46b"; } +.fa-hand-point-up { + --fa: "\f0a6"; } -.fa-poo-storm::before { - content: "\f75a"; } +.fa-money-bill { + --fa: "\f0d6"; } -.fa-poo-bolt::before { - content: "\f75a"; } +.fa-bookmark { + --fa: "\f02e"; } -.fa-face-frown-open::before { - content: "\f57a"; } +.fa-align-justify { + --fa: "\f039"; } -.fa-frown-open::before { - content: "\f57a"; } +.fa-umbrella-beach { + --fa: "\f5ca"; } -.fa-hand-point-up::before { - content: "\f0a6"; } +.fa-helmet-un { + --fa: "\e503"; } -.fa-money-bill::before { - content: "\f0d6"; } +.fa-bullseye { + --fa: "\f140"; } -.fa-bookmark::before { - content: "\f02e"; } +.fa-bacon { + --fa: "\f7e5"; } -.fa-align-justify::before { - content: "\f039"; } +.fa-hand-point-down { + --fa: "\f0a7"; } -.fa-umbrella-beach::before { - content: "\f5ca"; } +.fa-arrow-up-from-bracket { + --fa: "\e09a"; } -.fa-helmet-un::before { - content: "\e503"; } +.fa-folder { + --fa: "\f07b"; } -.fa-bullseye::before { - content: "\f140"; } +.fa-folder-blank { + --fa: "\f07b"; } -.fa-bacon::before { - content: "\f7e5"; } +.fa-file-waveform { + --fa: "\f478"; } -.fa-hand-point-down::before { - content: "\f0a7"; } +.fa-file-medical-alt { + --fa: "\f478"; } -.fa-arrow-up-from-bracket::before { - content: "\e09a"; } +.fa-radiation { + --fa: "\f7b9"; } -.fa-folder::before { - content: "\f07b"; } +.fa-chart-simple { + --fa: "\e473"; } -.fa-folder-blank::before { - content: "\f07b"; } +.fa-mars-stroke { + --fa: "\f229"; } -.fa-file-waveform::before { - content: "\f478"; } +.fa-vial { + --fa: "\f492"; } -.fa-file-medical-alt::before { - content: "\f478"; } +.fa-gauge { + --fa: "\f624"; } -.fa-radiation::before { - content: "\f7b9"; } +.fa-dashboard { + --fa: "\f624"; } -.fa-chart-simple::before { - content: "\e473"; } +.fa-gauge-med { + --fa: "\f624"; } -.fa-mars-stroke::before { - content: "\f229"; } +.fa-tachometer-alt-average { + --fa: "\f624"; } -.fa-vial::before { - content: "\f492"; } +.fa-wand-magic-sparkles { + --fa: "\e2ca"; } -.fa-gauge::before { - content: "\f624"; } +.fa-magic-wand-sparkles { + --fa: "\e2ca"; } -.fa-dashboard::before { - content: "\f624"; } +.fa-e { + --fa: "\45"; } -.fa-gauge-med::before { - content: "\f624"; } +.fa-pen-clip { + --fa: "\f305"; } -.fa-tachometer-alt-average::before { - content: "\f624"; } +.fa-pen-alt { + --fa: "\f305"; } -.fa-wand-magic-sparkles::before { - content: "\e2ca"; } +.fa-bridge-circle-exclamation { + --fa: "\e4ca"; } -.fa-magic-wand-sparkles::before { - content: "\e2ca"; } +.fa-user { + --fa: "\f007"; } -.fa-e::before { - content: "\45"; } +.fa-school-circle-check { + --fa: "\e56b"; } -.fa-pen-clip::before { - content: "\f305"; } +.fa-dumpster { + --fa: "\f793"; } -.fa-pen-alt::before { - content: "\f305"; } +.fa-van-shuttle { + --fa: "\f5b6"; } -.fa-bridge-circle-exclamation::before { - content: "\e4ca"; } +.fa-shuttle-van { + --fa: "\f5b6"; } -.fa-user::before { - content: "\f007"; } +.fa-building-user { + --fa: "\e4da"; } -.fa-school-circle-check::before { - content: "\e56b"; } +.fa-square-caret-left { + --fa: "\f191"; } -.fa-dumpster::before { - content: "\f793"; } +.fa-caret-square-left { + --fa: "\f191"; } -.fa-van-shuttle::before { - content: "\f5b6"; } +.fa-highlighter { + --fa: "\f591"; } -.fa-shuttle-van::before { - content: "\f5b6"; } +.fa-key { + --fa: "\f084"; } -.fa-building-user::before { - content: "\e4da"; } +.fa-bullhorn { + --fa: "\f0a1"; } -.fa-square-caret-left::before { - content: "\f191"; } +.fa-globe { + --fa: "\f0ac"; } -.fa-caret-square-left::before { - content: "\f191"; } +.fa-synagogue { + --fa: "\f69b"; } -.fa-highlighter::before { - content: "\f591"; } +.fa-person-half-dress { + --fa: "\e548"; } -.fa-key::before { - content: "\f084"; } +.fa-road-bridge { + --fa: "\e563"; } -.fa-bullhorn::before { - content: "\f0a1"; } +.fa-location-arrow { + --fa: "\f124"; } -.fa-globe::before { - content: "\f0ac"; } +.fa-c { + --fa: "\43"; } -.fa-synagogue::before { - content: "\f69b"; } +.fa-tablet-button { + --fa: "\f10a"; } -.fa-person-half-dress::before { - content: "\e548"; } +.fa-building-lock { + --fa: "\e4d6"; } -.fa-road-bridge::before { - content: "\e563"; } +.fa-pizza-slice { + --fa: "\f818"; } -.fa-location-arrow::before { - content: "\f124"; } +.fa-money-bill-wave { + --fa: "\f53a"; } -.fa-c::before { - content: "\43"; } +.fa-chart-area { + --fa: "\f1fe"; } -.fa-tablet-button::before { - content: "\f10a"; } +.fa-area-chart { + --fa: "\f1fe"; } -.fa-building-lock::before { - content: "\e4d6"; } +.fa-house-flag { + --fa: "\e50d"; } -.fa-pizza-slice::before { - content: "\f818"; } +.fa-person-circle-minus { + --fa: "\e540"; } -.fa-money-bill-wave::before { - content: "\f53a"; } +.fa-ban { + --fa: "\f05e"; } -.fa-chart-area::before { - content: "\f1fe"; } +.fa-cancel { + --fa: "\f05e"; } -.fa-area-chart::before { - content: "\f1fe"; } +.fa-camera-rotate { + --fa: "\e0d8"; } -.fa-house-flag::before { - content: "\e50d"; } +.fa-spray-can-sparkles { + --fa: "\f5d0"; } -.fa-person-circle-minus::before { - content: "\e540"; } +.fa-air-freshener { + --fa: "\f5d0"; } -.fa-ban::before { - content: "\f05e"; } +.fa-star { + --fa: "\f005"; } -.fa-cancel::before { - content: "\f05e"; } +.fa-repeat { + --fa: "\f363"; } -.fa-camera-rotate::before { - content: "\e0d8"; } +.fa-cross { + --fa: "\f654"; } -.fa-spray-can-sparkles::before { - content: "\f5d0"; } +.fa-box { + --fa: "\f466"; } -.fa-air-freshener::before { - content: "\f5d0"; } +.fa-venus-mars { + --fa: "\f228"; } -.fa-star::before { - content: "\f005"; } +.fa-arrow-pointer { + --fa: "\f245"; } -.fa-repeat::before { - content: "\f363"; } +.fa-mouse-pointer { + --fa: "\f245"; } -.fa-cross::before { - content: "\f654"; } +.fa-maximize { + --fa: "\f31e"; } -.fa-box::before { - content: "\f466"; } +.fa-expand-arrows-alt { + --fa: "\f31e"; } -.fa-venus-mars::before { - content: "\f228"; } +.fa-charging-station { + --fa: "\f5e7"; } -.fa-arrow-pointer::before { - content: "\f245"; } +.fa-shapes { + --fa: "\f61f"; } -.fa-mouse-pointer::before { - content: "\f245"; } +.fa-triangle-circle-square { + --fa: "\f61f"; } -.fa-maximize::before { - content: "\f31e"; } +.fa-shuffle { + --fa: "\f074"; } -.fa-expand-arrows-alt::before { - content: "\f31e"; } +.fa-random { + --fa: "\f074"; } -.fa-charging-station::before { - content: "\f5e7"; } +.fa-person-running { + --fa: "\f70c"; } -.fa-shapes::before { - content: "\f61f"; } +.fa-running { + --fa: "\f70c"; } -.fa-triangle-circle-square::before { - content: "\f61f"; } +.fa-mobile-retro { + --fa: "\e527"; } -.fa-shuffle::before { - content: "\f074"; } +.fa-grip-lines-vertical { + --fa: "\f7a5"; } -.fa-random::before { - content: "\f074"; } +.fa-spider { + --fa: "\f717"; } -.fa-person-running::before { - content: "\f70c"; } +.fa-hands-bound { + --fa: "\e4f9"; } -.fa-running::before { - content: "\f70c"; } +.fa-file-invoice-dollar { + --fa: "\f571"; } -.fa-mobile-retro::before { - content: "\e527"; } +.fa-plane-circle-exclamation { + --fa: "\e556"; } -.fa-grip-lines-vertical::before { - content: "\f7a5"; } +.fa-x-ray { + --fa: "\f497"; } -.fa-spider::before { - content: "\f717"; } +.fa-spell-check { + --fa: "\f891"; } -.fa-hands-bound::before { - content: "\e4f9"; } +.fa-slash { + --fa: "\f715"; } -.fa-file-invoice-dollar::before { - content: "\f571"; } +.fa-computer-mouse { + --fa: "\f8cc"; } -.fa-plane-circle-exclamation::before { - content: "\e556"; } +.fa-mouse { + --fa: "\f8cc"; } -.fa-x-ray::before { - content: "\f497"; } +.fa-arrow-right-to-bracket { + --fa: "\f090"; } -.fa-spell-check::before { - content: "\f891"; } +.fa-sign-in { + --fa: "\f090"; } -.fa-slash::before { - content: "\f715"; } +.fa-shop-slash { + --fa: "\e070"; } -.fa-computer-mouse::before { - content: "\f8cc"; } +.fa-store-alt-slash { + --fa: "\e070"; } -.fa-mouse::before { - content: "\f8cc"; } +.fa-server { + --fa: "\f233"; } -.fa-arrow-right-to-bracket::before { - content: "\f090"; } +.fa-virus-covid-slash { + --fa: "\e4a9"; } -.fa-sign-in::before { - content: "\f090"; } +.fa-shop-lock { + --fa: "\e4a5"; } -.fa-shop-slash::before { - content: "\e070"; } +.fa-hourglass-start { + --fa: "\f251"; } -.fa-store-alt-slash::before { - content: "\e070"; } +.fa-hourglass-1 { + --fa: "\f251"; } -.fa-server::before { - content: "\f233"; } +.fa-blender-phone { + --fa: "\f6b6"; } -.fa-virus-covid-slash::before { - content: "\e4a9"; } +.fa-building-wheat { + --fa: "\e4db"; } -.fa-shop-lock::before { - content: "\e4a5"; } +.fa-person-breastfeeding { + --fa: "\e53a"; } -.fa-hourglass-start::before { - content: "\f251"; } +.fa-right-to-bracket { + --fa: "\f2f6"; } -.fa-hourglass-1::before { - content: "\f251"; } +.fa-sign-in-alt { + --fa: "\f2f6"; } -.fa-blender-phone::before { - content: "\f6b6"; } +.fa-venus { + --fa: "\f221"; } -.fa-building-wheat::before { - content: "\e4db"; } +.fa-passport { + --fa: "\f5ab"; } -.fa-person-breastfeeding::before { - content: "\e53a"; } +.fa-thumbtack-slash { + --fa: "\e68f"; } -.fa-right-to-bracket::before { - content: "\f2f6"; } +.fa-thumb-tack-slash { + --fa: "\e68f"; } -.fa-sign-in-alt::before { - content: "\f2f6"; } +.fa-heart-pulse { + --fa: "\f21e"; } -.fa-venus::before { - content: "\f221"; } +.fa-heartbeat { + --fa: "\f21e"; } -.fa-passport::before { - content: "\f5ab"; } +.fa-people-carry-box { + --fa: "\f4ce"; } -.fa-thumbtack-slash::before { - content: "\e68f"; } +.fa-people-carry { + --fa: "\f4ce"; } -.fa-thumb-tack-slash::before { - content: "\e68f"; } +.fa-temperature-high { + --fa: "\f769"; } -.fa-heart-pulse::before { - content: "\f21e"; } +.fa-microchip { + --fa: "\f2db"; } -.fa-heartbeat::before { - content: "\f21e"; } +.fa-crown { + --fa: "\f521"; } -.fa-people-carry-box::before { - content: "\f4ce"; } +.fa-weight-hanging { + --fa: "\f5cd"; } -.fa-people-carry::before { - content: "\f4ce"; } +.fa-xmarks-lines { + --fa: "\e59a"; } -.fa-temperature-high::before { - content: "\f769"; } +.fa-file-prescription { + --fa: "\f572"; } -.fa-microchip::before { - content: "\f2db"; } +.fa-weight-scale { + --fa: "\f496"; } -.fa-crown::before { - content: "\f521"; } +.fa-weight { + --fa: "\f496"; } -.fa-weight-hanging::before { - content: "\f5cd"; } +.fa-user-group { + --fa: "\f500"; } -.fa-xmarks-lines::before { - content: "\e59a"; } +.fa-user-friends { + --fa: "\f500"; } -.fa-file-prescription::before { - content: "\f572"; } +.fa-arrow-up-a-z { + --fa: "\f15e"; } -.fa-weight-scale::before { - content: "\f496"; } +.fa-sort-alpha-up { + --fa: "\f15e"; } -.fa-weight::before { - content: "\f496"; } +.fa-chess-knight { + --fa: "\f441"; } -.fa-user-group::before { - content: "\f500"; } +.fa-face-laugh-squint { + --fa: "\f59b"; } -.fa-user-friends::before { - content: "\f500"; } +.fa-laugh-squint { + --fa: "\f59b"; } -.fa-arrow-up-a-z::before { - content: "\f15e"; } +.fa-wheelchair { + --fa: "\f193"; } -.fa-sort-alpha-up::before { - content: "\f15e"; } +.fa-circle-arrow-up { + --fa: "\f0aa"; } -.fa-chess-knight::before { - content: "\f441"; } +.fa-arrow-circle-up { + --fa: "\f0aa"; } -.fa-face-laugh-squint::before { - content: "\f59b"; } +.fa-toggle-on { + --fa: "\f205"; } -.fa-laugh-squint::before { - content: "\f59b"; } +.fa-person-walking { + --fa: "\f554"; } -.fa-wheelchair::before { - content: "\f193"; } +.fa-walking { + --fa: "\f554"; } -.fa-circle-arrow-up::before { - content: "\f0aa"; } +.fa-l { + --fa: "\4c"; } -.fa-arrow-circle-up::before { - content: "\f0aa"; } +.fa-fire { + --fa: "\f06d"; } -.fa-toggle-on::before { - content: "\f205"; } +.fa-bed-pulse { + --fa: "\f487"; } -.fa-person-walking::before { - content: "\f554"; } +.fa-procedures { + --fa: "\f487"; } -.fa-walking::before { - content: "\f554"; } +.fa-shuttle-space { + --fa: "\f197"; } -.fa-l::before { - content: "\4c"; } +.fa-space-shuttle { + --fa: "\f197"; } -.fa-fire::before { - content: "\f06d"; } +.fa-face-laugh { + --fa: "\f599"; } -.fa-bed-pulse::before { - content: "\f487"; } +.fa-laugh { + --fa: "\f599"; } -.fa-procedures::before { - content: "\f487"; } +.fa-folder-open { + --fa: "\f07c"; } -.fa-shuttle-space::before { - content: "\f197"; } +.fa-heart-circle-plus { + --fa: "\e500"; } -.fa-space-shuttle::before { - content: "\f197"; } +.fa-code-fork { + --fa: "\e13b"; } -.fa-face-laugh::before { - content: "\f599"; } +.fa-city { + --fa: "\f64f"; } -.fa-laugh::before { - content: "\f599"; } +.fa-microphone-lines { + --fa: "\f3c9"; } -.fa-folder-open::before { - content: "\f07c"; } +.fa-microphone-alt { + --fa: "\f3c9"; } -.fa-heart-circle-plus::before { - content: "\e500"; } +.fa-pepper-hot { + --fa: "\f816"; } -.fa-code-fork::before { - content: "\e13b"; } +.fa-unlock { + --fa: "\f09c"; } -.fa-city::before { - content: "\f64f"; } +.fa-colon-sign { + --fa: "\e140"; } -.fa-microphone-lines::before { - content: "\f3c9"; } +.fa-headset { + --fa: "\f590"; } -.fa-microphone-alt::before { - content: "\f3c9"; } +.fa-store-slash { + --fa: "\e071"; } -.fa-pepper-hot::before { - content: "\f816"; } +.fa-road-circle-xmark { + --fa: "\e566"; } -.fa-unlock::before { - content: "\f09c"; } +.fa-user-minus { + --fa: "\f503"; } -.fa-colon-sign::before { - content: "\e140"; } +.fa-mars-stroke-up { + --fa: "\f22a"; } -.fa-headset::before { - content: "\f590"; } +.fa-mars-stroke-v { + --fa: "\f22a"; } -.fa-store-slash::before { - content: "\e071"; } +.fa-champagne-glasses { + --fa: "\f79f"; } -.fa-road-circle-xmark::before { - content: "\e566"; } +.fa-glass-cheers { + --fa: "\f79f"; } -.fa-user-minus::before { - content: "\f503"; } +.fa-clipboard { + --fa: "\f328"; } -.fa-mars-stroke-up::before { - content: "\f22a"; } +.fa-house-circle-exclamation { + --fa: "\e50a"; } -.fa-mars-stroke-v::before { - content: "\f22a"; } +.fa-file-arrow-up { + --fa: "\f574"; } -.fa-champagne-glasses::before { - content: "\f79f"; } +.fa-file-upload { + --fa: "\f574"; } -.fa-glass-cheers::before { - content: "\f79f"; } +.fa-wifi { + --fa: "\f1eb"; } -.fa-clipboard::before { - content: "\f328"; } +.fa-wifi-3 { + --fa: "\f1eb"; } -.fa-house-circle-exclamation::before { - content: "\e50a"; } +.fa-wifi-strong { + --fa: "\f1eb"; } -.fa-file-arrow-up::before { - content: "\f574"; } +.fa-bath { + --fa: "\f2cd"; } -.fa-file-upload::before { - content: "\f574"; } +.fa-bathtub { + --fa: "\f2cd"; } -.fa-wifi::before { - content: "\f1eb"; } +.fa-underline { + --fa: "\f0cd"; } -.fa-wifi-3::before { - content: "\f1eb"; } +.fa-user-pen { + --fa: "\f4ff"; } -.fa-wifi-strong::before { - content: "\f1eb"; } +.fa-user-edit { + --fa: "\f4ff"; } -.fa-bath::before { - content: "\f2cd"; } +.fa-signature { + --fa: "\f5b7"; } -.fa-bathtub::before { - content: "\f2cd"; } +.fa-stroopwafel { + --fa: "\f551"; } -.fa-underline::before { - content: "\f0cd"; } +.fa-bold { + --fa: "\f032"; } -.fa-user-pen::before { - content: "\f4ff"; } +.fa-anchor-lock { + --fa: "\e4ad"; } -.fa-user-edit::before { - content: "\f4ff"; } +.fa-building-ngo { + --fa: "\e4d7"; } -.fa-signature::before { - content: "\f5b7"; } +.fa-manat-sign { + --fa: "\e1d5"; } -.fa-stroopwafel::before { - content: "\f551"; } +.fa-not-equal { + --fa: "\f53e"; } -.fa-bold::before { - content: "\f032"; } +.fa-border-top-left { + --fa: "\f853"; } -.fa-anchor-lock::before { - content: "\e4ad"; } +.fa-border-style { + --fa: "\f853"; } -.fa-building-ngo::before { - content: "\e4d7"; } +.fa-map-location-dot { + --fa: "\f5a0"; } -.fa-manat-sign::before { - content: "\e1d5"; } +.fa-map-marked-alt { + --fa: "\f5a0"; } -.fa-not-equal::before { - content: "\f53e"; } +.fa-jedi { + --fa: "\f669"; } -.fa-border-top-left::before { - content: "\f853"; } +.fa-square-poll-vertical { + --fa: "\f681"; } -.fa-border-style::before { - content: "\f853"; } +.fa-poll { + --fa: "\f681"; } -.fa-map-location-dot::before { - content: "\f5a0"; } +.fa-mug-hot { + --fa: "\f7b6"; } -.fa-map-marked-alt::before { - content: "\f5a0"; } +.fa-car-battery { + --fa: "\f5df"; } -.fa-jedi::before { - content: "\f669"; } +.fa-battery-car { + --fa: "\f5df"; } -.fa-square-poll-vertical::before { - content: "\f681"; } +.fa-gift { + --fa: "\f06b"; } -.fa-poll::before { - content: "\f681"; } +.fa-dice-two { + --fa: "\f528"; } -.fa-mug-hot::before { - content: "\f7b6"; } +.fa-chess-queen { + --fa: "\f445"; } -.fa-car-battery::before { - content: "\f5df"; } +.fa-glasses { + --fa: "\f530"; } -.fa-battery-car::before { - content: "\f5df"; } +.fa-chess-board { + --fa: "\f43c"; } -.fa-gift::before { - content: "\f06b"; } +.fa-building-circle-check { + --fa: "\e4d2"; } -.fa-dice-two::before { - content: "\f528"; } +.fa-person-chalkboard { + --fa: "\e53d"; } -.fa-chess-queen::before { - content: "\f445"; } +.fa-mars-stroke-right { + --fa: "\f22b"; } -.fa-glasses::before { - content: "\f530"; } +.fa-mars-stroke-h { + --fa: "\f22b"; } -.fa-chess-board::before { - content: "\f43c"; } +.fa-hand-back-fist { + --fa: "\f255"; } -.fa-building-circle-check::before { - content: "\e4d2"; } +.fa-hand-rock { + --fa: "\f255"; } -.fa-person-chalkboard::before { - content: "\e53d"; } +.fa-square-caret-up { + --fa: "\f151"; } -.fa-mars-stroke-right::before { - content: "\f22b"; } +.fa-caret-square-up { + --fa: "\f151"; } -.fa-mars-stroke-h::before { - content: "\f22b"; } +.fa-cloud-showers-water { + --fa: "\e4e4"; } -.fa-hand-back-fist::before { - content: "\f255"; } +.fa-chart-bar { + --fa: "\f080"; } -.fa-hand-rock::before { - content: "\f255"; } +.fa-bar-chart { + --fa: "\f080"; } -.fa-square-caret-up::before { - content: "\f151"; } +.fa-hands-bubbles { + --fa: "\e05e"; } -.fa-caret-square-up::before { - content: "\f151"; } +.fa-hands-wash { + --fa: "\e05e"; } -.fa-cloud-showers-water::before { - content: "\e4e4"; } +.fa-less-than-equal { + --fa: "\f537"; } -.fa-chart-bar::before { - content: "\f080"; } +.fa-train { + --fa: "\f238"; } -.fa-bar-chart::before { - content: "\f080"; } +.fa-eye-low-vision { + --fa: "\f2a8"; } -.fa-hands-bubbles::before { - content: "\e05e"; } +.fa-low-vision { + --fa: "\f2a8"; } -.fa-hands-wash::before { - content: "\e05e"; } +.fa-crow { + --fa: "\f520"; } -.fa-less-than-equal::before { - content: "\f537"; } +.fa-sailboat { + --fa: "\e445"; } -.fa-train::before { - content: "\f238"; } +.fa-window-restore { + --fa: "\f2d2"; } -.fa-eye-low-vision::before { - content: "\f2a8"; } +.fa-square-plus { + --fa: "\f0fe"; } -.fa-low-vision::before { - content: "\f2a8"; } +.fa-plus-square { + --fa: "\f0fe"; } -.fa-crow::before { - content: "\f520"; } +.fa-torii-gate { + --fa: "\f6a1"; } -.fa-sailboat::before { - content: "\e445"; } +.fa-frog { + --fa: "\f52e"; } -.fa-window-restore::before { - content: "\f2d2"; } +.fa-bucket { + --fa: "\e4cf"; } -.fa-square-plus::before { - content: "\f0fe"; } +.fa-image { + --fa: "\f03e"; } -.fa-plus-square::before { - content: "\f0fe"; } +.fa-microphone { + --fa: "\f130"; } -.fa-torii-gate::before { - content: "\f6a1"; } +.fa-cow { + --fa: "\f6c8"; } -.fa-frog::before { - content: "\f52e"; } +.fa-caret-up { + --fa: "\f0d8"; } -.fa-bucket::before { - content: "\e4cf"; } +.fa-screwdriver { + --fa: "\f54a"; } -.fa-image::before { - content: "\f03e"; } +.fa-folder-closed { + --fa: "\e185"; } -.fa-microphone::before { - content: "\f130"; } +.fa-house-tsunami { + --fa: "\e515"; } -.fa-cow::before { - content: "\f6c8"; } +.fa-square-nfi { + --fa: "\e576"; } -.fa-caret-up::before { - content: "\f0d8"; } +.fa-arrow-up-from-ground-water { + --fa: "\e4b5"; } -.fa-screwdriver::before { - content: "\f54a"; } +.fa-martini-glass { + --fa: "\f57b"; } -.fa-folder-closed::before { - content: "\e185"; } +.fa-glass-martini-alt { + --fa: "\f57b"; } -.fa-house-tsunami::before { - content: "\e515"; } +.fa-square-binary { + --fa: "\e69b"; } -.fa-square-nfi::before { - content: "\e576"; } +.fa-rotate-left { + --fa: "\f2ea"; } -.fa-arrow-up-from-ground-water::before { - content: "\e4b5"; } +.fa-rotate-back { + --fa: "\f2ea"; } -.fa-martini-glass::before { - content: "\f57b"; } +.fa-rotate-backward { + --fa: "\f2ea"; } -.fa-glass-martini-alt::before { - content: "\f57b"; } +.fa-undo-alt { + --fa: "\f2ea"; } -.fa-rotate-left::before { - content: "\f2ea"; } +.fa-table-columns { + --fa: "\f0db"; } -.fa-rotate-back::before { - content: "\f2ea"; } +.fa-columns { + --fa: "\f0db"; } -.fa-rotate-backward::before { - content: "\f2ea"; } +.fa-lemon { + --fa: "\f094"; } -.fa-undo-alt::before { - content: "\f2ea"; } +.fa-head-side-mask { + --fa: "\e063"; } -.fa-table-columns::before { - content: "\f0db"; } +.fa-handshake { + --fa: "\f2b5"; } -.fa-columns::before { - content: "\f0db"; } +.fa-gem { + --fa: "\f3a5"; } -.fa-lemon::before { - content: "\f094"; } +.fa-dolly { + --fa: "\f472"; } -.fa-head-side-mask::before { - content: "\e063"; } +.fa-dolly-box { + --fa: "\f472"; } -.fa-handshake::before { - content: "\f2b5"; } +.fa-smoking { + --fa: "\f48d"; } -.fa-gem::before { - content: "\f3a5"; } +.fa-minimize { + --fa: "\f78c"; } -.fa-dolly::before { - content: "\f472"; } +.fa-compress-arrows-alt { + --fa: "\f78c"; } -.fa-dolly-box::before { - content: "\f472"; } +.fa-monument { + --fa: "\f5a6"; } -.fa-smoking::before { - content: "\f48d"; } +.fa-snowplow { + --fa: "\f7d2"; } -.fa-minimize::before { - content: "\f78c"; } +.fa-angles-right { + --fa: "\f101"; } -.fa-compress-arrows-alt::before { - content: "\f78c"; } +.fa-angle-double-right { + --fa: "\f101"; } -.fa-monument::before { - content: "\f5a6"; } +.fa-cannabis { + --fa: "\f55f"; } -.fa-snowplow::before { - content: "\f7d2"; } +.fa-circle-play { + --fa: "\f144"; } -.fa-angles-right::before { - content: "\f101"; } +.fa-play-circle { + --fa: "\f144"; } -.fa-angle-double-right::before { - content: "\f101"; } +.fa-tablets { + --fa: "\f490"; } -.fa-cannabis::before { - content: "\f55f"; } +.fa-ethernet { + --fa: "\f796"; } -.fa-circle-play::before { - content: "\f144"; } +.fa-euro-sign { + --fa: "\f153"; } -.fa-play-circle::before { - content: "\f144"; } +.fa-eur { + --fa: "\f153"; } -.fa-tablets::before { - content: "\f490"; } +.fa-euro { + --fa: "\f153"; } -.fa-ethernet::before { - content: "\f796"; } +.fa-chair { + --fa: "\f6c0"; } -.fa-euro-sign::before { - content: "\f153"; } +.fa-circle-check { + --fa: "\f058"; } -.fa-eur::before { - content: "\f153"; } +.fa-check-circle { + --fa: "\f058"; } -.fa-euro::before { - content: "\f153"; } +.fa-circle-stop { + --fa: "\f28d"; } -.fa-chair::before { - content: "\f6c0"; } +.fa-stop-circle { + --fa: "\f28d"; } -.fa-circle-check::before { - content: "\f058"; } +.fa-compass-drafting { + --fa: "\f568"; } -.fa-check-circle::before { - content: "\f058"; } +.fa-drafting-compass { + --fa: "\f568"; } -.fa-circle-stop::before { - content: "\f28d"; } +.fa-plate-wheat { + --fa: "\e55a"; } -.fa-stop-circle::before { - content: "\f28d"; } +.fa-icicles { + --fa: "\f7ad"; } -.fa-compass-drafting::before { - content: "\f568"; } +.fa-person-shelter { + --fa: "\e54f"; } -.fa-drafting-compass::before { - content: "\f568"; } +.fa-neuter { + --fa: "\f22c"; } -.fa-plate-wheat::before { - content: "\e55a"; } +.fa-id-badge { + --fa: "\f2c1"; } -.fa-icicles::before { - content: "\f7ad"; } +.fa-marker { + --fa: "\f5a1"; } -.fa-person-shelter::before { - content: "\e54f"; } +.fa-face-laugh-beam { + --fa: "\f59a"; } -.fa-neuter::before { - content: "\f22c"; } +.fa-laugh-beam { + --fa: "\f59a"; } -.fa-id-badge::before { - content: "\f2c1"; } +.fa-helicopter-symbol { + --fa: "\e502"; } -.fa-marker::before { - content: "\f5a1"; } +.fa-universal-access { + --fa: "\f29a"; } -.fa-face-laugh-beam::before { - content: "\f59a"; } +.fa-circle-chevron-up { + --fa: "\f139"; } -.fa-laugh-beam::before { - content: "\f59a"; } +.fa-chevron-circle-up { + --fa: "\f139"; } -.fa-helicopter-symbol::before { - content: "\e502"; } +.fa-lari-sign { + --fa: "\e1c8"; } -.fa-universal-access::before { - content: "\f29a"; } +.fa-volcano { + --fa: "\f770"; } -.fa-circle-chevron-up::before { - content: "\f139"; } +.fa-person-walking-dashed-line-arrow-right { + --fa: "\e553"; } -.fa-chevron-circle-up::before { - content: "\f139"; } +.fa-sterling-sign { + --fa: "\f154"; } -.fa-lari-sign::before { - content: "\e1c8"; } +.fa-gbp { + --fa: "\f154"; } -.fa-volcano::before { - content: "\f770"; } +.fa-pound-sign { + --fa: "\f154"; } -.fa-person-walking-dashed-line-arrow-right::before { - content: "\e553"; } +.fa-viruses { + --fa: "\e076"; } -.fa-sterling-sign::before { - content: "\f154"; } +.fa-square-person-confined { + --fa: "\e577"; } -.fa-gbp::before { - content: "\f154"; } +.fa-user-tie { + --fa: "\f508"; } -.fa-pound-sign::before { - content: "\f154"; } +.fa-arrow-down-long { + --fa: "\f175"; } -.fa-viruses::before { - content: "\e076"; } +.fa-long-arrow-down { + --fa: "\f175"; } -.fa-square-person-confined::before { - content: "\e577"; } +.fa-tent-arrow-down-to-line { + --fa: "\e57e"; } -.fa-user-tie::before { - content: "\f508"; } +.fa-certificate { + --fa: "\f0a3"; } -.fa-arrow-down-long::before { - content: "\f175"; } +.fa-reply-all { + --fa: "\f122"; } -.fa-long-arrow-down::before { - content: "\f175"; } +.fa-mail-reply-all { + --fa: "\f122"; } -.fa-tent-arrow-down-to-line::before { - content: "\e57e"; } +.fa-suitcase { + --fa: "\f0f2"; } -.fa-certificate::before { - content: "\f0a3"; } +.fa-person-skating { + --fa: "\f7c5"; } -.fa-reply-all::before { - content: "\f122"; } +.fa-skating { + --fa: "\f7c5"; } -.fa-mail-reply-all::before { - content: "\f122"; } +.fa-filter-circle-dollar { + --fa: "\f662"; } -.fa-suitcase::before { - content: "\f0f2"; } +.fa-funnel-dollar { + --fa: "\f662"; } -.fa-person-skating::before { - content: "\f7c5"; } +.fa-camera-retro { + --fa: "\f083"; } -.fa-skating::before { - content: "\f7c5"; } +.fa-circle-arrow-down { + --fa: "\f0ab"; } -.fa-filter-circle-dollar::before { - content: "\f662"; } +.fa-arrow-circle-down { + --fa: "\f0ab"; } -.fa-funnel-dollar::before { - content: "\f662"; } +.fa-file-import { + --fa: "\f56f"; } -.fa-camera-retro::before { - content: "\f083"; } +.fa-arrow-right-to-file { + --fa: "\f56f"; } -.fa-circle-arrow-down::before { - content: "\f0ab"; } +.fa-square-arrow-up-right { + --fa: "\f14c"; } -.fa-arrow-circle-down::before { - content: "\f0ab"; } +.fa-external-link-square { + --fa: "\f14c"; } -.fa-file-import::before { - content: "\f56f"; } +.fa-box-open { + --fa: "\f49e"; } -.fa-arrow-right-to-file::before { - content: "\f56f"; } +.fa-scroll { + --fa: "\f70e"; } -.fa-square-arrow-up-right::before { - content: "\f14c"; } +.fa-spa { + --fa: "\f5bb"; } -.fa-external-link-square::before { - content: "\f14c"; } +.fa-location-pin-lock { + --fa: "\e51f"; } -.fa-box-open::before { - content: "\f49e"; } +.fa-pause { + --fa: "\f04c"; } -.fa-scroll::before { - content: "\f70e"; } +.fa-hill-avalanche { + --fa: "\e507"; } -.fa-spa::before { - content: "\f5bb"; } +.fa-temperature-empty { + --fa: "\f2cb"; } -.fa-location-pin-lock::before { - content: "\e51f"; } +.fa-temperature-0 { + --fa: "\f2cb"; } -.fa-pause::before { - content: "\f04c"; } +.fa-thermometer-0 { + --fa: "\f2cb"; } -.fa-hill-avalanche::before { - content: "\e507"; } +.fa-thermometer-empty { + --fa: "\f2cb"; } -.fa-temperature-empty::before { - content: "\f2cb"; } +.fa-bomb { + --fa: "\f1e2"; } -.fa-temperature-0::before { - content: "\f2cb"; } +.fa-registered { + --fa: "\f25d"; } -.fa-thermometer-0::before { - content: "\f2cb"; } +.fa-address-card { + --fa: "\f2bb"; } -.fa-thermometer-empty::before { - content: "\f2cb"; } +.fa-contact-card { + --fa: "\f2bb"; } -.fa-bomb::before { - content: "\f1e2"; } +.fa-vcard { + --fa: "\f2bb"; } -.fa-registered::before { - content: "\f25d"; } +.fa-scale-unbalanced-flip { + --fa: "\f516"; } -.fa-address-card::before { - content: "\f2bb"; } +.fa-balance-scale-right { + --fa: "\f516"; } -.fa-contact-card::before { - content: "\f2bb"; } +.fa-subscript { + --fa: "\f12c"; } -.fa-vcard::before { - content: "\f2bb"; } +.fa-diamond-turn-right { + --fa: "\f5eb"; } -.fa-scale-unbalanced-flip::before { - content: "\f516"; } +.fa-directions { + --fa: "\f5eb"; } -.fa-balance-scale-right::before { - content: "\f516"; } +.fa-burst { + --fa: "\e4dc"; } -.fa-subscript::before { - content: "\f12c"; } +.fa-house-laptop { + --fa: "\e066"; } -.fa-diamond-turn-right::before { - content: "\f5eb"; } +.fa-laptop-house { + --fa: "\e066"; } -.fa-directions::before { - content: "\f5eb"; } +.fa-face-tired { + --fa: "\f5c8"; } -.fa-burst::before { - content: "\e4dc"; } +.fa-tired { + --fa: "\f5c8"; } -.fa-house-laptop::before { - content: "\e066"; } +.fa-money-bills { + --fa: "\e1f3"; } -.fa-laptop-house::before { - content: "\e066"; } +.fa-smog { + --fa: "\f75f"; } -.fa-face-tired::before { - content: "\f5c8"; } +.fa-crutch { + --fa: "\f7f7"; } -.fa-tired::before { - content: "\f5c8"; } +.fa-cloud-arrow-up { + --fa: "\f0ee"; } -.fa-money-bills::before { - content: "\e1f3"; } +.fa-cloud-upload { + --fa: "\f0ee"; } -.fa-smog::before { - content: "\f75f"; } +.fa-cloud-upload-alt { + --fa: "\f0ee"; } -.fa-crutch::before { - content: "\f7f7"; } +.fa-palette { + --fa: "\f53f"; } -.fa-cloud-arrow-up::before { - content: "\f0ee"; } +.fa-arrows-turn-right { + --fa: "\e4c0"; } -.fa-cloud-upload::before { - content: "\f0ee"; } +.fa-vest { + --fa: "\e085"; } -.fa-cloud-upload-alt::before { - content: "\f0ee"; } +.fa-ferry { + --fa: "\e4ea"; } -.fa-palette::before { - content: "\f53f"; } +.fa-arrows-down-to-people { + --fa: "\e4b9"; } -.fa-arrows-turn-right::before { - content: "\e4c0"; } +.fa-seedling { + --fa: "\f4d8"; } -.fa-vest::before { - content: "\e085"; } +.fa-sprout { + --fa: "\f4d8"; } -.fa-ferry::before { - content: "\e4ea"; } +.fa-left-right { + --fa: "\f337"; } -.fa-arrows-down-to-people::before { - content: "\e4b9"; } +.fa-arrows-alt-h { + --fa: "\f337"; } -.fa-seedling::before { - content: "\f4d8"; } +.fa-boxes-packing { + --fa: "\e4c7"; } -.fa-sprout::before { - content: "\f4d8"; } +.fa-circle-arrow-left { + --fa: "\f0a8"; } -.fa-left-right::before { - content: "\f337"; } +.fa-arrow-circle-left { + --fa: "\f0a8"; } -.fa-arrows-alt-h::before { - content: "\f337"; } +.fa-group-arrows-rotate { + --fa: "\e4f6"; } -.fa-boxes-packing::before { - content: "\e4c7"; } +.fa-bowl-food { + --fa: "\e4c6"; } -.fa-circle-arrow-left::before { - content: "\f0a8"; } +.fa-candy-cane { + --fa: "\f786"; } -.fa-arrow-circle-left::before { - content: "\f0a8"; } +.fa-arrow-down-wide-short { + --fa: "\f160"; } -.fa-group-arrows-rotate::before { - content: "\e4f6"; } +.fa-sort-amount-asc { + --fa: "\f160"; } -.fa-bowl-food::before { - content: "\e4c6"; } +.fa-sort-amount-down { + --fa: "\f160"; } -.fa-candy-cane::before { - content: "\f786"; } +.fa-cloud-bolt { + --fa: "\f76c"; } -.fa-arrow-down-wide-short::before { - content: "\f160"; } +.fa-thunderstorm { + --fa: "\f76c"; } -.fa-sort-amount-asc::before { - content: "\f160"; } +.fa-text-slash { + --fa: "\f87d"; } -.fa-sort-amount-down::before { - content: "\f160"; } +.fa-remove-format { + --fa: "\f87d"; } -.fa-cloud-bolt::before { - content: "\f76c"; } +.fa-face-smile-wink { + --fa: "\f4da"; } -.fa-thunderstorm::before { - content: "\f76c"; } +.fa-smile-wink { + --fa: "\f4da"; } -.fa-text-slash::before { - content: "\f87d"; } +.fa-file-word { + --fa: "\f1c2"; } -.fa-remove-format::before { - content: "\f87d"; } +.fa-file-powerpoint { + --fa: "\f1c4"; } -.fa-face-smile-wink::before { - content: "\f4da"; } +.fa-arrows-left-right { + --fa: "\f07e"; } -.fa-smile-wink::before { - content: "\f4da"; } +.fa-arrows-h { + --fa: "\f07e"; } -.fa-file-word::before { - content: "\f1c2"; } +.fa-house-lock { + --fa: "\e510"; } -.fa-file-powerpoint::before { - content: "\f1c4"; } +.fa-cloud-arrow-down { + --fa: "\f0ed"; } -.fa-arrows-left-right::before { - content: "\f07e"; } +.fa-cloud-download { + --fa: "\f0ed"; } -.fa-arrows-h::before { - content: "\f07e"; } +.fa-cloud-download-alt { + --fa: "\f0ed"; } -.fa-house-lock::before { - content: "\e510"; } +.fa-children { + --fa: "\e4e1"; } -.fa-cloud-arrow-down::before { - content: "\f0ed"; } +.fa-chalkboard { + --fa: "\f51b"; } -.fa-cloud-download::before { - content: "\f0ed"; } +.fa-blackboard { + --fa: "\f51b"; } -.fa-cloud-download-alt::before { - content: "\f0ed"; } +.fa-user-large-slash { + --fa: "\f4fa"; } -.fa-children::before { - content: "\e4e1"; } +.fa-user-alt-slash { + --fa: "\f4fa"; } -.fa-chalkboard::before { - content: "\f51b"; } +.fa-envelope-open { + --fa: "\f2b6"; } -.fa-blackboard::before { - content: "\f51b"; } +.fa-handshake-simple-slash { + --fa: "\e05f"; } -.fa-user-large-slash::before { - content: "\f4fa"; } +.fa-handshake-alt-slash { + --fa: "\e05f"; } -.fa-user-alt-slash::before { - content: "\f4fa"; } +.fa-mattress-pillow { + --fa: "\e525"; } -.fa-envelope-open::before { - content: "\f2b6"; } +.fa-guarani-sign { + --fa: "\e19a"; } -.fa-handshake-simple-slash::before { - content: "\e05f"; } +.fa-arrows-rotate { + --fa: "\f021"; } -.fa-handshake-alt-slash::before { - content: "\e05f"; } +.fa-refresh { + --fa: "\f021"; } -.fa-mattress-pillow::before { - content: "\e525"; } +.fa-sync { + --fa: "\f021"; } -.fa-guarani-sign::before { - content: "\e19a"; } +.fa-fire-extinguisher { + --fa: "\f134"; } -.fa-arrows-rotate::before { - content: "\f021"; } +.fa-cruzeiro-sign { + --fa: "\e152"; } -.fa-refresh::before { - content: "\f021"; } +.fa-greater-than-equal { + --fa: "\f532"; } -.fa-sync::before { - content: "\f021"; } +.fa-shield-halved { + --fa: "\f3ed"; } -.fa-fire-extinguisher::before { - content: "\f134"; } +.fa-shield-alt { + --fa: "\f3ed"; } -.fa-cruzeiro-sign::before { - content: "\e152"; } +.fa-book-atlas { + --fa: "\f558"; } -.fa-greater-than-equal::before { - content: "\f532"; } +.fa-atlas { + --fa: "\f558"; } -.fa-shield-halved::before { - content: "\f3ed"; } +.fa-virus { + --fa: "\e074"; } -.fa-shield-alt::before { - content: "\f3ed"; } +.fa-envelope-circle-check { + --fa: "\e4e8"; } -.fa-book-atlas::before { - content: "\f558"; } +.fa-layer-group { + --fa: "\f5fd"; } -.fa-atlas::before { - content: "\f558"; } +.fa-arrows-to-dot { + --fa: "\e4be"; } -.fa-virus::before { - content: "\e074"; } +.fa-archway { + --fa: "\f557"; } -.fa-envelope-circle-check::before { - content: "\e4e8"; } +.fa-heart-circle-check { + --fa: "\e4fd"; } -.fa-layer-group::before { - content: "\f5fd"; } +.fa-house-chimney-crack { + --fa: "\f6f1"; } -.fa-arrows-to-dot::before { - content: "\e4be"; } +.fa-house-damage { + --fa: "\f6f1"; } -.fa-archway::before { - content: "\f557"; } +.fa-file-zipper { + --fa: "\f1c6"; } -.fa-heart-circle-check::before { - content: "\e4fd"; } +.fa-file-archive { + --fa: "\f1c6"; } -.fa-house-chimney-crack::before { - content: "\f6f1"; } +.fa-square { + --fa: "\f0c8"; } -.fa-house-damage::before { - content: "\f6f1"; } +.fa-martini-glass-empty { + --fa: "\f000"; } -.fa-file-zipper::before { - content: "\f1c6"; } +.fa-glass-martini { + --fa: "\f000"; } -.fa-file-archive::before { - content: "\f1c6"; } +.fa-couch { + --fa: "\f4b8"; } -.fa-square::before { - content: "\f0c8"; } +.fa-cedi-sign { + --fa: "\e0df"; } -.fa-martini-glass-empty::before { - content: "\f000"; } +.fa-italic { + --fa: "\f033"; } -.fa-glass-martini::before { - content: "\f000"; } +.fa-table-cells-column-lock { + --fa: "\e678"; } -.fa-couch::before { - content: "\f4b8"; } +.fa-church { + --fa: "\f51d"; } -.fa-cedi-sign::before { - content: "\e0df"; } +.fa-comments-dollar { + --fa: "\f653"; } -.fa-italic::before { - content: "\f033"; } +.fa-democrat { + --fa: "\f747"; } -.fa-table-cells-column-lock::before { - content: "\e678"; } +.fa-z { + --fa: "\5a"; } -.fa-church::before { - content: "\f51d"; } +.fa-person-skiing { + --fa: "\f7c9"; } -.fa-comments-dollar::before { - content: "\f653"; } +.fa-skiing { + --fa: "\f7c9"; } -.fa-democrat::before { - content: "\f747"; } +.fa-road-lock { + --fa: "\e567"; } -.fa-z::before { - content: "\5a"; } +.fa-a { + --fa: "\41"; } -.fa-person-skiing::before { - content: "\f7c9"; } +.fa-temperature-arrow-down { + --fa: "\e03f"; } -.fa-skiing::before { - content: "\f7c9"; } +.fa-temperature-down { + --fa: "\e03f"; } -.fa-road-lock::before { - content: "\e567"; } +.fa-feather-pointed { + --fa: "\f56b"; } -.fa-a::before { - content: "\41"; } +.fa-feather-alt { + --fa: "\f56b"; } -.fa-temperature-arrow-down::before { - content: "\e03f"; } +.fa-p { + --fa: "\50"; } -.fa-temperature-down::before { - content: "\e03f"; } +.fa-snowflake { + --fa: "\f2dc"; } -.fa-feather-pointed::before { - content: "\f56b"; } +.fa-newspaper { + --fa: "\f1ea"; } -.fa-feather-alt::before { - content: "\f56b"; } +.fa-rectangle-ad { + --fa: "\f641"; } -.fa-p::before { - content: "\50"; } +.fa-ad { + --fa: "\f641"; } -.fa-snowflake::before { - content: "\f2dc"; } +.fa-circle-arrow-right { + --fa: "\f0a9"; } -.fa-newspaper::before { - content: "\f1ea"; } +.fa-arrow-circle-right { + --fa: "\f0a9"; } -.fa-rectangle-ad::before { - content: "\f641"; } +.fa-filter-circle-xmark { + --fa: "\e17b"; } -.fa-ad::before { - content: "\f641"; } +.fa-locust { + --fa: "\e520"; } -.fa-circle-arrow-right::before { - content: "\f0a9"; } +.fa-sort { + --fa: "\f0dc"; } -.fa-arrow-circle-right::before { - content: "\f0a9"; } +.fa-unsorted { + --fa: "\f0dc"; } -.fa-filter-circle-xmark::before { - content: "\e17b"; } +.fa-list-ol { + --fa: "\f0cb"; } -.fa-locust::before { - content: "\e520"; } +.fa-list-1-2 { + --fa: "\f0cb"; } -.fa-sort::before { - content: "\f0dc"; } +.fa-list-numeric { + --fa: "\f0cb"; } -.fa-unsorted::before { - content: "\f0dc"; } +.fa-person-dress-burst { + --fa: "\e544"; } -.fa-list-ol::before { - content: "\f0cb"; } +.fa-money-check-dollar { + --fa: "\f53d"; } -.fa-list-1-2::before { - content: "\f0cb"; } +.fa-money-check-alt { + --fa: "\f53d"; } -.fa-list-numeric::before { - content: "\f0cb"; } +.fa-vector-square { + --fa: "\f5cb"; } -.fa-person-dress-burst::before { - content: "\e544"; } +.fa-bread-slice { + --fa: "\f7ec"; } -.fa-money-check-dollar::before { - content: "\f53d"; } +.fa-language { + --fa: "\f1ab"; } -.fa-money-check-alt::before { - content: "\f53d"; } +.fa-face-kiss-wink-heart { + --fa: "\f598"; } -.fa-vector-square::before { - content: "\f5cb"; } +.fa-kiss-wink-heart { + --fa: "\f598"; } -.fa-bread-slice::before { - content: "\f7ec"; } +.fa-filter { + --fa: "\f0b0"; } -.fa-language::before { - content: "\f1ab"; } +.fa-question { + --fa: "\3f"; } -.fa-face-kiss-wink-heart::before { - content: "\f598"; } +.fa-file-signature { + --fa: "\f573"; } -.fa-kiss-wink-heart::before { - content: "\f598"; } +.fa-up-down-left-right { + --fa: "\f0b2"; } -.fa-filter::before { - content: "\f0b0"; } +.fa-arrows-alt { + --fa: "\f0b2"; } -.fa-question::before { - content: "\3f"; } +.fa-house-chimney-user { + --fa: "\e065"; } -.fa-file-signature::before { - content: "\f573"; } +.fa-hand-holding-heart { + --fa: "\f4be"; } -.fa-up-down-left-right::before { - content: "\f0b2"; } +.fa-puzzle-piece { + --fa: "\f12e"; } -.fa-arrows-alt::before { - content: "\f0b2"; } +.fa-money-check { + --fa: "\f53c"; } -.fa-house-chimney-user::before { - content: "\e065"; } +.fa-star-half-stroke { + --fa: "\f5c0"; } -.fa-hand-holding-heart::before { - content: "\f4be"; } +.fa-star-half-alt { + --fa: "\f5c0"; } -.fa-puzzle-piece::before { - content: "\f12e"; } +.fa-code { + --fa: "\f121"; } -.fa-money-check::before { - content: "\f53c"; } +.fa-whiskey-glass { + --fa: "\f7a0"; } -.fa-star-half-stroke::before { - content: "\f5c0"; } +.fa-glass-whiskey { + --fa: "\f7a0"; } -.fa-star-half-alt::before { - content: "\f5c0"; } +.fa-building-circle-exclamation { + --fa: "\e4d3"; } -.fa-code::before { - content: "\f121"; } +.fa-magnifying-glass-chart { + --fa: "\e522"; } -.fa-whiskey-glass::before { - content: "\f7a0"; } +.fa-arrow-up-right-from-square { + --fa: "\f08e"; } -.fa-glass-whiskey::before { - content: "\f7a0"; } +.fa-external-link { + --fa: "\f08e"; } -.fa-building-circle-exclamation::before { - content: "\e4d3"; } +.fa-cubes-stacked { + --fa: "\e4e6"; } -.fa-magnifying-glass-chart::before { - content: "\e522"; } +.fa-won-sign { + --fa: "\f159"; } -.fa-arrow-up-right-from-square::before { - content: "\f08e"; } +.fa-krw { + --fa: "\f159"; } -.fa-external-link::before { - content: "\f08e"; } +.fa-won { + --fa: "\f159"; } -.fa-cubes-stacked::before { - content: "\e4e6"; } +.fa-virus-covid { + --fa: "\e4a8"; } -.fa-won-sign::before { - content: "\f159"; } +.fa-austral-sign { + --fa: "\e0a9"; } -.fa-krw::before { - content: "\f159"; } +.fa-f { + --fa: "\46"; } -.fa-won::before { - content: "\f159"; } +.fa-leaf { + --fa: "\f06c"; } -.fa-virus-covid::before { - content: "\e4a8"; } +.fa-road { + --fa: "\f018"; } -.fa-austral-sign::before { - content: "\e0a9"; } +.fa-taxi { + --fa: "\f1ba"; } -.fa-f::before { - content: "\46"; } +.fa-cab { + --fa: "\f1ba"; } -.fa-leaf::before { - content: "\f06c"; } +.fa-person-circle-plus { + --fa: "\e541"; } -.fa-road::before { - content: "\f018"; } +.fa-chart-pie { + --fa: "\f200"; } -.fa-taxi::before { - content: "\f1ba"; } +.fa-pie-chart { + --fa: "\f200"; } -.fa-cab::before { - content: "\f1ba"; } +.fa-bolt-lightning { + --fa: "\e0b7"; } -.fa-person-circle-plus::before { - content: "\e541"; } +.fa-sack-xmark { + --fa: "\e56a"; } -.fa-chart-pie::before { - content: "\f200"; } +.fa-file-excel { + --fa: "\f1c3"; } -.fa-pie-chart::before { - content: "\f200"; } +.fa-file-contract { + --fa: "\f56c"; } -.fa-bolt-lightning::before { - content: "\e0b7"; } +.fa-fish-fins { + --fa: "\e4f2"; } -.fa-sack-xmark::before { - content: "\e56a"; } +.fa-building-flag { + --fa: "\e4d5"; } -.fa-file-excel::before { - content: "\f1c3"; } +.fa-face-grin-beam { + --fa: "\f582"; } -.fa-file-contract::before { - content: "\f56c"; } +.fa-grin-beam { + --fa: "\f582"; } -.fa-fish-fins::before { - content: "\e4f2"; } +.fa-object-ungroup { + --fa: "\f248"; } -.fa-building-flag::before { - content: "\e4d5"; } +.fa-poop { + --fa: "\f619"; } -.fa-face-grin-beam::before { - content: "\f582"; } +.fa-location-pin { + --fa: "\f041"; } -.fa-grin-beam::before { - content: "\f582"; } +.fa-map-marker { + --fa: "\f041"; } -.fa-object-ungroup::before { - content: "\f248"; } +.fa-kaaba { + --fa: "\f66b"; } -.fa-poop::before { - content: "\f619"; } +.fa-toilet-paper { + --fa: "\f71e"; } -.fa-location-pin::before { - content: "\f041"; } +.fa-helmet-safety { + --fa: "\f807"; } -.fa-map-marker::before { - content: "\f041"; } +.fa-hard-hat { + --fa: "\f807"; } -.fa-kaaba::before { - content: "\f66b"; } +.fa-hat-hard { + --fa: "\f807"; } -.fa-toilet-paper::before { - content: "\f71e"; } +.fa-eject { + --fa: "\f052"; } -.fa-helmet-safety::before { - content: "\f807"; } +.fa-circle-right { + --fa: "\f35a"; } -.fa-hard-hat::before { - content: "\f807"; } +.fa-arrow-alt-circle-right { + --fa: "\f35a"; } -.fa-hat-hard::before { - content: "\f807"; } +.fa-plane-circle-check { + --fa: "\e555"; } -.fa-eject::before { - content: "\f052"; } +.fa-face-rolling-eyes { + --fa: "\f5a5"; } -.fa-circle-right::before { - content: "\f35a"; } +.fa-meh-rolling-eyes { + --fa: "\f5a5"; } -.fa-arrow-alt-circle-right::before { - content: "\f35a"; } +.fa-object-group { + --fa: "\f247"; } -.fa-plane-circle-check::before { - content: "\e555"; } +.fa-chart-line { + --fa: "\f201"; } -.fa-face-rolling-eyes::before { - content: "\f5a5"; } +.fa-line-chart { + --fa: "\f201"; } -.fa-meh-rolling-eyes::before { - content: "\f5a5"; } +.fa-mask-ventilator { + --fa: "\e524"; } -.fa-object-group::before { - content: "\f247"; } +.fa-arrow-right { + --fa: "\f061"; } -.fa-chart-line::before { - content: "\f201"; } +.fa-signs-post { + --fa: "\f277"; } -.fa-line-chart::before { - content: "\f201"; } +.fa-map-signs { + --fa: "\f277"; } -.fa-mask-ventilator::before { - content: "\e524"; } +.fa-cash-register { + --fa: "\f788"; } -.fa-arrow-right::before { - content: "\f061"; } +.fa-person-circle-question { + --fa: "\e542"; } -.fa-signs-post::before { - content: "\f277"; } +.fa-h { + --fa: "\48"; } -.fa-map-signs::before { - content: "\f277"; } +.fa-tarp { + --fa: "\e57b"; } -.fa-cash-register::before { - content: "\f788"; } +.fa-screwdriver-wrench { + --fa: "\f7d9"; } -.fa-person-circle-question::before { - content: "\e542"; } +.fa-tools { + --fa: "\f7d9"; } -.fa-h::before { - content: "\48"; } +.fa-arrows-to-eye { + --fa: "\e4bf"; } -.fa-tarp::before { - content: "\e57b"; } +.fa-plug-circle-bolt { + --fa: "\e55b"; } -.fa-screwdriver-wrench::before { - content: "\f7d9"; } +.fa-heart { + --fa: "\f004"; } -.fa-tools::before { - content: "\f7d9"; } +.fa-mars-and-venus { + --fa: "\f224"; } -.fa-arrows-to-eye::before { - content: "\e4bf"; } +.fa-house-user { + --fa: "\e1b0"; } -.fa-plug-circle-bolt::before { - content: "\e55b"; } +.fa-home-user { + --fa: "\e1b0"; } -.fa-heart::before { - content: "\f004"; } +.fa-dumpster-fire { + --fa: "\f794"; } -.fa-mars-and-venus::before { - content: "\f224"; } +.fa-house-crack { + --fa: "\e3b1"; } -.fa-house-user::before { - content: "\e1b0"; } +.fa-martini-glass-citrus { + --fa: "\f561"; } -.fa-home-user::before { - content: "\e1b0"; } +.fa-cocktail { + --fa: "\f561"; } -.fa-dumpster-fire::before { - content: "\f794"; } +.fa-face-surprise { + --fa: "\f5c2"; } -.fa-house-crack::before { - content: "\e3b1"; } +.fa-surprise { + --fa: "\f5c2"; } -.fa-martini-glass-citrus::before { - content: "\f561"; } +.fa-bottle-water { + --fa: "\e4c5"; } -.fa-cocktail::before { - content: "\f561"; } +.fa-circle-pause { + --fa: "\f28b"; } -.fa-face-surprise::before { - content: "\f5c2"; } +.fa-pause-circle { + --fa: "\f28b"; } -.fa-surprise::before { - content: "\f5c2"; } +.fa-toilet-paper-slash { + --fa: "\e072"; } -.fa-bottle-water::before { - content: "\e4c5"; } +.fa-apple-whole { + --fa: "\f5d1"; } -.fa-circle-pause::before { - content: "\f28b"; } +.fa-apple-alt { + --fa: "\f5d1"; } -.fa-pause-circle::before { - content: "\f28b"; } +.fa-kitchen-set { + --fa: "\e51a"; } -.fa-toilet-paper-slash::before { - content: "\e072"; } +.fa-r { + --fa: "\52"; } -.fa-apple-whole::before { - content: "\f5d1"; } +.fa-temperature-quarter { + --fa: "\f2ca"; } -.fa-apple-alt::before { - content: "\f5d1"; } +.fa-temperature-1 { + --fa: "\f2ca"; } -.fa-kitchen-set::before { - content: "\e51a"; } +.fa-thermometer-1 { + --fa: "\f2ca"; } -.fa-r::before { - content: "\52"; } +.fa-thermometer-quarter { + --fa: "\f2ca"; } -.fa-temperature-quarter::before { - content: "\f2ca"; } +.fa-cube { + --fa: "\f1b2"; } -.fa-temperature-1::before { - content: "\f2ca"; } +.fa-bitcoin-sign { + --fa: "\e0b4"; } -.fa-thermometer-1::before { - content: "\f2ca"; } +.fa-shield-dog { + --fa: "\e573"; } -.fa-thermometer-quarter::before { - content: "\f2ca"; } +.fa-solar-panel { + --fa: "\f5ba"; } -.fa-cube::before { - content: "\f1b2"; } +.fa-lock-open { + --fa: "\f3c1"; } -.fa-bitcoin-sign::before { - content: "\e0b4"; } +.fa-elevator { + --fa: "\e16d"; } -.fa-shield-dog::before { - content: "\e573"; } +.fa-money-bill-transfer { + --fa: "\e528"; } -.fa-solar-panel::before { - content: "\f5ba"; } +.fa-money-bill-trend-up { + --fa: "\e529"; } -.fa-lock-open::before { - content: "\f3c1"; } +.fa-house-flood-water-circle-arrow-right { + --fa: "\e50f"; } -.fa-elevator::before { - content: "\e16d"; } +.fa-square-poll-horizontal { + --fa: "\f682"; } -.fa-money-bill-transfer::before { - content: "\e528"; } +.fa-poll-h { + --fa: "\f682"; } -.fa-money-bill-trend-up::before { - content: "\e529"; } +.fa-circle { + --fa: "\f111"; } -.fa-house-flood-water-circle-arrow-right::before { - content: "\e50f"; } +.fa-backward-fast { + --fa: "\f049"; } -.fa-square-poll-horizontal::before { - content: "\f682"; } +.fa-fast-backward { + --fa: "\f049"; } -.fa-poll-h::before { - content: "\f682"; } +.fa-recycle { + --fa: "\f1b8"; } -.fa-circle::before { - content: "\f111"; } +.fa-user-astronaut { + --fa: "\f4fb"; } -.fa-backward-fast::before { - content: "\f049"; } +.fa-plane-slash { + --fa: "\e069"; } -.fa-fast-backward::before { - content: "\f049"; } +.fa-trademark { + --fa: "\f25c"; } -.fa-recycle::before { - content: "\f1b8"; } +.fa-basketball { + --fa: "\f434"; } -.fa-user-astronaut::before { - content: "\f4fb"; } +.fa-basketball-ball { + --fa: "\f434"; } -.fa-plane-slash::before { - content: "\e069"; } +.fa-satellite-dish { + --fa: "\f7c0"; } -.fa-trademark::before { - content: "\f25c"; } +.fa-circle-up { + --fa: "\f35b"; } -.fa-basketball::before { - content: "\f434"; } +.fa-arrow-alt-circle-up { + --fa: "\f35b"; } -.fa-basketball-ball::before { - content: "\f434"; } +.fa-mobile-screen-button { + --fa: "\f3cd"; } -.fa-satellite-dish::before { - content: "\f7c0"; } +.fa-mobile-alt { + --fa: "\f3cd"; } -.fa-circle-up::before { - content: "\f35b"; } +.fa-volume-high { + --fa: "\f028"; } -.fa-arrow-alt-circle-up::before { - content: "\f35b"; } +.fa-volume-up { + --fa: "\f028"; } -.fa-mobile-screen-button::before { - content: "\f3cd"; } +.fa-users-rays { + --fa: "\e593"; } -.fa-mobile-alt::before { - content: "\f3cd"; } +.fa-wallet { + --fa: "\f555"; } -.fa-volume-high::before { - content: "\f028"; } +.fa-clipboard-check { + --fa: "\f46c"; } -.fa-volume-up::before { - content: "\f028"; } +.fa-file-audio { + --fa: "\f1c7"; } -.fa-users-rays::before { - content: "\e593"; } +.fa-burger { + --fa: "\f805"; } -.fa-wallet::before { - content: "\f555"; } +.fa-hamburger { + --fa: "\f805"; } -.fa-clipboard-check::before { - content: "\f46c"; } +.fa-wrench { + --fa: "\f0ad"; } -.fa-file-audio::before { - content: "\f1c7"; } +.fa-bugs { + --fa: "\e4d0"; } -.fa-burger::before { - content: "\f805"; } +.fa-rupee-sign { + --fa: "\f156"; } -.fa-hamburger::before { - content: "\f805"; } +.fa-rupee { + --fa: "\f156"; } -.fa-wrench::before { - content: "\f0ad"; } +.fa-file-image { + --fa: "\f1c5"; } -.fa-bugs::before { - content: "\e4d0"; } +.fa-circle-question { + --fa: "\f059"; } -.fa-rupee-sign::before { - content: "\f156"; } +.fa-question-circle { + --fa: "\f059"; } -.fa-rupee::before { - content: "\f156"; } +.fa-plane-departure { + --fa: "\f5b0"; } -.fa-file-image::before { - content: "\f1c5"; } +.fa-handshake-slash { + --fa: "\e060"; } -.fa-circle-question::before { - content: "\f059"; } +.fa-book-bookmark { + --fa: "\e0bb"; } -.fa-question-circle::before { - content: "\f059"; } +.fa-code-branch { + --fa: "\f126"; } -.fa-plane-departure::before { - content: "\f5b0"; } +.fa-hat-cowboy { + --fa: "\f8c0"; } -.fa-handshake-slash::before { - content: "\e060"; } +.fa-bridge { + --fa: "\e4c8"; } -.fa-book-bookmark::before { - content: "\e0bb"; } +.fa-phone-flip { + --fa: "\f879"; } -.fa-code-branch::before { - content: "\f126"; } +.fa-phone-alt { + --fa: "\f879"; } -.fa-hat-cowboy::before { - content: "\f8c0"; } +.fa-truck-front { + --fa: "\e2b7"; } -.fa-bridge::before { - content: "\e4c8"; } +.fa-cat { + --fa: "\f6be"; } -.fa-phone-flip::before { - content: "\f879"; } +.fa-anchor-circle-exclamation { + --fa: "\e4ab"; } -.fa-phone-alt::before { - content: "\f879"; } +.fa-truck-field { + --fa: "\e58d"; } -.fa-truck-front::before { - content: "\e2b7"; } +.fa-route { + --fa: "\f4d7"; } -.fa-cat::before { - content: "\f6be"; } +.fa-clipboard-question { + --fa: "\e4e3"; } -.fa-anchor-circle-exclamation::before { - content: "\e4ab"; } +.fa-panorama { + --fa: "\e209"; } -.fa-truck-field::before { - content: "\e58d"; } +.fa-comment-medical { + --fa: "\f7f5"; } -.fa-route::before { - content: "\f4d7"; } +.fa-teeth-open { + --fa: "\f62f"; } -.fa-clipboard-question::before { - content: "\e4e3"; } +.fa-file-circle-minus { + --fa: "\e4ed"; } -.fa-panorama::before { - content: "\e209"; } +.fa-tags { + --fa: "\f02c"; } -.fa-comment-medical::before { - content: "\f7f5"; } +.fa-wine-glass { + --fa: "\f4e3"; } -.fa-teeth-open::before { - content: "\f62f"; } +.fa-forward-fast { + --fa: "\f050"; } -.fa-file-circle-minus::before { - content: "\e4ed"; } +.fa-fast-forward { + --fa: "\f050"; } -.fa-tags::before { - content: "\f02c"; } +.fa-face-meh-blank { + --fa: "\f5a4"; } -.fa-wine-glass::before { - content: "\f4e3"; } +.fa-meh-blank { + --fa: "\f5a4"; } -.fa-forward-fast::before { - content: "\f050"; } +.fa-square-parking { + --fa: "\f540"; } -.fa-fast-forward::before { - content: "\f050"; } +.fa-parking { + --fa: "\f540"; } -.fa-face-meh-blank::before { - content: "\f5a4"; } +.fa-house-signal { + --fa: "\e012"; } -.fa-meh-blank::before { - content: "\f5a4"; } +.fa-bars-progress { + --fa: "\f828"; } -.fa-square-parking::before { - content: "\f540"; } +.fa-tasks-alt { + --fa: "\f828"; } -.fa-parking::before { - content: "\f540"; } +.fa-faucet-drip { + --fa: "\e006"; } -.fa-house-signal::before { - content: "\e012"; } +.fa-cart-flatbed { + --fa: "\f474"; } -.fa-bars-progress::before { - content: "\f828"; } +.fa-dolly-flatbed { + --fa: "\f474"; } -.fa-tasks-alt::before { - content: "\f828"; } +.fa-ban-smoking { + --fa: "\f54d"; } -.fa-faucet-drip::before { - content: "\e006"; } +.fa-smoking-ban { + --fa: "\f54d"; } -.fa-cart-flatbed::before { - content: "\f474"; } +.fa-terminal { + --fa: "\f120"; } -.fa-dolly-flatbed::before { - content: "\f474"; } +.fa-mobile-button { + --fa: "\f10b"; } -.fa-ban-smoking::before { - content: "\f54d"; } +.fa-house-medical-flag { + --fa: "\e514"; } -.fa-smoking-ban::before { - content: "\f54d"; } +.fa-basket-shopping { + --fa: "\f291"; } -.fa-terminal::before { - content: "\f120"; } +.fa-shopping-basket { + --fa: "\f291"; } -.fa-mobile-button::before { - content: "\f10b"; } +.fa-tape { + --fa: "\f4db"; } -.fa-house-medical-flag::before { - content: "\e514"; } +.fa-bus-simple { + --fa: "\f55e"; } -.fa-basket-shopping::before { - content: "\f291"; } +.fa-bus-alt { + --fa: "\f55e"; } -.fa-shopping-basket::before { - content: "\f291"; } +.fa-eye { + --fa: "\f06e"; } -.fa-tape::before { - content: "\f4db"; } +.fa-face-sad-cry { + --fa: "\f5b3"; } -.fa-bus-simple::before { - content: "\f55e"; } +.fa-sad-cry { + --fa: "\f5b3"; } -.fa-bus-alt::before { - content: "\f55e"; } +.fa-audio-description { + --fa: "\f29e"; } -.fa-eye::before { - content: "\f06e"; } +.fa-person-military-to-person { + --fa: "\e54c"; } -.fa-face-sad-cry::before { - content: "\f5b3"; } +.fa-file-shield { + --fa: "\e4f0"; } -.fa-sad-cry::before { - content: "\f5b3"; } +.fa-user-slash { + --fa: "\f506"; } -.fa-audio-description::before { - content: "\f29e"; } +.fa-pen { + --fa: "\f304"; } -.fa-person-military-to-person::before { - content: "\e54c"; } +.fa-tower-observation { + --fa: "\e586"; } -.fa-file-shield::before { - content: "\e4f0"; } +.fa-file-code { + --fa: "\f1c9"; } -.fa-user-slash::before { - content: "\f506"; } +.fa-signal { + --fa: "\f012"; } -.fa-pen::before { - content: "\f304"; } +.fa-signal-5 { + --fa: "\f012"; } -.fa-tower-observation::before { - content: "\e586"; } +.fa-signal-perfect { + --fa: "\f012"; } -.fa-file-code::before { - content: "\f1c9"; } +.fa-bus { + --fa: "\f207"; } -.fa-signal::before { - content: "\f012"; } +.fa-heart-circle-xmark { + --fa: "\e501"; } -.fa-signal-5::before { - content: "\f012"; } +.fa-house-chimney { + --fa: "\e3af"; } -.fa-signal-perfect::before { - content: "\f012"; } +.fa-home-lg { + --fa: "\e3af"; } -.fa-bus::before { - content: "\f207"; } +.fa-window-maximize { + --fa: "\f2d0"; } -.fa-heart-circle-xmark::before { - content: "\e501"; } +.fa-face-frown { + --fa: "\f119"; } -.fa-house-chimney::before { - content: "\e3af"; } +.fa-frown { + --fa: "\f119"; } -.fa-home-lg::before { - content: "\e3af"; } +.fa-prescription { + --fa: "\f5b1"; } -.fa-window-maximize::before { - content: "\f2d0"; } +.fa-shop { + --fa: "\f54f"; } -.fa-face-frown::before { - content: "\f119"; } +.fa-store-alt { + --fa: "\f54f"; } -.fa-frown::before { - content: "\f119"; } +.fa-floppy-disk { + --fa: "\f0c7"; } -.fa-prescription::before { - content: "\f5b1"; } +.fa-save { + --fa: "\f0c7"; } -.fa-shop::before { - content: "\f54f"; } +.fa-vihara { + --fa: "\f6a7"; } -.fa-store-alt::before { - content: "\f54f"; } +.fa-scale-unbalanced { + --fa: "\f515"; } -.fa-floppy-disk::before { - content: "\f0c7"; } +.fa-balance-scale-left { + --fa: "\f515"; } -.fa-save::before { - content: "\f0c7"; } +.fa-sort-up { + --fa: "\f0de"; } -.fa-vihara::before { - content: "\f6a7"; } +.fa-sort-asc { + --fa: "\f0de"; } -.fa-scale-unbalanced::before { - content: "\f515"; } +.fa-comment-dots { + --fa: "\f4ad"; } -.fa-balance-scale-left::before { - content: "\f515"; } +.fa-commenting { + --fa: "\f4ad"; } -.fa-sort-up::before { - content: "\f0de"; } +.fa-plant-wilt { + --fa: "\e5aa"; } -.fa-sort-asc::before { - content: "\f0de"; } +.fa-diamond { + --fa: "\f219"; } -.fa-comment-dots::before { - content: "\f4ad"; } +.fa-face-grin-squint { + --fa: "\f585"; } -.fa-commenting::before { - content: "\f4ad"; } +.fa-grin-squint { + --fa: "\f585"; } -.fa-plant-wilt::before { - content: "\e5aa"; } +.fa-hand-holding-dollar { + --fa: "\f4c0"; } -.fa-diamond::before { - content: "\f219"; } +.fa-hand-holding-usd { + --fa: "\f4c0"; } -.fa-face-grin-squint::before { - content: "\f585"; } +.fa-chart-diagram { + --fa: "\e695"; } -.fa-grin-squint::before { - content: "\f585"; } +.fa-bacterium { + --fa: "\e05a"; } -.fa-hand-holding-dollar::before { - content: "\f4c0"; } +.fa-hand-pointer { + --fa: "\f25a"; } -.fa-hand-holding-usd::before { - content: "\f4c0"; } +.fa-drum-steelpan { + --fa: "\f56a"; } -.fa-bacterium::before { - content: "\e05a"; } +.fa-hand-scissors { + --fa: "\f257"; } -.fa-hand-pointer::before { - content: "\f25a"; } +.fa-hands-praying { + --fa: "\f684"; } -.fa-drum-steelpan::before { - content: "\f56a"; } +.fa-praying-hands { + --fa: "\f684"; } -.fa-hand-scissors::before { - content: "\f257"; } +.fa-arrow-rotate-right { + --fa: "\f01e"; } -.fa-hands-praying::before { - content: "\f684"; } +.fa-arrow-right-rotate { + --fa: "\f01e"; } -.fa-praying-hands::before { - content: "\f684"; } +.fa-arrow-rotate-forward { + --fa: "\f01e"; } -.fa-arrow-rotate-right::before { - content: "\f01e"; } +.fa-redo { + --fa: "\f01e"; } -.fa-arrow-right-rotate::before { - content: "\f01e"; } +.fa-biohazard { + --fa: "\f780"; } -.fa-arrow-rotate-forward::before { - content: "\f01e"; } +.fa-location-crosshairs { + --fa: "\f601"; } -.fa-redo::before { - content: "\f01e"; } +.fa-location { + --fa: "\f601"; } -.fa-biohazard::before { - content: "\f780"; } +.fa-mars-double { + --fa: "\f227"; } -.fa-location-crosshairs::before { - content: "\f601"; } +.fa-child-dress { + --fa: "\e59c"; } -.fa-location::before { - content: "\f601"; } +.fa-users-between-lines { + --fa: "\e591"; } -.fa-mars-double::before { - content: "\f227"; } +.fa-lungs-virus { + --fa: "\e067"; } -.fa-child-dress::before { - content: "\e59c"; } +.fa-face-grin-tears { + --fa: "\f588"; } -.fa-users-between-lines::before { - content: "\e591"; } +.fa-grin-tears { + --fa: "\f588"; } -.fa-lungs-virus::before { - content: "\e067"; } +.fa-phone { + --fa: "\f095"; } -.fa-face-grin-tears::before { - content: "\f588"; } +.fa-calendar-xmark { + --fa: "\f273"; } -.fa-grin-tears::before { - content: "\f588"; } +.fa-calendar-times { + --fa: "\f273"; } -.fa-phone::before { - content: "\f095"; } +.fa-child-reaching { + --fa: "\e59d"; } -.fa-calendar-xmark::before { - content: "\f273"; } +.fa-head-side-virus { + --fa: "\e064"; } -.fa-calendar-times::before { - content: "\f273"; } +.fa-user-gear { + --fa: "\f4fe"; } -.fa-child-reaching::before { - content: "\e59d"; } +.fa-user-cog { + --fa: "\f4fe"; } -.fa-head-side-virus::before { - content: "\e064"; } +.fa-arrow-up-1-9 { + --fa: "\f163"; } -.fa-user-gear::before { - content: "\f4fe"; } +.fa-sort-numeric-up { + --fa: "\f163"; } -.fa-user-cog::before { - content: "\f4fe"; } +.fa-door-closed { + --fa: "\f52a"; } -.fa-arrow-up-1-9::before { - content: "\f163"; } +.fa-shield-virus { + --fa: "\e06c"; } -.fa-sort-numeric-up::before { - content: "\f163"; } +.fa-dice-six { + --fa: "\f526"; } -.fa-door-closed::before { - content: "\f52a"; } +.fa-mosquito-net { + --fa: "\e52c"; } -.fa-shield-virus::before { - content: "\e06c"; } +.fa-file-fragment { + --fa: "\e697"; } -.fa-dice-six::before { - content: "\f526"; } +.fa-bridge-water { + --fa: "\e4ce"; } -.fa-mosquito-net::before { - content: "\e52c"; } +.fa-person-booth { + --fa: "\f756"; } -.fa-bridge-water::before { - content: "\e4ce"; } +.fa-text-width { + --fa: "\f035"; } -.fa-person-booth::before { - content: "\f756"; } +.fa-hat-wizard { + --fa: "\f6e8"; } -.fa-text-width::before { - content: "\f035"; } +.fa-pen-fancy { + --fa: "\f5ac"; } -.fa-hat-wizard::before { - content: "\f6e8"; } +.fa-person-digging { + --fa: "\f85e"; } -.fa-pen-fancy::before { - content: "\f5ac"; } +.fa-digging { + --fa: "\f85e"; } -.fa-person-digging::before { - content: "\f85e"; } +.fa-trash { + --fa: "\f1f8"; } -.fa-digging::before { - content: "\f85e"; } +.fa-gauge-simple { + --fa: "\f629"; } -.fa-trash::before { - content: "\f1f8"; } +.fa-gauge-simple-med { + --fa: "\f629"; } -.fa-gauge-simple::before { - content: "\f629"; } +.fa-tachometer-average { + --fa: "\f629"; } -.fa-gauge-simple-med::before { - content: "\f629"; } +.fa-book-medical { + --fa: "\f7e6"; } -.fa-tachometer-average::before { - content: "\f629"; } +.fa-poo { + --fa: "\f2fe"; } -.fa-book-medical::before { - content: "\f7e6"; } +.fa-quote-right { + --fa: "\f10e"; } -.fa-poo::before { - content: "\f2fe"; } +.fa-quote-right-alt { + --fa: "\f10e"; } -.fa-quote-right::before { - content: "\f10e"; } +.fa-shirt { + --fa: "\f553"; } -.fa-quote-right-alt::before { - content: "\f10e"; } +.fa-t-shirt { + --fa: "\f553"; } -.fa-shirt::before { - content: "\f553"; } +.fa-tshirt { + --fa: "\f553"; } -.fa-t-shirt::before { - content: "\f553"; } +.fa-cubes { + --fa: "\f1b3"; } -.fa-tshirt::before { - content: "\f553"; } +.fa-divide { + --fa: "\f529"; } -.fa-cubes::before { - content: "\f1b3"; } +.fa-tenge-sign { + --fa: "\f7d7"; } -.fa-divide::before { - content: "\f529"; } +.fa-tenge { + --fa: "\f7d7"; } -.fa-tenge-sign::before { - content: "\f7d7"; } +.fa-headphones { + --fa: "\f025"; } -.fa-tenge::before { - content: "\f7d7"; } +.fa-hands-holding { + --fa: "\f4c2"; } -.fa-headphones::before { - content: "\f025"; } +.fa-hands-clapping { + --fa: "\e1a8"; } -.fa-hands-holding::before { - content: "\f4c2"; } +.fa-republican { + --fa: "\f75e"; } -.fa-hands-clapping::before { - content: "\e1a8"; } +.fa-arrow-left { + --fa: "\f060"; } -.fa-republican::before { - content: "\f75e"; } +.fa-person-circle-xmark { + --fa: "\e543"; } -.fa-arrow-left::before { - content: "\f060"; } +.fa-ruler { + --fa: "\f545"; } -.fa-person-circle-xmark::before { - content: "\e543"; } +.fa-align-left { + --fa: "\f036"; } -.fa-ruler::before { - content: "\f545"; } +.fa-dice-d6 { + --fa: "\f6d1"; } -.fa-align-left::before { - content: "\f036"; } +.fa-restroom { + --fa: "\f7bd"; } -.fa-dice-d6::before { - content: "\f6d1"; } +.fa-j { + --fa: "\4a"; } -.fa-restroom::before { - content: "\f7bd"; } +.fa-users-viewfinder { + --fa: "\e595"; } -.fa-j::before { - content: "\4a"; } +.fa-file-video { + --fa: "\f1c8"; } -.fa-users-viewfinder::before { - content: "\e595"; } +.fa-up-right-from-square { + --fa: "\f35d"; } -.fa-file-video::before { - content: "\f1c8"; } +.fa-external-link-alt { + --fa: "\f35d"; } -.fa-up-right-from-square::before { - content: "\f35d"; } +.fa-table-cells { + --fa: "\f00a"; } -.fa-external-link-alt::before { - content: "\f35d"; } +.fa-th { + --fa: "\f00a"; } -.fa-table-cells::before { - content: "\f00a"; } +.fa-file-pdf { + --fa: "\f1c1"; } -.fa-th::before { - content: "\f00a"; } +.fa-book-bible { + --fa: "\f647"; } -.fa-file-pdf::before { - content: "\f1c1"; } +.fa-bible { + --fa: "\f647"; } -.fa-book-bible::before { - content: "\f647"; } +.fa-o { + --fa: "\4f"; } -.fa-bible::before { - content: "\f647"; } +.fa-suitcase-medical { + --fa: "\f0fa"; } -.fa-o::before { - content: "\4f"; } +.fa-medkit { + --fa: "\f0fa"; } -.fa-suitcase-medical::before { - content: "\f0fa"; } +.fa-user-secret { + --fa: "\f21b"; } -.fa-medkit::before { - content: "\f0fa"; } +.fa-otter { + --fa: "\f700"; } -.fa-user-secret::before { - content: "\f21b"; } +.fa-person-dress { + --fa: "\f182"; } -.fa-otter::before { - content: "\f700"; } +.fa-female { + --fa: "\f182"; } -.fa-person-dress::before { - content: "\f182"; } +.fa-comment-dollar { + --fa: "\f651"; } -.fa-female::before { - content: "\f182"; } +.fa-business-time { + --fa: "\f64a"; } -.fa-comment-dollar::before { - content: "\f651"; } +.fa-briefcase-clock { + --fa: "\f64a"; } -.fa-business-time::before { - content: "\f64a"; } +.fa-table-cells-large { + --fa: "\f009"; } -.fa-briefcase-clock::before { - content: "\f64a"; } +.fa-th-large { + --fa: "\f009"; } -.fa-table-cells-large::before { - content: "\f009"; } +.fa-book-tanakh { + --fa: "\f827"; } -.fa-th-large::before { - content: "\f009"; } +.fa-tanakh { + --fa: "\f827"; } -.fa-book-tanakh::before { - content: "\f827"; } +.fa-phone-volume { + --fa: "\f2a0"; } -.fa-tanakh::before { - content: "\f827"; } +.fa-volume-control-phone { + --fa: "\f2a0"; } -.fa-phone-volume::before { - content: "\f2a0"; } +.fa-hat-cowboy-side { + --fa: "\f8c1"; } -.fa-volume-control-phone::before { - content: "\f2a0"; } +.fa-clipboard-user { + --fa: "\f7f3"; } -.fa-hat-cowboy-side::before { - content: "\f8c1"; } +.fa-child { + --fa: "\f1ae"; } -.fa-clipboard-user::before { - content: "\f7f3"; } +.fa-lira-sign { + --fa: "\f195"; } -.fa-child::before { - content: "\f1ae"; } +.fa-satellite { + --fa: "\f7bf"; } -.fa-lira-sign::before { - content: "\f195"; } +.fa-plane-lock { + --fa: "\e558"; } -.fa-satellite::before { - content: "\f7bf"; } +.fa-tag { + --fa: "\f02b"; } -.fa-plane-lock::before { - content: "\e558"; } +.fa-comment { + --fa: "\f075"; } -.fa-tag::before { - content: "\f02b"; } +.fa-cake-candles { + --fa: "\f1fd"; } -.fa-comment::before { - content: "\f075"; } +.fa-birthday-cake { + --fa: "\f1fd"; } -.fa-cake-candles::before { - content: "\f1fd"; } +.fa-cake { + --fa: "\f1fd"; } -.fa-birthday-cake::before { - content: "\f1fd"; } +.fa-envelope { + --fa: "\f0e0"; } -.fa-cake::before { - content: "\f1fd"; } +.fa-angles-up { + --fa: "\f102"; } -.fa-envelope::before { - content: "\f0e0"; } +.fa-angle-double-up { + --fa: "\f102"; } -.fa-angles-up::before { - content: "\f102"; } +.fa-paperclip { + --fa: "\f0c6"; } -.fa-angle-double-up::before { - content: "\f102"; } +.fa-arrow-right-to-city { + --fa: "\e4b3"; } -.fa-paperclip::before { - content: "\f0c6"; } +.fa-ribbon { + --fa: "\f4d6"; } -.fa-arrow-right-to-city::before { - content: "\e4b3"; } +.fa-lungs { + --fa: "\f604"; } -.fa-ribbon::before { - content: "\f4d6"; } +.fa-arrow-up-9-1 { + --fa: "\f887"; } -.fa-lungs::before { - content: "\f604"; } +.fa-sort-numeric-up-alt { + --fa: "\f887"; } -.fa-arrow-up-9-1::before { - content: "\f887"; } +.fa-litecoin-sign { + --fa: "\e1d3"; } -.fa-sort-numeric-up-alt::before { - content: "\f887"; } +.fa-border-none { + --fa: "\f850"; } -.fa-litecoin-sign::before { - content: "\e1d3"; } +.fa-circle-nodes { + --fa: "\e4e2"; } -.fa-border-none::before { - content: "\f850"; } +.fa-parachute-box { + --fa: "\f4cd"; } -.fa-circle-nodes::before { - content: "\e4e2"; } +.fa-indent { + --fa: "\f03c"; } -.fa-parachute-box::before { - content: "\f4cd"; } +.fa-truck-field-un { + --fa: "\e58e"; } -.fa-indent::before { - content: "\f03c"; } +.fa-hourglass { + --fa: "\f254"; } -.fa-truck-field-un::before { - content: "\e58e"; } +.fa-hourglass-empty { + --fa: "\f254"; } -.fa-hourglass::before { - content: "\f254"; } +.fa-mountain { + --fa: "\f6fc"; } -.fa-hourglass-empty::before { - content: "\f254"; } +.fa-user-doctor { + --fa: "\f0f0"; } -.fa-mountain::before { - content: "\f6fc"; } +.fa-user-md { + --fa: "\f0f0"; } -.fa-user-doctor::before { - content: "\f0f0"; } +.fa-circle-info { + --fa: "\f05a"; } -.fa-user-md::before { - content: "\f0f0"; } +.fa-info-circle { + --fa: "\f05a"; } -.fa-circle-info::before { - content: "\f05a"; } +.fa-cloud-meatball { + --fa: "\f73b"; } -.fa-info-circle::before { - content: "\f05a"; } +.fa-camera { + --fa: "\f030"; } -.fa-cloud-meatball::before { - content: "\f73b"; } +.fa-camera-alt { + --fa: "\f030"; } -.fa-camera::before { - content: "\f030"; } +.fa-square-virus { + --fa: "\e578"; } -.fa-camera-alt::before { - content: "\f030"; } +.fa-meteor { + --fa: "\f753"; } -.fa-square-virus::before { - content: "\e578"; } +.fa-car-on { + --fa: "\e4dd"; } -.fa-meteor::before { - content: "\f753"; } +.fa-sleigh { + --fa: "\f7cc"; } -.fa-car-on::before { - content: "\e4dd"; } +.fa-arrow-down-1-9 { + --fa: "\f162"; } -.fa-sleigh::before { - content: "\f7cc"; } +.fa-sort-numeric-asc { + --fa: "\f162"; } -.fa-arrow-down-1-9::before { - content: "\f162"; } +.fa-sort-numeric-down { + --fa: "\f162"; } -.fa-sort-numeric-asc::before { - content: "\f162"; } +.fa-hand-holding-droplet { + --fa: "\f4c1"; } -.fa-sort-numeric-down::before { - content: "\f162"; } +.fa-hand-holding-water { + --fa: "\f4c1"; } -.fa-hand-holding-droplet::before { - content: "\f4c1"; } +.fa-water { + --fa: "\f773"; } -.fa-hand-holding-water::before { - content: "\f4c1"; } +.fa-calendar-check { + --fa: "\f274"; } -.fa-water::before { - content: "\f773"; } +.fa-braille { + --fa: "\f2a1"; } -.fa-calendar-check::before { - content: "\f274"; } +.fa-prescription-bottle-medical { + --fa: "\f486"; } -.fa-braille::before { - content: "\f2a1"; } +.fa-prescription-bottle-alt { + --fa: "\f486"; } -.fa-prescription-bottle-medical::before { - content: "\f486"; } +.fa-landmark { + --fa: "\f66f"; } -.fa-prescription-bottle-alt::before { - content: "\f486"; } +.fa-truck { + --fa: "\f0d1"; } -.fa-landmark::before { - content: "\f66f"; } +.fa-crosshairs { + --fa: "\f05b"; } -.fa-truck::before { - content: "\f0d1"; } +.fa-person-cane { + --fa: "\e53c"; } -.fa-crosshairs::before { - content: "\f05b"; } +.fa-tent { + --fa: "\e57d"; } -.fa-person-cane::before { - content: "\e53c"; } +.fa-vest-patches { + --fa: "\e086"; } -.fa-tent::before { - content: "\e57d"; } +.fa-check-double { + --fa: "\f560"; } -.fa-vest-patches::before { - content: "\e086"; } +.fa-arrow-down-a-z { + --fa: "\f15d"; } -.fa-check-double::before { - content: "\f560"; } +.fa-sort-alpha-asc { + --fa: "\f15d"; } -.fa-arrow-down-a-z::before { - content: "\f15d"; } +.fa-sort-alpha-down { + --fa: "\f15d"; } -.fa-sort-alpha-asc::before { - content: "\f15d"; } +.fa-money-bill-wheat { + --fa: "\e52a"; } -.fa-sort-alpha-down::before { - content: "\f15d"; } +.fa-cookie { + --fa: "\f563"; } -.fa-money-bill-wheat::before { - content: "\e52a"; } +.fa-arrow-rotate-left { + --fa: "\f0e2"; } -.fa-cookie::before { - content: "\f563"; } +.fa-arrow-left-rotate { + --fa: "\f0e2"; } -.fa-arrow-rotate-left::before { - content: "\f0e2"; } +.fa-arrow-rotate-back { + --fa: "\f0e2"; } -.fa-arrow-left-rotate::before { - content: "\f0e2"; } +.fa-arrow-rotate-backward { + --fa: "\f0e2"; } -.fa-arrow-rotate-back::before { - content: "\f0e2"; } +.fa-undo { + --fa: "\f0e2"; } -.fa-arrow-rotate-backward::before { - content: "\f0e2"; } +.fa-hard-drive { + --fa: "\f0a0"; } -.fa-undo::before { - content: "\f0e2"; } +.fa-hdd { + --fa: "\f0a0"; } -.fa-hard-drive::before { - content: "\f0a0"; } +.fa-face-grin-squint-tears { + --fa: "\f586"; } -.fa-hdd::before { - content: "\f0a0"; } +.fa-grin-squint-tears { + --fa: "\f586"; } -.fa-face-grin-squint-tears::before { - content: "\f586"; } +.fa-dumbbell { + --fa: "\f44b"; } -.fa-grin-squint-tears::before { - content: "\f586"; } +.fa-rectangle-list { + --fa: "\f022"; } -.fa-dumbbell::before { - content: "\f44b"; } +.fa-list-alt { + --fa: "\f022"; } -.fa-rectangle-list::before { - content: "\f022"; } +.fa-tarp-droplet { + --fa: "\e57c"; } -.fa-list-alt::before { - content: "\f022"; } +.fa-house-medical-circle-check { + --fa: "\e511"; } -.fa-tarp-droplet::before { - content: "\e57c"; } +.fa-person-skiing-nordic { + --fa: "\f7ca"; } -.fa-house-medical-circle-check::before { - content: "\e511"; } +.fa-skiing-nordic { + --fa: "\f7ca"; } -.fa-person-skiing-nordic::before { - content: "\f7ca"; } +.fa-calendar-plus { + --fa: "\f271"; } -.fa-skiing-nordic::before { - content: "\f7ca"; } +.fa-plane-arrival { + --fa: "\f5af"; } -.fa-calendar-plus::before { - content: "\f271"; } +.fa-circle-left { + --fa: "\f359"; } -.fa-plane-arrival::before { - content: "\f5af"; } +.fa-arrow-alt-circle-left { + --fa: "\f359"; } -.fa-circle-left::before { - content: "\f359"; } +.fa-train-subway { + --fa: "\f239"; } -.fa-arrow-alt-circle-left::before { - content: "\f359"; } +.fa-subway { + --fa: "\f239"; } -.fa-train-subway::before { - content: "\f239"; } +.fa-chart-gantt { + --fa: "\e0e4"; } -.fa-subway::before { - content: "\f239"; } +.fa-indian-rupee-sign { + --fa: "\e1bc"; } -.fa-chart-gantt::before { - content: "\e0e4"; } +.fa-indian-rupee { + --fa: "\e1bc"; } -.fa-indian-rupee-sign::before { - content: "\e1bc"; } +.fa-inr { + --fa: "\e1bc"; } -.fa-indian-rupee::before { - content: "\e1bc"; } +.fa-crop-simple { + --fa: "\f565"; } -.fa-inr::before { - content: "\e1bc"; } +.fa-crop-alt { + --fa: "\f565"; } -.fa-crop-simple::before { - content: "\f565"; } +.fa-money-bill-1 { + --fa: "\f3d1"; } -.fa-crop-alt::before { - content: "\f565"; } +.fa-money-bill-alt { + --fa: "\f3d1"; } -.fa-money-bill-1::before { - content: "\f3d1"; } +.fa-left-long { + --fa: "\f30a"; } -.fa-money-bill-alt::before { - content: "\f3d1"; } +.fa-long-arrow-alt-left { + --fa: "\f30a"; } -.fa-left-long::before { - content: "\f30a"; } +.fa-dna { + --fa: "\f471"; } -.fa-long-arrow-alt-left::before { - content: "\f30a"; } +.fa-virus-slash { + --fa: "\e075"; } -.fa-dna::before { - content: "\f471"; } +.fa-minus { + --fa: "\f068"; } -.fa-virus-slash::before { - content: "\e075"; } +.fa-subtract { + --fa: "\f068"; } -.fa-minus::before { - content: "\f068"; } +.fa-chess { + --fa: "\f439"; } -.fa-subtract::before { - content: "\f068"; } +.fa-arrow-left-long { + --fa: "\f177"; } -.fa-chess::before { - content: "\f439"; } +.fa-long-arrow-left { + --fa: "\f177"; } -.fa-arrow-left-long::before { - content: "\f177"; } +.fa-plug-circle-check { + --fa: "\e55c"; } -.fa-long-arrow-left::before { - content: "\f177"; } +.fa-street-view { + --fa: "\f21d"; } -.fa-plug-circle-check::before { - content: "\e55c"; } +.fa-franc-sign { + --fa: "\e18f"; } -.fa-street-view::before { - content: "\f21d"; } +.fa-volume-off { + --fa: "\f026"; } -.fa-franc-sign::before { - content: "\e18f"; } +.fa-hands-asl-interpreting { + --fa: "\f2a3"; } -.fa-volume-off::before { - content: "\f026"; } +.fa-american-sign-language-interpreting { + --fa: "\f2a3"; } -.fa-hands-asl-interpreting::before { - content: "\f2a3"; } +.fa-asl-interpreting { + --fa: "\f2a3"; } -.fa-american-sign-language-interpreting::before { - content: "\f2a3"; } +.fa-hands-american-sign-language-interpreting { + --fa: "\f2a3"; } -.fa-asl-interpreting::before { - content: "\f2a3"; } +.fa-gear { + --fa: "\f013"; } -.fa-hands-american-sign-language-interpreting::before { - content: "\f2a3"; } +.fa-cog { + --fa: "\f013"; } -.fa-gear::before { - content: "\f013"; } +.fa-droplet-slash { + --fa: "\f5c7"; } -.fa-cog::before { - content: "\f013"; } +.fa-tint-slash { + --fa: "\f5c7"; } -.fa-droplet-slash::before { - content: "\f5c7"; } +.fa-mosque { + --fa: "\f678"; } -.fa-tint-slash::before { - content: "\f5c7"; } +.fa-mosquito { + --fa: "\e52b"; } -.fa-mosque::before { - content: "\f678"; } +.fa-star-of-david { + --fa: "\f69a"; } -.fa-mosquito::before { - content: "\e52b"; } +.fa-person-military-rifle { + --fa: "\e54b"; } -.fa-star-of-david::before { - content: "\f69a"; } +.fa-cart-shopping { + --fa: "\f07a"; } -.fa-person-military-rifle::before { - content: "\e54b"; } +.fa-shopping-cart { + --fa: "\f07a"; } -.fa-cart-shopping::before { - content: "\f07a"; } +.fa-vials { + --fa: "\f493"; } -.fa-shopping-cart::before { - content: "\f07a"; } +.fa-plug-circle-plus { + --fa: "\e55f"; } -.fa-vials::before { - content: "\f493"; } +.fa-place-of-worship { + --fa: "\f67f"; } -.fa-plug-circle-plus::before { - content: "\e55f"; } +.fa-grip-vertical { + --fa: "\f58e"; } -.fa-place-of-worship::before { - content: "\f67f"; } +.fa-hexagon-nodes { + --fa: "\e699"; } -.fa-grip-vertical::before { - content: "\f58e"; } +.fa-arrow-turn-up { + --fa: "\f148"; } -.fa-arrow-turn-up::before { - content: "\f148"; } +.fa-level-up { + --fa: "\f148"; } -.fa-level-up::before { - content: "\f148"; } +.fa-u { + --fa: "\55"; } -.fa-u::before { - content: "\55"; } +.fa-square-root-variable { + --fa: "\f698"; } -.fa-square-root-variable::before { - content: "\f698"; } +.fa-square-root-alt { + --fa: "\f698"; } -.fa-square-root-alt::before { - content: "\f698"; } +.fa-clock { + --fa: "\f017"; } -.fa-clock::before { - content: "\f017"; } +.fa-clock-four { + --fa: "\f017"; } -.fa-clock-four::before { - content: "\f017"; } +.fa-backward-step { + --fa: "\f048"; } -.fa-backward-step::before { - content: "\f048"; } +.fa-step-backward { + --fa: "\f048"; } -.fa-step-backward::before { - content: "\f048"; } +.fa-pallet { + --fa: "\f482"; } -.fa-pallet::before { - content: "\f482"; } +.fa-faucet { + --fa: "\e005"; } -.fa-faucet::before { - content: "\e005"; } +.fa-baseball-bat-ball { + --fa: "\f432"; } -.fa-baseball-bat-ball::before { - content: "\f432"; } +.fa-s { + --fa: "\53"; } -.fa-s::before { - content: "\53"; } +.fa-timeline { + --fa: "\e29c"; } -.fa-timeline::before { - content: "\e29c"; } +.fa-keyboard { + --fa: "\f11c"; } -.fa-keyboard::before { - content: "\f11c"; } +.fa-caret-down { + --fa: "\f0d7"; } -.fa-caret-down::before { - content: "\f0d7"; } +.fa-house-chimney-medical { + --fa: "\f7f2"; } -.fa-house-chimney-medical::before { - content: "\f7f2"; } +.fa-clinic-medical { + --fa: "\f7f2"; } -.fa-clinic-medical::before { - content: "\f7f2"; } +.fa-temperature-three-quarters { + --fa: "\f2c8"; } -.fa-temperature-three-quarters::before { - content: "\f2c8"; } +.fa-temperature-3 { + --fa: "\f2c8"; } -.fa-temperature-3::before { - content: "\f2c8"; } +.fa-thermometer-3 { + --fa: "\f2c8"; } -.fa-thermometer-3::before { - content: "\f2c8"; } +.fa-thermometer-three-quarters { + --fa: "\f2c8"; } -.fa-thermometer-three-quarters::before { - content: "\f2c8"; } +.fa-mobile-screen { + --fa: "\f3cf"; } -.fa-mobile-screen::before { - content: "\f3cf"; } +.fa-mobile-android-alt { + --fa: "\f3cf"; } -.fa-mobile-android-alt::before { - content: "\f3cf"; } +.fa-plane-up { + --fa: "\e22d"; } -.fa-plane-up::before { - content: "\e22d"; } +.fa-piggy-bank { + --fa: "\f4d3"; } -.fa-piggy-bank::before { - content: "\f4d3"; } +.fa-battery-half { + --fa: "\f242"; } -.fa-battery-half::before { - content: "\f242"; } +.fa-battery-3 { + --fa: "\f242"; } -.fa-battery-3::before { - content: "\f242"; } +.fa-mountain-city { + --fa: "\e52e"; } -.fa-mountain-city::before { - content: "\e52e"; } +.fa-coins { + --fa: "\f51e"; } -.fa-coins::before { - content: "\f51e"; } +.fa-khanda { + --fa: "\f66d"; } -.fa-khanda::before { - content: "\f66d"; } +.fa-sliders { + --fa: "\f1de"; } -.fa-sliders::before { - content: "\f1de"; } +.fa-sliders-h { + --fa: "\f1de"; } -.fa-sliders-h::before { - content: "\f1de"; } +.fa-folder-tree { + --fa: "\f802"; } -.fa-folder-tree::before { - content: "\f802"; } +.fa-network-wired { + --fa: "\f6ff"; } -.fa-network-wired::before { - content: "\f6ff"; } +.fa-map-pin { + --fa: "\f276"; } -.fa-map-pin::before { - content: "\f276"; } +.fa-hamsa { + --fa: "\f665"; } -.fa-hamsa::before { - content: "\f665"; } +.fa-cent-sign { + --fa: "\e3f5"; } -.fa-cent-sign::before { - content: "\e3f5"; } +.fa-flask { + --fa: "\f0c3"; } -.fa-flask::before { - content: "\f0c3"; } +.fa-person-pregnant { + --fa: "\e31e"; } -.fa-person-pregnant::before { - content: "\e31e"; } +.fa-wand-sparkles { + --fa: "\f72b"; } -.fa-wand-sparkles::before { - content: "\f72b"; } +.fa-ellipsis-vertical { + --fa: "\f142"; } -.fa-ellipsis-vertical::before { - content: "\f142"; } +.fa-ellipsis-v { + --fa: "\f142"; } -.fa-ellipsis-v::before { - content: "\f142"; } +.fa-ticket { + --fa: "\f145"; } -.fa-ticket::before { - content: "\f145"; } +.fa-power-off { + --fa: "\f011"; } -.fa-power-off::before { - content: "\f011"; } +.fa-right-long { + --fa: "\f30b"; } -.fa-right-long::before { - content: "\f30b"; } +.fa-long-arrow-alt-right { + --fa: "\f30b"; } -.fa-long-arrow-alt-right::before { - content: "\f30b"; } +.fa-flag-usa { + --fa: "\f74d"; } -.fa-flag-usa::before { - content: "\f74d"; } +.fa-laptop-file { + --fa: "\e51d"; } -.fa-laptop-file::before { - content: "\e51d"; } +.fa-tty { + --fa: "\f1e4"; } -.fa-tty::before { - content: "\f1e4"; } +.fa-teletype { + --fa: "\f1e4"; } -.fa-teletype::before { - content: "\f1e4"; } +.fa-diagram-next { + --fa: "\e476"; } -.fa-diagram-next::before { - content: "\e476"; } +.fa-person-rifle { + --fa: "\e54e"; } -.fa-person-rifle::before { - content: "\e54e"; } +.fa-house-medical-circle-exclamation { + --fa: "\e512"; } -.fa-house-medical-circle-exclamation::before { - content: "\e512"; } +.fa-closed-captioning { + --fa: "\f20a"; } -.fa-closed-captioning::before { - content: "\f20a"; } +.fa-person-hiking { + --fa: "\f6ec"; } -.fa-person-hiking::before { - content: "\f6ec"; } +.fa-hiking { + --fa: "\f6ec"; } -.fa-hiking::before { - content: "\f6ec"; } +.fa-venus-double { + --fa: "\f226"; } -.fa-venus-double::before { - content: "\f226"; } +.fa-images { + --fa: "\f302"; } -.fa-images::before { - content: "\f302"; } +.fa-calculator { + --fa: "\f1ec"; } -.fa-calculator::before { - content: "\f1ec"; } +.fa-people-pulling { + --fa: "\e535"; } -.fa-people-pulling::before { - content: "\e535"; } +.fa-n { + --fa: "\4e"; } -.fa-n::before { - content: "\4e"; } +.fa-cable-car { + --fa: "\f7da"; } -.fa-cable-car::before { - content: "\f7da"; } +.fa-tram { + --fa: "\f7da"; } -.fa-tram::before { - content: "\f7da"; } +.fa-cloud-rain { + --fa: "\f73d"; } -.fa-cloud-rain::before { - content: "\f73d"; } +.fa-building-circle-xmark { + --fa: "\e4d4"; } -.fa-building-circle-xmark::before { - content: "\e4d4"; } +.fa-ship { + --fa: "\f21a"; } -.fa-ship::before { - content: "\f21a"; } +.fa-arrows-down-to-line { + --fa: "\e4b8"; } -.fa-arrows-down-to-line::before { - content: "\e4b8"; } +.fa-download { + --fa: "\f019"; } -.fa-download::before { - content: "\f019"; } +.fa-face-grin { + --fa: "\f580"; } -.fa-face-grin::before { - content: "\f580"; } +.fa-grin { + --fa: "\f580"; } -.fa-grin::before { - content: "\f580"; } +.fa-delete-left { + --fa: "\f55a"; } -.fa-delete-left::before { - content: "\f55a"; } +.fa-backspace { + --fa: "\f55a"; } -.fa-backspace::before { - content: "\f55a"; } +.fa-eye-dropper { + --fa: "\f1fb"; } -.fa-eye-dropper::before { - content: "\f1fb"; } +.fa-eye-dropper-empty { + --fa: "\f1fb"; } -.fa-eye-dropper-empty::before { - content: "\f1fb"; } +.fa-eyedropper { + --fa: "\f1fb"; } -.fa-eyedropper::before { - content: "\f1fb"; } +.fa-file-circle-check { + --fa: "\e5a0"; } -.fa-file-circle-check::before { - content: "\e5a0"; } +.fa-forward { + --fa: "\f04e"; } -.fa-forward::before { - content: "\f04e"; } +.fa-mobile { + --fa: "\f3ce"; } -.fa-mobile::before { - content: "\f3ce"; } +.fa-mobile-android { + --fa: "\f3ce"; } -.fa-mobile-android::before { - content: "\f3ce"; } +.fa-mobile-phone { + --fa: "\f3ce"; } -.fa-mobile-phone::before { - content: "\f3ce"; } +.fa-face-meh { + --fa: "\f11a"; } -.fa-face-meh::before { - content: "\f11a"; } +.fa-meh { + --fa: "\f11a"; } -.fa-meh::before { - content: "\f11a"; } +.fa-align-center { + --fa: "\f037"; } -.fa-align-center::before { - content: "\f037"; } +.fa-book-skull { + --fa: "\f6b7"; } -.fa-book-skull::before { - content: "\f6b7"; } +.fa-book-dead { + --fa: "\f6b7"; } -.fa-book-dead::before { - content: "\f6b7"; } +.fa-id-card { + --fa: "\f2c2"; } -.fa-id-card::before { - content: "\f2c2"; } +.fa-drivers-license { + --fa: "\f2c2"; } -.fa-drivers-license::before { - content: "\f2c2"; } +.fa-outdent { + --fa: "\f03b"; } -.fa-outdent::before { - content: "\f03b"; } +.fa-dedent { + --fa: "\f03b"; } -.fa-dedent::before { - content: "\f03b"; } +.fa-heart-circle-exclamation { + --fa: "\e4fe"; } -.fa-heart-circle-exclamation::before { - content: "\e4fe"; } +.fa-house { + --fa: "\f015"; } -.fa-house::before { - content: "\f015"; } +.fa-home { + --fa: "\f015"; } -.fa-home::before { - content: "\f015"; } +.fa-home-alt { + --fa: "\f015"; } -.fa-home-alt::before { - content: "\f015"; } +.fa-home-lg-alt { + --fa: "\f015"; } -.fa-home-lg-alt::before { - content: "\f015"; } +.fa-calendar-week { + --fa: "\f784"; } -.fa-calendar-week::before { - content: "\f784"; } +.fa-laptop-medical { + --fa: "\f812"; } -.fa-laptop-medical::before { - content: "\f812"; } +.fa-b { + --fa: "\42"; } -.fa-b::before { - content: "\42"; } +.fa-file-medical { + --fa: "\f477"; } -.fa-file-medical::before { - content: "\f477"; } +.fa-dice-one { + --fa: "\f525"; } -.fa-dice-one::before { - content: "\f525"; } +.fa-kiwi-bird { + --fa: "\f535"; } -.fa-kiwi-bird::before { - content: "\f535"; } +.fa-arrow-right-arrow-left { + --fa: "\f0ec"; } -.fa-arrow-right-arrow-left::before { - content: "\f0ec"; } +.fa-exchange { + --fa: "\f0ec"; } -.fa-exchange::before { - content: "\f0ec"; } +.fa-rotate-right { + --fa: "\f2f9"; } -.fa-rotate-right::before { - content: "\f2f9"; } +.fa-redo-alt { + --fa: "\f2f9"; } -.fa-redo-alt::before { - content: "\f2f9"; } +.fa-rotate-forward { + --fa: "\f2f9"; } -.fa-rotate-forward::before { - content: "\f2f9"; } +.fa-utensils { + --fa: "\f2e7"; } -.fa-utensils::before { - content: "\f2e7"; } +.fa-cutlery { + --fa: "\f2e7"; } -.fa-cutlery::before { - content: "\f2e7"; } +.fa-arrow-up-wide-short { + --fa: "\f161"; } -.fa-arrow-up-wide-short::before { - content: "\f161"; } +.fa-sort-amount-up { + --fa: "\f161"; } -.fa-sort-amount-up::before { - content: "\f161"; } +.fa-mill-sign { + --fa: "\e1ed"; } -.fa-mill-sign::before { - content: "\e1ed"; } +.fa-bowl-rice { + --fa: "\e2eb"; } -.fa-bowl-rice::before { - content: "\e2eb"; } +.fa-skull { + --fa: "\f54c"; } -.fa-skull::before { - content: "\f54c"; } +.fa-tower-broadcast { + --fa: "\f519"; } -.fa-tower-broadcast::before { - content: "\f519"; } +.fa-broadcast-tower { + --fa: "\f519"; } -.fa-broadcast-tower::before { - content: "\f519"; } +.fa-truck-pickup { + --fa: "\f63c"; } -.fa-truck-pickup::before { - content: "\f63c"; } +.fa-up-long { + --fa: "\f30c"; } -.fa-up-long::before { - content: "\f30c"; } +.fa-long-arrow-alt-up { + --fa: "\f30c"; } -.fa-long-arrow-alt-up::before { - content: "\f30c"; } +.fa-stop { + --fa: "\f04d"; } -.fa-stop::before { - content: "\f04d"; } +.fa-code-merge { + --fa: "\f387"; } -.fa-code-merge::before { - content: "\f387"; } +.fa-upload { + --fa: "\f093"; } -.fa-upload::before { - content: "\f093"; } +.fa-hurricane { + --fa: "\f751"; } -.fa-hurricane::before { - content: "\f751"; } +.fa-mound { + --fa: "\e52d"; } -.fa-mound::before { - content: "\e52d"; } +.fa-toilet-portable { + --fa: "\e583"; } -.fa-toilet-portable::before { - content: "\e583"; } +.fa-compact-disc { + --fa: "\f51f"; } -.fa-compact-disc::before { - content: "\f51f"; } +.fa-file-arrow-down { + --fa: "\f56d"; } -.fa-file-arrow-down::before { - content: "\f56d"; } +.fa-file-download { + --fa: "\f56d"; } -.fa-file-download::before { - content: "\f56d"; } +.fa-caravan { + --fa: "\f8ff"; } -.fa-caravan::before { - content: "\f8ff"; } +.fa-shield-cat { + --fa: "\e572"; } -.fa-shield-cat::before { - content: "\e572"; } +.fa-bolt { + --fa: "\f0e7"; } -.fa-bolt::before { - content: "\f0e7"; } +.fa-zap { + --fa: "\f0e7"; } -.fa-zap::before { - content: "\f0e7"; } +.fa-glass-water { + --fa: "\e4f4"; } -.fa-glass-water::before { - content: "\e4f4"; } +.fa-oil-well { + --fa: "\e532"; } -.fa-oil-well::before { - content: "\e532"; } +.fa-vault { + --fa: "\e2c5"; } -.fa-vault::before { - content: "\e2c5"; } +.fa-mars { + --fa: "\f222"; } -.fa-mars::before { - content: "\f222"; } +.fa-toilet { + --fa: "\f7d8"; } -.fa-toilet::before { - content: "\f7d8"; } +.fa-plane-circle-xmark { + --fa: "\e557"; } -.fa-plane-circle-xmark::before { - content: "\e557"; } +.fa-yen-sign { + --fa: "\f157"; } -.fa-yen-sign::before { - content: "\f157"; } +.fa-cny { + --fa: "\f157"; } -.fa-cny::before { - content: "\f157"; } +.fa-jpy { + --fa: "\f157"; } -.fa-jpy::before { - content: "\f157"; } +.fa-rmb { + --fa: "\f157"; } -.fa-rmb::before { - content: "\f157"; } +.fa-yen { + --fa: "\f157"; } -.fa-yen::before { - content: "\f157"; } +.fa-ruble-sign { + --fa: "\f158"; } -.fa-ruble-sign::before { - content: "\f158"; } +.fa-rouble { + --fa: "\f158"; } -.fa-rouble::before { - content: "\f158"; } +.fa-rub { + --fa: "\f158"; } -.fa-rub::before { - content: "\f158"; } +.fa-ruble { + --fa: "\f158"; } -.fa-ruble::before { - content: "\f158"; } +.fa-sun { + --fa: "\f185"; } -.fa-sun::before { - content: "\f185"; } +.fa-guitar { + --fa: "\f7a6"; } -.fa-guitar::before { - content: "\f7a6"; } +.fa-face-laugh-wink { + --fa: "\f59c"; } -.fa-face-laugh-wink::before { - content: "\f59c"; } +.fa-laugh-wink { + --fa: "\f59c"; } -.fa-laugh-wink::before { - content: "\f59c"; } +.fa-horse-head { + --fa: "\f7ab"; } -.fa-horse-head::before { - content: "\f7ab"; } +.fa-bore-hole { + --fa: "\e4c3"; } -.fa-bore-hole::before { - content: "\e4c3"; } +.fa-industry { + --fa: "\f275"; } -.fa-industry::before { - content: "\f275"; } +.fa-circle-down { + --fa: "\f358"; } -.fa-circle-down::before { - content: "\f358"; } +.fa-arrow-alt-circle-down { + --fa: "\f358"; } -.fa-arrow-alt-circle-down::before { - content: "\f358"; } +.fa-arrows-turn-to-dots { + --fa: "\e4c1"; } -.fa-arrows-turn-to-dots::before { - content: "\e4c1"; } +.fa-florin-sign { + --fa: "\e184"; } -.fa-florin-sign::before { - content: "\e184"; } +.fa-arrow-down-short-wide { + --fa: "\f884"; } -.fa-arrow-down-short-wide::before { - content: "\f884"; } +.fa-sort-amount-desc { + --fa: "\f884"; } -.fa-sort-amount-desc::before { - content: "\f884"; } +.fa-sort-amount-down-alt { + --fa: "\f884"; } -.fa-sort-amount-down-alt::before { - content: "\f884"; } +.fa-less-than { + --fa: "\3c"; } -.fa-less-than::before { - content: "\3c"; } +.fa-angle-down { + --fa: "\f107"; } -.fa-angle-down::before { - content: "\f107"; } +.fa-car-tunnel { + --fa: "\e4de"; } -.fa-car-tunnel::before { - content: "\e4de"; } +.fa-head-side-cough { + --fa: "\e061"; } -.fa-head-side-cough::before { - content: "\e061"; } +.fa-grip-lines { + --fa: "\f7a4"; } -.fa-grip-lines::before { - content: "\f7a4"; } +.fa-thumbs-down { + --fa: "\f165"; } -.fa-thumbs-down::before { - content: "\f165"; } +.fa-user-lock { + --fa: "\f502"; } -.fa-user-lock::before { - content: "\f502"; } +.fa-arrow-right-long { + --fa: "\f178"; } -.fa-arrow-right-long::before { - content: "\f178"; } +.fa-long-arrow-right { + --fa: "\f178"; } -.fa-long-arrow-right::before { - content: "\f178"; } +.fa-anchor-circle-xmark { + --fa: "\e4ac"; } -.fa-anchor-circle-xmark::before { - content: "\e4ac"; } +.fa-ellipsis { + --fa: "\f141"; } -.fa-ellipsis::before { - content: "\f141"; } +.fa-ellipsis-h { + --fa: "\f141"; } -.fa-ellipsis-h::before { - content: "\f141"; } +.fa-chess-pawn { + --fa: "\f443"; } -.fa-chess-pawn::before { - content: "\f443"; } +.fa-kit-medical { + --fa: "\f479"; } -.fa-kit-medical::before { - content: "\f479"; } +.fa-first-aid { + --fa: "\f479"; } -.fa-first-aid::before { - content: "\f479"; } +.fa-person-through-window { + --fa: "\e5a9"; } -.fa-person-through-window::before { - content: "\e5a9"; } +.fa-toolbox { + --fa: "\f552"; } -.fa-toolbox::before { - content: "\f552"; } +.fa-hands-holding-circle { + --fa: "\e4fb"; } -.fa-hands-holding-circle::before { - content: "\e4fb"; } +.fa-bug { + --fa: "\f188"; } -.fa-bug::before { - content: "\f188"; } +.fa-credit-card { + --fa: "\f09d"; } -.fa-credit-card::before { - content: "\f09d"; } +.fa-credit-card-alt { + --fa: "\f09d"; } -.fa-credit-card-alt::before { - content: "\f09d"; } +.fa-car { + --fa: "\f1b9"; } -.fa-car::before { - content: "\f1b9"; } +.fa-automobile { + --fa: "\f1b9"; } -.fa-automobile::before { - content: "\f1b9"; } +.fa-hand-holding-hand { + --fa: "\e4f7"; } -.fa-hand-holding-hand::before { - content: "\e4f7"; } +.fa-book-open-reader { + --fa: "\f5da"; } -.fa-book-open-reader::before { - content: "\f5da"; } +.fa-book-reader { + --fa: "\f5da"; } -.fa-book-reader::before { - content: "\f5da"; } +.fa-mountain-sun { + --fa: "\e52f"; } -.fa-mountain-sun::before { - content: "\e52f"; } +.fa-arrows-left-right-to-line { + --fa: "\e4ba"; } -.fa-arrows-left-right-to-line::before { - content: "\e4ba"; } +.fa-dice-d20 { + --fa: "\f6cf"; } -.fa-dice-d20::before { - content: "\f6cf"; } +.fa-truck-droplet { + --fa: "\e58c"; } -.fa-truck-droplet::before { - content: "\e58c"; } +.fa-file-circle-xmark { + --fa: "\e5a1"; } -.fa-file-circle-xmark::before { - content: "\e5a1"; } +.fa-temperature-arrow-up { + --fa: "\e040"; } -.fa-temperature-arrow-up::before { - content: "\e040"; } +.fa-temperature-up { + --fa: "\e040"; } -.fa-temperature-up::before { - content: "\e040"; } +.fa-medal { + --fa: "\f5a2"; } -.fa-medal::before { - content: "\f5a2"; } +.fa-bed { + --fa: "\f236"; } -.fa-bed::before { - content: "\f236"; } +.fa-square-h { + --fa: "\f0fd"; } -.fa-square-h::before { - content: "\f0fd"; } +.fa-h-square { + --fa: "\f0fd"; } -.fa-h-square::before { - content: "\f0fd"; } +.fa-podcast { + --fa: "\f2ce"; } -.fa-podcast::before { - content: "\f2ce"; } +.fa-temperature-full { + --fa: "\f2c7"; } -.fa-temperature-full::before { - content: "\f2c7"; } +.fa-temperature-4 { + --fa: "\f2c7"; } -.fa-temperature-4::before { - content: "\f2c7"; } +.fa-thermometer-4 { + --fa: "\f2c7"; } -.fa-thermometer-4::before { - content: "\f2c7"; } +.fa-thermometer-full { + --fa: "\f2c7"; } -.fa-thermometer-full::before { - content: "\f2c7"; } +.fa-bell { + --fa: "\f0f3"; } -.fa-bell::before { - content: "\f0f3"; } +.fa-superscript { + --fa: "\f12b"; } -.fa-superscript::before { - content: "\f12b"; } +.fa-plug-circle-xmark { + --fa: "\e560"; } -.fa-plug-circle-xmark::before { - content: "\e560"; } +.fa-star-of-life { + --fa: "\f621"; } -.fa-star-of-life::before { - content: "\f621"; } +.fa-phone-slash { + --fa: "\f3dd"; } -.fa-phone-slash::before { - content: "\f3dd"; } +.fa-paint-roller { + --fa: "\f5aa"; } -.fa-paint-roller::before { - content: "\f5aa"; } +.fa-handshake-angle { + --fa: "\f4c4"; } -.fa-handshake-angle::before { - content: "\f4c4"; } +.fa-hands-helping { + --fa: "\f4c4"; } -.fa-hands-helping::before { - content: "\f4c4"; } +.fa-location-dot { + --fa: "\f3c5"; } -.fa-location-dot::before { - content: "\f3c5"; } +.fa-map-marker-alt { + --fa: "\f3c5"; } -.fa-map-marker-alt::before { - content: "\f3c5"; } +.fa-file { + --fa: "\f15b"; } -.fa-file::before { - content: "\f15b"; } +.fa-greater-than { + --fa: "\3e"; } -.fa-greater-than::before { - content: "\3e"; } +.fa-person-swimming { + --fa: "\f5c4"; } -.fa-person-swimming::before { - content: "\f5c4"; } +.fa-swimmer { + --fa: "\f5c4"; } -.fa-swimmer::before { - content: "\f5c4"; } +.fa-arrow-down { + --fa: "\f063"; } -.fa-arrow-down::before { - content: "\f063"; } +.fa-droplet { + --fa: "\f043"; } -.fa-droplet::before { - content: "\f043"; } +.fa-tint { + --fa: "\f043"; } -.fa-tint::before { - content: "\f043"; } +.fa-eraser { + --fa: "\f12d"; } -.fa-eraser::before { - content: "\f12d"; } +.fa-earth-americas { + --fa: "\f57d"; } -.fa-earth-americas::before { - content: "\f57d"; } +.fa-earth { + --fa: "\f57d"; } -.fa-earth::before { - content: "\f57d"; } +.fa-earth-america { + --fa: "\f57d"; } -.fa-earth-america::before { - content: "\f57d"; } +.fa-globe-americas { + --fa: "\f57d"; } -.fa-globe-americas::before { - content: "\f57d"; } +.fa-person-burst { + --fa: "\e53b"; } -.fa-person-burst::before { - content: "\e53b"; } +.fa-dove { + --fa: "\f4ba"; } -.fa-dove::before { - content: "\f4ba"; } +.fa-battery-empty { + --fa: "\f244"; } -.fa-battery-empty::before { - content: "\f244"; } +.fa-battery-0 { + --fa: "\f244"; } -.fa-battery-0::before { - content: "\f244"; } +.fa-socks { + --fa: "\f696"; } -.fa-socks::before { - content: "\f696"; } +.fa-inbox { + --fa: "\f01c"; } -.fa-inbox::before { - content: "\f01c"; } +.fa-section { + --fa: "\e447"; } -.fa-section::before { - content: "\e447"; } +.fa-gauge-high { + --fa: "\f625"; } -.fa-gauge-high::before { - content: "\f625"; } +.fa-tachometer-alt { + --fa: "\f625"; } -.fa-tachometer-alt::before { - content: "\f625"; } +.fa-tachometer-alt-fast { + --fa: "\f625"; } -.fa-tachometer-alt-fast::before { - content: "\f625"; } +.fa-envelope-open-text { + --fa: "\f658"; } -.fa-envelope-open-text::before { - content: "\f658"; } +.fa-hospital { + --fa: "\f0f8"; } -.fa-hospital::before { - content: "\f0f8"; } +.fa-hospital-alt { + --fa: "\f0f8"; } -.fa-hospital-alt::before { - content: "\f0f8"; } +.fa-hospital-wide { + --fa: "\f0f8"; } -.fa-hospital-wide::before { - content: "\f0f8"; } +.fa-wine-bottle { + --fa: "\f72f"; } -.fa-wine-bottle::before { - content: "\f72f"; } +.fa-chess-rook { + --fa: "\f447"; } -.fa-chess-rook::before { - content: "\f447"; } +.fa-bars-staggered { + --fa: "\f550"; } -.fa-bars-staggered::before { - content: "\f550"; } +.fa-reorder { + --fa: "\f550"; } -.fa-reorder::before { - content: "\f550"; } +.fa-stream { + --fa: "\f550"; } -.fa-stream::before { - content: "\f550"; } +.fa-dharmachakra { + --fa: "\f655"; } -.fa-dharmachakra::before { - content: "\f655"; } +.fa-hotdog { + --fa: "\f80f"; } -.fa-hotdog::before { - content: "\f80f"; } +.fa-person-walking-with-cane { + --fa: "\f29d"; } -.fa-person-walking-with-cane::before { - content: "\f29d"; } +.fa-blind { + --fa: "\f29d"; } -.fa-blind::before { - content: "\f29d"; } +.fa-drum { + --fa: "\f569"; } -.fa-drum::before { - content: "\f569"; } +.fa-ice-cream { + --fa: "\f810"; } -.fa-ice-cream::before { - content: "\f810"; } +.fa-heart-circle-bolt { + --fa: "\e4fc"; } -.fa-heart-circle-bolt::before { - content: "\e4fc"; } +.fa-fax { + --fa: "\f1ac"; } -.fa-fax::before { - content: "\f1ac"; } +.fa-paragraph { + --fa: "\f1dd"; } -.fa-paragraph::before { - content: "\f1dd"; } +.fa-check-to-slot { + --fa: "\f772"; } -.fa-check-to-slot::before { - content: "\f772"; } +.fa-vote-yea { + --fa: "\f772"; } -.fa-vote-yea::before { - content: "\f772"; } +.fa-star-half { + --fa: "\f089"; } -.fa-star-half::before { - content: "\f089"; } +.fa-boxes-stacked { + --fa: "\f468"; } -.fa-boxes-stacked::before { - content: "\f468"; } +.fa-boxes { + --fa: "\f468"; } -.fa-boxes::before { - content: "\f468"; } +.fa-boxes-alt { + --fa: "\f468"; } -.fa-boxes-alt::before { - content: "\f468"; } +.fa-link { + --fa: "\f0c1"; } -.fa-link::before { - content: "\f0c1"; } +.fa-chain { + --fa: "\f0c1"; } -.fa-chain::before { - content: "\f0c1"; } +.fa-ear-listen { + --fa: "\f2a2"; } -.fa-ear-listen::before { - content: "\f2a2"; } +.fa-assistive-listening-systems { + --fa: "\f2a2"; } -.fa-assistive-listening-systems::before { - content: "\f2a2"; } +.fa-tree-city { + --fa: "\e587"; } -.fa-tree-city::before { - content: "\e587"; } +.fa-play { + --fa: "\f04b"; } -.fa-play::before { - content: "\f04b"; } +.fa-font { + --fa: "\f031"; } -.fa-font::before { - content: "\f031"; } +.fa-table-cells-row-lock { + --fa: "\e67a"; } -.fa-table-cells-row-lock::before { - content: "\e67a"; } +.fa-rupiah-sign { + --fa: "\e23d"; } -.fa-rupiah-sign::before { - content: "\e23d"; } +.fa-magnifying-glass { + --fa: "\f002"; } -.fa-magnifying-glass::before { - content: "\f002"; } +.fa-search { + --fa: "\f002"; } -.fa-search::before { - content: "\f002"; } +.fa-table-tennis-paddle-ball { + --fa: "\f45d"; } -.fa-table-tennis-paddle-ball::before { - content: "\f45d"; } +.fa-ping-pong-paddle-ball { + --fa: "\f45d"; } -.fa-ping-pong-paddle-ball::before { - content: "\f45d"; } +.fa-table-tennis { + --fa: "\f45d"; } -.fa-table-tennis::before { - content: "\f45d"; } +.fa-person-dots-from-line { + --fa: "\f470"; } -.fa-person-dots-from-line::before { - content: "\f470"; } +.fa-diagnoses { + --fa: "\f470"; } -.fa-diagnoses::before { - content: "\f470"; } +.fa-trash-can-arrow-up { + --fa: "\f82a"; } -.fa-trash-can-arrow-up::before { - content: "\f82a"; } +.fa-trash-restore-alt { + --fa: "\f82a"; } -.fa-trash-restore-alt::before { - content: "\f82a"; } +.fa-naira-sign { + --fa: "\e1f6"; } -.fa-naira-sign::before { - content: "\e1f6"; } +.fa-cart-arrow-down { + --fa: "\f218"; } -.fa-cart-arrow-down::before { - content: "\f218"; } +.fa-walkie-talkie { + --fa: "\f8ef"; } -.fa-walkie-talkie::before { - content: "\f8ef"; } +.fa-file-pen { + --fa: "\f31c"; } -.fa-file-pen::before { - content: "\f31c"; } +.fa-file-edit { + --fa: "\f31c"; } -.fa-file-edit::before { - content: "\f31c"; } +.fa-receipt { + --fa: "\f543"; } -.fa-receipt::before { - content: "\f543"; } +.fa-square-pen { + --fa: "\f14b"; } -.fa-square-pen::before { - content: "\f14b"; } +.fa-pen-square { + --fa: "\f14b"; } -.fa-pen-square::before { - content: "\f14b"; } +.fa-pencil-square { + --fa: "\f14b"; } -.fa-pencil-square::before { - content: "\f14b"; } +.fa-suitcase-rolling { + --fa: "\f5c1"; } -.fa-suitcase-rolling::before { - content: "\f5c1"; } +.fa-person-circle-exclamation { + --fa: "\e53f"; } -.fa-person-circle-exclamation::before { - content: "\e53f"; } +.fa-chevron-down { + --fa: "\f078"; } -.fa-chevron-down::before { - content: "\f078"; } +.fa-battery-full { + --fa: "\f240"; } -.fa-battery-full::before { - content: "\f240"; } +.fa-battery { + --fa: "\f240"; } -.fa-battery::before { - content: "\f240"; } +.fa-battery-5 { + --fa: "\f240"; } -.fa-battery-5::before { - content: "\f240"; } +.fa-skull-crossbones { + --fa: "\f714"; } -.fa-skull-crossbones::before { - content: "\f714"; } +.fa-code-compare { + --fa: "\e13a"; } -.fa-code-compare::before { - content: "\e13a"; } +.fa-list-ul { + --fa: "\f0ca"; } -.fa-list-ul::before { - content: "\f0ca"; } +.fa-list-dots { + --fa: "\f0ca"; } -.fa-list-dots::before { - content: "\f0ca"; } +.fa-school-lock { + --fa: "\e56f"; } -.fa-school-lock::before { - content: "\e56f"; } +.fa-tower-cell { + --fa: "\e585"; } -.fa-tower-cell::before { - content: "\e585"; } +.fa-down-long { + --fa: "\f309"; } -.fa-down-long::before { - content: "\f309"; } +.fa-long-arrow-alt-down { + --fa: "\f309"; } -.fa-long-arrow-alt-down::before { - content: "\f309"; } +.fa-ranking-star { + --fa: "\e561"; } -.fa-ranking-star::before { - content: "\e561"; } +.fa-chess-king { + --fa: "\f43f"; } -.fa-chess-king::before { - content: "\f43f"; } +.fa-person-harassing { + --fa: "\e549"; } -.fa-person-harassing::before { - content: "\e549"; } +.fa-brazilian-real-sign { + --fa: "\e46c"; } -.fa-brazilian-real-sign::before { - content: "\e46c"; } +.fa-landmark-dome { + --fa: "\f752"; } -.fa-landmark-dome::before { - content: "\f752"; } +.fa-landmark-alt { + --fa: "\f752"; } -.fa-landmark-alt::before { - content: "\f752"; } +.fa-arrow-up { + --fa: "\f062"; } -.fa-arrow-up::before { - content: "\f062"; } +.fa-tv { + --fa: "\f26c"; } -.fa-tv::before { - content: "\f26c"; } +.fa-television { + --fa: "\f26c"; } -.fa-television::before { - content: "\f26c"; } +.fa-tv-alt { + --fa: "\f26c"; } -.fa-tv-alt::before { - content: "\f26c"; } +.fa-shrimp { + --fa: "\e448"; } -.fa-shrimp::before { - content: "\e448"; } +.fa-list-check { + --fa: "\f0ae"; } -.fa-list-check::before { - content: "\f0ae"; } +.fa-tasks { + --fa: "\f0ae"; } -.fa-tasks::before { - content: "\f0ae"; } +.fa-jug-detergent { + --fa: "\e519"; } -.fa-jug-detergent::before { - content: "\e519"; } +.fa-circle-user { + --fa: "\f2bd"; } -.fa-circle-user::before { - content: "\f2bd"; } +.fa-user-circle { + --fa: "\f2bd"; } -.fa-user-circle::before { - content: "\f2bd"; } +.fa-user-shield { + --fa: "\f505"; } -.fa-user-shield::before { - content: "\f505"; } +.fa-wind { + --fa: "\f72e"; } -.fa-wind::before { - content: "\f72e"; } +.fa-car-burst { + --fa: "\f5e1"; } -.fa-car-burst::before { - content: "\f5e1"; } +.fa-car-crash { + --fa: "\f5e1"; } -.fa-car-crash::before { - content: "\f5e1"; } +.fa-y { + --fa: "\59"; } -.fa-y::before { - content: "\59"; } +.fa-person-snowboarding { + --fa: "\f7ce"; } -.fa-person-snowboarding::before { - content: "\f7ce"; } +.fa-snowboarding { + --fa: "\f7ce"; } -.fa-snowboarding::before { - content: "\f7ce"; } +.fa-truck-fast { + --fa: "\f48b"; } -.fa-truck-fast::before { - content: "\f48b"; } +.fa-shipping-fast { + --fa: "\f48b"; } -.fa-shipping-fast::before { - content: "\f48b"; } +.fa-fish { + --fa: "\f578"; } -.fa-fish::before { - content: "\f578"; } +.fa-user-graduate { + --fa: "\f501"; } -.fa-user-graduate::before { - content: "\f501"; } +.fa-circle-half-stroke { + --fa: "\f042"; } -.fa-circle-half-stroke::before { - content: "\f042"; } +.fa-adjust { + --fa: "\f042"; } -.fa-adjust::before { - content: "\f042"; } +.fa-clapperboard { + --fa: "\e131"; } -.fa-clapperboard::before { - content: "\e131"; } +.fa-circle-radiation { + --fa: "\f7ba"; } -.fa-circle-radiation::before { - content: "\f7ba"; } +.fa-radiation-alt { + --fa: "\f7ba"; } -.fa-radiation-alt::before { - content: "\f7ba"; } +.fa-baseball { + --fa: "\f433"; } -.fa-baseball::before { - content: "\f433"; } +.fa-baseball-ball { + --fa: "\f433"; } -.fa-baseball-ball::before { - content: "\f433"; } +.fa-jet-fighter-up { + --fa: "\e518"; } -.fa-jet-fighter-up::before { - content: "\e518"; } +.fa-diagram-project { + --fa: "\f542"; } -.fa-diagram-project::before { - content: "\f542"; } +.fa-project-diagram { + --fa: "\f542"; } -.fa-project-diagram::before { - content: "\f542"; } +.fa-copy { + --fa: "\f0c5"; } -.fa-copy::before { - content: "\f0c5"; } +.fa-volume-xmark { + --fa: "\f6a9"; } -.fa-volume-xmark::before { - content: "\f6a9"; } +.fa-volume-mute { + --fa: "\f6a9"; } -.fa-volume-mute::before { - content: "\f6a9"; } +.fa-volume-times { + --fa: "\f6a9"; } -.fa-volume-times::before { - content: "\f6a9"; } +.fa-hand-sparkles { + --fa: "\e05d"; } -.fa-hand-sparkles::before { - content: "\e05d"; } +.fa-grip { + --fa: "\f58d"; } -.fa-grip::before { - content: "\f58d"; } +.fa-grip-horizontal { + --fa: "\f58d"; } -.fa-grip-horizontal::before { - content: "\f58d"; } +.fa-share-from-square { + --fa: "\f14d"; } -.fa-share-from-square::before { - content: "\f14d"; } +.fa-share-square { + --fa: "\f14d"; } -.fa-share-square::before { - content: "\f14d"; } +.fa-child-combatant { + --fa: "\e4e0"; } -.fa-child-combatant::before { - content: "\e4e0"; } +.fa-child-rifle { + --fa: "\e4e0"; } -.fa-child-rifle::before { - content: "\e4e0"; } +.fa-gun { + --fa: "\e19b"; } -.fa-gun::before { - content: "\e19b"; } +.fa-square-phone { + --fa: "\f098"; } -.fa-square-phone::before { - content: "\f098"; } +.fa-phone-square { + --fa: "\f098"; } -.fa-phone-square::before { - content: "\f098"; } +.fa-plus { + --fa: "\2b"; } -.fa-plus::before { - content: "\2b"; } +.fa-add { + --fa: "\2b"; } -.fa-add::before { - content: "\2b"; } +.fa-expand { + --fa: "\f065"; } -.fa-expand::before { - content: "\f065"; } +.fa-computer { + --fa: "\e4e5"; } -.fa-computer::before { - content: "\e4e5"; } +.fa-xmark { + --fa: "\f00d"; } -.fa-xmark::before { - content: "\f00d"; } +.fa-close { + --fa: "\f00d"; } -.fa-close::before { - content: "\f00d"; } +.fa-multiply { + --fa: "\f00d"; } -.fa-multiply::before { - content: "\f00d"; } +.fa-remove { + --fa: "\f00d"; } -.fa-remove::before { - content: "\f00d"; } +.fa-times { + --fa: "\f00d"; } -.fa-times::before { - content: "\f00d"; } +.fa-arrows-up-down-left-right { + --fa: "\f047"; } -.fa-arrows-up-down-left-right::before { - content: "\f047"; } +.fa-arrows { + --fa: "\f047"; } -.fa-arrows::before { - content: "\f047"; } +.fa-chalkboard-user { + --fa: "\f51c"; } -.fa-chalkboard-user::before { - content: "\f51c"; } +.fa-chalkboard-teacher { + --fa: "\f51c"; } -.fa-chalkboard-teacher::before { - content: "\f51c"; } +.fa-peso-sign { + --fa: "\e222"; } -.fa-peso-sign::before { - content: "\e222"; } +.fa-building-shield { + --fa: "\e4d8"; } -.fa-building-shield::before { - content: "\e4d8"; } +.fa-baby { + --fa: "\f77c"; } -.fa-baby::before { - content: "\f77c"; } +.fa-users-line { + --fa: "\e592"; } -.fa-users-line::before { - content: "\e592"; } +.fa-quote-left { + --fa: "\f10d"; } -.fa-quote-left::before { - content: "\f10d"; } +.fa-quote-left-alt { + --fa: "\f10d"; } -.fa-quote-left-alt::before { - content: "\f10d"; } +.fa-tractor { + --fa: "\f722"; } -.fa-tractor::before { - content: "\f722"; } +.fa-trash-arrow-up { + --fa: "\f829"; } -.fa-trash-arrow-up::before { - content: "\f829"; } +.fa-trash-restore { + --fa: "\f829"; } -.fa-trash-restore::before { - content: "\f829"; } +.fa-arrow-down-up-lock { + --fa: "\e4b0"; } -.fa-arrow-down-up-lock::before { - content: "\e4b0"; } +.fa-lines-leaning { + --fa: "\e51e"; } -.fa-lines-leaning::before { - content: "\e51e"; } +.fa-ruler-combined { + --fa: "\f546"; } -.fa-ruler-combined::before { - content: "\f546"; } +.fa-copyright { + --fa: "\f1f9"; } -.fa-copyright::before { - content: "\f1f9"; } +.fa-equals { + --fa: "\3d"; } -.fa-equals::before { - content: "\3d"; } +.fa-blender { + --fa: "\f517"; } -.fa-blender::before { - content: "\f517"; } +.fa-teeth { + --fa: "\f62e"; } -.fa-teeth::before { - content: "\f62e"; } +.fa-shekel-sign { + --fa: "\f20b"; } -.fa-shekel-sign::before { - content: "\f20b"; } +.fa-ils { + --fa: "\f20b"; } -.fa-ils::before { - content: "\f20b"; } +.fa-shekel { + --fa: "\f20b"; } -.fa-shekel::before { - content: "\f20b"; } +.fa-sheqel { + --fa: "\f20b"; } -.fa-sheqel::before { - content: "\f20b"; } +.fa-sheqel-sign { + --fa: "\f20b"; } -.fa-sheqel-sign::before { - content: "\f20b"; } +.fa-map { + --fa: "\f279"; } -.fa-map::before { - content: "\f279"; } +.fa-rocket { + --fa: "\f135"; } -.fa-rocket::before { - content: "\f135"; } +.fa-photo-film { + --fa: "\f87c"; } -.fa-photo-film::before { - content: "\f87c"; } +.fa-photo-video { + --fa: "\f87c"; } -.fa-photo-video::before { - content: "\f87c"; } +.fa-folder-minus { + --fa: "\f65d"; } -.fa-folder-minus::before { - content: "\f65d"; } +.fa-hexagon-nodes-bolt { + --fa: "\e69a"; } -.fa-store::before { - content: "\f54e"; } +.fa-store { + --fa: "\f54e"; } -.fa-arrow-trend-up::before { - content: "\e098"; } +.fa-arrow-trend-up { + --fa: "\e098"; } -.fa-plug-circle-minus::before { - content: "\e55e"; } +.fa-plug-circle-minus { + --fa: "\e55e"; } -.fa-sign-hanging::before { - content: "\f4d9"; } +.fa-sign-hanging { + --fa: "\f4d9"; } -.fa-sign::before { - content: "\f4d9"; } +.fa-sign { + --fa: "\f4d9"; } -.fa-bezier-curve::before { - content: "\f55b"; } +.fa-bezier-curve { + --fa: "\f55b"; } -.fa-bell-slash::before { - content: "\f1f6"; } +.fa-bell-slash { + --fa: "\f1f6"; } -.fa-tablet::before { - content: "\f3fb"; } +.fa-tablet { + --fa: "\f3fb"; } -.fa-tablet-android::before { - content: "\f3fb"; } +.fa-tablet-android { + --fa: "\f3fb"; } -.fa-school-flag::before { - content: "\e56e"; } +.fa-school-flag { + --fa: "\e56e"; } -.fa-fill::before { - content: "\f575"; } +.fa-fill { + --fa: "\f575"; } -.fa-angle-up::before { - content: "\f106"; } +.fa-angle-up { + --fa: "\f106"; } -.fa-drumstick-bite::before { - content: "\f6d7"; } +.fa-drumstick-bite { + --fa: "\f6d7"; } -.fa-holly-berry::before { - content: "\f7aa"; } +.fa-holly-berry { + --fa: "\f7aa"; } -.fa-chevron-left::before { - content: "\f053"; } +.fa-chevron-left { + --fa: "\f053"; } -.fa-bacteria::before { - content: "\e059"; } +.fa-bacteria { + --fa: "\e059"; } -.fa-hand-lizard::before { - content: "\f258"; } +.fa-hand-lizard { + --fa: "\f258"; } -.fa-notdef::before { - content: "\e1fe"; } +.fa-notdef { + --fa: "\e1fe"; } -.fa-disease::before { - content: "\f7fa"; } +.fa-disease { + --fa: "\f7fa"; } -.fa-briefcase-medical::before { - content: "\f469"; } +.fa-briefcase-medical { + --fa: "\f469"; } -.fa-genderless::before { - content: "\f22d"; } +.fa-genderless { + --fa: "\f22d"; } -.fa-chevron-right::before { - content: "\f054"; } +.fa-chevron-right { + --fa: "\f054"; } -.fa-retweet::before { - content: "\f079"; } +.fa-retweet { + --fa: "\f079"; } -.fa-car-rear::before { - content: "\f5de"; } +.fa-car-rear { + --fa: "\f5de"; } -.fa-car-alt::before { - content: "\f5de"; } +.fa-car-alt { + --fa: "\f5de"; } -.fa-pump-soap::before { - content: "\e06b"; } +.fa-pump-soap { + --fa: "\e06b"; } -.fa-video-slash::before { - content: "\f4e2"; } +.fa-video-slash { + --fa: "\f4e2"; } -.fa-battery-quarter::before { - content: "\f243"; } +.fa-battery-quarter { + --fa: "\f243"; } -.fa-battery-2::before { - content: "\f243"; } +.fa-battery-2 { + --fa: "\f243"; } -.fa-radio::before { - content: "\f8d7"; } +.fa-radio { + --fa: "\f8d7"; } -.fa-baby-carriage::before { - content: "\f77d"; } +.fa-baby-carriage { + --fa: "\f77d"; } -.fa-carriage-baby::before { - content: "\f77d"; } +.fa-carriage-baby { + --fa: "\f77d"; } -.fa-traffic-light::before { - content: "\f637"; } +.fa-traffic-light { + --fa: "\f637"; } -.fa-thermometer::before { - content: "\f491"; } +.fa-thermometer { + --fa: "\f491"; } -.fa-vr-cardboard::before { - content: "\f729"; } +.fa-vr-cardboard { + --fa: "\f729"; } -.fa-hand-middle-finger::before { - content: "\f806"; } +.fa-hand-middle-finger { + --fa: "\f806"; } -.fa-percent::before { - content: "\25"; } +.fa-percent { + --fa: "\25"; } -.fa-percentage::before { - content: "\25"; } +.fa-percentage { + --fa: "\25"; } -.fa-truck-moving::before { - content: "\f4df"; } +.fa-truck-moving { + --fa: "\f4df"; } -.fa-glass-water-droplet::before { - content: "\e4f5"; } +.fa-glass-water-droplet { + --fa: "\e4f5"; } -.fa-display::before { - content: "\e163"; } +.fa-display { + --fa: "\e163"; } -.fa-face-smile::before { - content: "\f118"; } +.fa-face-smile { + --fa: "\f118"; } -.fa-smile::before { - content: "\f118"; } +.fa-smile { + --fa: "\f118"; } -.fa-thumbtack::before { - content: "\f08d"; } +.fa-thumbtack { + --fa: "\f08d"; } -.fa-thumb-tack::before { - content: "\f08d"; } +.fa-thumb-tack { + --fa: "\f08d"; } -.fa-trophy::before { - content: "\f091"; } +.fa-trophy { + --fa: "\f091"; } -.fa-person-praying::before { - content: "\f683"; } +.fa-person-praying { + --fa: "\f683"; } -.fa-pray::before { - content: "\f683"; } +.fa-pray { + --fa: "\f683"; } -.fa-hammer::before { - content: "\f6e3"; } +.fa-hammer { + --fa: "\f6e3"; } -.fa-hand-peace::before { - content: "\f25b"; } +.fa-hand-peace { + --fa: "\f25b"; } -.fa-rotate::before { - content: "\f2f1"; } +.fa-rotate { + --fa: "\f2f1"; } -.fa-sync-alt::before { - content: "\f2f1"; } +.fa-sync-alt { + --fa: "\f2f1"; } -.fa-spinner::before { - content: "\f110"; } +.fa-spinner { + --fa: "\f110"; } -.fa-robot::before { - content: "\f544"; } +.fa-robot { + --fa: "\f544"; } -.fa-peace::before { - content: "\f67c"; } +.fa-peace { + --fa: "\f67c"; } -.fa-gears::before { - content: "\f085"; } +.fa-gears { + --fa: "\f085"; } -.fa-cogs::before { - content: "\f085"; } +.fa-cogs { + --fa: "\f085"; } -.fa-warehouse::before { - content: "\f494"; } +.fa-warehouse { + --fa: "\f494"; } -.fa-arrow-up-right-dots::before { - content: "\e4b7"; } +.fa-arrow-up-right-dots { + --fa: "\e4b7"; } -.fa-splotch::before { - content: "\f5bc"; } +.fa-splotch { + --fa: "\f5bc"; } -.fa-face-grin-hearts::before { - content: "\f584"; } +.fa-face-grin-hearts { + --fa: "\f584"; } -.fa-grin-hearts::before { - content: "\f584"; } +.fa-grin-hearts { + --fa: "\f584"; } -.fa-dice-four::before { - content: "\f524"; } +.fa-dice-four { + --fa: "\f524"; } -.fa-sim-card::before { - content: "\f7c4"; } +.fa-sim-card { + --fa: "\f7c4"; } -.fa-transgender::before { - content: "\f225"; } +.fa-transgender { + --fa: "\f225"; } -.fa-transgender-alt::before { - content: "\f225"; } +.fa-transgender-alt { + --fa: "\f225"; } -.fa-mercury::before { - content: "\f223"; } +.fa-mercury { + --fa: "\f223"; } -.fa-arrow-turn-down::before { - content: "\f149"; } +.fa-arrow-turn-down { + --fa: "\f149"; } -.fa-level-down::before { - content: "\f149"; } +.fa-level-down { + --fa: "\f149"; } -.fa-person-falling-burst::before { - content: "\e547"; } +.fa-person-falling-burst { + --fa: "\e547"; } -.fa-award::before { - content: "\f559"; } +.fa-award { + --fa: "\f559"; } -.fa-ticket-simple::before { - content: "\f3ff"; } +.fa-ticket-simple { + --fa: "\f3ff"; } -.fa-ticket-alt::before { - content: "\f3ff"; } +.fa-ticket-alt { + --fa: "\f3ff"; } -.fa-building::before { - content: "\f1ad"; } +.fa-building { + --fa: "\f1ad"; } -.fa-angles-left::before { - content: "\f100"; } +.fa-angles-left { + --fa: "\f100"; } -.fa-angle-double-left::before { - content: "\f100"; } +.fa-angle-double-left { + --fa: "\f100"; } -.fa-qrcode::before { - content: "\f029"; } +.fa-qrcode { + --fa: "\f029"; } -.fa-clock-rotate-left::before { - content: "\f1da"; } +.fa-clock-rotate-left { + --fa: "\f1da"; } -.fa-history::before { - content: "\f1da"; } +.fa-history { + --fa: "\f1da"; } -.fa-face-grin-beam-sweat::before { - content: "\f583"; } +.fa-face-grin-beam-sweat { + --fa: "\f583"; } -.fa-grin-beam-sweat::before { - content: "\f583"; } +.fa-grin-beam-sweat { + --fa: "\f583"; } -.fa-file-export::before { - content: "\f56e"; } +.fa-file-export { + --fa: "\f56e"; } -.fa-arrow-right-from-file::before { - content: "\f56e"; } +.fa-arrow-right-from-file { + --fa: "\f56e"; } -.fa-shield::before { - content: "\f132"; } +.fa-shield { + --fa: "\f132"; } -.fa-shield-blank::before { - content: "\f132"; } +.fa-shield-blank { + --fa: "\f132"; } -.fa-arrow-up-short-wide::before { - content: "\f885"; } +.fa-arrow-up-short-wide { + --fa: "\f885"; } -.fa-sort-amount-up-alt::before { - content: "\f885"; } +.fa-sort-amount-up-alt { + --fa: "\f885"; } -.fa-house-medical::before { - content: "\e3b2"; } +.fa-comment-nodes { + --fa: "\e696"; } -.fa-golf-ball-tee::before { - content: "\f450"; } +.fa-house-medical { + --fa: "\e3b2"; } -.fa-golf-ball::before { - content: "\f450"; } +.fa-golf-ball-tee { + --fa: "\f450"; } -.fa-circle-chevron-left::before { - content: "\f137"; } +.fa-golf-ball { + --fa: "\f450"; } -.fa-chevron-circle-left::before { - content: "\f137"; } +.fa-circle-chevron-left { + --fa: "\f137"; } -.fa-house-chimney-window::before { - content: "\e00d"; } +.fa-chevron-circle-left { + --fa: "\f137"; } -.fa-pen-nib::before { - content: "\f5ad"; } +.fa-house-chimney-window { + --fa: "\e00d"; } -.fa-tent-arrow-turn-left::before { - content: "\e580"; } +.fa-pen-nib { + --fa: "\f5ad"; } -.fa-tents::before { - content: "\e582"; } +.fa-tent-arrow-turn-left { + --fa: "\e580"; } -.fa-wand-magic::before { - content: "\f0d0"; } +.fa-tents { + --fa: "\e582"; } -.fa-magic::before { - content: "\f0d0"; } +.fa-wand-magic { + --fa: "\f0d0"; } -.fa-dog::before { - content: "\f6d3"; } +.fa-magic { + --fa: "\f0d0"; } -.fa-carrot::before { - content: "\f787"; } +.fa-dog { + --fa: "\f6d3"; } -.fa-moon::before { - content: "\f186"; } +.fa-carrot { + --fa: "\f787"; } -.fa-wine-glass-empty::before { - content: "\f5ce"; } +.fa-moon { + --fa: "\f186"; } -.fa-wine-glass-alt::before { - content: "\f5ce"; } +.fa-wine-glass-empty { + --fa: "\f5ce"; } -.fa-cheese::before { - content: "\f7ef"; } +.fa-wine-glass-alt { + --fa: "\f5ce"; } -.fa-yin-yang::before { - content: "\f6ad"; } +.fa-cheese { + --fa: "\f7ef"; } -.fa-music::before { - content: "\f001"; } +.fa-yin-yang { + --fa: "\f6ad"; } -.fa-code-commit::before { - content: "\f386"; } +.fa-music { + --fa: "\f001"; } -.fa-temperature-low::before { - content: "\f76b"; } +.fa-code-commit { + --fa: "\f386"; } -.fa-person-biking::before { - content: "\f84a"; } +.fa-temperature-low { + --fa: "\f76b"; } -.fa-biking::before { - content: "\f84a"; } +.fa-person-biking { + --fa: "\f84a"; } -.fa-broom::before { - content: "\f51a"; } +.fa-biking { + --fa: "\f84a"; } -.fa-shield-heart::before { - content: "\e574"; } +.fa-broom { + --fa: "\f51a"; } -.fa-gopuram::before { - content: "\f664"; } +.fa-shield-heart { + --fa: "\e574"; } -.fa-earth-oceania::before { - content: "\e47b"; } +.fa-gopuram { + --fa: "\f664"; } -.fa-globe-oceania::before { - content: "\e47b"; } +.fa-earth-oceania { + --fa: "\e47b"; } -.fa-square-xmark::before { - content: "\f2d3"; } +.fa-globe-oceania { + --fa: "\e47b"; } -.fa-times-square::before { - content: "\f2d3"; } +.fa-square-xmark { + --fa: "\f2d3"; } -.fa-xmark-square::before { - content: "\f2d3"; } +.fa-times-square { + --fa: "\f2d3"; } -.fa-hashtag::before { - content: "\23"; } +.fa-xmark-square { + --fa: "\f2d3"; } -.fa-up-right-and-down-left-from-center::before { - content: "\f424"; } +.fa-hashtag { + --fa: "\23"; } -.fa-expand-alt::before { - content: "\f424"; } +.fa-up-right-and-down-left-from-center { + --fa: "\f424"; } -.fa-oil-can::before { - content: "\f613"; } +.fa-expand-alt { + --fa: "\f424"; } -.fa-t::before { - content: "\54"; } +.fa-oil-can { + --fa: "\f613"; } -.fa-hippo::before { - content: "\f6ed"; } +.fa-t { + --fa: "\54"; } -.fa-chart-column::before { - content: "\e0e3"; } +.fa-hippo { + --fa: "\f6ed"; } -.fa-infinity::before { - content: "\f534"; } +.fa-chart-column { + --fa: "\e0e3"; } -.fa-vial-circle-check::before { - content: "\e596"; } +.fa-infinity { + --fa: "\f534"; } -.fa-person-arrow-down-to-line::before { - content: "\e538"; } +.fa-vial-circle-check { + --fa: "\e596"; } -.fa-voicemail::before { - content: "\f897"; } +.fa-person-arrow-down-to-line { + --fa: "\e538"; } -.fa-fan::before { - content: "\f863"; } +.fa-voicemail { + --fa: "\f897"; } -.fa-person-walking-luggage::before { - content: "\e554"; } +.fa-fan { + --fa: "\f863"; } -.fa-up-down::before { - content: "\f338"; } +.fa-person-walking-luggage { + --fa: "\e554"; } -.fa-arrows-alt-v::before { - content: "\f338"; } +.fa-up-down { + --fa: "\f338"; } -.fa-cloud-moon-rain::before { - content: "\f73c"; } +.fa-arrows-alt-v { + --fa: "\f338"; } -.fa-calendar::before { - content: "\f133"; } +.fa-cloud-moon-rain { + --fa: "\f73c"; } -.fa-trailer::before { - content: "\e041"; } +.fa-calendar { + --fa: "\f133"; } -.fa-bahai::before { - content: "\f666"; } +.fa-trailer { + --fa: "\e041"; } -.fa-haykal::before { - content: "\f666"; } +.fa-bahai { + --fa: "\f666"; } -.fa-sd-card::before { - content: "\f7c2"; } +.fa-haykal { + --fa: "\f666"; } -.fa-dragon::before { - content: "\f6d5"; } +.fa-sd-card { + --fa: "\f7c2"; } -.fa-shoe-prints::before { - content: "\f54b"; } +.fa-dragon { + --fa: "\f6d5"; } -.fa-circle-plus::before { - content: "\f055"; } +.fa-shoe-prints { + --fa: "\f54b"; } -.fa-plus-circle::before { - content: "\f055"; } +.fa-circle-plus { + --fa: "\f055"; } -.fa-face-grin-tongue-wink::before { - content: "\f58b"; } +.fa-plus-circle { + --fa: "\f055"; } -.fa-grin-tongue-wink::before { - content: "\f58b"; } +.fa-face-grin-tongue-wink { + --fa: "\f58b"; } -.fa-hand-holding::before { - content: "\f4bd"; } +.fa-grin-tongue-wink { + --fa: "\f58b"; } -.fa-plug-circle-exclamation::before { - content: "\e55d"; } +.fa-hand-holding { + --fa: "\f4bd"; } -.fa-link-slash::before { - content: "\f127"; } +.fa-plug-circle-exclamation { + --fa: "\e55d"; } -.fa-chain-broken::before { - content: "\f127"; } +.fa-link-slash { + --fa: "\f127"; } -.fa-chain-slash::before { - content: "\f127"; } +.fa-chain-broken { + --fa: "\f127"; } -.fa-unlink::before { - content: "\f127"; } +.fa-chain-slash { + --fa: "\f127"; } -.fa-clone::before { - content: "\f24d"; } +.fa-unlink { + --fa: "\f127"; } -.fa-person-walking-arrow-loop-left::before { - content: "\e551"; } +.fa-clone { + --fa: "\f24d"; } -.fa-arrow-up-z-a::before { - content: "\f882"; } +.fa-person-walking-arrow-loop-left { + --fa: "\e551"; } -.fa-sort-alpha-up-alt::before { - content: "\f882"; } +.fa-arrow-up-z-a { + --fa: "\f882"; } -.fa-fire-flame-curved::before { - content: "\f7e4"; } +.fa-sort-alpha-up-alt { + --fa: "\f882"; } -.fa-fire-alt::before { - content: "\f7e4"; } +.fa-fire-flame-curved { + --fa: "\f7e4"; } -.fa-tornado::before { - content: "\f76f"; } +.fa-fire-alt { + --fa: "\f7e4"; } -.fa-file-circle-plus::before { - content: "\e494"; } +.fa-tornado { + --fa: "\f76f"; } -.fa-book-quran::before { - content: "\f687"; } +.fa-file-circle-plus { + --fa: "\e494"; } -.fa-quran::before { - content: "\f687"; } +.fa-book-quran { + --fa: "\f687"; } -.fa-anchor::before { - content: "\f13d"; } +.fa-quran { + --fa: "\f687"; } -.fa-border-all::before { - content: "\f84c"; } +.fa-anchor { + --fa: "\f13d"; } -.fa-face-angry::before { - content: "\f556"; } +.fa-border-all { + --fa: "\f84c"; } -.fa-angry::before { - content: "\f556"; } +.fa-face-angry { + --fa: "\f556"; } -.fa-cookie-bite::before { - content: "\f564"; } +.fa-angry { + --fa: "\f556"; } -.fa-arrow-trend-down::before { - content: "\e097"; } +.fa-cookie-bite { + --fa: "\f564"; } -.fa-rss::before { - content: "\f09e"; } +.fa-arrow-trend-down { + --fa: "\e097"; } -.fa-feed::before { - content: "\f09e"; } +.fa-rss { + --fa: "\f09e"; } -.fa-draw-polygon::before { - content: "\f5ee"; } +.fa-feed { + --fa: "\f09e"; } -.fa-scale-balanced::before { - content: "\f24e"; } +.fa-draw-polygon { + --fa: "\f5ee"; } -.fa-balance-scale::before { - content: "\f24e"; } +.fa-scale-balanced { + --fa: "\f24e"; } -.fa-gauge-simple-high::before { - content: "\f62a"; } +.fa-balance-scale { + --fa: "\f24e"; } -.fa-tachometer::before { - content: "\f62a"; } +.fa-gauge-simple-high { + --fa: "\f62a"; } -.fa-tachometer-fast::before { - content: "\f62a"; } +.fa-tachometer { + --fa: "\f62a"; } -.fa-shower::before { - content: "\f2cc"; } +.fa-tachometer-fast { + --fa: "\f62a"; } -.fa-desktop::before { - content: "\f390"; } +.fa-shower { + --fa: "\f2cc"; } -.fa-desktop-alt::before { - content: "\f390"; } +.fa-desktop { + --fa: "\f390"; } -.fa-m::before { - content: "\4d"; } +.fa-desktop-alt { + --fa: "\f390"; } -.fa-table-list::before { - content: "\f00b"; } +.fa-m { + --fa: "\4d"; } -.fa-th-list::before { - content: "\f00b"; } +.fa-table-list { + --fa: "\f00b"; } -.fa-comment-sms::before { - content: "\f7cd"; } +.fa-th-list { + --fa: "\f00b"; } -.fa-sms::before { - content: "\f7cd"; } +.fa-comment-sms { + --fa: "\f7cd"; } -.fa-book::before { - content: "\f02d"; } +.fa-sms { + --fa: "\f7cd"; } -.fa-user-plus::before { - content: "\f234"; } +.fa-book { + --fa: "\f02d"; } -.fa-check::before { - content: "\f00c"; } +.fa-user-plus { + --fa: "\f234"; } -.fa-battery-three-quarters::before { - content: "\f241"; } +.fa-check { + --fa: "\f00c"; } -.fa-battery-4::before { - content: "\f241"; } +.fa-battery-three-quarters { + --fa: "\f241"; } -.fa-house-circle-check::before { - content: "\e509"; } +.fa-battery-4 { + --fa: "\f241"; } -.fa-angle-left::before { - content: "\f104"; } +.fa-house-circle-check { + --fa: "\e509"; } -.fa-diagram-successor::before { - content: "\e47a"; } +.fa-angle-left { + --fa: "\f104"; } -.fa-truck-arrow-right::before { - content: "\e58b"; } +.fa-diagram-successor { + --fa: "\e47a"; } -.fa-arrows-split-up-and-left::before { - content: "\e4bc"; } +.fa-truck-arrow-right { + --fa: "\e58b"; } -.fa-hand-fist::before { - content: "\f6de"; } +.fa-arrows-split-up-and-left { + --fa: "\e4bc"; } -.fa-fist-raised::before { - content: "\f6de"; } +.fa-hand-fist { + --fa: "\f6de"; } -.fa-cloud-moon::before { - content: "\f6c3"; } +.fa-fist-raised { + --fa: "\f6de"; } -.fa-briefcase::before { - content: "\f0b1"; } +.fa-cloud-moon { + --fa: "\f6c3"; } -.fa-person-falling::before { - content: "\e546"; } +.fa-briefcase { + --fa: "\f0b1"; } -.fa-image-portrait::before { - content: "\f3e0"; } +.fa-person-falling { + --fa: "\e546"; } -.fa-portrait::before { - content: "\f3e0"; } +.fa-image-portrait { + --fa: "\f3e0"; } -.fa-user-tag::before { - content: "\f507"; } +.fa-portrait { + --fa: "\f3e0"; } -.fa-rug::before { - content: "\e569"; } +.fa-user-tag { + --fa: "\f507"; } -.fa-earth-europe::before { - content: "\f7a2"; } +.fa-rug { + --fa: "\e569"; } -.fa-globe-europe::before { - content: "\f7a2"; } +.fa-earth-europe { + --fa: "\f7a2"; } -.fa-cart-flatbed-suitcase::before { - content: "\f59d"; } +.fa-globe-europe { + --fa: "\f7a2"; } -.fa-luggage-cart::before { - content: "\f59d"; } +.fa-cart-flatbed-suitcase { + --fa: "\f59d"; } -.fa-rectangle-xmark::before { - content: "\f410"; } +.fa-luggage-cart { + --fa: "\f59d"; } -.fa-rectangle-times::before { - content: "\f410"; } +.fa-rectangle-xmark { + --fa: "\f410"; } -.fa-times-rectangle::before { - content: "\f410"; } +.fa-rectangle-times { + --fa: "\f410"; } -.fa-window-close::before { - content: "\f410"; } +.fa-times-rectangle { + --fa: "\f410"; } -.fa-baht-sign::before { - content: "\e0ac"; } +.fa-window-close { + --fa: "\f410"; } -.fa-book-open::before { - content: "\f518"; } +.fa-baht-sign { + --fa: "\e0ac"; } -.fa-book-journal-whills::before { - content: "\f66a"; } +.fa-book-open { + --fa: "\f518"; } -.fa-journal-whills::before { - content: "\f66a"; } +.fa-book-journal-whills { + --fa: "\f66a"; } -.fa-handcuffs::before { - content: "\e4f8"; } +.fa-journal-whills { + --fa: "\f66a"; } -.fa-triangle-exclamation::before { - content: "\f071"; } +.fa-handcuffs { + --fa: "\e4f8"; } -.fa-exclamation-triangle::before { - content: "\f071"; } +.fa-triangle-exclamation { + --fa: "\f071"; } -.fa-warning::before { - content: "\f071"; } +.fa-exclamation-triangle { + --fa: "\f071"; } -.fa-database::before { - content: "\f1c0"; } +.fa-warning { + --fa: "\f071"; } -.fa-share::before { - content: "\f064"; } +.fa-database { + --fa: "\f1c0"; } -.fa-mail-forward::before { - content: "\f064"; } +.fa-share { + --fa: "\f064"; } -.fa-bottle-droplet::before { - content: "\e4c4"; } +.fa-mail-forward { + --fa: "\f064"; } -.fa-mask-face::before { - content: "\e1d7"; } +.fa-bottle-droplet { + --fa: "\e4c4"; } -.fa-hill-rockslide::before { - content: "\e508"; } +.fa-mask-face { + --fa: "\e1d7"; } -.fa-right-left::before { - content: "\f362"; } +.fa-hill-rockslide { + --fa: "\e508"; } -.fa-exchange-alt::before { - content: "\f362"; } +.fa-right-left { + --fa: "\f362"; } -.fa-paper-plane::before { - content: "\f1d8"; } +.fa-exchange-alt { + --fa: "\f362"; } -.fa-road-circle-exclamation::before { - content: "\e565"; } +.fa-paper-plane { + --fa: "\f1d8"; } -.fa-dungeon::before { - content: "\f6d9"; } +.fa-road-circle-exclamation { + --fa: "\e565"; } -.fa-align-right::before { - content: "\f038"; } +.fa-dungeon { + --fa: "\f6d9"; } -.fa-money-bill-1-wave::before { - content: "\f53b"; } +.fa-align-right { + --fa: "\f038"; } -.fa-money-bill-wave-alt::before { - content: "\f53b"; } +.fa-money-bill-1-wave { + --fa: "\f53b"; } -.fa-life-ring::before { - content: "\f1cd"; } +.fa-money-bill-wave-alt { + --fa: "\f53b"; } -.fa-hands::before { - content: "\f2a7"; } +.fa-life-ring { + --fa: "\f1cd"; } -.fa-sign-language::before { - content: "\f2a7"; } +.fa-hands { + --fa: "\f2a7"; } -.fa-signing::before { - content: "\f2a7"; } +.fa-sign-language { + --fa: "\f2a7"; } -.fa-calendar-day::before { - content: "\f783"; } +.fa-signing { + --fa: "\f2a7"; } -.fa-water-ladder::before { - content: "\f5c5"; } +.fa-calendar-day { + --fa: "\f783"; } -.fa-ladder-water::before { - content: "\f5c5"; } +.fa-water-ladder { + --fa: "\f5c5"; } -.fa-swimming-pool::before { - content: "\f5c5"; } +.fa-ladder-water { + --fa: "\f5c5"; } -.fa-arrows-up-down::before { - content: "\f07d"; } +.fa-swimming-pool { + --fa: "\f5c5"; } -.fa-arrows-v::before { - content: "\f07d"; } +.fa-arrows-up-down { + --fa: "\f07d"; } -.fa-face-grimace::before { - content: "\f57f"; } +.fa-arrows-v { + --fa: "\f07d"; } -.fa-grimace::before { - content: "\f57f"; } +.fa-face-grimace { + --fa: "\f57f"; } -.fa-wheelchair-move::before { - content: "\e2ce"; } +.fa-grimace { + --fa: "\f57f"; } -.fa-wheelchair-alt::before { - content: "\e2ce"; } +.fa-wheelchair-move { + --fa: "\e2ce"; } -.fa-turn-down::before { - content: "\f3be"; } +.fa-wheelchair-alt { + --fa: "\e2ce"; } -.fa-level-down-alt::before { - content: "\f3be"; } +.fa-turn-down { + --fa: "\f3be"; } -.fa-person-walking-arrow-right::before { - content: "\e552"; } +.fa-level-down-alt { + --fa: "\f3be"; } -.fa-square-envelope::before { - content: "\f199"; } +.fa-person-walking-arrow-right { + --fa: "\e552"; } -.fa-envelope-square::before { - content: "\f199"; } +.fa-square-envelope { + --fa: "\f199"; } -.fa-dice::before { - content: "\f522"; } +.fa-envelope-square { + --fa: "\f199"; } -.fa-bowling-ball::before { - content: "\f436"; } +.fa-dice { + --fa: "\f522"; } -.fa-brain::before { - content: "\f5dc"; } +.fa-bowling-ball { + --fa: "\f436"; } -.fa-bandage::before { - content: "\f462"; } +.fa-brain { + --fa: "\f5dc"; } -.fa-band-aid::before { - content: "\f462"; } +.fa-bandage { + --fa: "\f462"; } -.fa-calendar-minus::before { - content: "\f272"; } +.fa-band-aid { + --fa: "\f462"; } -.fa-circle-xmark::before { - content: "\f057"; } +.fa-calendar-minus { + --fa: "\f272"; } -.fa-times-circle::before { - content: "\f057"; } +.fa-circle-xmark { + --fa: "\f057"; } -.fa-xmark-circle::before { - content: "\f057"; } +.fa-times-circle { + --fa: "\f057"; } -.fa-gifts::before { - content: "\f79c"; } +.fa-xmark-circle { + --fa: "\f057"; } -.fa-hotel::before { - content: "\f594"; } +.fa-gifts { + --fa: "\f79c"; } -.fa-earth-asia::before { - content: "\f57e"; } +.fa-hotel { + --fa: "\f594"; } -.fa-globe-asia::before { - content: "\f57e"; } +.fa-earth-asia { + --fa: "\f57e"; } -.fa-id-card-clip::before { - content: "\f47f"; } +.fa-globe-asia { + --fa: "\f57e"; } -.fa-id-card-alt::before { - content: "\f47f"; } +.fa-id-card-clip { + --fa: "\f47f"; } -.fa-magnifying-glass-plus::before { - content: "\f00e"; } +.fa-id-card-alt { + --fa: "\f47f"; } -.fa-search-plus::before { - content: "\f00e"; } +.fa-magnifying-glass-plus { + --fa: "\f00e"; } -.fa-thumbs-up::before { - content: "\f164"; } +.fa-search-plus { + --fa: "\f00e"; } -.fa-user-clock::before { - content: "\f4fd"; } +.fa-thumbs-up { + --fa: "\f164"; } -.fa-hand-dots::before { - content: "\f461"; } +.fa-user-clock { + --fa: "\f4fd"; } -.fa-allergies::before { - content: "\f461"; } +.fa-hand-dots { + --fa: "\f461"; } -.fa-file-invoice::before { - content: "\f570"; } +.fa-allergies { + --fa: "\f461"; } -.fa-window-minimize::before { - content: "\f2d1"; } +.fa-file-invoice { + --fa: "\f570"; } -.fa-mug-saucer::before { - content: "\f0f4"; } +.fa-window-minimize { + --fa: "\f2d1"; } -.fa-coffee::before { - content: "\f0f4"; } +.fa-mug-saucer { + --fa: "\f0f4"; } -.fa-brush::before { - content: "\f55d"; } +.fa-coffee { + --fa: "\f0f4"; } -.fa-mask::before { - content: "\f6fa"; } +.fa-brush { + --fa: "\f55d"; } -.fa-magnifying-glass-minus::before { - content: "\f010"; } +.fa-file-half-dashed { + --fa: "\e698"; } -.fa-search-minus::before { - content: "\f010"; } +.fa-mask { + --fa: "\f6fa"; } -.fa-ruler-vertical::before { - content: "\f548"; } +.fa-magnifying-glass-minus { + --fa: "\f010"; } -.fa-user-large::before { - content: "\f406"; } +.fa-search-minus { + --fa: "\f010"; } -.fa-user-alt::before { - content: "\f406"; } +.fa-ruler-vertical { + --fa: "\f548"; } -.fa-train-tram::before { - content: "\e5b4"; } +.fa-user-large { + --fa: "\f406"; } -.fa-user-nurse::before { - content: "\f82f"; } +.fa-user-alt { + --fa: "\f406"; } -.fa-syringe::before { - content: "\f48e"; } +.fa-train-tram { + --fa: "\e5b4"; } -.fa-cloud-sun::before { - content: "\f6c4"; } +.fa-user-nurse { + --fa: "\f82f"; } -.fa-stopwatch-20::before { - content: "\e06f"; } +.fa-syringe { + --fa: "\f48e"; } -.fa-square-full::before { - content: "\f45c"; } +.fa-cloud-sun { + --fa: "\f6c4"; } -.fa-magnet::before { - content: "\f076"; } +.fa-stopwatch-20 { + --fa: "\e06f"; } -.fa-jar::before { - content: "\e516"; } +.fa-square-full { + --fa: "\f45c"; } -.fa-note-sticky::before { - content: "\f249"; } +.fa-magnet { + --fa: "\f076"; } -.fa-sticky-note::before { - content: "\f249"; } +.fa-jar { + --fa: "\e516"; } -.fa-bug-slash::before { - content: "\e490"; } +.fa-note-sticky { + --fa: "\f249"; } -.fa-arrow-up-from-water-pump::before { - content: "\e4b6"; } +.fa-sticky-note { + --fa: "\f249"; } -.fa-bone::before { - content: "\f5d7"; } +.fa-bug-slash { + --fa: "\e490"; } -.fa-table-cells-row-unlock::before { - content: "\e691"; } +.fa-arrow-up-from-water-pump { + --fa: "\e4b6"; } -.fa-user-injured::before { - content: "\f728"; } +.fa-bone { + --fa: "\f5d7"; } -.fa-face-sad-tear::before { - content: "\f5b4"; } +.fa-table-cells-row-unlock { + --fa: "\e691"; } -.fa-sad-tear::before { - content: "\f5b4"; } +.fa-user-injured { + --fa: "\f728"; } -.fa-plane::before { - content: "\f072"; } +.fa-face-sad-tear { + --fa: "\f5b4"; } -.fa-tent-arrows-down::before { - content: "\e581"; } +.fa-sad-tear { + --fa: "\f5b4"; } -.fa-exclamation::before { - content: "\21"; } +.fa-plane { + --fa: "\f072"; } -.fa-arrows-spin::before { - content: "\e4bb"; } +.fa-tent-arrows-down { + --fa: "\e581"; } -.fa-print::before { - content: "\f02f"; } +.fa-exclamation { + --fa: "\21"; } -.fa-turkish-lira-sign::before { - content: "\e2bb"; } +.fa-arrows-spin { + --fa: "\e4bb"; } -.fa-try::before { - content: "\e2bb"; } +.fa-print { + --fa: "\f02f"; } -.fa-turkish-lira::before { - content: "\e2bb"; } +.fa-turkish-lira-sign { + --fa: "\e2bb"; } -.fa-dollar-sign::before { - content: "\24"; } +.fa-try { + --fa: "\e2bb"; } -.fa-dollar::before { - content: "\24"; } +.fa-turkish-lira { + --fa: "\e2bb"; } -.fa-usd::before { - content: "\24"; } +.fa-dollar-sign { + --fa: "\24"; } -.fa-x::before { - content: "\58"; } +.fa-dollar { + --fa: "\24"; } -.fa-magnifying-glass-dollar::before { - content: "\f688"; } +.fa-usd { + --fa: "\24"; } -.fa-search-dollar::before { - content: "\f688"; } +.fa-x { + --fa: "\58"; } -.fa-users-gear::before { - content: "\f509"; } +.fa-magnifying-glass-dollar { + --fa: "\f688"; } -.fa-users-cog::before { - content: "\f509"; } +.fa-search-dollar { + --fa: "\f688"; } -.fa-person-military-pointing::before { - content: "\e54a"; } +.fa-users-gear { + --fa: "\f509"; } -.fa-building-columns::before { - content: "\f19c"; } +.fa-users-cog { + --fa: "\f509"; } -.fa-bank::before { - content: "\f19c"; } +.fa-person-military-pointing { + --fa: "\e54a"; } -.fa-institution::before { - content: "\f19c"; } +.fa-building-columns { + --fa: "\f19c"; } -.fa-museum::before { - content: "\f19c"; } +.fa-bank { + --fa: "\f19c"; } -.fa-university::before { - content: "\f19c"; } +.fa-institution { + --fa: "\f19c"; } -.fa-umbrella::before { - content: "\f0e9"; } +.fa-museum { + --fa: "\f19c"; } -.fa-trowel::before { - content: "\e589"; } +.fa-university { + --fa: "\f19c"; } -.fa-d::before { - content: "\44"; } +.fa-umbrella { + --fa: "\f0e9"; } -.fa-stapler::before { - content: "\e5af"; } +.fa-trowel { + --fa: "\e589"; } -.fa-masks-theater::before { - content: "\f630"; } +.fa-d { + --fa: "\44"; } -.fa-theater-masks::before { - content: "\f630"; } +.fa-stapler { + --fa: "\e5af"; } -.fa-kip-sign::before { - content: "\e1c4"; } +.fa-masks-theater { + --fa: "\f630"; } -.fa-hand-point-left::before { - content: "\f0a5"; } +.fa-theater-masks { + --fa: "\f630"; } -.fa-handshake-simple::before { - content: "\f4c6"; } +.fa-kip-sign { + --fa: "\e1c4"; } -.fa-handshake-alt::before { - content: "\f4c6"; } +.fa-hand-point-left { + --fa: "\f0a5"; } -.fa-jet-fighter::before { - content: "\f0fb"; } +.fa-handshake-simple { + --fa: "\f4c6"; } -.fa-fighter-jet::before { - content: "\f0fb"; } +.fa-handshake-alt { + --fa: "\f4c6"; } -.fa-square-share-nodes::before { - content: "\f1e1"; } +.fa-jet-fighter { + --fa: "\f0fb"; } -.fa-share-alt-square::before { - content: "\f1e1"; } +.fa-fighter-jet { + --fa: "\f0fb"; } -.fa-barcode::before { - content: "\f02a"; } +.fa-square-share-nodes { + --fa: "\f1e1"; } -.fa-plus-minus::before { - content: "\e43c"; } +.fa-share-alt-square { + --fa: "\f1e1"; } -.fa-video::before { - content: "\f03d"; } +.fa-barcode { + --fa: "\f02a"; } -.fa-video-camera::before { - content: "\f03d"; } +.fa-plus-minus { + --fa: "\e43c"; } -.fa-graduation-cap::before { - content: "\f19d"; } +.fa-video { + --fa: "\f03d"; } -.fa-mortar-board::before { - content: "\f19d"; } +.fa-video-camera { + --fa: "\f03d"; } -.fa-hand-holding-medical::before { - content: "\e05c"; } +.fa-graduation-cap { + --fa: "\f19d"; } -.fa-person-circle-check::before { - content: "\e53e"; } +.fa-mortar-board { + --fa: "\f19d"; } -.fa-turn-up::before { - content: "\f3bf"; } +.fa-hand-holding-medical { + --fa: "\e05c"; } -.fa-level-up-alt::before { - content: "\f3bf"; } +.fa-person-circle-check { + --fa: "\e53e"; } + +.fa-turn-up { + --fa: "\f3bf"; } + +.fa-level-up-alt { + --fa: "\f3bf"; } .sr-only, .fa-sr-only { @@ -6228,1586 +6256,1595 @@ readers do not read off random characters that represent icons */ .fa-brands { font-weight: 400; } -.fa-monero:before { - content: "\f3d0"; } +.fa-monero { + --fa: "\f3d0"; } + +.fa-hooli { + --fa: "\f427"; } + +.fa-yelp { + --fa: "\f1e9"; } + +.fa-cc-visa { + --fa: "\f1f0"; } -.fa-hooli:before { - content: "\f427"; } +.fa-lastfm { + --fa: "\f202"; } -.fa-yelp:before { - content: "\f1e9"; } +.fa-shopware { + --fa: "\f5b5"; } -.fa-cc-visa:before { - content: "\f1f0"; } +.fa-creative-commons-nc { + --fa: "\f4e8"; } -.fa-lastfm:before { - content: "\f202"; } +.fa-aws { + --fa: "\f375"; } -.fa-shopware:before { - content: "\f5b5"; } +.fa-redhat { + --fa: "\f7bc"; } -.fa-creative-commons-nc:before { - content: "\f4e8"; } +.fa-yoast { + --fa: "\f2b1"; } -.fa-aws:before { - content: "\f375"; } +.fa-cloudflare { + --fa: "\e07d"; } -.fa-redhat:before { - content: "\f7bc"; } +.fa-ups { + --fa: "\f7e0"; } -.fa-yoast:before { - content: "\f2b1"; } +.fa-pixiv { + --fa: "\e640"; } -.fa-cloudflare:before { - content: "\e07d"; } +.fa-wpexplorer { + --fa: "\f2de"; } -.fa-ups:before { - content: "\f7e0"; } +.fa-dyalog { + --fa: "\f399"; } -.fa-pixiv:before { - content: "\e640"; } +.fa-bity { + --fa: "\f37a"; } -.fa-wpexplorer:before { - content: "\f2de"; } +.fa-stackpath { + --fa: "\f842"; } -.fa-dyalog:before { - content: "\f399"; } +.fa-buysellads { + --fa: "\f20d"; } -.fa-bity:before { - content: "\f37a"; } +.fa-first-order { + --fa: "\f2b0"; } -.fa-stackpath:before { - content: "\f842"; } +.fa-modx { + --fa: "\f285"; } -.fa-buysellads:before { - content: "\f20d"; } +.fa-guilded { + --fa: "\e07e"; } -.fa-first-order:before { - content: "\f2b0"; } +.fa-vnv { + --fa: "\f40b"; } -.fa-modx:before { - content: "\f285"; } +.fa-square-js { + --fa: "\f3b9"; } -.fa-guilded:before { - content: "\e07e"; } +.fa-js-square { + --fa: "\f3b9"; } -.fa-vnv:before { - content: "\f40b"; } +.fa-microsoft { + --fa: "\f3ca"; } -.fa-square-js:before { - content: "\f3b9"; } +.fa-qq { + --fa: "\f1d6"; } -.fa-js-square:before { - content: "\f3b9"; } +.fa-orcid { + --fa: "\f8d2"; } -.fa-microsoft:before { - content: "\f3ca"; } +.fa-java { + --fa: "\f4e4"; } -.fa-qq:before { - content: "\f1d6"; } +.fa-invision { + --fa: "\f7b0"; } -.fa-orcid:before { - content: "\f8d2"; } +.fa-creative-commons-pd-alt { + --fa: "\f4ed"; } -.fa-java:before { - content: "\f4e4"; } +.fa-centercode { + --fa: "\f380"; } -.fa-invision:before { - content: "\f7b0"; } +.fa-glide-g { + --fa: "\f2a6"; } -.fa-creative-commons-pd-alt:before { - content: "\f4ed"; } +.fa-drupal { + --fa: "\f1a9"; } -.fa-centercode:before { - content: "\f380"; } +.fa-jxl { + --fa: "\e67b"; } -.fa-glide-g:before { - content: "\f2a6"; } +.fa-dart-lang { + --fa: "\e693"; } -.fa-drupal:before { - content: "\f1a9"; } +.fa-hire-a-helper { + --fa: "\f3b0"; } -.fa-jxl:before { - content: "\e67b"; } +.fa-creative-commons-by { + --fa: "\f4e7"; } -.fa-dart-lang:before { - content: "\e693"; } +.fa-unity { + --fa: "\e049"; } -.fa-hire-a-helper:before { - content: "\f3b0"; } +.fa-whmcs { + --fa: "\f40d"; } -.fa-creative-commons-by:before { - content: "\f4e7"; } +.fa-rocketchat { + --fa: "\f3e8"; } -.fa-unity:before { - content: "\e049"; } +.fa-vk { + --fa: "\f189"; } -.fa-whmcs:before { - content: "\f40d"; } +.fa-untappd { + --fa: "\f405"; } -.fa-rocketchat:before { - content: "\f3e8"; } +.fa-mailchimp { + --fa: "\f59e"; } -.fa-vk:before { - content: "\f189"; } +.fa-css3-alt { + --fa: "\f38b"; } -.fa-untappd:before { - content: "\f405"; } +.fa-square-reddit { + --fa: "\f1a2"; } -.fa-mailchimp:before { - content: "\f59e"; } +.fa-reddit-square { + --fa: "\f1a2"; } -.fa-css3-alt:before { - content: "\f38b"; } +.fa-vimeo-v { + --fa: "\f27d"; } -.fa-square-reddit:before { - content: "\f1a2"; } +.fa-contao { + --fa: "\f26d"; } -.fa-reddit-square:before { - content: "\f1a2"; } +.fa-square-font-awesome { + --fa: "\e5ad"; } -.fa-vimeo-v:before { - content: "\f27d"; } +.fa-deskpro { + --fa: "\f38f"; } -.fa-contao:before { - content: "\f26d"; } +.fa-brave { + --fa: "\e63c"; } -.fa-square-font-awesome:before { - content: "\e5ad"; } +.fa-sistrix { + --fa: "\f3ee"; } -.fa-deskpro:before { - content: "\f38f"; } +.fa-square-instagram { + --fa: "\e055"; } -.fa-brave:before { - content: "\e63c"; } +.fa-instagram-square { + --fa: "\e055"; } -.fa-sistrix:before { - content: "\f3ee"; } +.fa-battle-net { + --fa: "\f835"; } -.fa-square-instagram:before { - content: "\e055"; } +.fa-the-red-yeti { + --fa: "\f69d"; } -.fa-instagram-square:before { - content: "\e055"; } +.fa-square-hacker-news { + --fa: "\f3af"; } -.fa-battle-net:before { - content: "\f835"; } +.fa-hacker-news-square { + --fa: "\f3af"; } -.fa-the-red-yeti:before { - content: "\f69d"; } +.fa-edge { + --fa: "\f282"; } -.fa-square-hacker-news:before { - content: "\f3af"; } +.fa-threads { + --fa: "\e618"; } -.fa-hacker-news-square:before { - content: "\f3af"; } +.fa-napster { + --fa: "\f3d2"; } -.fa-edge:before { - content: "\f282"; } +.fa-square-snapchat { + --fa: "\f2ad"; } -.fa-threads:before { - content: "\e618"; } +.fa-snapchat-square { + --fa: "\f2ad"; } -.fa-napster:before { - content: "\f3d2"; } +.fa-google-plus-g { + --fa: "\f0d5"; } -.fa-square-snapchat:before { - content: "\f2ad"; } +.fa-artstation { + --fa: "\f77a"; } -.fa-snapchat-square:before { - content: "\f2ad"; } +.fa-markdown { + --fa: "\f60f"; } -.fa-google-plus-g:before { - content: "\f0d5"; } +.fa-sourcetree { + --fa: "\f7d3"; } -.fa-artstation:before { - content: "\f77a"; } +.fa-google-plus { + --fa: "\f2b3"; } -.fa-markdown:before { - content: "\f60f"; } +.fa-diaspora { + --fa: "\f791"; } -.fa-sourcetree:before { - content: "\f7d3"; } +.fa-foursquare { + --fa: "\f180"; } -.fa-google-plus:before { - content: "\f2b3"; } +.fa-stack-overflow { + --fa: "\f16c"; } -.fa-diaspora:before { - content: "\f791"; } +.fa-github-alt { + --fa: "\f113"; } -.fa-foursquare:before { - content: "\f180"; } +.fa-phoenix-squadron { + --fa: "\f511"; } -.fa-stack-overflow:before { - content: "\f16c"; } +.fa-pagelines { + --fa: "\f18c"; } -.fa-github-alt:before { - content: "\f113"; } +.fa-algolia { + --fa: "\f36c"; } -.fa-phoenix-squadron:before { - content: "\f511"; } +.fa-red-river { + --fa: "\f3e3"; } -.fa-pagelines:before { - content: "\f18c"; } +.fa-creative-commons-sa { + --fa: "\f4ef"; } -.fa-algolia:before { - content: "\f36c"; } +.fa-safari { + --fa: "\f267"; } -.fa-red-river:before { - content: "\f3e3"; } +.fa-google { + --fa: "\f1a0"; } -.fa-creative-commons-sa:before { - content: "\f4ef"; } +.fa-square-font-awesome-stroke { + --fa: "\f35c"; } -.fa-safari:before { - content: "\f267"; } +.fa-font-awesome-alt { + --fa: "\f35c"; } -.fa-google:before { - content: "\f1a0"; } +.fa-atlassian { + --fa: "\f77b"; } -.fa-square-font-awesome-stroke:before { - content: "\f35c"; } +.fa-linkedin-in { + --fa: "\f0e1"; } -.fa-font-awesome-alt:before { - content: "\f35c"; } +.fa-digital-ocean { + --fa: "\f391"; } -.fa-atlassian:before { - content: "\f77b"; } +.fa-nimblr { + --fa: "\f5a8"; } -.fa-linkedin-in:before { - content: "\f0e1"; } +.fa-chromecast { + --fa: "\f838"; } -.fa-digital-ocean:before { - content: "\f391"; } +.fa-evernote { + --fa: "\f839"; } -.fa-nimblr:before { - content: "\f5a8"; } +.fa-hacker-news { + --fa: "\f1d4"; } -.fa-chromecast:before { - content: "\f838"; } +.fa-creative-commons-sampling { + --fa: "\f4f0"; } -.fa-evernote:before { - content: "\f839"; } +.fa-adversal { + --fa: "\f36a"; } -.fa-hacker-news:before { - content: "\f1d4"; } +.fa-creative-commons { + --fa: "\f25e"; } -.fa-creative-commons-sampling:before { - content: "\f4f0"; } +.fa-watchman-monitoring { + --fa: "\e087"; } -.fa-adversal:before { - content: "\f36a"; } +.fa-fonticons { + --fa: "\f280"; } -.fa-creative-commons:before { - content: "\f25e"; } +.fa-weixin { + --fa: "\f1d7"; } -.fa-watchman-monitoring:before { - content: "\e087"; } +.fa-shirtsinbulk { + --fa: "\f214"; } -.fa-fonticons:before { - content: "\f280"; } +.fa-codepen { + --fa: "\f1cb"; } -.fa-weixin:before { - content: "\f1d7"; } +.fa-git-alt { + --fa: "\f841"; } -.fa-shirtsinbulk:before { - content: "\f214"; } +.fa-lyft { + --fa: "\f3c3"; } -.fa-codepen:before { - content: "\f1cb"; } +.fa-rev { + --fa: "\f5b2"; } -.fa-git-alt:before { - content: "\f841"; } +.fa-windows { + --fa: "\f17a"; } -.fa-lyft:before { - content: "\f3c3"; } +.fa-wizards-of-the-coast { + --fa: "\f730"; } -.fa-rev:before { - content: "\f5b2"; } +.fa-square-viadeo { + --fa: "\f2aa"; } -.fa-windows:before { - content: "\f17a"; } +.fa-viadeo-square { + --fa: "\f2aa"; } -.fa-wizards-of-the-coast:before { - content: "\f730"; } +.fa-meetup { + --fa: "\f2e0"; } -.fa-square-viadeo:before { - content: "\f2aa"; } +.fa-centos { + --fa: "\f789"; } -.fa-viadeo-square:before { - content: "\f2aa"; } +.fa-adn { + --fa: "\f170"; } -.fa-meetup:before { - content: "\f2e0"; } +.fa-cloudsmith { + --fa: "\f384"; } -.fa-centos:before { - content: "\f789"; } +.fa-opensuse { + --fa: "\e62b"; } -.fa-adn:before { - content: "\f170"; } +.fa-pied-piper-alt { + --fa: "\f1a8"; } -.fa-cloudsmith:before { - content: "\f384"; } +.fa-square-dribbble { + --fa: "\f397"; } -.fa-opensuse:before { - content: "\e62b"; } +.fa-dribbble-square { + --fa: "\f397"; } -.fa-pied-piper-alt:before { - content: "\f1a8"; } +.fa-codiepie { + --fa: "\f284"; } -.fa-square-dribbble:before { - content: "\f397"; } +.fa-node { + --fa: "\f419"; } -.fa-dribbble-square:before { - content: "\f397"; } +.fa-mix { + --fa: "\f3cb"; } -.fa-codiepie:before { - content: "\f284"; } +.fa-steam { + --fa: "\f1b6"; } -.fa-node:before { - content: "\f419"; } +.fa-cc-apple-pay { + --fa: "\f416"; } -.fa-mix:before { - content: "\f3cb"; } +.fa-scribd { + --fa: "\f28a"; } -.fa-steam:before { - content: "\f1b6"; } +.fa-debian { + --fa: "\e60b"; } -.fa-cc-apple-pay:before { - content: "\f416"; } +.fa-openid { + --fa: "\f19b"; } -.fa-scribd:before { - content: "\f28a"; } +.fa-instalod { + --fa: "\e081"; } -.fa-debian:before { - content: "\e60b"; } +.fa-files-pinwheel { + --fa: "\e69f"; } -.fa-openid:before { - content: "\f19b"; } +.fa-expeditedssl { + --fa: "\f23e"; } -.fa-instalod:before { - content: "\e081"; } +.fa-sellcast { + --fa: "\f2da"; } -.fa-expeditedssl:before { - content: "\f23e"; } +.fa-square-twitter { + --fa: "\f081"; } -.fa-sellcast:before { - content: "\f2da"; } +.fa-twitter-square { + --fa: "\f081"; } -.fa-square-twitter:before { - content: "\f081"; } +.fa-r-project { + --fa: "\f4f7"; } -.fa-twitter-square:before { - content: "\f081"; } +.fa-delicious { + --fa: "\f1a5"; } -.fa-r-project:before { - content: "\f4f7"; } +.fa-freebsd { + --fa: "\f3a4"; } -.fa-delicious:before { - content: "\f1a5"; } +.fa-vuejs { + --fa: "\f41f"; } -.fa-freebsd:before { - content: "\f3a4"; } +.fa-accusoft { + --fa: "\f369"; } -.fa-vuejs:before { - content: "\f41f"; } +.fa-ioxhost { + --fa: "\f208"; } -.fa-accusoft:before { - content: "\f369"; } +.fa-fonticons-fi { + --fa: "\f3a2"; } -.fa-ioxhost:before { - content: "\f208"; } +.fa-app-store { + --fa: "\f36f"; } -.fa-fonticons-fi:before { - content: "\f3a2"; } +.fa-cc-mastercard { + --fa: "\f1f1"; } -.fa-app-store:before { - content: "\f36f"; } +.fa-itunes-note { + --fa: "\f3b5"; } -.fa-cc-mastercard:before { - content: "\f1f1"; } +.fa-golang { + --fa: "\e40f"; } -.fa-itunes-note:before { - content: "\f3b5"; } +.fa-kickstarter { + --fa: "\f3bb"; } -.fa-golang:before { - content: "\e40f"; } +.fa-square-kickstarter { + --fa: "\f3bb"; } -.fa-kickstarter:before { - content: "\f3bb"; } +.fa-grav { + --fa: "\f2d6"; } -.fa-square-kickstarter:before { - content: "\f3bb"; } +.fa-weibo { + --fa: "\f18a"; } -.fa-grav:before { - content: "\f2d6"; } +.fa-uncharted { + --fa: "\e084"; } -.fa-weibo:before { - content: "\f18a"; } +.fa-firstdraft { + --fa: "\f3a1"; } -.fa-uncharted:before { - content: "\e084"; } +.fa-square-youtube { + --fa: "\f431"; } -.fa-firstdraft:before { - content: "\f3a1"; } +.fa-youtube-square { + --fa: "\f431"; } -.fa-square-youtube:before { - content: "\f431"; } +.fa-wikipedia-w { + --fa: "\f266"; } -.fa-youtube-square:before { - content: "\f431"; } +.fa-wpressr { + --fa: "\f3e4"; } -.fa-wikipedia-w:before { - content: "\f266"; } +.fa-rendact { + --fa: "\f3e4"; } -.fa-wpressr:before { - content: "\f3e4"; } +.fa-angellist { + --fa: "\f209"; } -.fa-rendact:before { - content: "\f3e4"; } +.fa-galactic-republic { + --fa: "\f50c"; } -.fa-angellist:before { - content: "\f209"; } +.fa-nfc-directional { + --fa: "\e530"; } -.fa-galactic-republic:before { - content: "\f50c"; } +.fa-skype { + --fa: "\f17e"; } -.fa-nfc-directional:before { - content: "\e530"; } +.fa-joget { + --fa: "\f3b7"; } -.fa-skype:before { - content: "\f17e"; } +.fa-fedora { + --fa: "\f798"; } -.fa-joget:before { - content: "\f3b7"; } +.fa-stripe-s { + --fa: "\f42a"; } -.fa-fedora:before { - content: "\f798"; } +.fa-meta { + --fa: "\e49b"; } -.fa-stripe-s:before { - content: "\f42a"; } +.fa-laravel { + --fa: "\f3bd"; } -.fa-meta:before { - content: "\e49b"; } +.fa-hotjar { + --fa: "\f3b1"; } -.fa-laravel:before { - content: "\f3bd"; } +.fa-bluetooth-b { + --fa: "\f294"; } -.fa-hotjar:before { - content: "\f3b1"; } +.fa-square-letterboxd { + --fa: "\e62e"; } -.fa-bluetooth-b:before { - content: "\f294"; } +.fa-sticker-mule { + --fa: "\f3f7"; } -.fa-square-letterboxd:before { - content: "\e62e"; } +.fa-creative-commons-zero { + --fa: "\f4f3"; } -.fa-sticker-mule:before { - content: "\f3f7"; } +.fa-hips { + --fa: "\f452"; } -.fa-creative-commons-zero:before { - content: "\f4f3"; } +.fa-css { + --fa: "\e6a2"; } -.fa-hips:before { - content: "\f452"; } +.fa-behance { + --fa: "\f1b4"; } -.fa-behance:before { - content: "\f1b4"; } +.fa-reddit { + --fa: "\f1a1"; } -.fa-reddit:before { - content: "\f1a1"; } +.fa-discord { + --fa: "\f392"; } -.fa-discord:before { - content: "\f392"; } +.fa-chrome { + --fa: "\f268"; } -.fa-chrome:before { - content: "\f268"; } +.fa-app-store-ios { + --fa: "\f370"; } -.fa-app-store-ios:before { - content: "\f370"; } +.fa-cc-discover { + --fa: "\f1f2"; } -.fa-cc-discover:before { - content: "\f1f2"; } +.fa-wpbeginner { + --fa: "\f297"; } -.fa-wpbeginner:before { - content: "\f297"; } +.fa-confluence { + --fa: "\f78d"; } -.fa-confluence:before { - content: "\f78d"; } +.fa-shoelace { + --fa: "\e60c"; } -.fa-shoelace:before { - content: "\e60c"; } +.fa-mdb { + --fa: "\f8ca"; } -.fa-mdb:before { - content: "\f8ca"; } +.fa-dochub { + --fa: "\f394"; } -.fa-dochub:before { - content: "\f394"; } +.fa-accessible-icon { + --fa: "\f368"; } -.fa-accessible-icon:before { - content: "\f368"; } +.fa-ebay { + --fa: "\f4f4"; } -.fa-ebay:before { - content: "\f4f4"; } +.fa-amazon { + --fa: "\f270"; } -.fa-amazon:before { - content: "\f270"; } +.fa-unsplash { + --fa: "\e07c"; } -.fa-unsplash:before { - content: "\e07c"; } +.fa-yarn { + --fa: "\f7e3"; } -.fa-yarn:before { - content: "\f7e3"; } +.fa-square-steam { + --fa: "\f1b7"; } -.fa-square-steam:before { - content: "\f1b7"; } +.fa-steam-square { + --fa: "\f1b7"; } -.fa-steam-square:before { - content: "\f1b7"; } +.fa-500px { + --fa: "\f26e"; } -.fa-500px:before { - content: "\f26e"; } +.fa-square-vimeo { + --fa: "\f194"; } -.fa-square-vimeo:before { - content: "\f194"; } +.fa-vimeo-square { + --fa: "\f194"; } -.fa-vimeo-square:before { - content: "\f194"; } +.fa-asymmetrik { + --fa: "\f372"; } -.fa-asymmetrik:before { - content: "\f372"; } +.fa-font-awesome { + --fa: "\f2b4"; } -.fa-font-awesome:before { - content: "\f2b4"; } +.fa-font-awesome-flag { + --fa: "\f2b4"; } -.fa-font-awesome-flag:before { - content: "\f2b4"; } +.fa-font-awesome-logo-full { + --fa: "\f2b4"; } -.fa-font-awesome-logo-full:before { - content: "\f2b4"; } +.fa-gratipay { + --fa: "\f184"; } -.fa-gratipay:before { - content: "\f184"; } +.fa-apple { + --fa: "\f179"; } -.fa-apple:before { - content: "\f179"; } +.fa-hive { + --fa: "\e07f"; } -.fa-hive:before { - content: "\e07f"; } +.fa-gitkraken { + --fa: "\f3a6"; } -.fa-gitkraken:before { - content: "\f3a6"; } +.fa-keybase { + --fa: "\f4f5"; } -.fa-keybase:before { - content: "\f4f5"; } +.fa-apple-pay { + --fa: "\f415"; } -.fa-apple-pay:before { - content: "\f415"; } +.fa-padlet { + --fa: "\e4a0"; } -.fa-padlet:before { - content: "\e4a0"; } +.fa-amazon-pay { + --fa: "\f42c"; } -.fa-amazon-pay:before { - content: "\f42c"; } +.fa-square-github { + --fa: "\f092"; } -.fa-square-github:before { - content: "\f092"; } +.fa-github-square { + --fa: "\f092"; } -.fa-github-square:before { - content: "\f092"; } +.fa-stumbleupon { + --fa: "\f1a4"; } -.fa-stumbleupon:before { - content: "\f1a4"; } +.fa-fedex { + --fa: "\f797"; } -.fa-fedex:before { - content: "\f797"; } +.fa-phoenix-framework { + --fa: "\f3dc"; } -.fa-phoenix-framework:before { - content: "\f3dc"; } +.fa-shopify { + --fa: "\e057"; } -.fa-shopify:before { - content: "\e057"; } +.fa-neos { + --fa: "\f612"; } -.fa-neos:before { - content: "\f612"; } +.fa-square-threads { + --fa: "\e619"; } -.fa-square-threads:before { - content: "\e619"; } +.fa-hackerrank { + --fa: "\f5f7"; } -.fa-hackerrank:before { - content: "\f5f7"; } +.fa-researchgate { + --fa: "\f4f8"; } -.fa-researchgate:before { - content: "\f4f8"; } +.fa-swift { + --fa: "\f8e1"; } -.fa-swift:before { - content: "\f8e1"; } +.fa-angular { + --fa: "\f420"; } -.fa-angular:before { - content: "\f420"; } +.fa-speakap { + --fa: "\f3f3"; } -.fa-speakap:before { - content: "\f3f3"; } +.fa-angrycreative { + --fa: "\f36e"; } -.fa-angrycreative:before { - content: "\f36e"; } +.fa-y-combinator { + --fa: "\f23b"; } -.fa-y-combinator:before { - content: "\f23b"; } +.fa-empire { + --fa: "\f1d1"; } -.fa-empire:before { - content: "\f1d1"; } +.fa-envira { + --fa: "\f299"; } -.fa-envira:before { - content: "\f299"; } +.fa-google-scholar { + --fa: "\e63b"; } -.fa-google-scholar:before { - content: "\e63b"; } +.fa-square-gitlab { + --fa: "\e5ae"; } -.fa-square-gitlab:before { - content: "\e5ae"; } +.fa-gitlab-square { + --fa: "\e5ae"; } -.fa-gitlab-square:before { - content: "\e5ae"; } +.fa-studiovinari { + --fa: "\f3f8"; } -.fa-studiovinari:before { - content: "\f3f8"; } +.fa-pied-piper { + --fa: "\f2ae"; } -.fa-pied-piper:before { - content: "\f2ae"; } +.fa-wordpress { + --fa: "\f19a"; } -.fa-wordpress:before { - content: "\f19a"; } +.fa-product-hunt { + --fa: "\f288"; } -.fa-product-hunt:before { - content: "\f288"; } +.fa-firefox { + --fa: "\f269"; } -.fa-firefox:before { - content: "\f269"; } +.fa-linode { + --fa: "\f2b8"; } -.fa-linode:before { - content: "\f2b8"; } +.fa-goodreads { + --fa: "\f3a8"; } -.fa-goodreads:before { - content: "\f3a8"; } +.fa-square-odnoklassniki { + --fa: "\f264"; } -.fa-square-odnoklassniki:before { - content: "\f264"; } +.fa-odnoklassniki-square { + --fa: "\f264"; } -.fa-odnoklassniki-square:before { - content: "\f264"; } +.fa-jsfiddle { + --fa: "\f1cc"; } -.fa-jsfiddle:before { - content: "\f1cc"; } +.fa-sith { + --fa: "\f512"; } -.fa-sith:before { - content: "\f512"; } +.fa-themeisle { + --fa: "\f2b2"; } -.fa-themeisle:before { - content: "\f2b2"; } +.fa-page4 { + --fa: "\f3d7"; } -.fa-page4:before { - content: "\f3d7"; } +.fa-hashnode { + --fa: "\e499"; } -.fa-hashnode:before { - content: "\e499"; } +.fa-react { + --fa: "\f41b"; } -.fa-react:before { - content: "\f41b"; } +.fa-cc-paypal { + --fa: "\f1f4"; } -.fa-cc-paypal:before { - content: "\f1f4"; } +.fa-squarespace { + --fa: "\f5be"; } -.fa-squarespace:before { - content: "\f5be"; } +.fa-cc-stripe { + --fa: "\f1f5"; } -.fa-cc-stripe:before { - content: "\f1f5"; } +.fa-creative-commons-share { + --fa: "\f4f2"; } -.fa-creative-commons-share:before { - content: "\f4f2"; } +.fa-bitcoin { + --fa: "\f379"; } -.fa-bitcoin:before { - content: "\f379"; } +.fa-keycdn { + --fa: "\f3ba"; } -.fa-keycdn:before { - content: "\f3ba"; } +.fa-opera { + --fa: "\f26a"; } -.fa-opera:before { - content: "\f26a"; } +.fa-itch-io { + --fa: "\f83a"; } -.fa-itch-io:before { - content: "\f83a"; } +.fa-umbraco { + --fa: "\f8e8"; } -.fa-umbraco:before { - content: "\f8e8"; } +.fa-galactic-senate { + --fa: "\f50d"; } -.fa-galactic-senate:before { - content: "\f50d"; } +.fa-ubuntu { + --fa: "\f7df"; } -.fa-ubuntu:before { - content: "\f7df"; } +.fa-draft2digital { + --fa: "\f396"; } -.fa-draft2digital:before { - content: "\f396"; } +.fa-stripe { + --fa: "\f429"; } -.fa-stripe:before { - content: "\f429"; } +.fa-houzz { + --fa: "\f27c"; } -.fa-houzz:before { - content: "\f27c"; } +.fa-gg { + --fa: "\f260"; } -.fa-gg:before { - content: "\f260"; } +.fa-dhl { + --fa: "\f790"; } -.fa-dhl:before { - content: "\f790"; } +.fa-square-pinterest { + --fa: "\f0d3"; } -.fa-square-pinterest:before { - content: "\f0d3"; } +.fa-pinterest-square { + --fa: "\f0d3"; } -.fa-pinterest-square:before { - content: "\f0d3"; } +.fa-xing { + --fa: "\f168"; } -.fa-xing:before { - content: "\f168"; } +.fa-blackberry { + --fa: "\f37b"; } -.fa-blackberry:before { - content: "\f37b"; } +.fa-creative-commons-pd { + --fa: "\f4ec"; } -.fa-creative-commons-pd:before { - content: "\f4ec"; } +.fa-playstation { + --fa: "\f3df"; } -.fa-playstation:before { - content: "\f3df"; } +.fa-quinscape { + --fa: "\f459"; } -.fa-quinscape:before { - content: "\f459"; } +.fa-less { + --fa: "\f41d"; } -.fa-less:before { - content: "\f41d"; } +.fa-blogger-b { + --fa: "\f37d"; } -.fa-blogger-b:before { - content: "\f37d"; } +.fa-opencart { + --fa: "\f23d"; } -.fa-opencart:before { - content: "\f23d"; } +.fa-vine { + --fa: "\f1ca"; } -.fa-vine:before { - content: "\f1ca"; } +.fa-signal-messenger { + --fa: "\e663"; } -.fa-signal-messenger:before { - content: "\e663"; } +.fa-paypal { + --fa: "\f1ed"; } -.fa-paypal:before { - content: "\f1ed"; } +.fa-gitlab { + --fa: "\f296"; } -.fa-gitlab:before { - content: "\f296"; } +.fa-typo3 { + --fa: "\f42b"; } -.fa-typo3:before { - content: "\f42b"; } +.fa-reddit-alien { + --fa: "\f281"; } -.fa-reddit-alien:before { - content: "\f281"; } +.fa-yahoo { + --fa: "\f19e"; } -.fa-yahoo:before { - content: "\f19e"; } +.fa-dailymotion { + --fa: "\e052"; } -.fa-dailymotion:before { - content: "\e052"; } +.fa-affiliatetheme { + --fa: "\f36b"; } -.fa-affiliatetheme:before { - content: "\f36b"; } +.fa-pied-piper-pp { + --fa: "\f1a7"; } -.fa-pied-piper-pp:before { - content: "\f1a7"; } +.fa-bootstrap { + --fa: "\f836"; } -.fa-bootstrap:before { - content: "\f836"; } +.fa-odnoklassniki { + --fa: "\f263"; } -.fa-odnoklassniki:before { - content: "\f263"; } +.fa-nfc-symbol { + --fa: "\e531"; } -.fa-nfc-symbol:before { - content: "\e531"; } +.fa-mintbit { + --fa: "\e62f"; } -.fa-mintbit:before { - content: "\e62f"; } +.fa-ethereum { + --fa: "\f42e"; } -.fa-ethereum:before { - content: "\f42e"; } +.fa-speaker-deck { + --fa: "\f83c"; } -.fa-speaker-deck:before { - content: "\f83c"; } +.fa-creative-commons-nc-eu { + --fa: "\f4e9"; } -.fa-creative-commons-nc-eu:before { - content: "\f4e9"; } +.fa-patreon { + --fa: "\f3d9"; } -.fa-patreon:before { - content: "\f3d9"; } +.fa-avianex { + --fa: "\f374"; } -.fa-avianex:before { - content: "\f374"; } +.fa-ello { + --fa: "\f5f1"; } -.fa-ello:before { - content: "\f5f1"; } +.fa-gofore { + --fa: "\f3a7"; } -.fa-gofore:before { - content: "\f3a7"; } +.fa-bimobject { + --fa: "\f378"; } -.fa-bimobject:before { - content: "\f378"; } +.fa-brave-reverse { + --fa: "\e63d"; } -.fa-brave-reverse:before { - content: "\e63d"; } +.fa-facebook-f { + --fa: "\f39e"; } -.fa-facebook-f:before { - content: "\f39e"; } +.fa-square-google-plus { + --fa: "\f0d4"; } -.fa-square-google-plus:before { - content: "\f0d4"; } +.fa-google-plus-square { + --fa: "\f0d4"; } -.fa-google-plus-square:before { - content: "\f0d4"; } +.fa-web-awesome { + --fa: "\e682"; } -.fa-web-awesome:before { - content: "\e682"; } +.fa-mandalorian { + --fa: "\f50f"; } -.fa-mandalorian:before { - content: "\f50f"; } +.fa-first-order-alt { + --fa: "\f50a"; } -.fa-first-order-alt:before { - content: "\f50a"; } +.fa-osi { + --fa: "\f41a"; } -.fa-osi:before { - content: "\f41a"; } +.fa-google-wallet { + --fa: "\f1ee"; } -.fa-google-wallet:before { - content: "\f1ee"; } +.fa-d-and-d-beyond { + --fa: "\f6ca"; } -.fa-d-and-d-beyond:before { - content: "\f6ca"; } +.fa-periscope { + --fa: "\f3da"; } -.fa-periscope:before { - content: "\f3da"; } +.fa-fulcrum { + --fa: "\f50b"; } -.fa-fulcrum:before { - content: "\f50b"; } +.fa-cloudscale { + --fa: "\f383"; } -.fa-cloudscale:before { - content: "\f383"; } +.fa-forumbee { + --fa: "\f211"; } -.fa-forumbee:before { - content: "\f211"; } +.fa-mizuni { + --fa: "\f3cc"; } -.fa-mizuni:before { - content: "\f3cc"; } +.fa-schlix { + --fa: "\f3ea"; } -.fa-schlix:before { - content: "\f3ea"; } +.fa-square-xing { + --fa: "\f169"; } -.fa-square-xing:before { - content: "\f169"; } +.fa-xing-square { + --fa: "\f169"; } -.fa-xing-square:before { - content: "\f169"; } +.fa-bandcamp { + --fa: "\f2d5"; } -.fa-bandcamp:before { - content: "\f2d5"; } +.fa-wpforms { + --fa: "\f298"; } -.fa-wpforms:before { - content: "\f298"; } +.fa-cloudversify { + --fa: "\f385"; } -.fa-cloudversify:before { - content: "\f385"; } +.fa-usps { + --fa: "\f7e1"; } -.fa-usps:before { - content: "\f7e1"; } +.fa-megaport { + --fa: "\f5a3"; } -.fa-megaport:before { - content: "\f5a3"; } +.fa-magento { + --fa: "\f3c4"; } -.fa-magento:before { - content: "\f3c4"; } +.fa-spotify { + --fa: "\f1bc"; } -.fa-spotify:before { - content: "\f1bc"; } +.fa-optin-monster { + --fa: "\f23c"; } -.fa-optin-monster:before { - content: "\f23c"; } +.fa-fly { + --fa: "\f417"; } -.fa-fly:before { - content: "\f417"; } +.fa-square-bluesky { + --fa: "\e6a3"; } -.fa-aviato:before { - content: "\f421"; } +.fa-aviato { + --fa: "\f421"; } -.fa-itunes:before { - content: "\f3b4"; } +.fa-itunes { + --fa: "\f3b4"; } -.fa-cuttlefish:before { - content: "\f38c"; } +.fa-cuttlefish { + --fa: "\f38c"; } -.fa-blogger:before { - content: "\f37c"; } +.fa-blogger { + --fa: "\f37c"; } -.fa-flickr:before { - content: "\f16e"; } +.fa-flickr { + --fa: "\f16e"; } -.fa-viber:before { - content: "\f409"; } +.fa-viber { + --fa: "\f409"; } -.fa-soundcloud:before { - content: "\f1be"; } +.fa-soundcloud { + --fa: "\f1be"; } -.fa-digg:before { - content: "\f1a6"; } +.fa-digg { + --fa: "\f1a6"; } -.fa-tencent-weibo:before { - content: "\f1d5"; } +.fa-tencent-weibo { + --fa: "\f1d5"; } -.fa-letterboxd:before { - content: "\e62d"; } +.fa-letterboxd { + --fa: "\e62d"; } -.fa-symfony:before { - content: "\f83d"; } +.fa-symfony { + --fa: "\f83d"; } -.fa-maxcdn:before { - content: "\f136"; } +.fa-maxcdn { + --fa: "\f136"; } -.fa-etsy:before { - content: "\f2d7"; } +.fa-etsy { + --fa: "\f2d7"; } -.fa-facebook-messenger:before { - content: "\f39f"; } +.fa-facebook-messenger { + --fa: "\f39f"; } -.fa-audible:before { - content: "\f373"; } +.fa-audible { + --fa: "\f373"; } -.fa-think-peaks:before { - content: "\f731"; } +.fa-think-peaks { + --fa: "\f731"; } -.fa-bilibili:before { - content: "\e3d9"; } +.fa-bilibili { + --fa: "\e3d9"; } -.fa-erlang:before { - content: "\f39d"; } +.fa-erlang { + --fa: "\f39d"; } -.fa-x-twitter:before { - content: "\e61b"; } +.fa-x-twitter { + --fa: "\e61b"; } -.fa-cotton-bureau:before { - content: "\f89e"; } +.fa-cotton-bureau { + --fa: "\f89e"; } -.fa-dashcube:before { - content: "\f210"; } +.fa-dashcube { + --fa: "\f210"; } -.fa-42-group:before { - content: "\e080"; } +.fa-42-group { + --fa: "\e080"; } -.fa-innosoft:before { - content: "\e080"; } +.fa-innosoft { + --fa: "\e080"; } -.fa-stack-exchange:before { - content: "\f18d"; } +.fa-stack-exchange { + --fa: "\f18d"; } -.fa-elementor:before { - content: "\f430"; } +.fa-elementor { + --fa: "\f430"; } -.fa-square-pied-piper:before { - content: "\e01e"; } +.fa-square-pied-piper { + --fa: "\e01e"; } -.fa-pied-piper-square:before { - content: "\e01e"; } +.fa-pied-piper-square { + --fa: "\e01e"; } -.fa-creative-commons-nd:before { - content: "\f4eb"; } +.fa-creative-commons-nd { + --fa: "\f4eb"; } -.fa-palfed:before { - content: "\f3d8"; } +.fa-palfed { + --fa: "\f3d8"; } -.fa-superpowers:before { - content: "\f2dd"; } +.fa-superpowers { + --fa: "\f2dd"; } -.fa-resolving:before { - content: "\f3e7"; } +.fa-resolving { + --fa: "\f3e7"; } -.fa-xbox:before { - content: "\f412"; } +.fa-xbox { + --fa: "\f412"; } -.fa-square-web-awesome-stroke:before { - content: "\e684"; } +.fa-square-web-awesome-stroke { + --fa: "\e684"; } -.fa-searchengin:before { - content: "\f3eb"; } +.fa-searchengin { + --fa: "\f3eb"; } -.fa-tiktok:before { - content: "\e07b"; } +.fa-tiktok { + --fa: "\e07b"; } -.fa-square-facebook:before { - content: "\f082"; } +.fa-square-facebook { + --fa: "\f082"; } -.fa-facebook-square:before { - content: "\f082"; } +.fa-facebook-square { + --fa: "\f082"; } -.fa-renren:before { - content: "\f18b"; } +.fa-renren { + --fa: "\f18b"; } -.fa-linux:before { - content: "\f17c"; } +.fa-linux { + --fa: "\f17c"; } -.fa-glide:before { - content: "\f2a5"; } +.fa-glide { + --fa: "\f2a5"; } -.fa-linkedin:before { - content: "\f08c"; } +.fa-linkedin { + --fa: "\f08c"; } -.fa-hubspot:before { - content: "\f3b2"; } +.fa-hubspot { + --fa: "\f3b2"; } -.fa-deploydog:before { - content: "\f38e"; } +.fa-deploydog { + --fa: "\f38e"; } -.fa-twitch:before { - content: "\f1e8"; } +.fa-twitch { + --fa: "\f1e8"; } -.fa-flutter:before { - content: "\e694"; } +.fa-flutter { + --fa: "\e694"; } -.fa-ravelry:before { - content: "\f2d9"; } +.fa-ravelry { + --fa: "\f2d9"; } -.fa-mixer:before { - content: "\e056"; } +.fa-mixer { + --fa: "\e056"; } -.fa-square-lastfm:before { - content: "\f203"; } +.fa-square-lastfm { + --fa: "\f203"; } -.fa-lastfm-square:before { - content: "\f203"; } +.fa-lastfm-square { + --fa: "\f203"; } -.fa-vimeo:before { - content: "\f40a"; } +.fa-vimeo { + --fa: "\f40a"; } -.fa-mendeley:before { - content: "\f7b3"; } +.fa-mendeley { + --fa: "\f7b3"; } -.fa-uniregistry:before { - content: "\f404"; } +.fa-uniregistry { + --fa: "\f404"; } -.fa-figma:before { - content: "\f799"; } +.fa-figma { + --fa: "\f799"; } -.fa-creative-commons-remix:before { - content: "\f4ee"; } +.fa-creative-commons-remix { + --fa: "\f4ee"; } -.fa-cc-amazon-pay:before { - content: "\f42d"; } +.fa-cc-amazon-pay { + --fa: "\f42d"; } -.fa-dropbox:before { - content: "\f16b"; } +.fa-dropbox { + --fa: "\f16b"; } -.fa-instagram:before { - content: "\f16d"; } +.fa-instagram { + --fa: "\f16d"; } -.fa-cmplid:before { - content: "\e360"; } +.fa-cmplid { + --fa: "\e360"; } -.fa-upwork:before { - content: "\e641"; } +.fa-upwork { + --fa: "\e641"; } -.fa-facebook:before { - content: "\f09a"; } +.fa-facebook { + --fa: "\f09a"; } -.fa-gripfire:before { - content: "\f3ac"; } +.fa-gripfire { + --fa: "\f3ac"; } -.fa-jedi-order:before { - content: "\f50e"; } +.fa-jedi-order { + --fa: "\f50e"; } -.fa-uikit:before { - content: "\f403"; } +.fa-uikit { + --fa: "\f403"; } -.fa-fort-awesome-alt:before { - content: "\f3a3"; } +.fa-fort-awesome-alt { + --fa: "\f3a3"; } -.fa-phabricator:before { - content: "\f3db"; } +.fa-phabricator { + --fa: "\f3db"; } -.fa-ussunnah:before { - content: "\f407"; } +.fa-ussunnah { + --fa: "\f407"; } -.fa-earlybirds:before { - content: "\f39a"; } +.fa-earlybirds { + --fa: "\f39a"; } -.fa-trade-federation:before { - content: "\f513"; } +.fa-trade-federation { + --fa: "\f513"; } -.fa-autoprefixer:before { - content: "\f41c"; } +.fa-autoprefixer { + --fa: "\f41c"; } -.fa-whatsapp:before { - content: "\f232"; } +.fa-whatsapp { + --fa: "\f232"; } -.fa-square-upwork:before { - content: "\e67c"; } +.fa-square-upwork { + --fa: "\e67c"; } -.fa-slideshare:before { - content: "\f1e7"; } +.fa-slideshare { + --fa: "\f1e7"; } -.fa-google-play:before { - content: "\f3ab"; } +.fa-google-play { + --fa: "\f3ab"; } -.fa-viadeo:before { - content: "\f2a9"; } +.fa-viadeo { + --fa: "\f2a9"; } -.fa-line:before { - content: "\f3c0"; } +.fa-line { + --fa: "\f3c0"; } -.fa-google-drive:before { - content: "\f3aa"; } +.fa-google-drive { + --fa: "\f3aa"; } -.fa-servicestack:before { - content: "\f3ec"; } +.fa-servicestack { + --fa: "\f3ec"; } -.fa-simplybuilt:before { - content: "\f215"; } +.fa-simplybuilt { + --fa: "\f215"; } -.fa-bitbucket:before { - content: "\f171"; } +.fa-bitbucket { + --fa: "\f171"; } -.fa-imdb:before { - content: "\f2d8"; } +.fa-imdb { + --fa: "\f2d8"; } -.fa-deezer:before { - content: "\e077"; } +.fa-deezer { + --fa: "\e077"; } -.fa-raspberry-pi:before { - content: "\f7bb"; } +.fa-raspberry-pi { + --fa: "\f7bb"; } -.fa-jira:before { - content: "\f7b1"; } +.fa-jira { + --fa: "\f7b1"; } -.fa-docker:before { - content: "\f395"; } +.fa-docker { + --fa: "\f395"; } -.fa-screenpal:before { - content: "\e570"; } +.fa-screenpal { + --fa: "\e570"; } -.fa-bluetooth:before { - content: "\f293"; } +.fa-bluetooth { + --fa: "\f293"; } -.fa-gitter:before { - content: "\f426"; } +.fa-gitter { + --fa: "\f426"; } -.fa-d-and-d:before { - content: "\f38d"; } +.fa-d-and-d { + --fa: "\f38d"; } -.fa-microblog:before { - content: "\e01a"; } +.fa-microblog { + --fa: "\e01a"; } -.fa-cc-diners-club:before { - content: "\f24c"; } +.fa-cc-diners-club { + --fa: "\f24c"; } -.fa-gg-circle:before { - content: "\f261"; } +.fa-gg-circle { + --fa: "\f261"; } -.fa-pied-piper-hat:before { - content: "\f4e5"; } +.fa-pied-piper-hat { + --fa: "\f4e5"; } -.fa-kickstarter-k:before { - content: "\f3bc"; } +.fa-kickstarter-k { + --fa: "\f3bc"; } -.fa-yandex:before { - content: "\f413"; } +.fa-yandex { + --fa: "\f413"; } -.fa-readme:before { - content: "\f4d5"; } +.fa-readme { + --fa: "\f4d5"; } -.fa-html5:before { - content: "\f13b"; } +.fa-html5 { + --fa: "\f13b"; } -.fa-sellsy:before { - content: "\f213"; } +.fa-sellsy { + --fa: "\f213"; } -.fa-square-web-awesome:before { - content: "\e683"; } +.fa-square-web-awesome { + --fa: "\e683"; } -.fa-sass:before { - content: "\f41e"; } +.fa-sass { + --fa: "\f41e"; } -.fa-wirsindhandwerk:before { - content: "\e2d0"; } +.fa-wirsindhandwerk { + --fa: "\e2d0"; } -.fa-wsh:before { - content: "\e2d0"; } +.fa-wsh { + --fa: "\e2d0"; } -.fa-buromobelexperte:before { - content: "\f37f"; } +.fa-buromobelexperte { + --fa: "\f37f"; } -.fa-salesforce:before { - content: "\f83b"; } +.fa-salesforce { + --fa: "\f83b"; } -.fa-octopus-deploy:before { - content: "\e082"; } +.fa-octopus-deploy { + --fa: "\e082"; } -.fa-medapps:before { - content: "\f3c6"; } +.fa-medapps { + --fa: "\f3c6"; } -.fa-ns8:before { - content: "\f3d5"; } +.fa-ns8 { + --fa: "\f3d5"; } -.fa-pinterest-p:before { - content: "\f231"; } +.fa-pinterest-p { + --fa: "\f231"; } -.fa-apper:before { - content: "\f371"; } +.fa-apper { + --fa: "\f371"; } -.fa-fort-awesome:before { - content: "\f286"; } +.fa-fort-awesome { + --fa: "\f286"; } -.fa-waze:before { - content: "\f83f"; } +.fa-waze { + --fa: "\f83f"; } -.fa-bluesky:before { - content: "\e671"; } +.fa-bluesky { + --fa: "\e671"; } -.fa-cc-jcb:before { - content: "\f24b"; } +.fa-cc-jcb { + --fa: "\f24b"; } -.fa-snapchat:before { - content: "\f2ab"; } +.fa-snapchat { + --fa: "\f2ab"; } -.fa-snapchat-ghost:before { - content: "\f2ab"; } +.fa-snapchat-ghost { + --fa: "\f2ab"; } -.fa-fantasy-flight-games:before { - content: "\f6dc"; } +.fa-fantasy-flight-games { + --fa: "\f6dc"; } -.fa-rust:before { - content: "\e07a"; } +.fa-rust { + --fa: "\e07a"; } -.fa-wix:before { - content: "\f5cf"; } +.fa-wix { + --fa: "\f5cf"; } -.fa-square-behance:before { - content: "\f1b5"; } +.fa-square-behance { + --fa: "\f1b5"; } -.fa-behance-square:before { - content: "\f1b5"; } +.fa-behance-square { + --fa: "\f1b5"; } -.fa-supple:before { - content: "\f3f9"; } +.fa-supple { + --fa: "\f3f9"; } -.fa-webflow:before { - content: "\e65c"; } +.fa-webflow { + --fa: "\e65c"; } -.fa-rebel:before { - content: "\f1d0"; } +.fa-rebel { + --fa: "\f1d0"; } -.fa-css3:before { - content: "\f13c"; } +.fa-css3 { + --fa: "\f13c"; } -.fa-staylinked:before { - content: "\f3f5"; } +.fa-staylinked { + --fa: "\f3f5"; } -.fa-kaggle:before { - content: "\f5fa"; } +.fa-kaggle { + --fa: "\f5fa"; } -.fa-space-awesome:before { - content: "\e5ac"; } +.fa-space-awesome { + --fa: "\e5ac"; } -.fa-deviantart:before { - content: "\f1bd"; } +.fa-deviantart { + --fa: "\f1bd"; } -.fa-cpanel:before { - content: "\f388"; } +.fa-cpanel { + --fa: "\f388"; } -.fa-goodreads-g:before { - content: "\f3a9"; } +.fa-goodreads-g { + --fa: "\f3a9"; } -.fa-square-git:before { - content: "\f1d2"; } +.fa-square-git { + --fa: "\f1d2"; } -.fa-git-square:before { - content: "\f1d2"; } +.fa-git-square { + --fa: "\f1d2"; } -.fa-square-tumblr:before { - content: "\f174"; } +.fa-square-tumblr { + --fa: "\f174"; } -.fa-tumblr-square:before { - content: "\f174"; } +.fa-tumblr-square { + --fa: "\f174"; } -.fa-trello:before { - content: "\f181"; } +.fa-trello { + --fa: "\f181"; } -.fa-creative-commons-nc-jp:before { - content: "\f4ea"; } +.fa-creative-commons-nc-jp { + --fa: "\f4ea"; } -.fa-get-pocket:before { - content: "\f265"; } +.fa-get-pocket { + --fa: "\f265"; } -.fa-perbyte:before { - content: "\e083"; } +.fa-perbyte { + --fa: "\e083"; } -.fa-grunt:before { - content: "\f3ad"; } +.fa-grunt { + --fa: "\f3ad"; } -.fa-weebly:before { - content: "\f5cc"; } +.fa-weebly { + --fa: "\f5cc"; } -.fa-connectdevelop:before { - content: "\f20e"; } +.fa-connectdevelop { + --fa: "\f20e"; } -.fa-leanpub:before { - content: "\f212"; } +.fa-leanpub { + --fa: "\f212"; } -.fa-black-tie:before { - content: "\f27e"; } +.fa-black-tie { + --fa: "\f27e"; } -.fa-themeco:before { - content: "\f5c6"; } +.fa-themeco { + --fa: "\f5c6"; } -.fa-python:before { - content: "\f3e2"; } +.fa-python { + --fa: "\f3e2"; } -.fa-android:before { - content: "\f17b"; } +.fa-android { + --fa: "\f17b"; } -.fa-bots:before { - content: "\e340"; } +.fa-bots { + --fa: "\e340"; } -.fa-free-code-camp:before { - content: "\f2c5"; } +.fa-free-code-camp { + --fa: "\f2c5"; } -.fa-hornbill:before { - content: "\f592"; } +.fa-hornbill { + --fa: "\f592"; } -.fa-js:before { - content: "\f3b8"; } +.fa-js { + --fa: "\f3b8"; } -.fa-ideal:before { - content: "\e013"; } +.fa-ideal { + --fa: "\e013"; } -.fa-git:before { - content: "\f1d3"; } +.fa-git { + --fa: "\f1d3"; } -.fa-dev:before { - content: "\f6cc"; } +.fa-dev { + --fa: "\f6cc"; } -.fa-sketch:before { - content: "\f7c6"; } +.fa-sketch { + --fa: "\f7c6"; } -.fa-yandex-international:before { - content: "\f414"; } +.fa-yandex-international { + --fa: "\f414"; } -.fa-cc-amex:before { - content: "\f1f3"; } +.fa-cc-amex { + --fa: "\f1f3"; } -.fa-uber:before { - content: "\f402"; } +.fa-uber { + --fa: "\f402"; } -.fa-github:before { - content: "\f09b"; } +.fa-github { + --fa: "\f09b"; } -.fa-php:before { - content: "\f457"; } +.fa-php { + --fa: "\f457"; } -.fa-alipay:before { - content: "\f642"; } +.fa-alipay { + --fa: "\f642"; } -.fa-youtube:before { - content: "\f167"; } +.fa-youtube { + --fa: "\f167"; } -.fa-skyatlas:before { - content: "\f216"; } +.fa-skyatlas { + --fa: "\f216"; } -.fa-firefox-browser:before { - content: "\e007"; } +.fa-firefox-browser { + --fa: "\e007"; } -.fa-replyd:before { - content: "\f3e6"; } +.fa-replyd { + --fa: "\f3e6"; } -.fa-suse:before { - content: "\f7d6"; } +.fa-suse { + --fa: "\f7d6"; } -.fa-jenkins:before { - content: "\f3b6"; } +.fa-jenkins { + --fa: "\f3b6"; } -.fa-twitter:before { - content: "\f099"; } +.fa-twitter { + --fa: "\f099"; } -.fa-rockrms:before { - content: "\f3e9"; } +.fa-rockrms { + --fa: "\f3e9"; } -.fa-pinterest:before { - content: "\f0d2"; } +.fa-pinterest { + --fa: "\f0d2"; } -.fa-buffer:before { - content: "\f837"; } +.fa-buffer { + --fa: "\f837"; } -.fa-npm:before { - content: "\f3d4"; } +.fa-npm { + --fa: "\f3d4"; } -.fa-yammer:before { - content: "\f840"; } +.fa-yammer { + --fa: "\f840"; } -.fa-btc:before { - content: "\f15a"; } +.fa-btc { + --fa: "\f15a"; } -.fa-dribbble:before { - content: "\f17d"; } +.fa-dribbble { + --fa: "\f17d"; } -.fa-stumbleupon-circle:before { - content: "\f1a3"; } +.fa-stumbleupon-circle { + --fa: "\f1a3"; } -.fa-internet-explorer:before { - content: "\f26b"; } +.fa-internet-explorer { + --fa: "\f26b"; } -.fa-stubber:before { - content: "\e5c7"; } +.fa-stubber { + --fa: "\e5c7"; } -.fa-telegram:before { - content: "\f2c6"; } +.fa-telegram { + --fa: "\f2c6"; } -.fa-telegram-plane:before { - content: "\f2c6"; } +.fa-telegram-plane { + --fa: "\f2c6"; } -.fa-old-republic:before { - content: "\f510"; } +.fa-old-republic { + --fa: "\f510"; } -.fa-odysee:before { - content: "\e5c6"; } +.fa-odysee { + --fa: "\e5c6"; } -.fa-square-whatsapp:before { - content: "\f40c"; } +.fa-square-whatsapp { + --fa: "\f40c"; } -.fa-whatsapp-square:before { - content: "\f40c"; } +.fa-whatsapp-square { + --fa: "\f40c"; } -.fa-node-js:before { - content: "\f3d3"; } +.fa-node-js { + --fa: "\f3d3"; } -.fa-edge-legacy:before { - content: "\e078"; } +.fa-edge-legacy { + --fa: "\e078"; } -.fa-slack:before { - content: "\f198"; } +.fa-slack { + --fa: "\f198"; } -.fa-slack-hash:before { - content: "\f198"; } +.fa-slack-hash { + --fa: "\f198"; } -.fa-medrt:before { - content: "\f3c8"; } +.fa-medrt { + --fa: "\f3c8"; } -.fa-usb:before { - content: "\f287"; } +.fa-usb { + --fa: "\f287"; } -.fa-tumblr:before { - content: "\f173"; } +.fa-tumblr { + --fa: "\f173"; } -.fa-vaadin:before { - content: "\f408"; } +.fa-vaadin { + --fa: "\f408"; } -.fa-quora:before { - content: "\f2c4"; } +.fa-quora { + --fa: "\f2c4"; } -.fa-square-x-twitter:before { - content: "\e61a"; } +.fa-square-x-twitter { + --fa: "\e61a"; } -.fa-reacteurope:before { - content: "\f75d"; } +.fa-reacteurope { + --fa: "\f75d"; } -.fa-medium:before { - content: "\f23a"; } +.fa-medium { + --fa: "\f23a"; } -.fa-medium-m:before { - content: "\f23a"; } +.fa-medium-m { + --fa: "\f23a"; } -.fa-amilia:before { - content: "\f36d"; } +.fa-amilia { + --fa: "\f36d"; } -.fa-mixcloud:before { - content: "\f289"; } +.fa-mixcloud { + --fa: "\f289"; } -.fa-flipboard:before { - content: "\f44d"; } +.fa-flipboard { + --fa: "\f44d"; } -.fa-viacoin:before { - content: "\f237"; } +.fa-viacoin { + --fa: "\f237"; } -.fa-critical-role:before { - content: "\f6c9"; } +.fa-critical-role { + --fa: "\f6c9"; } -.fa-sitrox:before { - content: "\e44a"; } +.fa-sitrox { + --fa: "\e44a"; } -.fa-discourse:before { - content: "\f393"; } +.fa-discourse { + --fa: "\f393"; } -.fa-joomla:before { - content: "\f1aa"; } +.fa-joomla { + --fa: "\f1aa"; } -.fa-mastodon:before { - content: "\f4f6"; } +.fa-mastodon { + --fa: "\f4f6"; } -.fa-airbnb:before { - content: "\f834"; } +.fa-airbnb { + --fa: "\f834"; } -.fa-wolf-pack-battalion:before { - content: "\f514"; } +.fa-wolf-pack-battalion { + --fa: "\f514"; } -.fa-buy-n-large:before { - content: "\f8a6"; } +.fa-buy-n-large { + --fa: "\f8a6"; } -.fa-gulp:before { - content: "\f3ae"; } +.fa-gulp { + --fa: "\f3ae"; } -.fa-creative-commons-sampling-plus:before { - content: "\f4f1"; } +.fa-creative-commons-sampling-plus { + --fa: "\f4f1"; } -.fa-strava:before { - content: "\f428"; } +.fa-strava { + --fa: "\f428"; } -.fa-ember:before { - content: "\f423"; } +.fa-ember { + --fa: "\f423"; } -.fa-canadian-maple-leaf:before { - content: "\f785"; } +.fa-canadian-maple-leaf { + --fa: "\f785"; } -.fa-teamspeak:before { - content: "\f4f9"; } +.fa-teamspeak { + --fa: "\f4f9"; } -.fa-pushed:before { - content: "\f3e1"; } +.fa-pushed { + --fa: "\f3e1"; } -.fa-wordpress-simple:before { - content: "\f411"; } +.fa-wordpress-simple { + --fa: "\f411"; } -.fa-nutritionix:before { - content: "\f3d6"; } +.fa-nutritionix { + --fa: "\f3d6"; } -.fa-wodu:before { - content: "\e088"; } +.fa-wodu { + --fa: "\e088"; } -.fa-google-pay:before { - content: "\e079"; } +.fa-google-pay { + --fa: "\e079"; } -.fa-intercom:before { - content: "\f7af"; } +.fa-intercom { + --fa: "\f7af"; } -.fa-zhihu:before { - content: "\f63f"; } +.fa-zhihu { + --fa: "\f63f"; } -.fa-korvue:before { - content: "\f42f"; } +.fa-korvue { + --fa: "\f42f"; } -.fa-pix:before { - content: "\e43a"; } +.fa-pix { + --fa: "\e43a"; } -.fa-steam-symbol:before { - content: "\f3f6"; } +.fa-steam-symbol { + --fa: "\f3f6"; } :root, :host { --fa-style-family-classic: 'Font Awesome 6 Free'; --fa-font-regular: normal 400 1em/1 'Font Awesome 6 Free'; } diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/css/v4-shims.css b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/css/v4-shims.css index 239be56..7ed4af7 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/css/v4-shims.css +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/css/v4-shims.css @@ -1,174 +1,174 @@ /*! - * Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2024 Fonticons, Inc. */ -.fa.fa-glass:before { - content: "\f000"; } +.fa.fa-glass { + --fa: "\f000"; } .fa.fa-envelope-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-envelope-o:before { - content: "\f0e0"; } +.fa.fa-envelope-o { + --fa: "\f0e0"; } .fa.fa-star-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-star-o:before { - content: "\f005"; } +.fa.fa-star-o { + --fa: "\f005"; } -.fa.fa-remove:before { - content: "\f00d"; } +.fa.fa-remove { + --fa: "\f00d"; } -.fa.fa-close:before { - content: "\f00d"; } +.fa.fa-close { + --fa: "\f00d"; } -.fa.fa-gear:before { - content: "\f013"; } +.fa.fa-gear { + --fa: "\f013"; } .fa.fa-trash-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-trash-o:before { - content: "\f2ed"; } +.fa.fa-trash-o { + --fa: "\f2ed"; } -.fa.fa-home:before { - content: "\f015"; } +.fa.fa-home { + --fa: "\f015"; } .fa.fa-file-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-o:before { - content: "\f15b"; } +.fa.fa-file-o { + --fa: "\f15b"; } .fa.fa-clock-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-clock-o:before { - content: "\f017"; } +.fa.fa-clock-o { + --fa: "\f017"; } .fa.fa-arrow-circle-o-down { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-arrow-circle-o-down:before { - content: "\f358"; } +.fa.fa-arrow-circle-o-down { + --fa: "\f358"; } .fa.fa-arrow-circle-o-up { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-arrow-circle-o-up:before { - content: "\f35b"; } +.fa.fa-arrow-circle-o-up { + --fa: "\f35b"; } .fa.fa-play-circle-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-play-circle-o:before { - content: "\f144"; } +.fa.fa-play-circle-o { + --fa: "\f144"; } -.fa.fa-repeat:before { - content: "\f01e"; } +.fa.fa-repeat { + --fa: "\f01e"; } -.fa.fa-rotate-right:before { - content: "\f01e"; } +.fa.fa-rotate-right { + --fa: "\f01e"; } -.fa.fa-refresh:before { - content: "\f021"; } +.fa.fa-refresh { + --fa: "\f021"; } .fa.fa-list-alt { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-list-alt:before { - content: "\f022"; } +.fa.fa-list-alt { + --fa: "\f022"; } -.fa.fa-dedent:before { - content: "\f03b"; } +.fa.fa-dedent { + --fa: "\f03b"; } -.fa.fa-video-camera:before { - content: "\f03d"; } +.fa.fa-video-camera { + --fa: "\f03d"; } .fa.fa-picture-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-picture-o:before { - content: "\f03e"; } +.fa.fa-picture-o { + --fa: "\f03e"; } .fa.fa-photo { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-photo:before { - content: "\f03e"; } +.fa.fa-photo { + --fa: "\f03e"; } .fa.fa-image { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-image:before { - content: "\f03e"; } +.fa.fa-image { + --fa: "\f03e"; } -.fa.fa-map-marker:before { - content: "\f3c5"; } +.fa.fa-map-marker { + --fa: "\f3c5"; } .fa.fa-pencil-square-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-pencil-square-o:before { - content: "\f044"; } +.fa.fa-pencil-square-o { + --fa: "\f044"; } .fa.fa-edit { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-edit:before { - content: "\f044"; } +.fa.fa-edit { + --fa: "\f044"; } -.fa.fa-share-square-o:before { - content: "\f14d"; } +.fa.fa-share-square-o { + --fa: "\f14d"; } .fa.fa-check-square-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-check-square-o:before { - content: "\f14a"; } +.fa.fa-check-square-o { + --fa: "\f14a"; } -.fa.fa-arrows:before { - content: "\f0b2"; } +.fa.fa-arrows { + --fa: "\f0b2"; } .fa.fa-times-circle-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-times-circle-o:before { - content: "\f057"; } +.fa.fa-times-circle-o { + --fa: "\f057"; } .fa.fa-check-circle-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-check-circle-o:before { - content: "\f058"; } +.fa.fa-check-circle-o { + --fa: "\f058"; } -.fa.fa-mail-forward:before { - content: "\f064"; } +.fa.fa-mail-forward { + --fa: "\f064"; } -.fa.fa-expand:before { - content: "\f424"; } +.fa.fa-expand { + --fa: "\f424"; } -.fa.fa-compress:before { - content: "\f422"; } +.fa.fa-compress { + --fa: "\f422"; } .fa.fa-eye { font-family: 'Font Awesome 6 Free'; @@ -178,108 +178,108 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-warning:before { - content: "\f071"; } +.fa.fa-warning { + --fa: "\f071"; } -.fa.fa-calendar:before { - content: "\f073"; } +.fa.fa-calendar { + --fa: "\f073"; } -.fa.fa-arrows-v:before { - content: "\f338"; } +.fa.fa-arrows-v { + --fa: "\f338"; } -.fa.fa-arrows-h:before { - content: "\f337"; } +.fa.fa-arrows-h { + --fa: "\f337"; } -.fa.fa-bar-chart:before { - content: "\e0e3"; } +.fa.fa-bar-chart { + --fa: "\e0e3"; } -.fa.fa-bar-chart-o:before { - content: "\e0e3"; } +.fa.fa-bar-chart-o { + --fa: "\e0e3"; } .fa.fa-twitter-square { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-twitter-square:before { - content: "\f081"; } +.fa.fa-twitter-square { + --fa: "\f081"; } .fa.fa-facebook-square { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-facebook-square:before { - content: "\f082"; } +.fa.fa-facebook-square { + --fa: "\f082"; } -.fa.fa-gears:before { - content: "\f085"; } +.fa.fa-gears { + --fa: "\f085"; } .fa.fa-thumbs-o-up { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-thumbs-o-up:before { - content: "\f164"; } +.fa.fa-thumbs-o-up { + --fa: "\f164"; } .fa.fa-thumbs-o-down { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-thumbs-o-down:before { - content: "\f165"; } +.fa.fa-thumbs-o-down { + --fa: "\f165"; } .fa.fa-heart-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-heart-o:before { - content: "\f004"; } +.fa.fa-heart-o { + --fa: "\f004"; } -.fa.fa-sign-out:before { - content: "\f2f5"; } +.fa.fa-sign-out { + --fa: "\f2f5"; } .fa.fa-linkedin-square { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-linkedin-square:before { - content: "\f08c"; } +.fa.fa-linkedin-square { + --fa: "\f08c"; } -.fa.fa-thumb-tack:before { - content: "\f08d"; } +.fa.fa-thumb-tack { + --fa: "\f08d"; } -.fa.fa-external-link:before { - content: "\f35d"; } +.fa.fa-external-link { + --fa: "\f35d"; } -.fa.fa-sign-in:before { - content: "\f2f6"; } +.fa.fa-sign-in { + --fa: "\f2f6"; } .fa.fa-github-square { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-github-square:before { - content: "\f092"; } +.fa.fa-github-square { + --fa: "\f092"; } .fa.fa-lemon-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-lemon-o:before { - content: "\f094"; } +.fa.fa-lemon-o { + --fa: "\f094"; } .fa.fa-square-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-square-o:before { - content: "\f0c8"; } +.fa.fa-square-o { + --fa: "\f0c8"; } .fa.fa-bookmark-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-bookmark-o:before { - content: "\f02e"; } +.fa.fa-bookmark-o { + --fa: "\f02e"; } .fa.fa-twitter { font-family: 'Font Awesome 6 Brands'; @@ -289,15 +289,15 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-facebook:before { - content: "\f39e"; } +.fa.fa-facebook { + --fa: "\f39e"; } .fa.fa-facebook-f { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-facebook-f:before { - content: "\f39e"; } +.fa.fa-facebook-f { + --fa: "\f39e"; } .fa.fa-github { font-family: 'Font Awesome 6 Brands'; @@ -307,91 +307,91 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-feed:before { - content: "\f09e"; } +.fa.fa-feed { + --fa: "\f09e"; } .fa.fa-hdd-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hdd-o:before { - content: "\f0a0"; } +.fa.fa-hdd-o { + --fa: "\f0a0"; } .fa.fa-hand-o-right { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hand-o-right:before { - content: "\f0a4"; } +.fa.fa-hand-o-right { + --fa: "\f0a4"; } .fa.fa-hand-o-left { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hand-o-left:before { - content: "\f0a5"; } +.fa.fa-hand-o-left { + --fa: "\f0a5"; } .fa.fa-hand-o-up { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hand-o-up:before { - content: "\f0a6"; } +.fa.fa-hand-o-up { + --fa: "\f0a6"; } .fa.fa-hand-o-down { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hand-o-down:before { - content: "\f0a7"; } +.fa.fa-hand-o-down { + --fa: "\f0a7"; } -.fa.fa-globe:before { - content: "\f57d"; } +.fa.fa-globe { + --fa: "\f57d"; } -.fa.fa-tasks:before { - content: "\f828"; } +.fa.fa-tasks { + --fa: "\f828"; } -.fa.fa-arrows-alt:before { - content: "\f31e"; } +.fa.fa-arrows-alt { + --fa: "\f31e"; } -.fa.fa-group:before { - content: "\f0c0"; } +.fa.fa-group { + --fa: "\f0c0"; } -.fa.fa-chain:before { - content: "\f0c1"; } +.fa.fa-chain { + --fa: "\f0c1"; } -.fa.fa-cut:before { - content: "\f0c4"; } +.fa.fa-cut { + --fa: "\f0c4"; } .fa.fa-files-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-files-o:before { - content: "\f0c5"; } +.fa.fa-files-o { + --fa: "\f0c5"; } .fa.fa-floppy-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-floppy-o:before { - content: "\f0c7"; } +.fa.fa-floppy-o { + --fa: "\f0c7"; } .fa.fa-save { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-save:before { - content: "\f0c7"; } +.fa.fa-save { + --fa: "\f0c7"; } -.fa.fa-navicon:before { - content: "\f0c9"; } +.fa.fa-navicon { + --fa: "\f0c9"; } -.fa.fa-reorder:before { - content: "\f0c9"; } +.fa.fa-reorder { + --fa: "\f0c9"; } -.fa.fa-magic:before { - content: "\e2ca"; } +.fa.fa-magic { + --fa: "\e2ca"; } .fa.fa-pinterest { font-family: 'Font Awesome 6 Brands'; @@ -401,139 +401,139 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-pinterest-square:before { - content: "\f0d3"; } +.fa.fa-pinterest-square { + --fa: "\f0d3"; } .fa.fa-google-plus-square { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-google-plus-square:before { - content: "\f0d4"; } +.fa.fa-google-plus-square { + --fa: "\f0d4"; } .fa.fa-google-plus { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-google-plus:before { - content: "\f0d5"; } +.fa.fa-google-plus { + --fa: "\f0d5"; } -.fa.fa-money:before { - content: "\f3d1"; } +.fa.fa-money { + --fa: "\f3d1"; } -.fa.fa-unsorted:before { - content: "\f0dc"; } +.fa.fa-unsorted { + --fa: "\f0dc"; } -.fa.fa-sort-desc:before { - content: "\f0dd"; } +.fa.fa-sort-desc { + --fa: "\f0dd"; } -.fa.fa-sort-asc:before { - content: "\f0de"; } +.fa.fa-sort-asc { + --fa: "\f0de"; } .fa.fa-linkedin { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-linkedin:before { - content: "\f0e1"; } +.fa.fa-linkedin { + --fa: "\f0e1"; } -.fa.fa-rotate-left:before { - content: "\f0e2"; } +.fa.fa-rotate-left { + --fa: "\f0e2"; } -.fa.fa-legal:before { - content: "\f0e3"; } +.fa.fa-legal { + --fa: "\f0e3"; } -.fa.fa-tachometer:before { - content: "\f625"; } +.fa.fa-tachometer { + --fa: "\f625"; } -.fa.fa-dashboard:before { - content: "\f625"; } +.fa.fa-dashboard { + --fa: "\f625"; } .fa.fa-comment-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-comment-o:before { - content: "\f075"; } +.fa.fa-comment-o { + --fa: "\f075"; } .fa.fa-comments-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-comments-o:before { - content: "\f086"; } +.fa.fa-comments-o { + --fa: "\f086"; } -.fa.fa-flash:before { - content: "\f0e7"; } +.fa.fa-flash { + --fa: "\f0e7"; } -.fa.fa-clipboard:before { - content: "\f0ea"; } +.fa.fa-clipboard { + --fa: "\f0ea"; } .fa.fa-lightbulb-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-lightbulb-o:before { - content: "\f0eb"; } +.fa.fa-lightbulb-o { + --fa: "\f0eb"; } -.fa.fa-exchange:before { - content: "\f362"; } +.fa.fa-exchange { + --fa: "\f362"; } -.fa.fa-cloud-download:before { - content: "\f0ed"; } +.fa.fa-cloud-download { + --fa: "\f0ed"; } -.fa.fa-cloud-upload:before { - content: "\f0ee"; } +.fa.fa-cloud-upload { + --fa: "\f0ee"; } .fa.fa-bell-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-bell-o:before { - content: "\f0f3"; } +.fa.fa-bell-o { + --fa: "\f0f3"; } -.fa.fa-cutlery:before { - content: "\f2e7"; } +.fa.fa-cutlery { + --fa: "\f2e7"; } .fa.fa-file-text-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-text-o:before { - content: "\f15c"; } +.fa.fa-file-text-o { + --fa: "\f15c"; } .fa.fa-building-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-building-o:before { - content: "\f1ad"; } +.fa.fa-building-o { + --fa: "\f1ad"; } .fa.fa-hospital-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hospital-o:before { - content: "\f0f8"; } +.fa.fa-hospital-o { + --fa: "\f0f8"; } -.fa.fa-tablet:before { - content: "\f3fa"; } +.fa.fa-tablet { + --fa: "\f3fa"; } -.fa.fa-mobile:before { - content: "\f3cd"; } +.fa.fa-mobile { + --fa: "\f3cd"; } -.fa.fa-mobile-phone:before { - content: "\f3cd"; } +.fa.fa-mobile-phone { + --fa: "\f3cd"; } .fa.fa-circle-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-circle-o:before { - content: "\f111"; } +.fa.fa-circle-o { + --fa: "\f111"; } -.fa.fa-mail-reply:before { - content: "\f3e5"; } +.fa.fa-mail-reply { + --fa: "\f3e5"; } .fa.fa-github-alt { font-family: 'Font Awesome 6 Brands'; @@ -543,90 +543,90 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-folder-o:before { - content: "\f07b"; } +.fa.fa-folder-o { + --fa: "\f07b"; } .fa.fa-folder-open-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-folder-open-o:before { - content: "\f07c"; } +.fa.fa-folder-open-o { + --fa: "\f07c"; } .fa.fa-smile-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-smile-o:before { - content: "\f118"; } +.fa.fa-smile-o { + --fa: "\f118"; } .fa.fa-frown-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-frown-o:before { - content: "\f119"; } +.fa.fa-frown-o { + --fa: "\f119"; } .fa.fa-meh-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-meh-o:before { - content: "\f11a"; } +.fa.fa-meh-o { + --fa: "\f11a"; } .fa.fa-keyboard-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-keyboard-o:before { - content: "\f11c"; } +.fa.fa-keyboard-o { + --fa: "\f11c"; } .fa.fa-flag-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-flag-o:before { - content: "\f024"; } +.fa.fa-flag-o { + --fa: "\f024"; } -.fa.fa-mail-reply-all:before { - content: "\f122"; } +.fa.fa-mail-reply-all { + --fa: "\f122"; } .fa.fa-star-half-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-star-half-o:before { - content: "\f5c0"; } +.fa.fa-star-half-o { + --fa: "\f5c0"; } .fa.fa-star-half-empty { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-star-half-empty:before { - content: "\f5c0"; } +.fa.fa-star-half-empty { + --fa: "\f5c0"; } .fa.fa-star-half-full { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-star-half-full:before { - content: "\f5c0"; } +.fa.fa-star-half-full { + --fa: "\f5c0"; } -.fa.fa-code-fork:before { - content: "\f126"; } +.fa.fa-code-fork { + --fa: "\f126"; } -.fa.fa-chain-broken:before { - content: "\f127"; } +.fa.fa-chain-broken { + --fa: "\f127"; } -.fa.fa-unlink:before { - content: "\f127"; } +.fa.fa-unlink { + --fa: "\f127"; } .fa.fa-calendar-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-calendar-o:before { - content: "\f133"; } +.fa.fa-calendar-o { + --fa: "\f133"; } .fa.fa-maxcdn { font-family: 'Font Awesome 6 Brands'; @@ -640,27 +640,27 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-unlock-alt:before { - content: "\f09c"; } +.fa.fa-unlock-alt { + --fa: "\f09c"; } .fa.fa-minus-square-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-minus-square-o:before { - content: "\f146"; } +.fa.fa-minus-square-o { + --fa: "\f146"; } -.fa.fa-level-up:before { - content: "\f3bf"; } +.fa.fa-level-up { + --fa: "\f3bf"; } -.fa.fa-level-down:before { - content: "\f3be"; } +.fa.fa-level-down { + --fa: "\f3be"; } -.fa.fa-pencil-square:before { - content: "\f14b"; } +.fa.fa-pencil-square { + --fa: "\f14b"; } -.fa.fa-external-link-square:before { - content: "\f360"; } +.fa.fa-external-link-square { + --fa: "\f360"; } .fa.fa-compass { font-family: 'Font Awesome 6 Free'; @@ -670,91 +670,91 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-caret-square-o-down:before { - content: "\f150"; } +.fa.fa-caret-square-o-down { + --fa: "\f150"; } .fa.fa-toggle-down { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-toggle-down:before { - content: "\f150"; } +.fa.fa-toggle-down { + --fa: "\f150"; } .fa.fa-caret-square-o-up { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-caret-square-o-up:before { - content: "\f151"; } +.fa.fa-caret-square-o-up { + --fa: "\f151"; } .fa.fa-toggle-up { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-toggle-up:before { - content: "\f151"; } +.fa.fa-toggle-up { + --fa: "\f151"; } .fa.fa-caret-square-o-right { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-caret-square-o-right:before { - content: "\f152"; } +.fa.fa-caret-square-o-right { + --fa: "\f152"; } .fa.fa-toggle-right { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-toggle-right:before { - content: "\f152"; } +.fa.fa-toggle-right { + --fa: "\f152"; } -.fa.fa-eur:before { - content: "\f153"; } +.fa.fa-eur { + --fa: "\f153"; } -.fa.fa-euro:before { - content: "\f153"; } +.fa.fa-euro { + --fa: "\f153"; } -.fa.fa-gbp:before { - content: "\f154"; } +.fa.fa-gbp { + --fa: "\f154"; } -.fa.fa-usd:before { - content: "\24"; } +.fa.fa-usd { + --fa: "\24"; } -.fa.fa-dollar:before { - content: "\24"; } +.fa.fa-dollar { + --fa: "\24"; } -.fa.fa-inr:before { - content: "\e1bc"; } +.fa.fa-inr { + --fa: "\e1bc"; } -.fa.fa-rupee:before { - content: "\e1bc"; } +.fa.fa-rupee { + --fa: "\e1bc"; } -.fa.fa-jpy:before { - content: "\f157"; } +.fa.fa-jpy { + --fa: "\f157"; } -.fa.fa-cny:before { - content: "\f157"; } +.fa.fa-cny { + --fa: "\f157"; } -.fa.fa-rmb:before { - content: "\f157"; } +.fa.fa-rmb { + --fa: "\f157"; } -.fa.fa-yen:before { - content: "\f157"; } +.fa.fa-yen { + --fa: "\f157"; } -.fa.fa-rub:before { - content: "\f158"; } +.fa.fa-rub { + --fa: "\f158"; } -.fa.fa-ruble:before { - content: "\f158"; } +.fa.fa-ruble { + --fa: "\f158"; } -.fa.fa-rouble:before { - content: "\f158"; } +.fa.fa-rouble { + --fa: "\f158"; } -.fa.fa-krw:before { - content: "\f159"; } +.fa.fa-krw { + --fa: "\f159"; } -.fa.fa-won:before { - content: "\f159"; } +.fa.fa-won { + --fa: "\f159"; } .fa.fa-btc { font-family: 'Font Awesome 6 Brands'; @@ -764,36 +764,36 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-bitcoin:before { - content: "\f15a"; } +.fa.fa-bitcoin { + --fa: "\f15a"; } -.fa.fa-file-text:before { - content: "\f15c"; } +.fa.fa-file-text { + --fa: "\f15c"; } -.fa.fa-sort-alpha-asc:before { - content: "\f15d"; } +.fa.fa-sort-alpha-asc { + --fa: "\f15d"; } -.fa.fa-sort-alpha-desc:before { - content: "\f881"; } +.fa.fa-sort-alpha-desc { + --fa: "\f881"; } -.fa.fa-sort-amount-asc:before { - content: "\f884"; } +.fa.fa-sort-amount-asc { + --fa: "\f884"; } -.fa.fa-sort-amount-desc:before { - content: "\f160"; } +.fa.fa-sort-amount-desc { + --fa: "\f160"; } -.fa.fa-sort-numeric-asc:before { - content: "\f162"; } +.fa.fa-sort-numeric-asc { + --fa: "\f162"; } -.fa.fa-sort-numeric-desc:before { - content: "\f886"; } +.fa.fa-sort-numeric-desc { + --fa: "\f886"; } .fa.fa-youtube-square { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-youtube-square:before { - content: "\f431"; } +.fa.fa-youtube-square { + --fa: "\f431"; } .fa.fa-youtube { font-family: 'Font Awesome 6 Brands'; @@ -807,15 +807,15 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-xing-square:before { - content: "\f169"; } +.fa.fa-xing-square { + --fa: "\f169"; } .fa.fa-youtube-play { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-youtube-play:before { - content: "\f167"; } +.fa.fa-youtube-play { + --fa: "\f167"; } .fa.fa-dropbox { font-family: 'Font Awesome 6 Brands'; @@ -845,8 +845,8 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-bitbucket-square:before { - content: "\f171"; } +.fa.fa-bitbucket-square { + --fa: "\f171"; } .fa.fa-tumblr { font-family: 'Font Awesome 6 Brands'; @@ -856,20 +856,20 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-tumblr-square:before { - content: "\f174"; } +.fa.fa-tumblr-square { + --fa: "\f174"; } -.fa.fa-long-arrow-down:before { - content: "\f309"; } +.fa.fa-long-arrow-down { + --fa: "\f309"; } -.fa.fa-long-arrow-up:before { - content: "\f30c"; } +.fa.fa-long-arrow-up { + --fa: "\f30c"; } -.fa.fa-long-arrow-left:before { - content: "\f30a"; } +.fa.fa-long-arrow-left { + --fa: "\f30a"; } -.fa.fa-long-arrow-right:before { - content: "\f30b"; } +.fa.fa-long-arrow-right { + --fa: "\f30b"; } .fa.fa-apple { font-family: 'Font Awesome 6 Brands'; @@ -911,22 +911,22 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-gittip:before { - content: "\f184"; } +.fa.fa-gittip { + --fa: "\f184"; } .fa.fa-sun-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-sun-o:before { - content: "\f185"; } +.fa.fa-sun-o { + --fa: "\f185"; } .fa.fa-moon-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-moon-o:before { - content: "\f186"; } +.fa.fa-moon-o { + --fa: "\f186"; } .fa.fa-vk { font-family: 'Font Awesome 6 Brands'; @@ -952,56 +952,56 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-arrow-circle-o-right:before { - content: "\f35a"; } +.fa.fa-arrow-circle-o-right { + --fa: "\f35a"; } .fa.fa-arrow-circle-o-left { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-arrow-circle-o-left:before { - content: "\f359"; } +.fa.fa-arrow-circle-o-left { + --fa: "\f359"; } .fa.fa-caret-square-o-left { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-caret-square-o-left:before { - content: "\f191"; } +.fa.fa-caret-square-o-left { + --fa: "\f191"; } .fa.fa-toggle-left { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-toggle-left:before { - content: "\f191"; } +.fa.fa-toggle-left { + --fa: "\f191"; } .fa.fa-dot-circle-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-dot-circle-o:before { - content: "\f192"; } +.fa.fa-dot-circle-o { + --fa: "\f192"; } .fa.fa-vimeo-square { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-vimeo-square:before { - content: "\f194"; } +.fa.fa-vimeo-square { + --fa: "\f194"; } -.fa.fa-try:before { - content: "\e2bb"; } +.fa.fa-try { + --fa: "\e2bb"; } -.fa.fa-turkish-lira:before { - content: "\e2bb"; } +.fa.fa-turkish-lira { + --fa: "\e2bb"; } .fa.fa-plus-square-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-plus-square-o:before { - content: "\f0fe"; } +.fa.fa-plus-square-o { + --fa: "\f0fe"; } .fa.fa-slack { font-family: 'Font Awesome 6 Brands'; @@ -1015,14 +1015,14 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-institution:before { - content: "\f19c"; } +.fa.fa-institution { + --fa: "\f19c"; } -.fa.fa-bank:before { - content: "\f19c"; } +.fa.fa-bank { + --fa: "\f19c"; } -.fa.fa-mortar-board:before { - content: "\f19d"; } +.fa.fa-mortar-board { + --fa: "\f19d"; } .fa.fa-yahoo { font-family: 'Font Awesome 6 Brands'; @@ -1040,8 +1040,8 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-reddit-square:before { - content: "\f1a2"; } +.fa.fa-reddit-square { + --fa: "\f1a2"; } .fa.fa-stumbleupon-circle { font-family: 'Font Awesome 6 Brands'; @@ -1083,8 +1083,8 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-behance-square:before { - content: "\f1b5"; } +.fa.fa-behance-square { + --fa: "\f1b5"; } .fa.fa-steam { font-family: 'Font Awesome 6 Brands'; @@ -1094,14 +1094,14 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-steam-square:before { - content: "\f1b7"; } +.fa.fa-steam-square { + --fa: "\f1b7"; } -.fa.fa-automobile:before { - content: "\f1b9"; } +.fa.fa-automobile { + --fa: "\f1b9"; } -.fa.fa-cab:before { - content: "\f1ba"; } +.fa.fa-cab { + --fa: "\f1ba"; } .fa.fa-spotify { font-family: 'Font Awesome 6 Brands'; @@ -1119,99 +1119,99 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-pdf-o:before { - content: "\f1c1"; } +.fa.fa-file-pdf-o { + --fa: "\f1c1"; } .fa.fa-file-word-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-word-o:before { - content: "\f1c2"; } +.fa.fa-file-word-o { + --fa: "\f1c2"; } .fa.fa-file-excel-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-excel-o:before { - content: "\f1c3"; } +.fa.fa-file-excel-o { + --fa: "\f1c3"; } .fa.fa-file-powerpoint-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-powerpoint-o:before { - content: "\f1c4"; } +.fa.fa-file-powerpoint-o { + --fa: "\f1c4"; } .fa.fa-file-image-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-image-o:before { - content: "\f1c5"; } +.fa.fa-file-image-o { + --fa: "\f1c5"; } .fa.fa-file-photo-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-photo-o:before { - content: "\f1c5"; } +.fa.fa-file-photo-o { + --fa: "\f1c5"; } .fa.fa-file-picture-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-picture-o:before { - content: "\f1c5"; } +.fa.fa-file-picture-o { + --fa: "\f1c5"; } .fa.fa-file-archive-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-archive-o:before { - content: "\f1c6"; } +.fa.fa-file-archive-o { + --fa: "\f1c6"; } .fa.fa-file-zip-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-zip-o:before { - content: "\f1c6"; } +.fa.fa-file-zip-o { + --fa: "\f1c6"; } .fa.fa-file-audio-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-audio-o:before { - content: "\f1c7"; } +.fa.fa-file-audio-o { + --fa: "\f1c7"; } .fa.fa-file-sound-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-sound-o:before { - content: "\f1c7"; } +.fa.fa-file-sound-o { + --fa: "\f1c7"; } .fa.fa-file-video-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-video-o:before { - content: "\f1c8"; } +.fa.fa-file-video-o { + --fa: "\f1c8"; } .fa.fa-file-movie-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-movie-o:before { - content: "\f1c8"; } +.fa.fa-file-movie-o { + --fa: "\f1c8"; } .fa.fa-file-code-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-file-code-o:before { - content: "\f1c9"; } +.fa.fa-file-code-o { + --fa: "\f1c9"; } .fa.fa-vine { font-family: 'Font Awesome 6 Brands'; @@ -1225,20 +1225,20 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-life-bouy:before { - content: "\f1cd"; } +.fa.fa-life-bouy { + --fa: "\f1cd"; } -.fa.fa-life-buoy:before { - content: "\f1cd"; } +.fa.fa-life-buoy { + --fa: "\f1cd"; } -.fa.fa-life-saver:before { - content: "\f1cd"; } +.fa.fa-life-saver { + --fa: "\f1cd"; } -.fa.fa-support:before { - content: "\f1cd"; } +.fa.fa-support { + --fa: "\f1cd"; } -.fa.fa-circle-o-notch:before { - content: "\f1ce"; } +.fa.fa-circle-o-notch { + --fa: "\f1ce"; } .fa.fa-rebel { font-family: 'Font Awesome 6 Brands'; @@ -1248,15 +1248,15 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-ra:before { - content: "\f1d0"; } +.fa.fa-ra { + --fa: "\f1d0"; } .fa.fa-resistance { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-resistance:before { - content: "\f1d0"; } +.fa.fa-resistance { + --fa: "\f1d0"; } .fa.fa-empire { font-family: 'Font Awesome 6 Brands'; @@ -1266,15 +1266,15 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-ge:before { - content: "\f1d1"; } +.fa.fa-ge { + --fa: "\f1d1"; } .fa.fa-git-square { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-git-square:before { - content: "\f1d2"; } +.fa.fa-git-square { + --fa: "\f1d2"; } .fa.fa-git { font-family: 'Font Awesome 6 Brands'; @@ -1288,15 +1288,15 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-y-combinator-square:before { - content: "\f1d4"; } +.fa.fa-y-combinator-square { + --fa: "\f1d4"; } .fa.fa-yc-square { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-yc-square:before { - content: "\f1d4"; } +.fa.fa-yc-square { + --fa: "\f1d4"; } .fa.fa-tencent-weibo { font-family: 'Font Awesome 6 Brands'; @@ -1314,49 +1314,49 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-wechat:before { - content: "\f1d7"; } +.fa.fa-wechat { + --fa: "\f1d7"; } -.fa.fa-send:before { - content: "\f1d8"; } +.fa.fa-send { + --fa: "\f1d8"; } .fa.fa-paper-plane-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-paper-plane-o:before { - content: "\f1d8"; } +.fa.fa-paper-plane-o { + --fa: "\f1d8"; } .fa.fa-send-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-send-o:before { - content: "\f1d8"; } +.fa.fa-send-o { + --fa: "\f1d8"; } .fa.fa-circle-thin { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-circle-thin:before { - content: "\f111"; } +.fa.fa-circle-thin { + --fa: "\f111"; } -.fa.fa-header:before { - content: "\f1dc"; } +.fa.fa-header { + --fa: "\f1dc"; } .fa.fa-futbol-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-futbol-o:before { - content: "\f1e3"; } +.fa.fa-futbol-o { + --fa: "\f1e3"; } .fa.fa-soccer-ball-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-soccer-ball-o:before { - content: "\f1e3"; } +.fa.fa-soccer-ball-o { + --fa: "\f1e3"; } .fa.fa-slideshare { font-family: 'Font Awesome 6 Brands'; @@ -1374,8 +1374,8 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-newspaper-o:before { - content: "\f1ea"; } +.fa.fa-newspaper-o { + --fa: "\f1ea"; } .fa.fa-paypal { font-family: 'Font Awesome 6 Brands'; @@ -1413,27 +1413,27 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-bell-slash-o:before { - content: "\f1f6"; } +.fa.fa-bell-slash-o { + --fa: "\f1f6"; } -.fa.fa-trash:before { - content: "\f2ed"; } +.fa.fa-trash { + --fa: "\f2ed"; } .fa.fa-copyright { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-eyedropper:before { - content: "\f1fb"; } +.fa.fa-eyedropper { + --fa: "\f1fb"; } -.fa.fa-area-chart:before { - content: "\f1fe"; } +.fa.fa-area-chart { + --fa: "\f1fe"; } -.fa.fa-pie-chart:before { - content: "\f200"; } +.fa.fa-pie-chart { + --fa: "\f200"; } -.fa.fa-line-chart:before { - content: "\f201"; } +.fa.fa-line-chart { + --fa: "\f201"; } .fa.fa-lastfm { font-family: 'Font Awesome 6 Brands'; @@ -1443,8 +1443,8 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-lastfm-square:before { - content: "\f203"; } +.fa.fa-lastfm-square { + --fa: "\f203"; } .fa.fa-ioxhost { font-family: 'Font Awesome 6 Brands'; @@ -1458,17 +1458,17 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-cc:before { - content: "\f20a"; } +.fa.fa-cc { + --fa: "\f20a"; } -.fa.fa-ils:before { - content: "\f20b"; } +.fa.fa-ils { + --fa: "\f20b"; } -.fa.fa-shekel:before { - content: "\f20b"; } +.fa.fa-shekel { + --fa: "\f20b"; } -.fa.fa-sheqel:before { - content: "\f20b"; } +.fa.fa-sheqel { + --fa: "\f20b"; } .fa.fa-buysellads { font-family: 'Font Awesome 6 Brands'; @@ -1510,24 +1510,24 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-diamond:before { - content: "\f3a5"; } +.fa.fa-diamond { + --fa: "\f3a5"; } -.fa.fa-transgender:before { - content: "\f224"; } +.fa.fa-transgender { + --fa: "\f224"; } -.fa.fa-intersex:before { - content: "\f224"; } +.fa.fa-intersex { + --fa: "\f224"; } -.fa.fa-transgender-alt:before { - content: "\f225"; } +.fa.fa-transgender-alt { + --fa: "\f225"; } .fa.fa-facebook-official { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-facebook-official:before { - content: "\f09a"; } +.fa.fa-facebook-official { + --fa: "\f09a"; } .fa.fa-pinterest-p { font-family: 'Font Awesome 6 Brands'; @@ -1537,8 +1537,8 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-hotel:before { - content: "\f236"; } +.fa.fa-hotel { + --fa: "\f236"; } .fa.fa-viacoin { font-family: 'Font Awesome 6 Brands'; @@ -1556,8 +1556,8 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-yc:before { - content: "\f23b"; } +.fa.fa-yc { + --fa: "\f23b"; } .fa.fa-optin-monster { font-family: 'Font Awesome 6 Brands'; @@ -1571,23 +1571,23 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-battery-4:before { - content: "\f240"; } +.fa.fa-battery-4 { + --fa: "\f240"; } -.fa.fa-battery:before { - content: "\f240"; } +.fa.fa-battery { + --fa: "\f240"; } -.fa.fa-battery-3:before { - content: "\f241"; } +.fa.fa-battery-3 { + --fa: "\f241"; } -.fa.fa-battery-2:before { - content: "\f242"; } +.fa.fa-battery-2 { + --fa: "\f242"; } -.fa.fa-battery-1:before { - content: "\f243"; } +.fa.fa-battery-1 { + --fa: "\f243"; } -.fa.fa-battery-0:before { - content: "\f244"; } +.fa.fa-battery-0 { + --fa: "\f244"; } .fa.fa-object-group { font-family: 'Font Awesome 6 Free'; @@ -1601,8 +1601,8 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-sticky-note-o:before { - content: "\f249"; } +.fa.fa-sticky-note-o { + --fa: "\f249"; } .fa.fa-cc-jcb { font-family: 'Font Awesome 6 Brands'; @@ -1616,80 +1616,80 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hourglass-o:before { - content: "\f254"; } +.fa.fa-hourglass-o { + --fa: "\f254"; } -.fa.fa-hourglass-1:before { - content: "\f251"; } +.fa.fa-hourglass-1 { + --fa: "\f251"; } -.fa.fa-hourglass-2:before { - content: "\f252"; } +.fa.fa-hourglass-2 { + --fa: "\f252"; } -.fa.fa-hourglass-3:before { - content: "\f253"; } +.fa.fa-hourglass-3 { + --fa: "\f253"; } .fa.fa-hand-rock-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hand-rock-o:before { - content: "\f255"; } +.fa.fa-hand-rock-o { + --fa: "\f255"; } .fa.fa-hand-grab-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hand-grab-o:before { - content: "\f255"; } +.fa.fa-hand-grab-o { + --fa: "\f255"; } .fa.fa-hand-paper-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hand-paper-o:before { - content: "\f256"; } +.fa.fa-hand-paper-o { + --fa: "\f256"; } .fa.fa-hand-stop-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hand-stop-o:before { - content: "\f256"; } +.fa.fa-hand-stop-o { + --fa: "\f256"; } .fa.fa-hand-scissors-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hand-scissors-o:before { - content: "\f257"; } +.fa.fa-hand-scissors-o { + --fa: "\f257"; } .fa.fa-hand-lizard-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hand-lizard-o:before { - content: "\f258"; } +.fa.fa-hand-lizard-o { + --fa: "\f258"; } .fa.fa-hand-spock-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hand-spock-o:before { - content: "\f259"; } +.fa.fa-hand-spock-o { + --fa: "\f259"; } .fa.fa-hand-pointer-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hand-pointer-o:before { - content: "\f25a"; } +.fa.fa-hand-pointer-o { + --fa: "\f25a"; } .fa.fa-hand-peace-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-hand-peace-o:before { - content: "\f25b"; } +.fa.fa-hand-peace-o { + --fa: "\f25b"; } .fa.fa-registered { font-family: 'Font Awesome 6 Free'; @@ -1715,8 +1715,8 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-odnoklassniki-square:before { - content: "\f264"; } +.fa.fa-odnoklassniki-square { + --fa: "\f264"; } .fa.fa-get-pocket { font-family: 'Font Awesome 6 Brands'; @@ -1746,8 +1746,8 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-television:before { - content: "\f26c"; } +.fa.fa-television { + --fa: "\f26c"; } .fa.fa-contao { font-family: 'Font Awesome 6 Brands'; @@ -1765,46 +1765,46 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-calendar-plus-o:before { - content: "\f271"; } +.fa.fa-calendar-plus-o { + --fa: "\f271"; } .fa.fa-calendar-minus-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-calendar-minus-o:before { - content: "\f272"; } +.fa.fa-calendar-minus-o { + --fa: "\f272"; } .fa.fa-calendar-times-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-calendar-times-o:before { - content: "\f273"; } +.fa.fa-calendar-times-o { + --fa: "\f273"; } .fa.fa-calendar-check-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-calendar-check-o:before { - content: "\f274"; } +.fa.fa-calendar-check-o { + --fa: "\f274"; } .fa.fa-map-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-map-o:before { - content: "\f279"; } +.fa.fa-map-o { + --fa: "\f279"; } -.fa.fa-commenting:before { - content: "\f4ad"; } +.fa.fa-commenting { + --fa: "\f4ad"; } .fa.fa-commenting-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-commenting-o:before { - content: "\f4ad"; } +.fa.fa-commenting-o { + --fa: "\f4ad"; } .fa.fa-houzz { font-family: 'Font Awesome 6 Brands'; @@ -1814,8 +1814,8 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-vimeo:before { - content: "\f27d"; } +.fa.fa-vimeo { + --fa: "\f27d"; } .fa.fa-black-tie { font-family: 'Font Awesome 6 Brands'; @@ -1833,8 +1833,8 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-credit-card-alt:before { - content: "\f09d"; } +.fa.fa-credit-card-alt { + --fa: "\f09d"; } .fa.fa-codiepie { font-family: 'Font Awesome 6 Brands'; @@ -1868,15 +1868,15 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-pause-circle-o:before { - content: "\f28b"; } +.fa.fa-pause-circle-o { + --fa: "\f28b"; } .fa.fa-stop-circle-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-stop-circle-o:before { - content: "\f28d"; } +.fa.fa-stop-circle-o { + --fa: "\f28d"; } .fa.fa-bluetooth { font-family: 'Font Awesome 6 Brands'; @@ -1906,27 +1906,27 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-wheelchair-alt:before { - content: "\f368"; } +.fa.fa-wheelchair-alt { + --fa: "\f368"; } .fa.fa-question-circle-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-question-circle-o:before { - content: "\f059"; } +.fa.fa-question-circle-o { + --fa: "\f059"; } -.fa.fa-volume-control-phone:before { - content: "\f2a0"; } +.fa.fa-volume-control-phone { + --fa: "\f2a0"; } -.fa.fa-asl-interpreting:before { - content: "\f2a3"; } +.fa.fa-asl-interpreting { + --fa: "\f2a3"; } -.fa.fa-deafness:before { - content: "\f2a4"; } +.fa.fa-deafness { + --fa: "\f2a4"; } -.fa.fa-hard-of-hearing:before { - content: "\f2a4"; } +.fa.fa-hard-of-hearing { + --fa: "\f2a4"; } .fa.fa-glide { font-family: 'Font Awesome 6 Brands'; @@ -1936,8 +1936,8 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-signing:before { - content: "\f2a7"; } +.fa.fa-signing { + --fa: "\f2a7"; } .fa.fa-viadeo { font-family: 'Font Awesome 6 Brands'; @@ -1947,8 +1947,8 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-viadeo-square:before { - content: "\f2aa"; } +.fa.fa-viadeo-square { + --fa: "\f2aa"; } .fa.fa-snapchat { font-family: 'Font Awesome 6 Brands'; @@ -1958,15 +1958,15 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-snapchat-ghost:before { - content: "\f2ab"; } +.fa.fa-snapchat-ghost { + --fa: "\f2ab"; } .fa.fa-snapchat-square { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-snapchat-square:before { - content: "\f2ad"; } +.fa.fa-snapchat-square { + --fa: "\f2ad"; } .fa.fa-pied-piper { font-family: 'Font Awesome 6 Brands'; @@ -1988,15 +1988,15 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-google-plus-official:before { - content: "\f2b3"; } +.fa.fa-google-plus-official { + --fa: "\f2b3"; } .fa.fa-google-plus-circle { font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-google-plus-circle:before { - content: "\f2b3"; } +.fa.fa-google-plus-circle { + --fa: "\f2b3"; } .fa.fa-font-awesome { font-family: 'Font Awesome 6 Brands'; @@ -2006,22 +2006,22 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-fa:before { - content: "\f2b4"; } +.fa.fa-fa { + --fa: "\f2b4"; } .fa.fa-handshake-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-handshake-o:before { - content: "\f2b5"; } +.fa.fa-handshake-o { + --fa: "\f2b5"; } .fa.fa-envelope-open-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-envelope-open-o:before { - content: "\f2b6"; } +.fa.fa-envelope-open-o { + --fa: "\f2b6"; } .fa.fa-linode { font-family: 'Font Awesome 6 Brands'; @@ -2031,60 +2031,60 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-address-book-o:before { - content: "\f2b9"; } +.fa.fa-address-book-o { + --fa: "\f2b9"; } -.fa.fa-vcard:before { - content: "\f2bb"; } +.fa.fa-vcard { + --fa: "\f2bb"; } .fa.fa-address-card-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-address-card-o:before { - content: "\f2bb"; } +.fa.fa-address-card-o { + --fa: "\f2bb"; } .fa.fa-vcard-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-vcard-o:before { - content: "\f2bb"; } +.fa.fa-vcard-o { + --fa: "\f2bb"; } .fa.fa-user-circle-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-user-circle-o:before { - content: "\f2bd"; } +.fa.fa-user-circle-o { + --fa: "\f2bd"; } .fa.fa-user-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-user-o:before { - content: "\f007"; } +.fa.fa-user-o { + --fa: "\f007"; } .fa.fa-id-badge { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-drivers-license:before { - content: "\f2c2"; } +.fa.fa-drivers-license { + --fa: "\f2c2"; } .fa.fa-id-card-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-id-card-o:before { - content: "\f2c2"; } +.fa.fa-id-card-o { + --fa: "\f2c2"; } .fa.fa-drivers-license-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-drivers-license-o:before { - content: "\f2c2"; } +.fa.fa-drivers-license-o { + --fa: "\f2c2"; } .fa.fa-quora { font-family: 'Font Awesome 6 Brands'; @@ -2098,29 +2098,29 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-thermometer-4:before { - content: "\f2c7"; } +.fa.fa-thermometer-4 { + --fa: "\f2c7"; } -.fa.fa-thermometer:before { - content: "\f2c7"; } +.fa.fa-thermometer { + --fa: "\f2c7"; } -.fa.fa-thermometer-3:before { - content: "\f2c8"; } +.fa.fa-thermometer-3 { + --fa: "\f2c8"; } -.fa.fa-thermometer-2:before { - content: "\f2c9"; } +.fa.fa-thermometer-2 { + --fa: "\f2c9"; } -.fa.fa-thermometer-1:before { - content: "\f2ca"; } +.fa.fa-thermometer-1 { + --fa: "\f2ca"; } -.fa.fa-thermometer-0:before { - content: "\f2cb"; } +.fa.fa-thermometer-0 { + --fa: "\f2cb"; } -.fa.fa-bathtub:before { - content: "\f2cd"; } +.fa.fa-bathtub { + --fa: "\f2cd"; } -.fa.fa-s15:before { - content: "\f2cd"; } +.fa.fa-s15 { + --fa: "\f2cd"; } .fa.fa-window-maximize { font-family: 'Font Awesome 6 Free'; @@ -2130,22 +2130,22 @@ font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-times-rectangle:before { - content: "\f410"; } +.fa.fa-times-rectangle { + --fa: "\f410"; } .fa.fa-window-close-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-window-close-o:before { - content: "\f410"; } +.fa.fa-window-close-o { + --fa: "\f410"; } .fa.fa-times-rectangle-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-times-rectangle-o:before { - content: "\f410"; } +.fa.fa-times-rectangle-o { + --fa: "\f410"; } .fa.fa-bandcamp { font-family: 'Font Awesome 6 Brands'; @@ -2171,15 +2171,15 @@ font-family: 'Font Awesome 6 Brands'; font-weight: 400; } -.fa.fa-eercast:before { - content: "\f2da"; } +.fa.fa-eercast { + --fa: "\f2da"; } .fa.fa-snowflake-o { font-family: 'Font Awesome 6 Free'; font-weight: 400; } -.fa.fa-snowflake-o:before { - content: "\f2dc"; } +.fa.fa-snowflake-o { + --fa: "\f2dc"; } .fa.fa-superpowers { font-family: 'Font Awesome 6 Brands'; diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf index 08362f3..0f82a83 100644 Binary files a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf and b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf differ diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 index d84512f..3c5cf97 100644 Binary files a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 and b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 differ diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf index 7f9b53c..9ee1919 100644 Binary files a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf and b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf differ diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 index 452b49c..57d9179 100644 Binary files a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 and b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 differ diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf index e7e2ecf..1c10972 100644 Binary files a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf and b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf differ diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 index fec1fae..1672102 100644 Binary files a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 and b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 differ diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.ttf b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.ttf index 577b7a0..3bcb67f 100644 Binary files a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.ttf and b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.ttf differ diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2 b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2 index 7393168..fbafb22 100644 Binary files a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2 and b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2 differ diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/abp/core/abp.js b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/abp/core/abp.js index 7a82f58..45b8ac3 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/abp/core/abp.js +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/abp/core/abp.js @@ -480,7 +480,11 @@ var abp = abp || {}; var args = Array.prototype.slice.call(arguments, 1); for (var i = 0; i < callbacks.length; i++) { - callbacks[i].apply(this, args); + try { + callbacks[i].apply(this, args); + } catch(e) { + console.error(e); + } } }; diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/bootstrap-daterangepicker/daterangepicker.js b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/bootstrap-daterangepicker/daterangepicker.js index 4048310..6a49382 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/bootstrap-daterangepicker/daterangepicker.js +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/bootstrap-daterangepicker/daterangepicker.js @@ -305,8 +305,8 @@ end = moment(val, this.locale.format); } if (start !== null && end !== null) { - this.setStartDate(start); - this.setEndDate(end); + this.setStartDate(start.startOf('day')); + this.setEndDate(end.startOf('day')); } } } @@ -370,10 +370,6 @@ this.container.find('.calendar-time').hide(); } - //can't be used together for now - if (this.timePicker && this.autoApply) - this.autoApply = false; - if (this.autoApply) { this.container.addClass('auto-apply'); } @@ -386,9 +382,7 @@ this.container.find('.drp-calendar.left').addClass('single'); this.container.find('.drp-calendar.left').show(); this.container.find('.drp-calendar.right').hide(); - if (!this.timePicker && this.autoApply) { - this.container.addClass('auto-apply'); - } + } if ((typeof options.ranges === 'undefined' && !this.singleDatePicker) || this.alwaysShowCalendars) { @@ -898,6 +892,7 @@ // hours // + html = '<select class="hourselect">'; var start = this.timePicker24Hour ? 0 : 1; @@ -1354,8 +1349,8 @@ if (this.singleDatePicker) { this.setEndDate(this.startDate); - if (!this.timePicker && this.autoApply) - this.clickApply(); + if (this.autoApply) + this.clickApply(); } this.updateView(); @@ -1500,6 +1495,9 @@ this.renderTimePicker('left'); this.renderTimePicker('right'); + if(this.autoApply) { + this.element.trigger('apply.daterangepicker', this); + } }, elementChanged: function() { diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.all.js b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.all.js index 3adf136..e7f2af1 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.all.js +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.all.js @@ -1,5 +1,5 @@ /*! -* sweetalert2 v11.6.9 +* sweetalert2 v11.15.3 * Released under the MIT License. */ (function (global, factory) { @@ -8,56 +8,84 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Sweetalert2 = factory()); })(this, (function () { 'use strict'; + function _assertClassBrand(e, t, n) { + if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; + throw new TypeError("Private element is not present on this object"); + } + function _checkPrivateRedeclaration(e, t) { + if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); + } + function _classPrivateFieldGet2(s, a) { + return s.get(_assertClassBrand(s, a)); + } + function _classPrivateFieldInitSpec(e, t, a) { + _checkPrivateRedeclaration(e, t), t.set(e, a); + } + function _classPrivateFieldSet2(s, a, r) { + return s.set(_assertClassBrand(s, a), r), r; + } + + const RESTORE_FOCUS_TIMEOUT = 100; + + /** @type {GlobalState} */ + const globalState = {}; + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement instanceof HTMLElement) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; + /** - * This module contains `WeakMap`s for each effectively-"private property" that a `Swal` has. - * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` - * This is the approach that Babel will probably take to implement private methods/fields - * https://github.com/tc39/proposal-private-methods - * https://github.com/babel/babel/pull/7555 - * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* - * then we can use that language feature. + * Restore previous active (focused) element + * + * @param {boolean} returnFocus + * @returns {Promise<void>} */ + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 - var privateProps = { - awaitingPromise: new WeakMap(), - promise: new WeakMap(), - innerParams: new WeakMap(), - domCache: new WeakMap() + window.scrollTo(x, y); + }); }; const swalPrefix = 'swal2-'; /** - * @param {string[]} items - * @returns {object} + * @typedef {Record<SwalClass, string>} SwalClasses */ - const prefix = items => { - const result = {}; - for (const i in items) { - result[items[i]] = swalPrefix + items[i]; - } - return result; - }; - const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); - const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); - - const consolePrefix = 'SweetAlert2:'; /** - * Filter the unique values into a new array - * - * @param {Array} arr - * @returns {Array} + * @typedef {'success' | 'warning' | 'info' | 'question' | 'error'} SwalIcon + * @typedef {Record<SwalIcon, string>} SwalIcons */ - const uniqueArray = arr => { - const result = []; - for (let i = 0; i < arr.length; i++) { - if (result.indexOf(arr[i]) === -1) { - result.push(arr[i]); - } - } - return result; - }; + + /** @type {SwalClass[]} */ + const classNames = ['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error', 'draggable', 'dragging']; + const swalClasses = classNames.reduce((acc, className) => { + acc[className] = swalPrefix + className; + return acc; + }, /** @type {SwalClasses} */{}); + + /** @type {SwalIcon[]} */ + const icons = ['success', 'warning', 'info', 'question', 'error']; + const iconTypes = icons.reduce((acc, icon) => { + acc[icon] = swalPrefix + icon; + return acc; + }, /** @type {SwalIcons} */{}); + + const consolePrefix = 'SweetAlert2:'; /** * Capitalize the first letter of a string @@ -70,7 +98,7 @@ /** * Standardize console warnings * - * @param {string | Array} message + * @param {string | string[]} message */ const warn = message => { console.warn(`${consolePrefix} ${typeof message === 'object' ? message.join(' ') : message}`); @@ -88,7 +116,7 @@ /** * Private global state for `warnOnce` * - * @type {Array} + * @type {string[]} * @private */ const previousWarnOnceMessages = []; @@ -109,10 +137,11 @@ * Show a one-time console warning about deprecated params/methods * * @param {string} deprecatedParam - * @param {string} useInstead + * @param {string?} useInstead */ - const warnAboutDeprecation = (deprecatedParam, useInstead) => { - warnOnce(`"${deprecatedParam}" is deprecated and will be removed in the next major release. Please use "${useInstead}" instead.`); + const warnAboutDeprecation = function (deprecatedParam) { + let useInstead = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + warnOnce(`"${deprecatedParam}" is deprecated and will be removed in the next major release.${useInstead ? ` Use "${useInstead}" instead.` : ''}`); }; /** @@ -132,7 +161,7 @@ /** * @param {any} arg - * @returns {Promise} + * @returns {Promise<any>} */ const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); @@ -199,7 +228,7 @@ /** * @returns {HTMLElement | null} */ - const getProgressSteps$1 = () => elementByClass(swalClasses['progress-steps']); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); /** * @returns {HTMLElement | null} @@ -207,29 +236,29 @@ const getValidationMessage = () => elementByClass(swalClasses['validation-message']); /** - * @returns {HTMLElement | null} + * @returns {HTMLButtonElement | null} */ - const getConfirmButton = () => elementBySelector(`.${swalClasses.actions} .${swalClasses.confirm}`); + const getConfirmButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.confirm}`)); /** - * @returns {HTMLElement | null} + * @returns {HTMLButtonElement | null} */ - const getDenyButton = () => elementBySelector(`.${swalClasses.actions} .${swalClasses.deny}`); + const getCancelButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.cancel}`)); /** - * @returns {HTMLElement | null} + * @returns {HTMLButtonElement | null} */ - const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getDenyButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.deny}`)); /** * @returns {HTMLElement | null} */ - const getLoader = () => elementBySelector(`.${swalClasses.loader}`); + const getInputLabel = () => elementByClass(swalClasses['input-label']); /** * @returns {HTMLElement | null} */ - const getCancelButton = () => elementBySelector(`.${swalClasses.actions} .${swalClasses.cancel}`); + const getLoader = () => elementBySelector(`.${swalClasses.loader}`); /** * @returns {HTMLElement | null} @@ -272,11 +301,17 @@ * @returns {HTMLElement[]} */ const getFocusableElements = () => { - const focusableElementsWithTabindex = Array.from(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) + const popup = getPopup(); + if (!popup) { + return []; + } + /** @type {NodeListOf<HTMLElement>} */ + const focusableElementsWithTabindex = popup.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'); + const focusableElementsWithTabindexSorted = Array.from(focusableElementsWithTabindex) // sort according to tabindex .sort((a, b) => { - const tabindexA = parseInt(a.getAttribute('tabindex')); - const tabindexB = parseInt(b.getAttribute('tabindex')); + const tabindexA = parseInt(a.getAttribute('tabindex') || '0'); + const tabindexB = parseInt(b.getAttribute('tabindex') || '0'); if (tabindexA > tabindexB) { return 1; } else if (tabindexA < tabindexB) { @@ -284,8 +319,11 @@ } return 0; }); - const otherFocusableElements = Array.from(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); - return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible$1(el)); + + /** @type {NodeListOf<HTMLElement>} */ + const otherFocusableElements = popup.querySelectorAll(focusable); + const otherFocusableElementsFiltered = Array.from(otherFocusableElements).filter(el => el.getAttribute('tabindex') !== '-1'); + return [...new Set(focusableElementsWithTabindexSorted.concat(otherFocusableElementsFiltered))].filter(el => isVisible$1(el)); }; /** @@ -299,19 +337,22 @@ * @returns {boolean} */ const isToast = () => { - return getPopup() && hasClass(getPopup(), swalClasses.toast); + const popup = getPopup(); + if (!popup) { + return false; + } + return hasClass(popup, swalClasses.toast); }; /** * @returns {boolean} */ const isLoading = () => { - return getPopup().hasAttribute('data-loading'); - }; - - // Remember state in cases where opening and handling a modal will fiddle with it. - const states = { - previousBodyPadding: null + const popup = getPopup(); + if (!popup) { + return false; + } + return popup.hasAttribute('data-loading'); }; /** @@ -326,16 +367,22 @@ if (html) { const parser = new DOMParser(); const parsed = parser.parseFromString(html, `text/html`); - Array.from(parsed.querySelector('head').childNodes).forEach(child => { - elem.appendChild(child); - }); - Array.from(parsed.querySelector('body').childNodes).forEach(child => { - if (child instanceof HTMLVideoElement || child instanceof HTMLAudioElement) { - elem.appendChild(child.cloneNode(true)); // https://github.com/sweetalert2/sweetalert2/issues/2507 - } else { + const head = parsed.querySelector('head'); + if (head) { + Array.from(head.childNodes).forEach(child => { elem.appendChild(child); - } - }); + }); + } + const body = parsed.querySelector('body'); + if (body) { + Array.from(body.childNodes).forEach(child => { + if (child instanceof HTMLVideoElement || child instanceof HTMLAudioElement) { + elem.appendChild(child.cloneNode(true)); // https://github.com/sweetalert2/sweetalert2/issues/2507 + } else { + elem.appendChild(child); + } + }); + } } }; @@ -363,7 +410,7 @@ */ const removeCustomClasses = (elem, params) => { Array.from(elem.classList).forEach(className => { - if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass || {}).includes(className)) { elem.classList.remove(className); } }); @@ -376,18 +423,23 @@ */ const applyCustomClass = (elem, params, className) => { removeCustomClasses(elem, params); - if (params.customClass && params.customClass[className]) { - if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { - warn(`Invalid type of customClass.${className}! Expected string or iterable object, got "${typeof params.customClass[className]}"`); - return; - } - addClass(elem, params.customClass[className]); + if (!params.customClass) { + return; + } + const customClass = params.customClass[(/** @type {keyof SweetAlertCustomClass} */className)]; + if (!customClass) { + return; } + if (typeof customClass !== 'string' && !customClass.forEach) { + warn(`Invalid type of customClass.${className}! Expected string or iterable object, got "${typeof customClass}"`); + return; + } + addClass(elem, customClass); }; /** * @param {HTMLElement} popup - * @param {import('./renderers/renderInput').InputClass} inputClass + * @param {import('./renderers/renderInput').InputClass | SweetAlertInput} inputClass * @returns {HTMLInputElement | null} */ const getInput$1 = (popup, inputClass) => { @@ -427,7 +479,7 @@ /** * @param {HTMLElement | HTMLElement[] | null} target - * @param {string | string[] | readonly string[]} classList + * @param {string | string[] | readonly string[] | undefined} classList * @param {boolean} condition */ const toggleClass = (target, classList, condition) => { @@ -440,17 +492,25 @@ classList.forEach(className => { if (Array.isArray(target)) { target.forEach(elem => { - condition ? elem.classList.add(className) : elem.classList.remove(className); + if (condition) { + elem.classList.add(className); + } else { + elem.classList.remove(className); + } }); } else { - condition ? target.classList.add(className) : target.classList.remove(className); + if (condition) { + target.classList.add(className); + } else { + target.classList.remove(className); + } } }); }; /** * @param {HTMLElement | HTMLElement[] | null} target - * @param {string | string[] | readonly string[]} classList + * @param {string | string[] | readonly string[] | undefined} classList */ const addClass = (target, classList) => { toggleClass(target, classList, true); @@ -458,7 +518,7 @@ /** * @param {HTMLElement | HTMLElement[] | null} target - * @param {string | string[] | readonly string[]} classList + * @param {string | string[] | readonly string[] | undefined} classList */ const removeClass = (target, classList) => { toggleClass(target, classList, false); @@ -491,28 +551,51 @@ value = parseInt(value); } if (value || parseInt(value) === 0) { - elem.style[property] = typeof value === 'number' ? `${value}px` : value; + elem.style.setProperty(property, typeof value === 'number' ? `${value}px` : value); } else { elem.style.removeProperty(property); } }; /** - * @param {HTMLElement} elem + * @param {HTMLElement | null} elem * @param {string} display */ const show = function (elem) { let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex'; + if (!elem) { + return; + } elem.style.display = display; }; /** - * @param {HTMLElement} elem + * @param {HTMLElement | null} elem */ const hide = elem => { + if (!elem) { + return; + } elem.style.display = 'none'; }; + /** + * @param {HTMLElement | null} elem + * @param {string} display + */ + const showWhenInnerHtmlPresent = function (elem) { + let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'block'; + if (!elem) { + return; + } + new MutationObserver(() => { + toggle(elem, elem.innerHTML, display); + }).observe(elem, { + childList: true, + subtree: true + }); + }; + /** * @param {HTMLElement} parent * @param {string} selector @@ -520,10 +603,10 @@ * @param {string} value */ const setStyle = (parent, selector, property, value) => { - /** @type {HTMLElement} */ + /** @type {HTMLElement | null} */ const el = parent.querySelector(selector); if (el) { - el.style[property] = value; + el.style.setProperty(property, value); } }; @@ -534,13 +617,17 @@ */ const toggle = function (elem, condition) { let display = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'flex'; - condition ? show(elem, display) : hide(elem); + if (condition) { + show(elem, display); + } else { + hide(elem); + } }; /** * borrowed from jquery $(elem).is(':visible') implementation * - * @param {HTMLElement} elem + * @param {HTMLElement | null} elem * @returns {boolean} */ const isVisible$1 = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); @@ -576,6 +663,9 @@ const animateTimerProgressBar = function (timer) { let reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; const timerProgressBar = getTimerProgressBar(); + if (!timerProgressBar) { + return; + } if (isVisible$1(timerProgressBar)) { if (reset) { timerProgressBar.style.transition = 'none'; @@ -589,50 +679,17 @@ }; const stopTimerProgressBar = () => { const timerProgressBar = getTimerProgressBar(); + if (!timerProgressBar) { + return; + } const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); timerProgressBar.style.removeProperty('transition'); timerProgressBar.style.width = '100%'; const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); const timerProgressBarPercent = timerProgressBarWidth / timerProgressBarFullWidth * 100; - timerProgressBar.style.removeProperty('transition'); timerProgressBar.style.width = `${timerProgressBarPercent}%`; }; - const RESTORE_FOCUS_TIMEOUT = 100; - - /** @type {GlobalState} */ - const globalState = {}; - const focusPreviousActiveElement = () => { - if (globalState.previousActiveElement instanceof HTMLElement) { - globalState.previousActiveElement.focus(); - globalState.previousActiveElement = null; - } else if (document.body) { - document.body.focus(); - } - }; - - /** - * Restore previous active (focused) element - * - * @param {boolean} returnFocus - * @returns {Promise} - */ - const restoreActiveElement = returnFocus => { - return new Promise(resolve => { - if (!returnFocus) { - return resolve(); - } - const x = window.scrollX; - const y = window.scrollY; - globalState.restoreFocusTimeout = setTimeout(() => { - focusPreviousActiveElement(); - resolve(); - }, RESTORE_FOCUS_TIMEOUT); // issues/900 - - window.scrollTo(x, y); - }); - }; - /** * Detect Node env * @@ -648,19 +705,19 @@ <img class="${swalClasses.image}" /> <h2 class="${swalClasses.title}" id="${swalClasses.title}"></h2> <div class="${swalClasses['html-container']}" id="${swalClasses['html-container']}"></div> - <input class="${swalClasses.input}" /> + <input class="${swalClasses.input}" id="${swalClasses.input}" /> <input type="file" class="${swalClasses.file}" /> <div class="${swalClasses.range}"> <input type="range" /> <output></output> </div> - <select class="${swalClasses.select}"></select> + <select class="${swalClasses.select}" id="${swalClasses.select}"></select> <div class="${swalClasses.radio}"></div> - <label for="${swalClasses.checkbox}" class="${swalClasses.checkbox}"> - <input type="checkbox" /> + <label class="${swalClasses.checkbox}"> + <input type="checkbox" id="${swalClasses.checkbox}" /> <span class="${swalClasses.label}"></span> </label> - <textarea class="${swalClasses.textarea}"></textarea> + <textarea class="${swalClasses.textarea}" id="${swalClasses.textarea}"></textarea> <div class="${swalClasses['validation-message']}" id="${swalClasses['validation-message']}"></div> <div class="${swalClasses.actions}"> <div class="${swalClasses.loader}"></div> @@ -752,8 +809,6 @@ const init = params => { // Clean up the old popup container if it exists const oldContainerExisted = resetOldContainer(); - - /* istanbul ignore if */ if (isNodeEnv()) { error('SweetAlert2 requires document to initialize'); return; @@ -793,7 +848,7 @@ }; /** - * @param {object} param + * @param {any} param * @param {HTMLElement} target */ const handleObject = (param, target) => { @@ -810,12 +865,12 @@ /** * @param {HTMLElement} target - * @param {HTMLElement} elem + * @param {any} elem */ const handleJqueryElem = (target, elem) => { target.textContent = ''; if (0 in elem) { - for (let i = 0; (i in elem); i++) { + for (let i = 0; i in elem; i++) { target.appendChild(elem[i].cloneNode(true)); } } else { @@ -824,51 +879,15 @@ }; /** - * @returns {'webkitAnimationEnd' | 'animationend' | false} - */ - const animationEndEvent = (() => { - // Prevent run in Node env - /* istanbul ignore if */ - if (isNodeEnv()) { - return false; - } - const testEl = document.createElement('div'); - const transEndEventNames = { - WebkitAnimation: 'webkitAnimationEnd', - // Chrome, Safari and Opera - animation: 'animationend' // Standard syntax - }; - - for (const i in transEndEventNames) { - if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { - return transEndEventNames[i]; - } - } - return false; - })(); - - /** - * Measure scrollbar width for padding body during modal show/hide - * https://github.com/twbs/bootstrap/blob/master/js/src/modal.js - * - * @returns {number} - */ - const measureScrollbar = () => { - const scrollDiv = document.createElement('div'); - scrollDiv.className = swalClasses['scrollbar-measure']; - document.body.appendChild(scrollDiv); - const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; - document.body.removeChild(scrollDiv); - return scrollbarWidth; - }; - - /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderActions = (instance, params) => { const actions = getActions(); const loader = getLoader(); + if (!actions || !loader) { + return; + } // Actions (buttons) wrapper if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { @@ -884,7 +903,7 @@ renderButtons(actions, loader, params); // Loader - setInnerHtml(loader, params.loaderHtml); + setInnerHtml(loader, params.loaderHtml || ''); applyCustomClass(loader, params, 'loader'); }; @@ -897,6 +916,9 @@ const confirmButton = getConfirmButton(); const denyButton = getDenyButton(); const cancelButton = getCancelButton(); + if (!confirmButton || !denyButton || !cancelButton) { + return; + } // Render buttons renderButton(confirmButton, 'confirm', params); @@ -949,32 +971,35 @@ * @param {SweetAlertOptions} params */ function renderButton(button, buttonType, params) { - toggle(button, params[`show${capitalizeFirstLetter(buttonType)}Button`], 'inline-block'); - setInnerHtml(button, params[`${buttonType}ButtonText`]); // Set caption text - button.setAttribute('aria-label', params[`${buttonType}ButtonAriaLabel`]); // ARIA label + const buttonName = /** @type {'Confirm' | 'Deny' | 'Cancel'} */capitalizeFirstLetter(buttonType); + toggle(button, params[`show${buttonName}Button`], 'inline-block'); + setInnerHtml(button, params[`${buttonType}ButtonText`] || ''); // Set caption text + button.setAttribute('aria-label', params[`${buttonType}ButtonAriaLabel`] || ''); // ARIA label // Add buttons custom classes button.className = swalClasses[buttonType]; applyCustomClass(button, params, `${buttonType}Button`); - addClass(button, params[`${buttonType}ButtonClass`]); } /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderCloseButton = (instance, params) => { const closeButton = getCloseButton(); - setInnerHtml(closeButton, params.closeButtonHtml); + if (!closeButton) { + return; + } + setInnerHtml(closeButton, params.closeButtonHtml || ''); // Custom class applyCustomClass(closeButton, params, 'closeButton'); toggle(closeButton, params.showCloseButton); - closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel || ''); }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderContainer = (instance, params) => { @@ -1007,6 +1032,9 @@ * @param {SweetAlertOptions['position']} position */ function handlePositionParam(container, position) { + if (!position) { + return; + } if (position in swalClasses) { addClass(container, swalClasses[position]); } else { @@ -1020,29 +1048,49 @@ * @param {SweetAlertOptions['grow']} grow */ function handleGrowParam(container, grow) { - if (grow && typeof grow === 'string') { - const growClass = `grow-${grow}`; - if (growClass in swalClasses) { - addClass(container, swalClasses[growClass]); - } + if (!grow) { + return; } + addClass(container, swalClasses[`grow-${grow}`]); } + /** + * This module contains `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + + var privateProps = { + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + /// <reference path="../../../../sweetalert2.d.ts"/> + /** @type {InputClass[]} */ const inputClasses = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderInput = (instance, params) => { const popup = getPopup(); + if (!popup) { + return; + } const innerParams = privateProps.innerParams.get(instance); const rerender = !innerParams || params.input !== innerParams.input; inputClasses.forEach(inputClass => { const inputContainer = getDirectChildByClass(popup, swalClasses[inputClass]); + if (!inputContainer) { + return; + } // set attributes setAttributes(inputClass, params.inputAttributes); @@ -1066,18 +1114,26 @@ * @param {SweetAlertOptions} params */ const showInput = params => { + if (!params.input) { + return; + } if (!renderInputType[params.input]) { - error(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${params.input}"`); + error(`Unexpected type of input! Expected ${Object.keys(renderInputType).join(' | ')}, got "${params.input}"`); return; } const inputContainer = getInputContainer(params.input); + if (!inputContainer) { + return; + } const input = renderInputType[params.input](inputContainer, params); show(inputContainer); // input autofocus - setTimeout(() => { - focusInput(input); - }); + if (params.inputAutoFocus) { + setTimeout(() => { + focusInput(input); + }); + } }; /** @@ -1086,7 +1142,7 @@ const removeAttributes = input => { for (let i = 0; i < input.attributes.length; i++) { const attrName = input.attributes[i].name; - if (!['type', 'value', 'style'].includes(attrName)) { + if (!['id', 'type', 'value', 'style'].includes(attrName)) { input.removeAttribute(attrName); } } @@ -1097,7 +1153,11 @@ * @param {SweetAlertOptions['inputAttributes']} inputAttributes */ const setAttributes = (inputClass, inputAttributes) => { - const input = getInput$1(getPopup(), inputClass); + const popup = getPopup(); + if (!popup) { + return; + } + const input = getInput$1(popup, inputClass); if (!input) { return; } @@ -1111,9 +1171,12 @@ * @param {SweetAlertOptions} params */ const setCustomClass = params => { + if (!params.input) { + return; + } const inputContainer = getInputContainer(params.input); - if (typeof params.customClass === 'object') { - addClass(inputContainer, params.customClass.input); + if (inputContainer) { + applyCustomClass(inputContainer, params, 'input'); } }; @@ -1122,7 +1185,7 @@ * @param {SweetAlertOptions} params */ const setInputPlaceholder = (input, params) => { - if (!input.placeholder || params.inputPlaceholder) { + if (!input.placeholder && params.inputPlaceholder) { input.placeholder = params.inputPlaceholder; } }; @@ -1134,7 +1197,6 @@ */ const setInputLabel = (input, prependTo, params) => { if (params.inputLabel) { - input.id = swalClasses.input; const label = document.createElement('label'); const labelClass = swalClasses['input-label']; label.setAttribute('for', input.id); @@ -1148,11 +1210,15 @@ }; /** - * @param {SweetAlertOptions['input']} inputType - * @returns {HTMLElement} + * @param {SweetAlertInput} inputType + * @returns {HTMLElement | undefined} */ const getInputContainer = inputType => { - return getDirectChildByClass(getPopup(), swalClasses[inputType] || swalClasses.input); + const popup = getPopup(); + if (!popup) { + return; + } + return getDirectChildByClass(popup, swalClasses[(/** @type {SwalClass} */inputType)] || swalClasses.input); }; /** @@ -1167,7 +1233,7 @@ } }; - /** @type {Record<string, (input: Input | HTMLElement, params: SweetAlertOptions) => Input>} */ + /** @type {Record<SweetAlertInput, (input: Input | HTMLElement, params: SweetAlertOptions) => Input>} */ const renderInputType = {}; /** @@ -1175,7 +1241,8 @@ * @param {SweetAlertOptions} params * @returns {HTMLInputElement} */ - renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = renderInputType.search = renderInputType.date = renderInputType['datetime-local'] = renderInputType.time = renderInputType.week = renderInputType.month = /** @type {(input: Input | HTMLElement, params: SweetAlertOptions) => Input} */ + (input, params) => { checkAndSetInputValue(input, params.inputValue); setInputLabel(input, input, params); setInputPlaceholder(input, params); @@ -1245,10 +1312,9 @@ renderInputType.checkbox = (checkboxContainer, params) => { const checkbox = getInput$1(getPopup(), 'checkbox'); checkbox.value = '1'; - checkbox.id = swalClasses.checkbox; checkbox.checked = Boolean(params.inputValue); const label = checkboxContainer.querySelector('span'); - setInnerHtml(label, params.inputPlaceholder); + setInnerHtml(label, params.inputPlaceholder || params.inputLabel); return checkbox; }; @@ -1274,11 +1340,15 @@ if ('MutationObserver' in window) { const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); const textareaResizeHandler = () => { + // check if texarea is still in document (i.e. popup wasn't closed in the meantime) + if (!document.body.contains(textarea)) { + return; + } const textareaWidth = textarea.offsetWidth + getMargin(textarea); if (textareaWidth > initialPopupWidth) { getPopup().style.width = `${textareaWidth}px`; } else { - getPopup().style.width = null; + applyNumericalStyle(getPopup(), 'width', params.width); } }; new MutationObserver(textareaResizeHandler).observe(textarea, { @@ -1291,11 +1361,15 @@ }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderContent = (instance, params) => { const htmlContainer = getHtmlContainer(); + if (!htmlContainer) { + return; + } + showWhenInnerHtmlPresent(htmlContainer); applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML @@ -1318,12 +1392,16 @@ }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderFooter = (instance, params) => { const footer = getFooter(); - toggle(footer, params.footer); + if (!footer) { + return; + } + showWhenInnerHtmlPresent(footer); + toggle(footer, params.footer, 'block'); if (params.footer) { parseHtmlToContainer(params.footer, footer); } @@ -1333,12 +1411,15 @@ }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderIcon = (instance, params) => { const innerParams = privateProps.innerParams.get(instance); const icon = getIcon(); + if (!icon) { + return; + } // if the given icon already rendered, apply the styling without re-rendering the icon if (innerParams && params.icon === innerParams.icon) { @@ -1363,7 +1444,7 @@ applyStyles(icon, params); // Animate icon - addClass(icon, params.showClass.icon); + addClass(icon, params.showClass && params.showClass.icon); }; /** @@ -1371,12 +1452,12 @@ * @param {SweetAlertOptions} params */ const applyStyles = (icon, params) => { - for (const iconType in iconTypes) { + for (const [iconType, iconClassName] of Object.entries(iconTypes)) { if (params.icon !== iconType) { - removeClass(icon, iconTypes[iconType]); + removeClass(icon, iconClassName); } } - addClass(icon, iconTypes[params.icon]); + addClass(icon, params.icon && iconTypes[params.icon]); // Icon color setColor(icon, params); @@ -1391,6 +1472,9 @@ // Adjust success icon background color to match the popup background color const adjustSuccessIconBackgroundColor = () => { const popup = getPopup(); + if (!popup) { + return; + } const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); /** @type {NodeListOf<HTMLElement>} */ const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); @@ -1416,16 +1500,19 @@ * @param {SweetAlertOptions} params */ const setContent = (icon, params) => { - let oldContent = icon.innerHTML; - let newContent; - if (params.iconHtml) { + if (!params.icon && !params.iconHtml) { + return; + } + let oldContent = icon.innerHTML; + let newContent = ''; + if (params.iconHtml) { newContent = iconContent(params.iconHtml); } else if (params.icon === 'success') { newContent = successIconHtml; oldContent = oldContent.replace(/ style=".*?"/g, ''); // undo adjustSuccessIconBackgroundColor() } else if (params.icon === 'error') { newContent = errorIconHtml; - } else { + } else if (params.icon) { const defaultIconHtml = { question: '?', warning: '!', @@ -1449,9 +1536,9 @@ icon.style.color = params.iconColor; icon.style.borderColor = params.iconColor; for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { - setStyle(icon, sel, 'backgroundColor', params.iconColor); + setStyle(icon, sel, 'background-color', params.iconColor); } - setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + setStyle(icon, '.swal2-success-ring', 'border-color', params.iconColor); }; /** @@ -1461,11 +1548,14 @@ const iconContent = content => `<div class="${swalClasses['icon-content']}">${content}</div>`; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderImage = (instance, params) => { const image = getImage(); + if (!image) { + return; + } if (!params.imageUrl) { hide(image); return; @@ -1474,7 +1564,7 @@ // Src, alt image.setAttribute('src', params.imageUrl); - image.setAttribute('alt', params.imageAlt); + image.setAttribute('alt', params.imageAlt || ''); // Width, height applyNumericalStyle(image, 'width', params.imageWidth); @@ -1485,20 +1575,112 @@ applyCustomClass(image, params, 'image'); }; + let dragging = false; + let mousedownX = 0; + let mousedownY = 0; + let initialX = 0; + let initialY = 0; + + /** + * @param {HTMLElement} popup + */ + const addDraggableListeners = popup => { + popup.addEventListener('mousedown', down); + document.body.addEventListener('mousemove', move); + popup.addEventListener('mouseup', up); + popup.addEventListener('touchstart', down); + document.body.addEventListener('touchmove', move); + popup.addEventListener('touchend', up); + }; + + /** + * @param {HTMLElement} popup + */ + const removeDraggableListeners = popup => { + popup.removeEventListener('mousedown', down); + document.body.removeEventListener('mousemove', move); + popup.removeEventListener('mouseup', up); + popup.removeEventListener('touchstart', down); + document.body.removeEventListener('touchmove', move); + popup.removeEventListener('touchend', up); + }; + + /** + * @param {MouseEvent | TouchEvent} event + */ + const down = event => { + const popup = getPopup(); + if (event.target === popup || getIcon().contains(/** @type {HTMLElement} */event.target)) { + dragging = true; + const clientXY = getClientXY(event); + mousedownX = clientXY.clientX; + mousedownY = clientXY.clientY; + initialX = parseInt(popup.style.insetInlineStart) || 0; + initialY = parseInt(popup.style.insetBlockStart) || 0; + addClass(popup, 'swal2-dragging'); + } + }; + + /** + * @param {MouseEvent | TouchEvent} event + */ + const move = event => { + const popup = getPopup(); + if (dragging) { + let { + clientX, + clientY + } = getClientXY(event); + popup.style.insetInlineStart = `${initialX + (clientX - mousedownX)}px`; + popup.style.insetBlockStart = `${initialY + (clientY - mousedownY)}px`; + } + }; + const up = () => { + const popup = getPopup(); + dragging = false; + removeClass(popup, 'swal2-dragging'); + }; + + /** + * @param {MouseEvent | TouchEvent} event + * @returns {{ clientX: number, clientY: number }} + */ + const getClientXY = event => { + let clientX = 0, + clientY = 0; + if (event.type.startsWith('mouse')) { + clientX = /** @type {MouseEvent} */event.clientX; + clientY = /** @type {MouseEvent} */event.clientY; + } else if (event.type.startsWith('touch')) { + clientX = /** @type {TouchEvent} */event.touches[0].clientX; + clientY = /** @type {TouchEvent} */event.touches[0].clientY; + } + return { + clientX, + clientY + }; + }; + /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderPopup = (instance, params) => { const container = getContainer(); const popup = getPopup(); + if (!container || !popup) { + return; + } // Width // https://github.com/sweetalert2/sweetalert2/issues/2170 if (params.toast) { applyNumericalStyle(container, 'width', params.width); popup.style.width = '100%'; - popup.insertBefore(getLoader(), getIcon()); + const loader = getLoader(); + if (loader) { + popup.insertBefore(loader, getIcon()); + } } else { applyNumericalStyle(popup, 'width', params.width); } @@ -1519,6 +1701,13 @@ // Classes addClasses$1(popup, params); + if (params.draggable && !params.toast) { + addClass(popup, swalClasses.draggable); + addDraggableListeners(popup); + } else { + removeClass(popup, swalClasses.draggable); + removeDraggableListeners(popup); + } }; /** @@ -1526,8 +1715,9 @@ * @param {SweetAlertOptions} params */ const addClasses$1 = (popup, params) => { + const showClass = params.showClass || {}; // Default Class + showClass when updating Swal.update({}) - popup.className = `${swalClasses.popup} ${isVisible$1(popup) ? params.showClass.popup : ''}`; + popup.className = `${swalClasses.popup} ${isVisible$1(popup) ? showClass.popup : ''}`; if (params.toast) { addClass([document.documentElement, document.body], swalClasses['toast-shown']); addClass(popup, swalClasses.toast); @@ -1537,6 +1727,7 @@ // Custom class applyCustomClass(popup, params, 'popup'); + // TODO: remove in the next major if (typeof params.customClass === 'string') { addClass(popup, params.customClass); } @@ -1548,27 +1739,34 @@ }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderProgressSteps = (instance, params) => { - const progressStepsContainer = getProgressSteps$1(); - if (!params.progressSteps || params.progressSteps.length === 0) { + const progressStepsContainer = getProgressSteps(); + if (!progressStepsContainer) { + return; + } + const { + progressSteps, + currentProgressStep + } = params; + if (!progressSteps || progressSteps.length === 0 || currentProgressStep === undefined) { hide(progressStepsContainer); return; } show(progressStepsContainer); progressStepsContainer.textContent = ''; - if (params.currentProgressStep >= params.progressSteps.length) { + if (currentProgressStep >= progressSteps.length) { warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); } - params.progressSteps.forEach((step, index) => { + progressSteps.forEach((step, index) => { const stepEl = createStepElement(step); progressStepsContainer.appendChild(stepEl); - if (index === params.currentProgressStep) { + if (index === currentProgressStep) { addClass(stepEl, swalClasses['active-progress-step']); } - if (index !== params.progressSteps.length - 1) { + if (index !== progressSteps.length - 1) { const lineEl = createLineElement(params); progressStepsContainer.appendChild(lineEl); } @@ -1600,11 +1798,15 @@ }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderTitle = (instance, params) => { const title = getTitle(); + if (!title) { + return; + } + showWhenInnerHtmlPresent(title); toggle(title, params.title || params.titleText, 'block'); if (params.title) { parseHtmlToContainer(params.title, title); @@ -1618,7 +1820,7 @@ }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const render = (instance, params) => { @@ -1632,60 +1834,13 @@ renderContent(instance, params); renderActions(instance, params); renderFooter(instance, params); - if (typeof params.didRender === 'function') { - params.didRender(getPopup()); - } - }; - - /** - * Hides loader and shows back the button which was hidden by .showLoading() - */ - function hideLoading() { - // do nothing if popup is closed - const innerParams = privateProps.innerParams.get(this); - if (!innerParams) { - return; - } - const domCache = privateProps.domCache.get(this); - hide(domCache.loader); - if (isToast()) { - if (innerParams.icon) { - show(getIcon()); - } - } else { - showRelatedButton(domCache); - } - removeClass([domCache.popup, domCache.actions], swalClasses.loading); - domCache.popup.removeAttribute('aria-busy'); - domCache.popup.removeAttribute('data-loading'); - domCache.confirmButton.disabled = false; - domCache.denyButton.disabled = false; - domCache.cancelButton.disabled = false; - } - const showRelatedButton = domCache => { - const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); - if (buttonToReplace.length) { - show(buttonToReplace[0], 'inline-block'); - } else if (allButtonsAreHidden()) { - hide(domCache.actions); + const popup = getPopup(); + if (typeof params.didRender === 'function' && popup) { + params.didRender(popup); } + globalState.eventEmitter.emit('didRender', popup); }; - /** - * Gets the input DOM node, this method works with input parameter. - * - * @param {SweetAlert2} instance - * @returns {HTMLElement | null} - */ - function getInput(instance) { - const innerParams = privateProps.innerParams.get(instance || this); - const domCache = privateProps.domCache.get(instance || this); - if (!domCache) { - return null; - } - return getInput$1(domCache.popup, innerParams.input); - } - /* * Global function to determine if SweetAlert2 popup is shown */ @@ -1696,18 +1851,30 @@ /* * Global function to click 'Confirm' button */ - const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + const clickConfirm = () => { + var _dom$getConfirmButton; + return (_dom$getConfirmButton = getConfirmButton()) === null || _dom$getConfirmButton === void 0 ? void 0 : _dom$getConfirmButton.click(); + }; /* * Global function to click 'Deny' button */ - const clickDeny = () => getDenyButton() && getDenyButton().click(); + const clickDeny = () => { + var _dom$getDenyButton; + return (_dom$getDenyButton = getDenyButton()) === null || _dom$getDenyButton === void 0 ? void 0 : _dom$getDenyButton.click(); + }; /* * Global function to click 'Cancel' button */ - const clickCancel = () => getCancelButton() && getCancelButton().click(); + const clickCancel = () => { + var _dom$getCancelButton; + return (_dom$getCancelButton = getCancelButton()) === null || _dom$getCancelButton === void 0 ? void 0 : _dom$getCancelButton.click(); + }; + + /** @typedef {'cancel' | 'backdrop' | 'close' | 'esc' | 'timer'} DismissReason */ + /** @type {Record<DismissReason, DismissReason>} */ const DismissReason = Object.freeze({ cancel: 'cancel', backdrop: 'backdrop', @@ -1729,15 +1896,14 @@ }; /** - * @param {SweetAlert2} instance * @param {GlobalState} globalState * @param {SweetAlertOptions} innerParams * @param {*} dismissWith */ - const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + const addKeydownHandler = (globalState, innerParams, dismissWith) => { removeKeydownHandler(globalState); if (!innerParams.toast) { - globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + globalState.keydownHandler = e => keydownHandler(innerParams, e, dismissWith); globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); globalState.keydownListenerCapture = innerParams.keydownListenerCapture; globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { @@ -1748,11 +1914,11 @@ }; /** - * @param {SweetAlertOptions} innerParams * @param {number} index * @param {number} increment */ - const setFocus = (innerParams, index, increment) => { + const setFocus = (index, increment) => { + var _dom$getPopup; const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match if (focusableElements.length) { @@ -1766,21 +1932,21 @@ } else if (index === -1) { index = focusableElements.length - 1; } - return focusableElements[index].focus(); + focusableElements[index].focus(); + return; } // no visible focusable elements, focus the popup - getPopup().focus(); + (_dom$getPopup = getPopup()) === null || _dom$getPopup === void 0 || _dom$getPopup.focus(); }; const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; /** - * @param {SweetAlert2} instance - * @param {KeyboardEvent} e - * @param {function} dismissWith + * @param {SweetAlertOptions} innerParams + * @param {KeyboardEvent} event + * @param {Function} dismissWith */ - const keydownHandler = (instance, e, dismissWith) => { - const innerParams = privateProps.innerParams.get(instance); + const keydownHandler = (innerParams, event, dismissWith) => { if (!innerParams) { return; // This instance has already been destroyed } @@ -1789,60 +1955,58 @@ // https://developer.mozilla.org/en-US/docs/Web/API/Document/keydown_event#ignoring_keydown_during_ime_composition // https://github.com/sweetalert2/sweetalert2/issues/720 // https://github.com/sweetalert2/sweetalert2/issues/2406 - if (e.isComposing || e.keyCode === 229) { + if (event.isComposing || event.keyCode === 229) { return; } if (innerParams.stopKeydownPropagation) { - e.stopPropagation(); + event.stopPropagation(); } // ENTER - if (e.key === 'Enter') { - handleEnter(instance, e, innerParams); + if (event.key === 'Enter') { + handleEnter(event, innerParams); } // TAB - else if (e.key === 'Tab') { - handleTab(e, innerParams); + else if (event.key === 'Tab') { + handleTab(event); } // ARROWS - switch focus between buttons - else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { - handleArrows(e.key); + else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(event.key)) { + handleArrows(event.key); } // ESC - else if (e.key === 'Escape') { - handleEsc(e, innerParams, dismissWith); + else if (event.key === 'Escape') { + handleEsc(event, innerParams, dismissWith); } }; /** - * @param {SweetAlert2} instance - * @param {KeyboardEvent} e + * @param {KeyboardEvent} event * @param {SweetAlertOptions} innerParams */ - const handleEnter = (instance, e, innerParams) => { + const handleEnter = (event, innerParams) => { // https://github.com/sweetalert2/sweetalert2/issues/2386 if (!callIfFunction(innerParams.allowEnterKey)) { return; } - if (e.target && instance.getInput() && e.target instanceof HTMLElement && e.target.outerHTML === instance.getInput().outerHTML) { + const input = getInput$1(getPopup(), innerParams.input); + if (event.target && input && event.target instanceof HTMLElement && event.target.outerHTML === input.outerHTML) { if (['textarea', 'file'].includes(innerParams.input)) { return; // do not submit } - clickConfirm(); - e.preventDefault(); + event.preventDefault(); } }; /** - * @param {KeyboardEvent} e - * @param {SweetAlertOptions} innerParams + * @param {KeyboardEvent} event */ - const handleTab = (e, innerParams) => { - const targetElement = e.target; + const handleTab = event => { + const targetElement = event.target; const focusableElements = getFocusableElements(); let btnIndex = -1; for (let i = 0; i < focusableElements.length; i++) { @@ -1853,31 +2017,40 @@ } // Cycle to the next button - if (!e.shiftKey) { - setFocus(innerParams, btnIndex, 1); + if (!event.shiftKey) { + setFocus(btnIndex, 1); } // Cycle to the prev button else { - setFocus(innerParams, btnIndex, -1); + setFocus(btnIndex, -1); } - e.stopPropagation(); - e.preventDefault(); + event.stopPropagation(); + event.preventDefault(); }; /** * @param {string} key */ const handleArrows = key => { + const actions = getActions(); const confirmButton = getConfirmButton(); const denyButton = getDenyButton(); const cancelButton = getCancelButton(); - if (document.activeElement instanceof HTMLElement && ![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + if (!actions || !confirmButton || !denyButton || !cancelButton) { + return; + } + /** @type HTMLElement[] */ + const buttons = [confirmButton, denyButton, cancelButton]; + if (document.activeElement instanceof HTMLElement && !buttons.includes(document.activeElement)) { return; } const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; let buttonToFocus = document.activeElement; - for (let i = 0; i < getActions().children.length; i++) { + if (!buttonToFocus) { + return; + } + for (let i = 0; i < actions.children.length; i++) { buttonToFocus = buttonToFocus[sibling]; if (!buttonToFocus) { return; @@ -1892,13 +2065,13 @@ }; /** - * @param {KeyboardEvent} e + * @param {KeyboardEvent} event * @param {SweetAlertOptions} innerParams - * @param {function} dismissWith + * @param {Function} dismissWith */ - const handleEsc = (e, innerParams, dismissWith) => { + const handleEsc = (event, innerParams, dismissWith) => { if (callIfFunction(innerParams.allowEscapeKey)) { - e.preventDefault(); + event.preventDefault(); dismissWith(DismissReason.esc); } }; @@ -1924,13 +2097,14 @@ // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. const setAriaHidden = () => { + const container = getContainer(); const bodyChildren = Array.from(document.body.children); bodyChildren.forEach(el => { - if (el === getContainer() || el.contains(getContainer())) { + if (el.contains(container)) { return; } if (el.hasAttribute('aria-hidden')) { - el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden') || ''); } el.setAttribute('aria-hidden', 'true'); }); @@ -1939,7 +2113,7 @@ const bodyChildren = Array.from(document.body.children); bodyChildren.forEach(el => { if (el.hasAttribute('data-previous-aria-hidden')) { - el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden') || ''); el.removeAttribute('data-previous-aria-hidden'); } else { el.removeAttribute('aria-hidden'); @@ -1947,36 +2121,19 @@ }); }; - /* istanbul ignore file */ - - // Fix iOS scrolling http://stackoverflow.com/q/39626302 + // @ts-ignore + const isSafariOrIOS = typeof window !== 'undefined' && !!window.GestureEvent; // true for Safari desktop + all iOS browsers https://stackoverflow.com/a/70585394 + /** + * Fix iOS scrolling + * http://stackoverflow.com/q/39626302 + */ const iOSfix = () => { - const iOS = - // @ts-ignore - /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; - if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + if (isSafariOrIOS && !hasClass(document.body, swalClasses.iosfix)) { const offset = document.body.scrollTop; document.body.style.top = `${offset * -1}px`; addClass(document.body, swalClasses.iosfix); lockBodyScroll(); - addBottomPaddingForTallPopups(); - } - }; - - /** - * https://github.com/sweetalert2/sweetalert2/issues/1948 - */ - const addBottomPaddingForTallPopups = () => { - const ua = navigator.userAgent; - const iOS = !!ua.match(/iPad/i) || !!ua.match(/iPhone/i); - const webkit = !!ua.match(/WebKit/i); - const iOSSafari = iOS && webkit && !ua.match(/CriOS/i); - if (iOSSafari) { - const bottomPanelHeight = 44; - if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { - getContainer().style.paddingBottom = `${bottomPanelHeight}px`; - } } }; @@ -1985,20 +2142,24 @@ */ const lockBodyScroll = () => { const container = getContainer(); + if (!container) { + return; + } + /** @type {boolean} */ let preventTouchMove; /** - * @param {TouchEvent} e + * @param {TouchEvent} event */ - container.ontouchstart = e => { - preventTouchMove = shouldPreventTouchMove(e); + container.ontouchstart = event => { + preventTouchMove = shouldPreventTouchMove(event); }; /** - * @param {TouchEvent} e + * @param {TouchEvent} event */ - container.ontouchmove = e => { + container.ontouchmove = event => { if (preventTouchMove) { - e.preventDefault(); - e.stopPropagation(); + event.preventDefault(); + event.stopPropagation(); } }; }; @@ -2010,6 +2171,10 @@ const shouldPreventTouchMove = event => { const target = event.target; const container = getContainer(); + const htmlContainer = getHtmlContainer(); + if (!container || !htmlContainer) { + return false; + } if (isStylus(event) || isZoom(event)) { return false; } @@ -2020,9 +2185,9 @@ // #1603 target.tagName !== 'TEXTAREA' && // #2266 - !(isScrollable(getHtmlContainer()) && + !(isScrollable(htmlContainer) && // #1944 - getHtmlContainer().contains(target))) { + htmlContainer.contains(target))) { return true; } return false; @@ -2056,29 +2221,56 @@ } }; - const fixScrollbar = () => { + /** + * Measure scrollbar width for padding body during modal show/hide + * https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + * + * @returns {number} + */ + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + /** + * Remember state in cases where opening and handling a modal will fiddle with it. + * @type {number | null} + */ + let previousBodyPadding = null; + + /** + * @param {string} initialBodyOverflow + */ + const replaceScrollbarWithPadding = initialBodyOverflow => { // for queues, do not do this more than once - if (states.previousBodyPadding !== null) { + if (previousBodyPadding !== null) { return; } // if the body has overflow - if (document.body.scrollHeight > window.innerHeight) { + if (document.body.scrollHeight > window.innerHeight || initialBodyOverflow === 'scroll' // https://github.com/sweetalert2/sweetalert2/issues/2663 + ) { // add padding so the content doesn't shift after removal of scrollbar - states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); - document.body.style.paddingRight = `${states.previousBodyPadding + measureScrollbar()}px`; + previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = `${previousBodyPadding + measureScrollbar()}px`; } }; - const undoScrollbar = () => { - if (states.previousBodyPadding !== null) { - document.body.style.paddingRight = `${states.previousBodyPadding}px`; - states.previousBodyPadding = null; + const undoReplaceScrollbarWithPadding = () => { + if (previousBodyPadding !== null) { + document.body.style.paddingRight = `${previousBodyPadding}px`; + previousBodyPadding = null; } }; - /* - * Instance method to close sweetAlert + /** + * @param {SweetAlert} instance + * @param {HTMLElement} container + * @param {boolean} returnFocus + * @param {Function} didClose */ - function removePopupAndResetState(instance, container, returnFocus, didClose) { if (isToast()) { triggerDidCloseAndDispose(instance, didClose); @@ -2086,10 +2278,10 @@ restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); removeKeydownHandler(globalState); } - const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); - // workaround for #2088 + + // workaround for https://github.com/sweetalert2/sweetalert2/issues/2088 // for some reason removing the container in Safari will scroll the document to bottom - if (isSafari) { + if (isSafariOrIOS) { container.setAttribute('style', 'display:none !important'); container.removeAttribute('class'); container.innerHTML = ''; @@ -2097,20 +2289,30 @@ container.remove(); } if (isModal()) { - undoScrollbar(); + undoReplaceScrollbarWithPadding(); undoIOSfix(); unsetAriaHidden(); } removeBodyClasses(); } + + /** + * Remove SweetAlert2 classes from body + */ function removeBodyClasses() { removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); } + + /** + * Instance method to close sweetAlert + * + * @param {any} resolveValue + */ function close(resolveValue) { resolveValue = prepareResolveValue(resolveValue); const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); const didClose = triggerClosePopup(this); - if (this.isAwaitingPromise()) { + if (this.isAwaitingPromise) { // A swal awaiting for a promise (after a click on Confirm or Deny) cannot be dismissed anymore #2335 if (!resolveValue.isDismissed) { handleAwaitingPromise(this); @@ -2121,9 +2323,6 @@ swalPromiseResolve(resolveValue); } } - function isAwaitingPromise() { - return !!privateProps.awaitingPromise.get(this); - } const triggerClosePopup = instance => { const popup = getPopup(); if (!popup) { @@ -2141,6 +2340,10 @@ handlePopupAnimation(instance, popup, innerParams); return true; }; + + /** + * @param {any} error + */ function rejectPromise(error) { const rejectPromise = privateMethods.swalPromiseReject.get(this); handleAwaitingPromise(this); @@ -2149,15 +2352,24 @@ rejectPromise(error); } } + + /** + * @param {SweetAlert} instance + */ const handleAwaitingPromise = instance => { - if (instance.isAwaitingPromise()) { - privateProps.awaitingPromise.delete(instance); + if (instance.isAwaitingPromise) { + delete instance.isAwaitingPromise; // The instance might have been previously partly destroyed, we must resume the destroy process in this case #2335 if (!privateProps.innerParams.get(instance)) { instance._destroy(); } } }; + + /** + * @param {any} resolveValue + * @returns {SweetAlertResult} + */ const prepareResolveValue = resolveValue => { // When user calls Swal.close() if (typeof resolveValue === 'undefined') { @@ -2173,13 +2385,21 @@ isDismissed: false }, resolveValue); }; + + /** + * @param {SweetAlert} instance + * @param {HTMLElement} popup + * @param {SweetAlertOptions} innerParams + */ const handlePopupAnimation = (instance, popup, innerParams) => { + var _globalState$eventEmi; const container = getContainer(); // If animation is supported, animate - const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + const animationIsSupported = hasCssAnimation(popup); if (typeof innerParams.willClose === 'function') { innerParams.willClose(popup); } + (_globalState$eventEmi = globalState.eventEmitter) === null || _globalState$eventEmi === void 0 || _globalState$eventEmi.emit('willClose', popup); if (animationIsSupported) { animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); } else { @@ -2187,802 +2407,965 @@ removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); } }; + + /** + * @param {SweetAlert} instance + * @param {HTMLElement} popup + * @param {HTMLElement} container + * @param {boolean} returnFocus + * @param {Function} didClose + */ const animatePopup = (instance, popup, container, returnFocus, didClose) => { globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); - popup.addEventListener(animationEndEvent, function (e) { + /** + * @param {AnimationEvent | TransitionEvent} e + */ + const swalCloseAnimationFinished = function (e) { if (e.target === popup) { - globalState.swalCloseEventFinishedCallback(); + var _globalState$swalClos; + (_globalState$swalClos = globalState.swalCloseEventFinishedCallback) === null || _globalState$swalClos === void 0 || _globalState$swalClos.call(globalState); delete globalState.swalCloseEventFinishedCallback; + popup.removeEventListener('animationend', swalCloseAnimationFinished); + popup.removeEventListener('transitionend', swalCloseAnimationFinished); } - }); + }; + popup.addEventListener('animationend', swalCloseAnimationFinished); + popup.addEventListener('transitionend', swalCloseAnimationFinished); }; + + /** + * @param {SweetAlert} instance + * @param {Function} didClose + */ const triggerDidCloseAndDispose = (instance, didClose) => { setTimeout(() => { + var _globalState$eventEmi2; if (typeof didClose === 'function') { didClose.bind(instance.params)(); } - instance._destroy(); + (_globalState$eventEmi2 = globalState.eventEmitter) === null || _globalState$eventEmi2 === void 0 || _globalState$eventEmi2.emit('didClose'); + // instance might have been destroyed already + if (instance._destroy) { + instance._destroy(); + } }); }; /** - * @param {SweetAlert2} instance - * @param {string[]} buttons - * @param {boolean} disabled + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + * + * @param {HTMLButtonElement | null} [buttonToReplace] */ - function setButtonsDisabled(instance, buttons, disabled) { - const domCache = privateProps.domCache.get(instance); - buttons.forEach(button => { - domCache[button].disabled = disabled; - }); - } + const showLoading = buttonToReplace => { + let popup = getPopup(); + if (!popup) { + new Swal(); + } + popup = getPopup(); + if (!popup) { + return; + } + const loader = getLoader(); + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + show(loader); + popup.setAttribute('data-loading', 'true'); + popup.setAttribute('aria-busy', 'true'); + popup.focus(); + }; /** - * @param {HTMLInputElement} input - * @param {boolean} disabled + * @param {HTMLElement} popup + * @param {HTMLButtonElement | null} [buttonToReplace] */ - function setInputDisabled(input, disabled) { - if (!input) { + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + if (!actions || !loader) { return; } - if (input.type === 'radio') { - const radiosContainer = input.parentNode.parentNode; - const radios = radiosContainer.querySelectorAll('input'); - for (let i = 0; i < radios.length; i++) { - radios[i].disabled = disabled; - } - } else { - input.disabled = disabled; + if (!buttonToReplace && isVisible$1(getConfirmButton())) { + buttonToReplace = getConfirmButton(); } - } - function enableButtons() { - setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); - } - function disableButtons() { - setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); - } - function enableInput() { - setInputDisabled(this.getInput(), false); - } - function disableInput() { - setInputDisabled(this.getInput(), true); - } - - // Show block with validation message - function showValidationMessage(error) { - const domCache = privateProps.domCache.get(this); - const params = privateProps.innerParams.get(this); - setInnerHtml(domCache.validationMessage, error); - domCache.validationMessage.className = swalClasses['validation-message']; - if (params.customClass && params.customClass.validationMessage) { - addClass(domCache.validationMessage, params.customClass.validationMessage); + show(actions); + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + actions.insertBefore(loader, buttonToReplace); } - show(domCache.validationMessage); - const input = this.getInput(); - if (input) { - input.setAttribute('aria-invalid', true); - input.setAttribute('aria-describedby', swalClasses['validation-message']); - focusInput(input); - addClass(input, swalClasses.inputerror); + addClass([popup, actions], swalClasses.loading); + }; + + /** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].some(i => i === params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); } - } + }; - // Hide block with validation message - function resetValidationMessage() { - const domCache = privateProps.domCache.get(this); - if (domCache.validationMessage) { - hide(domCache.validationMessage); + /** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} innerParams + * @returns {SweetAlertInputValue} + */ + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + if (!input) { + return null; } - const input = this.getInput(); - if (input) { - input.removeAttribute('aria-invalid'); - input.removeAttribute('aria-describedby'); - removeClass(input, swalClasses.inputerror); + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + case 'radio': + return getRadioValue(input); + case 'file': + return getFileValue(input); + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; } - } - - function getProgressSteps() { - const domCache = privateProps.domCache.get(this); - return domCache.progressSteps; - } - - const defaultParams = { - title: '', - titleText: '', - text: '', - html: '', - footer: '', - icon: undefined, - iconColor: undefined, - iconHtml: undefined, - template: undefined, - toast: false, - showClass: { - popup: 'swal2-show', - backdrop: 'swal2-backdrop-show', - icon: 'swal2-icon-show' - }, - hideClass: { - popup: 'swal2-hide', - backdrop: 'swal2-backdrop-hide', - icon: 'swal2-icon-hide' - }, - customClass: {}, - target: 'body', - color: undefined, - backdrop: true, - heightAuto: true, - allowOutsideClick: true, - allowEscapeKey: true, - allowEnterKey: true, - stopKeydownPropagation: true, - keydownListenerCapture: false, - showConfirmButton: true, - showDenyButton: false, - showCancelButton: false, - preConfirm: undefined, - preDeny: undefined, - confirmButtonText: 'OK', - confirmButtonAriaLabel: '', - confirmButtonColor: undefined, - denyButtonText: 'No', - denyButtonAriaLabel: '', - denyButtonColor: undefined, - cancelButtonText: 'Cancel', - cancelButtonAriaLabel: '', - cancelButtonColor: undefined, - buttonsStyling: true, - reverseButtons: false, - focusConfirm: true, - focusDeny: false, - focusCancel: false, - returnFocus: true, - showCloseButton: false, - closeButtonHtml: '×', - closeButtonAriaLabel: 'Close this dialog', - loaderHtml: '', - showLoaderOnConfirm: false, - showLoaderOnDeny: false, - imageUrl: undefined, - imageWidth: undefined, - imageHeight: undefined, - imageAlt: '', - timer: undefined, - timerProgressBar: false, - width: undefined, - padding: undefined, - background: undefined, - input: undefined, - inputPlaceholder: '', - inputLabel: '', - inputValue: '', - inputOptions: {}, - inputAutoTrim: true, - inputAttributes: {}, - inputValidator: undefined, - returnInputValueOnDeny: false, - validationMessage: undefined, - grow: false, - position: 'center', - progressSteps: [], - currentProgressStep: undefined, - progressStepsDistance: undefined, - willOpen: undefined, - didOpen: undefined, - didRender: undefined, - willClose: undefined, - didClose: undefined, - didDestroy: undefined, - scrollbarPadding: true }; - const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'color', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; - const deprecatedParams = {}; - const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; /** - * Is valid parameter - * - * @param {string} paramName - * @returns {boolean} + * @param {HTMLInputElement} input + * @returns {number} */ - const isValidParameter = paramName => { - return Object.prototype.hasOwnProperty.call(defaultParams, paramName); - }; + const getCheckboxValue = input => input.checked ? 1 : 0; /** - * Is valid parameter for Swal.update() method - * - * @param {string} paramName - * @returns {boolean} + * @param {HTMLInputElement} input + * @returns {string | null} */ - const isUpdatableParameter = paramName => { - return updatableParams.indexOf(paramName) !== -1; - }; + const getRadioValue = input => input.checked ? input.value : null; /** - * Is deprecated parameter - * - * @param {string} paramName - * @returns {string | undefined} + * @param {HTMLInputElement} input + * @returns {FileList | File | null} */ - const isDeprecatedParameter = paramName => { - return deprecatedParams[paramName]; - }; + const getFileValue = input => input.files && input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; /** - * @param {string} param + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params */ - const checkIfParamIsValid = param => { - if (!isValidParameter(param)) { - warn(`Unknown parameter "${param}"`); + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + if (!popup) { + return; + } + /** + * @param {Record<string, any>} inputOptions + */ + const processInputOptions = inputOptions => { + if (params.input === 'select') { + populateSelectOptions(popup, formatInputOptions(inputOptions), params); + } else if (params.input === 'radio') { + populateRadioOptions(popup, formatInputOptions(inputOptions), params); + } + }; + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof params.inputOptions}`); } }; /** - * @param {string} param + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params */ - const checkIfToastParamIsValid = param => { - if (toastIncompatibleParams.includes(param)) { - warn(`The parameter "${param}" is incompatible with toasts`); + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + if (!input) { + return; } + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? `${parseFloat(inputValue) || 0}` : `${inputValue}`; + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error(`Error in inputValue promise: ${err}`); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); }; /** - * @param {string} param + * @param {HTMLElement} popup + * @param {InputOptionFlattened[]} inputOptions + * @param {SweetAlertOptions} params */ - const checkIfParamIsDeprecated = param => { - if (isDeprecatedParameter(param)) { - warnAboutDeprecation(param, isDeprecatedParameter(param)); + function populateSelectOptions(popup, inputOptions, params) { + const select = getDirectChildByClass(popup, swalClasses.select); + if (!select) { + return; } - }; + /** + * @param {HTMLElement} parent + * @param {string} optionLabel + * @param {string} optionValue + */ + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; + // <optgroup> spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a <optgroup> + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an <optgroup> + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of <option> + renderOption(select, optionLabel, optionValue); + } + }); + select.focus(); + } /** - * Show relevant warnings for given params - * + * @param {HTMLElement} popup + * @param {InputOptionFlattened[]} inputOptions * @param {SweetAlertOptions} params */ - const showWarningsForParams = params => { - if (params.backdrop === false && params.allowOutsideClick) { - warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + function populateRadioOptions(popup, inputOptions, params) { + const radio = getDirectChildByClass(popup, swalClasses.radio); + if (!radio) { + return; } - for (const param in params) { - checkIfParamIsValid(param); - if (params.toast) { - checkIfToastParamIsValid(param); + inputOptions.forEach(inputOption => { + const radioValue = inputOption[0]; + const radioLabel = inputOption[1]; + const radioInput = document.createElement('input'); + const radioLabelElement = document.createElement('label'); + radioInput.type = 'radio'; + radioInput.name = swalClasses.radio; + radioInput.value = radioValue; + if (isSelected(radioValue, params.inputValue)) { + radioInput.checked = true; } - checkIfParamIsDeprecated(param); + const label = document.createElement('span'); + setInnerHtml(label, radioLabel); + label.className = swalClasses.label; + radioLabelElement.appendChild(radioInput); + radioLabelElement.appendChild(label); + radio.appendChild(radioLabelElement); + }); + const radios = radio.querySelectorAll('input'); + if (radios.length) { + radios[0].focus(); } - }; + } /** - * Updates popup parameters. - */ - function update(params) { - const popup = getPopup(); - const innerParams = privateProps.innerParams.get(this); - if (!popup || hasClass(popup, innerParams.hideClass.popup)) { - return warn(`You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.`); + * Converts `inputOptions` into an array of `[value, label]`s + * + * @param {Record<string, any>} inputOptions + * @typedef {string[]} InputOptionFlattened + * @returns {InputOptionFlattened[]} + */ + const formatInputOptions = inputOptions => { + /** @type {InputOptionFlattened[]} */ + const result = []; + if (inputOptions instanceof Map) { + inputOptions.forEach((value, key) => { + let valueFormatted = value; + if (typeof valueFormatted === 'object') { + // case of <optgroup> + valueFormatted = formatInputOptions(valueFormatted); + } + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + if (typeof valueFormatted === 'object') { + // case of <optgroup> + valueFormatted = formatInputOptions(valueFormatted); + } + result.push([key, valueFormatted]); + }); } - const validUpdatableParams = filterValidParams(params); - const updatedParams = Object.assign({}, innerParams, validUpdatableParams); - render(this, updatedParams); - privateProps.innerParams.set(this, updatedParams); - Object.defineProperties(this, { - params: { - value: Object.assign({}, this.params, params), - writable: false, - enumerable: true - } - }); - } - const filterValidParams = params => { - const validUpdatableParams = {}; - Object.keys(params).forEach(param => { - if (isUpdatableParameter(param)) { - validUpdatableParams[param] = params[param]; - } else { - warn(`Invalid parameter to update: ${param}`); - } - }); - return validUpdatableParams; + return result; }; - function _destroy() { - const domCache = privateProps.domCache.get(this); - const innerParams = privateProps.innerParams.get(this); - if (!innerParams) { - disposeWeakMaps(this); // The WeakMaps might have been partly destroyed, we must recall it to dispose any remaining WeakMaps #2335 - return; // This instance has already been destroyed - } - - // Check if there is another Swal closing - if (domCache.popup && globalState.swalCloseEventFinishedCallback) { - globalState.swalCloseEventFinishedCallback(); - delete globalState.swalCloseEventFinishedCallback; - } - if (typeof innerParams.didDestroy === 'function') { - innerParams.didDestroy(); - } - disposeSwal(this); - } - /** - * @param {SweetAlert2} instance + * @param {string} optionValue + * @param {SweetAlertInputValue} inputValue + * @returns {boolean} */ - const disposeSwal = instance => { - disposeWeakMaps(instance); - // Unset this.params so GC will dispose it (#1569) - // @ts-ignore - delete instance.params; - // Unset globalState props so GC will dispose globalState (#1569) - delete globalState.keydownHandler; - delete globalState.keydownTarget; - // Unset currentInstance - delete globalState.currentInstance; + const isSelected = (optionValue, inputValue) => { + return !!inputValue && inputValue.toString() === optionValue.toString(); }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance */ - const disposeWeakMaps = instance => { - // If the current instance is awaiting a promise result, we keep the privateMethods to call them once the promise result is retrieved #2335 - // @ts-ignore - if (instance.isAwaitingPromise()) { - unsetWeakMaps(privateProps, instance); - privateProps.awaitingPromise.set(instance, true); + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); } else { - unsetWeakMaps(privateMethods, instance); - unsetWeakMaps(privateProps, instance); + confirm(instance, true); } }; /** - * @param {object} obj - * @param {SweetAlert2} instance + * @param {SweetAlert} instance */ - const unsetWeakMaps = (obj, instance) => { - for (const i in obj) { - obj[i].delete(instance); + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); } }; - var instanceMethods = /*#__PURE__*/Object.freeze({ - __proto__: null, - hideLoading: hideLoading, - disableLoading: hideLoading, - getInput: getInput, - close: close, - isAwaitingPromise: isAwaitingPromise, - rejectPromise: rejectPromise, - handleAwaitingPromise: handleAwaitingPromise, - closePopup: close, - closeModal: close, - closeToast: close, - enableButtons: enableButtons, - disableButtons: disableButtons, - enableInput: enableInput, - disableInput: disableInput, - showValidationMessage: showValidationMessage, - resetValidationMessage: resetValidationMessage, - getProgressSteps: getProgressSteps, - update: update, - _destroy: _destroy - }); + /** + * @param {SweetAlert} instance + * @param {Function} dismissWith + */ + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; /** - * Shows loader (spinner), this is useful with AJAX requests. - * By default the loader be shown instead of the "Confirm" button. + * @param {SweetAlert} instance + * @param {'confirm' | 'deny'} type */ - const showLoading = buttonToReplace => { - let popup = getPopup(); - if (!popup) { - new Swal(); // eslint-disable-line no-new + const handleConfirmOrDenyWithInput = (instance, type) => { + const innerParams = privateProps.innerParams.get(instance); + if (!innerParams.input) { + error(`The "input" parameter is needed to be set when using returnInputValueOn${capitalizeFirstLetter(type)}`); + return; } - - popup = getPopup(); - const loader = getLoader(); - if (isToast()) { - hide(getIcon()); + const input = instance.getInput(); + const inputValue = getInputValue(instance, innerParams); + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (input && !input.checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage || input.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); } else { - replaceButton(popup, buttonToReplace); + confirm(instance, inputValue); } - show(loader); - popup.setAttribute('data-loading', 'true'); - popup.setAttribute('aria-busy', 'true'); - popup.focus(); }; - const replaceButton = (popup, buttonToReplace) => { - const actions = getActions(); - const loader = getLoader(); - if (!buttonToReplace && isVisible$1(getConfirmButton())) { - buttonToReplace = getConfirmButton(); + + /** + * @param {SweetAlert} instance + * @param {SweetAlertInputValue} inputValue + * @param {'confirm' | 'deny'} type + */ + const handleInputValidator = (instance, inputValue, type) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + /** + * @param {SweetAlert} instance + * @param {any} value + */ + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); } - show(actions); - if (buttonToReplace) { - hide(buttonToReplace); - loader.setAttribute('data-button-to-replace', buttonToReplace.className); + if (innerParams.preDeny) { + instance.isAwaitingPromise = true; // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preDeny's promise is received + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + handleAwaitingPromise(instance); + } else { + instance.close({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }).catch(error => rejectWith(instance || undefined, error)); + } else { + instance.close({ + isDenied: true, + value + }); } - loader.parentNode.insertBefore(loader, buttonToReplace); - addClass([popup, actions], swalClasses.loading); }; /** - * @typedef { string | number | boolean } InputValue + * @param {SweetAlert} instance + * @param {any} value */ + const succeedWith = (instance, value) => { + instance.close({ + isConfirmed: true, + value + }); + }; /** - * @param {SweetAlert2} instance - * @param {SweetAlertOptions} params + * + * @param {SweetAlert} instance + * @param {string} error */ - const handleInputOptionsAndValue = (instance, params) => { - if (params.input === 'select' || params.input === 'radio') { - handleInputOptions(instance, params); - } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { - showLoading(getConfirmButton()); - handleInputValue(instance, params); - } + const rejectWith = (instance, error) => { + instance.rejectPromise(error); }; /** - * @param {SweetAlert2} instance - * @param {SweetAlertOptions} innerParams - * @returns {string | number | File | FileList | null} + * + * @param {SweetAlert} instance + * @param {any} value */ - const getInputValue = (instance, innerParams) => { - const input = instance.getInput(); - if (!input) { - return null; + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + if (innerParams.showLoaderOnConfirm) { + showLoading(); } - switch (innerParams.input) { - case 'checkbox': - return getCheckboxValue(input); - case 'radio': - return getRadioValue(input); - case 'file': - return getFileValue(input); - default: - return innerParams.inputAutoTrim ? input.value.trim() : input.value; + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + instance.isAwaitingPromise = true; // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preConfirm's promise is received + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible$1(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + handleAwaitingPromise(instance); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }).catch(error => rejectWith(instance || undefined, error)); + } else { + succeedWith(instance, value); } }; /** - * @param {HTMLInputElement} input - * @returns {number} + * Hides loader and shows back the button which was hidden by .showLoading() */ - const getCheckboxValue = input => input.checked ? 1 : 0; + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + if (!innerParams) { + return; + } + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; /** - * @param {HTMLInputElement} input - * @returns {string | null} + * Gets the input DOM node, this method works with input parameter. + * + * @returns {HTMLInputElement | null} */ - const getRadioValue = input => input.checked ? input.value : null; + function getInput() { + const innerParams = privateProps.innerParams.get(this); + const domCache = privateProps.domCache.get(this); + if (!domCache) { + return null; + } + return getInput$1(domCache.popup, innerParams.input); + } /** - * @param {HTMLInputElement} input - * @returns {FileList | File | null} + * @param {SweetAlert} instance + * @param {string[]} buttons + * @param {boolean} disabled */ - const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } /** - * @param {SweetAlert2} instance - * @param {SweetAlertOptions} params + * @param {HTMLInputElement | null} input + * @param {boolean} disabled */ - const handleInputOptions = (instance, params) => { + function setInputDisabled(input, disabled) { const popup = getPopup(); - /** - * @param {Record<string, any>} inputOptions - */ - const processInputOptions = inputOptions => { - populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); - }; - if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { - showLoading(getConfirmButton()); - asPromise(params.inputOptions).then(inputOptions => { - instance.hideLoading(); - processInputOptions(inputOptions); - }); - } else if (typeof params.inputOptions === 'object') { - processInputOptions(params.inputOptions); + if (!popup || !input) { + return; + } + if (input.type === 'radio') { + /** @type {NodeListOf<HTMLInputElement>} */ + const radios = popup.querySelectorAll(`[name="${swalClasses.radio}"]`); + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } } else { - error(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof params.inputOptions}`); + input.disabled = disabled; } - }; + } /** - * @param {SweetAlert2} instance - * @param {SweetAlertOptions} params + * Enable all the buttons + * @this {SweetAlert} */ - const handleInputValue = (instance, params) => { - const input = instance.getInput(); - hide(input); - asPromise(params.inputValue).then(inputValue => { - input.value = params.input === 'number' ? `${parseFloat(inputValue) || 0}` : `${inputValue}`; - show(input); - input.focus(); - instance.hideLoading(); - }).catch(err => { - error(`Error in inputValue promise: ${err}`); - input.value = ''; - show(input); - input.focus(); - instance.hideLoading(); - }); + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + + /** + * Disable all the buttons + * @this {SweetAlert} + */ + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + + /** + * Enable the input field + * @this {SweetAlert} + */ + function enableInput() { + setInputDisabled(this.getInput(), false); + } + + /** + * Disable the input field + * @this {SweetAlert} + */ + function disableInput() { + setInputDisabled(this.getInput(), true); + } + + /** + * Show block with validation message + * + * @param {string} error + * @this {SweetAlert} + */ + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + show(domCache.validationMessage); + const input = this.getInput(); + if (input) { + input.setAttribute('aria-invalid', 'true'); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } + + /** + * Hide block with validation message + * + * @this {SweetAlert} + */ + function resetValidationMessage() { + const domCache = privateProps.domCache.get(this); + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + const input = this.getInput(); + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + draggable: false, + animation: true, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + color: undefined, + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoFocus: true, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true }; - const populateInputOptions = { - /** - * @param {HTMLElement} popup - * @param {Record<string, any>} inputOptions - * @param {SweetAlertOptions} params - */ - select: (popup, inputOptions, params) => { - const select = getDirectChildByClass(popup, swalClasses.select); - /** - * @param {HTMLElement} parent - * @param {string} optionLabel - * @param {string} optionValue - */ - const renderOption = (parent, optionLabel, optionValue) => { - const option = document.createElement('option'); - option.value = optionValue; - setInnerHtml(option, optionLabel); - option.selected = isSelected(optionValue, params.inputValue); - parent.appendChild(option); - }; - inputOptions.forEach(inputOption => { - const optionValue = inputOption[0]; - const optionLabel = inputOption[1]; - // <optgroup> spec: - // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 - // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." - // check whether this is a <optgroup> - if (Array.isArray(optionLabel)) { - // if it is an array, then it is an <optgroup> - const optgroup = document.createElement('optgroup'); - optgroup.label = optionValue; - optgroup.disabled = false; // not configurable for now - select.appendChild(optgroup); - optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); - } else { - // case of <option> - renderOption(select, optionLabel, optionValue); - } - }); - select.focus(); - }, - /** - * @param {HTMLElement} popup - * @param {Record<string, any>} inputOptions - * @param {SweetAlertOptions} params - */ - radio: (popup, inputOptions, params) => { - const radio = getDirectChildByClass(popup, swalClasses.radio); - inputOptions.forEach(inputOption => { - const radioValue = inputOption[0]; - const radioLabel = inputOption[1]; - const radioInput = document.createElement('input'); - const radioLabelElement = document.createElement('label'); - radioInput.type = 'radio'; - radioInput.name = swalClasses.radio; - radioInput.value = radioValue; - if (isSelected(radioValue, params.inputValue)) { - radioInput.checked = true; - } - const label = document.createElement('span'); - setInnerHtml(label, radioLabel); - label.className = swalClasses.label; - radioLabelElement.appendChild(radioInput); - radioLabelElement.appendChild(label); - radio.appendChild(radioLabelElement); - }); - const radios = radio.querySelectorAll('input'); - if (radios.length) { - radios[0].focus(); - } - } + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'color', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'draggable', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + + /** @type {Record<string, string | undefined>} */ + const deprecatedParams = { + allowEnterKey: undefined }; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'draggable', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; /** - * Converts `inputOptions` into an array of `[value, label]`s + * Is valid parameter * - * @param {Record<string, any>} inputOptions - * @returns {Array<Array<string>>} + * @param {string} paramName + * @returns {boolean} */ - const formatInputOptions = inputOptions => { - const result = []; - if (typeof Map !== 'undefined' && inputOptions instanceof Map) { - inputOptions.forEach((value, key) => { - let valueFormatted = value; - if (typeof valueFormatted === 'object') { - // case of <optgroup> - valueFormatted = formatInputOptions(valueFormatted); - } - result.push([key, valueFormatted]); - }); - } else { - Object.keys(inputOptions).forEach(key => { - let valueFormatted = inputOptions[key]; - if (typeof valueFormatted === 'object') { - // case of <optgroup> - valueFormatted = formatInputOptions(valueFormatted); - } - result.push([key, valueFormatted]); - }); - } - return result; + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); }; /** - * @param {string} optionValue - * @param {InputValue | Promise<InputValue> | { toPromise: () => InputValue }} inputValue + * Is valid parameter for Swal.update() method + * + * @param {string} paramName * @returns {boolean} */ - const isSelected = (optionValue, inputValue) => { - return inputValue && inputValue.toString() === optionValue.toString(); + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; }; /** - * @param {SweetAlert2} instance + * Is deprecated parameter + * + * @param {string} paramName + * @returns {string | undefined} */ - const handleConfirmButtonClick = instance => { - const innerParams = privateProps.innerParams.get(instance); - instance.disableButtons(); - if (innerParams.input) { - handleConfirmOrDenyWithInput(instance, 'confirm'); - } else { - confirm(instance, true); - } + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; }; /** - * @param {SweetAlert2} instance + * @param {string} param */ - const handleDenyButtonClick = instance => { - const innerParams = privateProps.innerParams.get(instance); - instance.disableButtons(); - if (innerParams.returnInputValueOnDeny) { - handleConfirmOrDenyWithInput(instance, 'deny'); - } else { - deny(instance, false); + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn(`Unknown parameter "${param}"`); } }; /** - * @param {SweetAlert2} instance - * @param {Function} dismissWith + * @param {string} param */ - const handleCancelButtonClick = (instance, dismissWith) => { - instance.disableButtons(); - dismissWith(DismissReason.cancel); + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn(`The parameter "${param}" is incompatible with toasts`); + } }; /** - * @param {SweetAlert2} instance - * @param {'confirm' | 'deny'} type + * @param {string} param */ - const handleConfirmOrDenyWithInput = (instance, type) => { - const innerParams = privateProps.innerParams.get(instance); - if (!innerParams.input) { - error(`The "input" parameter is needed to be set when using returnInputValueOn${capitalizeFirstLetter(type)}`); - return; - } - const inputValue = getInputValue(instance, innerParams); - if (innerParams.inputValidator) { - handleInputValidator(instance, inputValue, type); - } else if (!instance.getInput().checkValidity()) { - instance.enableButtons(); - instance.showValidationMessage(innerParams.validationMessage); - } else if (type === 'deny') { - deny(instance, inputValue); - } else { - confirm(instance, inputValue); + const checkIfParamIsDeprecated = param => { + const isDeprecated = isDeprecatedParameter(param); + if (isDeprecated) { + warnAboutDeprecation(param, isDeprecated); } }; /** - * @param {SweetAlert2} instance - * @param {string | number | File | FileList | null} inputValue - * @param {'confirm' | 'deny'} type + * Show relevant warnings for given params + * + * @param {SweetAlertOptions} params */ - const handleInputValidator = (instance, inputValue, type) => { - const innerParams = privateProps.innerParams.get(instance); - instance.disableInput(); - const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); - validationPromise.then(validationMessage => { - instance.enableButtons(); - instance.enableInput(); - if (validationMessage) { - instance.showValidationMessage(validationMessage); - } else if (type === 'deny') { - deny(instance, inputValue); - } else { - confirm(instance, inputValue); + const showWarningsForParams = params => { + if (params.backdrop === false && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + for (const param in params) { + checkIfParamIsValid(param); + if (params.toast) { + checkIfToastParamIsValid(param); } - }); + checkIfParamIsDeprecated(param); + } }; /** - * @param {SweetAlert2} instance - * @param {any} value + * Updates popup parameters. + * + * @param {SweetAlertOptions} params */ - const deny = (instance, value) => { - const innerParams = privateProps.innerParams.get(instance || undefined); - if (innerParams.showLoaderOnDeny) { - showLoading(getDenyButton()); - } - if (innerParams.preDeny) { - privateProps.awaitingPromise.set(instance || undefined, true); // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preDeny's promise is received - const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); - preDenyPromise.then(preDenyValue => { - if (preDenyValue === false) { - instance.hideLoading(); - handleAwaitingPromise(instance); - } else { - instance.close({ - isDenied: true, - value: typeof preDenyValue === 'undefined' ? value : preDenyValue - }); - } - }).catch(error => rejectWith(instance || undefined, error)); - } else { - instance.close({ - isDenied: true, - value - }); + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + warn(`You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.`); + return; } - }; + const validUpdatableParams = filterValidParams(params); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } /** - * @param {SweetAlert2} instance - * @param {any} value + * @param {SweetAlertOptions} params + * @returns {SweetAlertOptions} */ - const succeedWith = (instance, value) => { - instance.close({ - isConfirmed: true, - value + const filterValidParams = params => { + const validUpdatableParams = {}; + Object.keys(params).forEach(param => { + if (isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn(`Invalid parameter to update: ${param}`); + } }); + return validUpdatableParams; }; /** - * - * @param {SweetAlert2} instance - * @param {string} error + * Dispose the current SweetAlert2 instance */ - const rejectWith = (instance, error) => { - // @ts-ignore - instance.rejectPromise(error); - }; + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + if (!innerParams) { + disposeWeakMaps(this); // The WeakMaps might have been partly destroyed, we must recall it to dispose any remaining WeakMaps #2335 + return; // This instance has already been destroyed + } + + // Check if there is another Swal closing + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + globalState.eventEmitter.emit('didDestroy'); + disposeSwal(this); + } /** - * - * @param {SweetAlert2} instance - * @param {any} value + * @param {SweetAlert} instance */ - const confirm = (instance, value) => { - const innerParams = privateProps.innerParams.get(instance || undefined); - if (innerParams.showLoaderOnConfirm) { - showLoading(); - } - if (innerParams.preConfirm) { - instance.resetValidationMessage(); - privateProps.awaitingPromise.set(instance || undefined, true); // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preConfirm's promise is received - const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); - preConfirmPromise.then(preConfirmValue => { - if (isVisible$1(getValidationMessage()) || preConfirmValue === false) { - instance.hideLoading(); - handleAwaitingPromise(instance); - } else { - succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); - } - }).catch(error => rejectWith(instance || undefined, error)); + const disposeSwal = instance => { + disposeWeakMaps(instance); + // Unset this.params so GC will dispose it (#1569) + delete instance.params; + // Unset globalState props so GC will dispose globalState (#1569) + delete globalState.keydownHandler; + delete globalState.keydownTarget; + // Unset currentInstance + delete globalState.currentInstance; + }; + + /** + * @param {SweetAlert} instance + */ + const disposeWeakMaps = instance => { + // If the current instance is awaiting a promise result, we keep the privateMethods to call them once the promise result is retrieved #2335 + if (instance.isAwaitingPromise) { + unsetWeakMaps(privateProps, instance); + instance.isAwaitingPromise = true; } else { - succeedWith(instance, value); + unsetWeakMaps(privateMethods, instance); + unsetWeakMaps(privateProps, instance); + delete instance.isAwaitingPromise; + // Unset instance methods + delete instance.disableButtons; + delete instance.enableButtons; + delete instance.getInput; + delete instance.disableInput; + delete instance.enableInput; + delete instance.hideLoading; + delete instance.disableLoading; + delete instance.showValidationMessage; + delete instance.resetValidationMessage; + delete instance.close; + delete instance.closePopup; + delete instance.closeModal; + delete instance.closeToast; + delete instance.rejectPromise; + delete instance.update; + delete instance._destroy; } }; - const handlePopupClick = (instance, domCache, dismissWith) => { - const innerParams = privateProps.innerParams.get(instance); + /** + * @param {object} obj + * @param {SweetAlert} instance + */ + const unsetWeakMaps = (obj, instance) => { + for (const i in obj) { + obj[i].delete(instance); + } + }; + + var instanceMethods = /*#__PURE__*/Object.freeze({ + __proto__: null, + _destroy: _destroy, + close: close, + closeModal: close, + closePopup: close, + closeToast: close, + disableButtons: disableButtons, + disableInput: disableInput, + disableLoading: hideLoading, + enableButtons: enableButtons, + enableInput: enableInput, + getInput: getInput, + handleAwaitingPromise: handleAwaitingPromise, + hideLoading: hideLoading, + rejectPromise: rejectPromise, + resetValidationMessage: resetValidationMessage, + showValidationMessage: showValidationMessage, + update: update + }); + + /** + * @param {SweetAlertOptions} innerParams + * @param {DomCache} domCache + * @param {Function} dismissWith + */ + const handlePopupClick = (innerParams, domCache, dismissWith) => { if (innerParams.toast) { - handleToastClick(instance, domCache, dismissWith); + handleToastClick(innerParams, domCache, dismissWith); } else { // Ignore click events that had mousedown on the popup but mouseup on the container // This can happen when the user drags a slider @@ -2990,13 +3373,18 @@ // Ignore click events that had mousedown on the container but mouseup on the popup handleContainerMousedown(domCache); - handleModalClick(instance, domCache, dismissWith); + handleModalClick(innerParams, domCache, dismissWith); } }; - const handleToastClick = (instance, domCache, dismissWith) => { + + /** + * @param {SweetAlertOptions} innerParams + * @param {DomCache} domCache + * @param {Function} dismissWith + */ + const handleToastClick = (innerParams, domCache, dismissWith) => { // Closing toast by internal click domCache.popup.onclick = () => { - const innerParams = privateProps.innerParams.get(instance); if (innerParams && (isAnyButtonShown(innerParams) || innerParams.timer || innerParams.input)) { return; } @@ -3005,17 +3393,21 @@ }; /** - * @param {*} innerParams + * @param {SweetAlertOptions} innerParams * @returns {boolean} */ const isAnyButtonShown = innerParams => { - return innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton; + return !!(innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton); }; let ignoreOutsideClick = false; + + /** + * @param {DomCache} domCache + */ const handleModalMousedown = domCache => { domCache.popup.onmousedown = () => { domCache.container.onmouseup = function (e) { - domCache.container.onmouseup = undefined; + domCache.container.onmouseup = () => {}; // We only check if the mouseup target is the container because usually it doesn't // have any other direct children aside of the popup if (e.target === domCache.container) { @@ -3024,20 +3416,33 @@ }; }; }; + + /** + * @param {DomCache} domCache + */ const handleContainerMousedown = domCache => { - domCache.container.onmousedown = () => { + domCache.container.onmousedown = e => { + // prevent the modal text from being selected on double click on the container (allowOutsideClick: false) + if (e.target === domCache.container) { + e.preventDefault(); + } domCache.popup.onmouseup = function (e) { - domCache.popup.onmouseup = undefined; + domCache.popup.onmouseup = () => {}; // We also need to check if the mouseup target is a child of the popup - if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + if (e.target === domCache.popup || e.target instanceof HTMLElement && domCache.popup.contains(e.target)) { ignoreOutsideClick = true; } }; }; }; - const handleModalClick = (instance, domCache, dismissWith) => { + + /** + * @param {SweetAlertOptions} innerParams + * @param {DomCache} domCache + * @param {Function} dismissWith + */ + const handleModalClick = (innerParams, domCache, dismissWith) => { domCache.container.onclick = e => { - const innerParams = privateProps.innerParams.get(instance); if (ignoreOutsideClick) { ignoreOutsideClick = false; return; @@ -3067,12 +3472,17 @@ return params; }; + /** + * Main method to create a new SweetAlert2 popup + * + * @param {...SweetAlertOptions} args + * @returns {Promise<SweetAlertResult>} + */ function fire() { - const Swal = this; // eslint-disable-line @typescript-eslint/no-this-alias for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return new Swal(...args); + return new this(...args); } /** @@ -3091,7 +3501,8 @@ * const {value: firstName} = await TextPrompt('What is your first name?') * const {value: lastName} = await TextPrompt('What is your last name?') * - * @param mixinParams + * @param {SweetAlertOptions} mixinParams + * @returns {SweetAlert} */ function mixin(mixinParams) { class MixinSwal extends this { @@ -3099,6 +3510,7 @@ return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); } } + // @ts-ignore return MixinSwal; } @@ -3154,12 +3566,12 @@ * Increase timer. Returns number of milliseconds of an updated timer. * If `timer` parameter isn't set, returns undefined. * - * @param {number} n + * @param {number} ms * @returns {number | undefined} */ - const increaseTimer = n => { + const increaseTimer = ms => { if (globalState.timeout) { - const remaining = globalState.timeout.increase(n); + const remaining = globalState.timeout.increase(ms); animateTimerProgressBar(remaining, true); return remaining; } @@ -3173,7 +3585,7 @@ * @returns {boolean} */ const isTimerRunning = () => { - return globalState.timeout && globalState.timeout.isRunning(); + return !!(globalState.timeout && globalState.timeout.isRunning()); }; let bodyClickListenerAdded = false; @@ -3204,46 +3616,185 @@ } }; + // Source: https://gist.github.com/mudge/5830382?permalink_comment_id=2691957#gistcomment-2691957 + + class EventEmitter { + constructor() { + /** @type {Events} */ + this.events = {}; + } + + /** + * @param {string} eventName + * @returns {EventHandlers} + */ + _getHandlersByEventName(eventName) { + if (typeof this.events[eventName] === 'undefined') { + // not Set because we need to keep the FIFO order + // https://github.com/sweetalert2/sweetalert2/pull/2763#discussion_r1748990334 + this.events[eventName] = []; + } + return this.events[eventName]; + } + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + on(eventName, eventHandler) { + const currentHandlers = this._getHandlersByEventName(eventName); + if (!currentHandlers.includes(eventHandler)) { + currentHandlers.push(eventHandler); + } + } + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + once(eventName, eventHandler) { + var _this = this; + /** + * @param {Array} args + */ + const onceFn = function () { + _this.removeListener(eventName, onceFn); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + eventHandler.apply(_this, args); + }; + this.on(eventName, onceFn); + } + + /** + * @param {string} eventName + * @param {Array} args + */ + emit(eventName) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + this._getHandlersByEventName(eventName).forEach( + /** + * @param {EventHandler} eventHandler + */ + eventHandler => { + try { + eventHandler.apply(this, args); + } catch (error) { + console.error(error); + } + }); + } + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + removeListener(eventName, eventHandler) { + const currentHandlers = this._getHandlersByEventName(eventName); + const index = currentHandlers.indexOf(eventHandler); + if (index > -1) { + currentHandlers.splice(index, 1); + } + } + + /** + * @param {string} eventName + */ + removeAllListeners(eventName) { + if (this.events[eventName] !== undefined) { + // https://github.com/sweetalert2/sweetalert2/pull/2763#discussion_r1749239222 + this.events[eventName].length = 0; + } + } + reset() { + this.events = {}; + } + } + + globalState.eventEmitter = new EventEmitter(); + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + const on = (eventName, eventHandler) => { + globalState.eventEmitter.on(eventName, eventHandler); + }; + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + const once = (eventName, eventHandler) => { + globalState.eventEmitter.once(eventName, eventHandler); + }; + + /** + * @param {string} [eventName] + * @param {EventHandler} [eventHandler] + */ + const off = (eventName, eventHandler) => { + // Remove all handlers for all events + if (!eventName) { + globalState.eventEmitter.reset(); + return; + } + if (eventHandler) { + // Remove a specific handler + globalState.eventEmitter.removeListener(eventName, eventHandler); + } else { + // Remove all handlers for a specific event + globalState.eventEmitter.removeAllListeners(eventName); + } + }; + var staticMethods = /*#__PURE__*/Object.freeze({ __proto__: null, - isValidParameter: isValidParameter, - isUpdatableParameter: isUpdatableParameter, - isDeprecatedParameter: isDeprecatedParameter, argsToParams: argsToParams, + bindClickHandler: bindClickHandler, + clickCancel: clickCancel, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + enableLoading: showLoading, + fire: fire, + getActions: getActions, + getCancelButton: getCancelButton, + getCloseButton: getCloseButton, + getConfirmButton: getConfirmButton, getContainer: getContainer, - getPopup: getPopup, - getTitle: getTitle, + getDenyButton: getDenyButton, + getFocusableElements: getFocusableElements, + getFooter: getFooter, getHtmlContainer: getHtmlContainer, - getImage: getImage, getIcon: getIcon, getIconContent: getIconContent, + getImage: getImage, getInputLabel: getInputLabel, - getCloseButton: getCloseButton, - getActions: getActions, - getConfirmButton: getConfirmButton, - getDenyButton: getDenyButton, - getCancelButton: getCancelButton, getLoader: getLoader, - getFooter: getFooter, + getPopup: getPopup, + getProgressSteps: getProgressSteps, + getTimerLeft: getTimerLeft, getTimerProgressBar: getTimerProgressBar, - getFocusableElements: getFocusableElements, + getTitle: getTitle, getValidationMessage: getValidationMessage, + increaseTimer: increaseTimer, + isDeprecatedParameter: isDeprecatedParameter, isLoading: isLoading, + isTimerRunning: isTimerRunning, + isUpdatableParameter: isUpdatableParameter, + isValidParameter: isValidParameter, isVisible: isVisible, - clickConfirm: clickConfirm, - clickDeny: clickDeny, - clickCancel: clickCancel, - fire: fire, mixin: mixin, + off: off, + on: on, + once: once, + resumeTimer: resumeTimer, showLoading: showLoading, - enableLoading: showLoading, - getTimerLeft: getTimerLeft, stopTimer: stopTimer, - resumeTimer: resumeTimer, - toggleTimer: toggleTimer, - increaseTimer: increaseTimer, - isTimerRunning: isTimerRunning, - bindClickHandler: bindClickHandler + toggleTimer: toggleTimer }); class Timer { @@ -3257,6 +3808,10 @@ this.running = false; this.start(); } + + /** + * @returns {number} + */ start() { if (!this.running) { this.running = true; @@ -3265,14 +3820,23 @@ } return this.remaining; } + + /** + * @returns {number} + */ stop() { - if (this.running) { + if (this.started && this.running) { this.running = false; clearTimeout(this.id); this.remaining -= new Date().getTime() - this.started.getTime(); } return this.remaining; } + + /** + * @param {number} n + * @returns {number} + */ increase(n) { const running = this.running; if (running) { @@ -3284,6 +3848,10 @@ } return this.remaining; } + + /** + * @returns {number} + */ getTimerLeft() { if (this.running) { this.stop(); @@ -3291,6 +3859,10 @@ } return this.remaining; } + + /** + * @returns {boolean} + */ isRunning() { return this.running; } @@ -3303,8 +3875,7 @@ * @returns {SweetAlertOptions} */ const getTemplateParams = params => { - /** @type {HTMLTemplateElement} */ - const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + const template = typeof params.template === 'string' ? (/** @type {HTMLTemplateElement} */document.querySelector(params.template)) : params.template; if (!template) { return {}; } @@ -3317,16 +3888,20 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record<string, any>} */ const getSwalParams = templateContent => { + /** @type {Record<string, any>} */ const result = {}; /** @type {HTMLElement[]} */ const swalParams = Array.from(templateContent.querySelectorAll('swal-param')); swalParams.forEach(param => { showWarningsForAttributes(param, ['name', 'value']); - const paramName = param.getAttribute('name'); + const paramName = /** @type {keyof SweetAlertOptions} */param.getAttribute('name'); const value = param.getAttribute('value'); + if (!paramName || !value) { + return; + } if (typeof defaultParams[paramName] === 'boolean') { result[paramName] = value !== 'false'; } else if (typeof defaultParams[paramName] === 'object') { @@ -3340,15 +3915,19 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record<string, any>} */ const getSwalFunctionParams = templateContent => { + /** @type {Record<string, any>} */ const result = {}; /** @type {HTMLElement[]} */ const swalFunctions = Array.from(templateContent.querySelectorAll('swal-function-param')); swalFunctions.forEach(param => { - const paramName = param.getAttribute('name'); + const paramName = /** @type {keyof SweetAlertOptions} */param.getAttribute('name'); const value = param.getAttribute('value'); + if (!paramName || !value) { + return; + } result[paramName] = new Function(`return ${value}`)(); }); return result; @@ -3356,15 +3935,19 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record<string, any>} */ const getSwalButtons = templateContent => { + /** @type {Record<string, any>} */ const result = {}; /** @type {HTMLElement[]} */ const swalButtons = Array.from(templateContent.querySelectorAll('swal-button')); swalButtons.forEach(button => { showWarningsForAttributes(button, ['type', 'color', 'aria-label']); const type = button.getAttribute('type'); + if (!type || !['confirm', 'cancel', 'deny'].includes(type)) { + return; + } result[`${type}ButtonText`] = button.innerHTML; result[`show${capitalizeFirstLetter(type)}Button`] = true; if (button.hasAttribute('color')) { @@ -3379,25 +3962,25 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Pick<SweetAlertOptions, 'imageUrl' | 'imageWidth' | 'imageHeight' | 'imageAlt'>} */ const getSwalImage = templateContent => { const result = {}; - /** @type {HTMLElement} */ + /** @type {HTMLElement | null} */ const image = templateContent.querySelector('swal-image'); if (image) { showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); if (image.hasAttribute('src')) { - result.imageUrl = image.getAttribute('src'); + result.imageUrl = image.getAttribute('src') || undefined; } if (image.hasAttribute('width')) { - result.imageWidth = image.getAttribute('width'); + result.imageWidth = image.getAttribute('width') || undefined; } if (image.hasAttribute('height')) { - result.imageHeight = image.getAttribute('height'); + result.imageHeight = image.getAttribute('height') || undefined; } if (image.hasAttribute('alt')) { - result.imageAlt = image.getAttribute('alt'); + result.imageAlt = image.getAttribute('alt') || undefined; } } return result; @@ -3405,17 +3988,15 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record<string, any>} */ const getSwalIcon = templateContent => { const result = {}; - /** @type {HTMLElement} */ + /** @type {HTMLElement | null} */ const icon = templateContent.querySelector('swal-icon'); if (icon) { showWarningsForAttributes(icon, ['type', 'color']); if (icon.hasAttribute('type')) { - /** @type {SweetAlertIcon} */ - // @ts-ignore result.icon = icon.getAttribute('type'); } if (icon.hasAttribute('color')) { @@ -3428,16 +4009,15 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record<string, any>} */ const getSwalInput = templateContent => { + /** @type {Record<string, any>} */ const result = {}; - /** @type {HTMLElement} */ + /** @type {HTMLElement | null} */ const input = templateContent.querySelector('swal-input'); if (input) { showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); - /** @type {SweetAlertInput} */ - // @ts-ignore result.input = input.getAttribute('type') || 'text'; if (input.hasAttribute('label')) { result.inputLabel = input.getAttribute('label'); @@ -3456,6 +4036,9 @@ inputOptions.forEach(option => { showWarningsForAttributes(option, ['value']); const optionValue = option.getAttribute('value'); + if (!optionValue) { + return; + } const optionName = option.innerHTML; result.inputOptions[optionValue] = optionName; }); @@ -3466,13 +4049,14 @@ /** * @param {DocumentFragment} templateContent * @param {string[]} paramNames - * @returns {SweetAlertOptions} + * @returns {Record<string, any>} */ const getSwalStringParams = (templateContent, paramNames) => { + /** @type {Record<string, any>} */ const result = {}; for (const i in paramNames) { const paramName = paramNames[i]; - /** @type {HTMLElement} */ + /** @type {HTMLElement | null} */ const tag = templateContent.querySelector(paramName); if (tag) { showWarningsForAttributes(tag, []); @@ -3520,6 +4104,7 @@ if (typeof params.willOpen === 'function') { params.willOpen(popup); } + globalState.eventEmitter.emit('willOpen', popup); const bodyStyles = window.getComputedStyle(document.body); const initialBodyOverflow = bodyStyles.overflowY; addClasses(container, popup, params); @@ -3538,6 +4123,7 @@ if (typeof params.didOpen === 'function') { setTimeout(() => params.didOpen(popup)); } + globalState.eventEmitter.emit('didOpen', popup); removeClass(container, swalClasses['no-transition']); }; @@ -3550,7 +4136,8 @@ return; } const container = getContainer(); - popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + popup.removeEventListener('animationend', swalOpenAnimationFinished); + popup.removeEventListener('transitionend', swalOpenAnimationFinished); container.style.overflowY = 'auto'; }; @@ -3559,9 +4146,10 @@ * @param {HTMLElement} popup */ const setScrollingVisibility = (container, popup) => { - if (animationEndEvent && hasCssAnimation(popup)) { + if (hasCssAnimation(popup)) { container.style.overflowY = 'hidden'; - popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + popup.addEventListener('animationend', swalOpenAnimationFinished); + popup.addEventListener('transitionend', swalOpenAnimationFinished); } else { container.style.overflowY = 'auto'; } @@ -3575,7 +4163,7 @@ const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { iOSfix(); if (scrollbarPadding && initialBodyOverflow !== 'hidden') { - fixScrollbar(); + replaceScrollbarWithPadding(initialBodyOverflow); } // sweetalert2/issues/1247 @@ -3591,16 +4179,19 @@ */ const addClasses = (container, popup, params) => { addClass(container, params.showClass.backdrop); - // this workaround with opacity is needed for https://github.com/sweetalert2/sweetalert2/issues/2059 - popup.style.setProperty('opacity', '0', 'important'); - show(popup, 'grid'); - setTimeout(() => { - // Animate popup right after showing it - addClass(popup, params.showClass.popup); - // and remove the opacity workaround - popup.style.removeProperty('opacity'); - }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 - + if (params.animation) { + // this workaround with opacity is needed for https://github.com/sweetalert2/sweetalert2/issues/2059 + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); + // and remove the opacity workaround + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + } else { + show(popup, 'grid'); + } addClass([document.documentElement, document.body], swalClasses.shown); if (params.heightAuto && params.backdrop && !params.toast) { addClass([document.documentElement, document.body], swalClasses['height-auto']); @@ -3610,16 +4201,16 @@ var defaultInputValidators = { /** * @param {string} string - * @param {string} validationMessage - * @returns {Promise<void | string>} + * @param {string} [validationMessage] + * @returns {Promise<string | void>} */ email: (string, validationMessage) => { - return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + return /^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); }, /** * @param {string} string - * @param {string} validationMessage - * @returns {Promise<void | string>} + * @param {string} [validationMessage] + * @returns {Promise<string | void>} */ url: (string, validationMessage) => { // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 @@ -3632,12 +4223,14 @@ */ function setDefaultInputValidators(params) { // Use default `inputValidator` for supported input types if not provided - if (!params.inputValidator) { - Object.keys(defaultInputValidators).forEach(key => { - if (params.input === key) { - params.inputValidator = defaultInputValidators[key]; - } - }); + if (params.inputValidator) { + return; + } + if (params.input === 'email') { + params.inputValidator = defaultInputValidators['email']; + } + if (params.input === 'url') { + params.inputValidator = defaultInputValidators['url']; } } @@ -3673,9 +4266,19 @@ init(params); } + /** @type {SweetAlert} */ let currentInstance; + var _promise = /*#__PURE__*/new WeakMap(); class SweetAlert { + /** + * @param {...any} args + * @this {SweetAlert} + */ constructor() { + /** + * @type {Promise<SweetAlertResult>} + */ + _classPrivateFieldInitSpec(this, _promise, void 0); // Prevent run in Node env if (typeof window === 'undefined') { return; @@ -3687,25 +4290,28 @@ args[_key] = arguments[_key]; } const outerParams = Object.freeze(this.constructor.argsToParams(args)); - Object.defineProperties(this, { - params: { - value: outerParams, - writable: false, - enumerable: true, - configurable: true - } - }); - // @ts-ignore - const promise = currentInstance._main(currentInstance.params); - privateProps.promise.set(this, promise); + /** @type {Readonly<SweetAlertOptions>} */ + this.params = outerParams; + + /** @type {boolean} */ + this.isAwaitingPromise = false; + _classPrivateFieldSet2(_promise, this, this._main(currentInstance.params)); } _main(userParams) { let mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; showWarningsForParams(Object.assign({}, mixinParams, userParams)); if (globalState.currentInstance) { - // @ts-ignore + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(globalState.currentInstance); + const { + isAwaitingPromise + } = globalState.currentInstance; globalState.currentInstance._destroy(); + if (!isAwaitingPromise) { + swalPromiseResolve({ + isDismissed: true + }); + } if (isModal()) { unsetAriaHidden(); } @@ -3731,17 +4337,15 @@ // `catch` cannot be the name of a module export, so we define our thenable methods here instead then(onFulfilled) { - const promise = privateProps.promise.get(this); - return promise.then(onFulfilled); + return _classPrivateFieldGet2(_promise, this).then(onFulfilled); } finally(onFinally) { - const promise = privateProps.promise.get(this); - return promise.finally(onFinally); + return _classPrivateFieldGet2(_promise, this).finally(onFinally); } } /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {DomCache} domCache * @param {SweetAlertOptions} innerParams * @returns {Promise} @@ -3753,7 +4357,6 @@ * @param {DismissReason} dismiss */ const dismissWith = dismiss => { - // @ts-ignore instance.close({ isDismissed: true, dismiss @@ -3771,11 +4374,10 @@ handleCancelButtonClick(instance, dismissWith); }; domCache.closeButton.onclick = () => { - // @ts-ignore dismissWith(DismissReason.close); }; - handlePopupClick(instance, domCache, dismissWith); - addKeydownHandler(instance, globalState, innerParams, dismissWith); + handlePopupClick(innerParams, domCache, dismissWith); + addKeydownHandler(globalState, innerParams, dismissWith); handleInputOptionsAndValue(instance, innerParams); openPopup(innerParams); setupTimer(globalState, innerParams, dismissWith); @@ -3798,11 +4400,17 @@ const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + if (params.animation === false) { + params.showClass = { + backdrop: 'swal2-noanimation' + }; + params.hideClass = {}; + } return params; }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @returns {DomCache} */ const populateDomCache = instance => { @@ -3816,7 +4424,7 @@ loader: getLoader(), closeButton: getCloseButton(), validationMessage: getValidationMessage(), - progressSteps: getProgressSteps$1() + progressSteps: getProgressSteps() }; privateProps.domCache.set(instance, domCache); return domCache; @@ -3849,6 +4457,15 @@ }; /** + * Initialize focus in the popup: + * + * 1. If `toast` is `true`, don't steal focus from the document. + * 2. Else if there is an [autofocus] element, focus it. + * 3. Else if `focusConfirm` is `true` and confirm button is visible, focus it. + * 4. Else if `focusDeny` is `true` and deny button is visible, focus it. + * 5. Else if `focusCancel` is `true` and cancel button is visible, focus it. + * 6. Else focus the first focusable element in a popup (if any). + * * @param {DomCache} domCache * @param {SweetAlertOptions} innerParams */ @@ -3856,13 +4473,34 @@ if (innerParams.toast) { return; } + // TODO: this is dumb, remove `allowEnterKey` param in the next major version if (!callIfFunction(innerParams.allowEnterKey)) { + warnAboutDeprecation('allowEnterKey'); blurActiveElement(); return; } - if (!focusButton(domCache, innerParams)) { - setFocus(innerParams, -1, 1); + if (focusAutofocus(domCache)) { + return; + } + if (focusButton(domCache, innerParams)) { + return; + } + setFocus(-1, 1); + }; + + /** + * @param {DomCache} domCache + * @returns {boolean} + */ + const focusAutofocus = domCache => { + const autofocusElements = Array.from(domCache.popup.querySelectorAll('[autofocus]')); + for (const autofocusElement of autofocusElements) { + if (autofocusElement instanceof HTMLElement && isVisible$1(autofocusElement)) { + autofocusElement.focus(); + return true; + } } + return false; }; /** @@ -3892,23 +4530,44 @@ }; // Dear russian users visiting russian sites. Let's have fun. - if (typeof window !== 'undefined' && /^ru\b/.test(navigator.language) && location.host.match(/\.(ru|su|xn--p1ai)$/)) { - setTimeout(() => { - document.body.style.pointerEvents = 'none'; - const ukrainianAnthem = document.createElement('audio'); - ukrainianAnthem.src = 'https://discoveric.ru/upload/anthem/61/61-1.mp3'; - ukrainianAnthem.loop = true; - document.body.appendChild(ukrainianAnthem); + if (typeof window !== 'undefined' && /^ru\b/.test(navigator.language) && location.host.match(/\.(ru|su|by|xn--p1ai)$/)) { + const now = new Date(); + const initiationDate = localStorage.getItem('swal-initiation'); + if (!initiationDate) { + localStorage.setItem('swal-initiation', `${now}`); + } else if ((now.getTime() - Date.parse(initiationDate)) / (1000 * 60 * 60 * 24) > 3) { setTimeout(() => { - ukrainianAnthem.play().catch(() => { - // ignore - }); - }, 2500); - }, 500); + document.body.style.pointerEvents = 'none'; + const ukrainianAnthem = document.createElement('audio'); + ukrainianAnthem.src = 'https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3'; + ukrainianAnthem.loop = true; + document.body.appendChild(ukrainianAnthem); + setTimeout(() => { + ukrainianAnthem.play().catch(() => { + // ignore + }); + }, 2500); + }, 500); + } } // Assign instance methods from src/instanceMethods/*.js to prototype - Object.assign(SweetAlert.prototype, instanceMethods); + SweetAlert.prototype.disableButtons = disableButtons; + SweetAlert.prototype.enableButtons = enableButtons; + SweetAlert.prototype.getInput = getInput; + SweetAlert.prototype.disableInput = disableInput; + SweetAlert.prototype.enableInput = enableInput; + SweetAlert.prototype.hideLoading = hideLoading; + SweetAlert.prototype.disableLoading = hideLoading; + SweetAlert.prototype.showValidationMessage = showValidationMessage; + SweetAlert.prototype.resetValidationMessage = resetValidationMessage; + SweetAlert.prototype.close = close; + SweetAlert.prototype.closePopup = close; + SweetAlert.prototype.closeModal = close; + SweetAlert.prototype.closeToast = close; + SweetAlert.prototype.rejectPromise = rejectPromise; + SweetAlert.prototype.update = update; + SweetAlert.prototype._destroy = _destroy; // Assign static methods from src/staticMethods/*.js to constructor Object.assign(SweetAlert, staticMethods); @@ -3917,16 +4576,17 @@ Object.keys(instanceMethods).forEach(key => { /** * @param {...any} args - * @returns {any} + * @returns {any | undefined} */ SweetAlert[key] = function () { - if (currentInstance) { + if (currentInstance && currentInstance[key]) { return currentInstance[key](...arguments); } + return null; }; }); SweetAlert.DismissReason = DismissReason; - SweetAlert.version = '11.6.9'; + SweetAlert.version = '11.15.3'; const Swal = SweetAlert; // @ts-ignore @@ -3936,4 +4596,4 @@ })); if (typeof this !== 'undefined' && this.Sweetalert2){this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} -"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:hsl(0,0%,33%);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid hsl(0,0%,85%);border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:hsl(0,0%,94%);color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:rgb(249.95234375,205.965625,167.74765625);color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:rgb(156.7033492823,224.2822966507,246.2966507177);color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:rgb(200.8064516129,217.9677419355,225.1935483871);color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}"); \ No newline at end of file diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.all.min.js b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.all.min.js index 35d2d84..306b9dd 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.all.min.js +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.all.min.js @@ -1,6 +1,6 @@ /*! -* sweetalert2 v11.6.9 +* sweetalert2 v11.15.3 * Released under the MIT License. */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sweetalert2=t()}(this,(function(){"use strict";var e={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const t=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t},n=t(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),o=t(["success","warning","info","question","error"]),i=e=>e.charAt(0).toUpperCase()+e.slice(1),s=e=>{console.warn(`SweetAlert2: ${"object"==typeof e?e.join(" "):e}`)},r=e=>{console.error(`SweetAlert2: ${e}`)},a=[],l=(e,t)=>{var n;n=`"${e}" is deprecated and will be removed in the next major release. Please use "${t}" instead.`,a.includes(n)||(a.push(n),s(n))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=()=>document.body.querySelector(`.${n.container}`),g=e=>{const t=m();return t?t.querySelector(e):null},h=e=>g(`.${e}`),f=()=>h(n.popup),b=()=>h(n.icon),y=()=>h(n.title),w=()=>h(n["html-container"]),v=()=>h(n.image),C=()=>h(n["progress-steps"]),A=()=>h(n["validation-message"]),k=()=>g(`.${n.actions} .${n.confirm}`),B=()=>g(`.${n.actions} .${n.deny}`),P=()=>g(`.${n.loader}`),x=()=>g(`.${n.actions} .${n.cancel}`),E=()=>h(n.actions),$=()=>h(n.footer),T=()=>h(n["timer-progress-bar"]),S=()=>h(n.close),L=()=>{const e=Array.from(f().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")),o=parseInt(t.getAttribute("tabindex"));return n>o?1:n<o?-1:0})),t=Array.from(f().querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n')).filter((e=>"-1"!==e.getAttribute("tabindex")));return(e=>{const t=[];for(let n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t})(e.concat(t)).filter((e=>Z(e)))},O=()=>I(document.body,n.shown)&&!I(document.body,n["toast-shown"])&&!I(document.body,n["no-backdrop"]),j=()=>f()&&I(f(),n.toast),M={previousBodyPadding:null},H=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html");Array.from(n.querySelector("head").childNodes).forEach((t=>{e.appendChild(t)})),Array.from(n.querySelector("body").childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},I=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t<n.length;t++)if(!e.classList.contains(n[t]))return!1;return!0},q=(e,t,i)=>{if(((e,t)=>{Array.from(e.classList).forEach((i=>{Object.values(n).includes(i)||Object.values(o).includes(i)||Object.values(t.showClass).includes(i)||e.classList.remove(i)}))})(e,t),t.customClass&&t.customClass[i]){if("string"!=typeof t.customClass[i]&&!t.customClass[i].forEach)return void s(`Invalid type of customClass.${i}! Expected string or iterable object, got "${typeof t.customClass[i]}"`);F(e,t.customClass[i])}},D=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${n.popup} > .${n[t]}`);case"checkbox":return e.querySelector(`.${n.popup} > .${n.checkbox} input`);case"radio":return e.querySelector(`.${n.popup} > .${n.radio} input:checked`)||e.querySelector(`.${n.popup} > .${n.radio} input:first-child`);case"range":return e.querySelector(`.${n.popup} > .${n.range} input`);default:return e.querySelector(`.${n.popup} > .${n.input}`)}},V=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},N=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},F=(e,t)=>{N(e,t,!0)},R=(e,t)=>{N(e,t,!1)},U=(e,t)=>{const n=Array.from(e.children);for(let e=0;e<n.length;e++){const o=n[e];if(o instanceof HTMLElement&&I(o,t))return o}},_=(e,t,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style[t]="number"==typeof n?`${n}px`:n:e.style.removeProperty(t)},W=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},z=e=>{e.style.display="none"},K=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},Y=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex";t?W(e,n):z(e)},Z=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),J=e=>!!(e.scrollHeight>e.clientHeight),X=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),o=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||o>0},G=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=T();Z(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"}),10))},Q={},ee=e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,o=window.scrollY;Q.restoreFocusTimeout=setTimeout((()=>{Q.previousActiveElement instanceof HTMLElement?(Q.previousActiveElement.focus(),Q.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(n,o)})),te=()=>"undefined"==typeof window||"undefined"==typeof document,ne=`\n <div aria-labelledby="${n.title}" aria-describedby="${n["html-container"]}" class="${n.popup}" tabindex="-1">\n <button type="button" class="${n.close}"></button>\n <ul class="${n["progress-steps"]}"></ul>\n <div class="${n.icon}"></div>\n <img class="${n.image}" />\n <h2 class="${n.title}" id="${n.title}"></h2>\n <div class="${n["html-container"]}" id="${n["html-container"]}"></div>\n <input class="${n.input}" />\n <input type="file" class="${n.file}" />\n <div class="${n.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${n.select}"></select>\n <div class="${n.radio}"></div>\n <label for="${n.checkbox}" class="${n.checkbox}">\n <input type="checkbox" />\n <span class="${n.label}"></span>\n </label>\n <textarea class="${n.textarea}"></textarea>\n <div class="${n["validation-message"]}" id="${n["validation-message"]}"></div>\n <div class="${n.actions}">\n <div class="${n.loader}"></div>\n <button type="button" class="${n.confirm}"></button>\n <button type="button" class="${n.deny}"></button>\n <button type="button" class="${n.cancel}"></button>\n </div>\n <div class="${n.footer}"></div>\n <div class="${n["timer-progress-bar-container"]}">\n <div class="${n["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),oe=()=>{Q.currentInstance.resetValidationMessage()},ie=e=>{const t=(()=>{const e=m();return!!e&&(e.remove(),R([document.documentElement,document.body],[n["no-backdrop"],n["toast-shown"],n["has-column"]]),!0)})();if(te())return void r("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=n.container,t&&F(o,n["no-transition"]),H(o,ne);const i="string"==typeof(s=e.target)?document.querySelector(s):s;var s;i.appendChild(o),(e=>{const t=f();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&F(m(),n.rtl)})(i),(()=>{const e=f(),t=U(e,n.input),o=U(e,n.file),i=e.querySelector(`.${n.range} input`),s=e.querySelector(`.${n.range} output`),r=U(e,n.select),a=e.querySelector(`.${n.checkbox} input`),l=U(e,n.textarea);t.oninput=oe,o.onchange=oe,r.onchange=oe,a.onchange=oe,l.oninput=oe,i.oninput=()=>{oe(),s.value=i.value},i.onchange=()=>{oe(),s.value=i.value}})()},se=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?re(e,t):e&&H(t,e)},re=(e,t)=>{e.jquery?ae(t,e):H(t,e.toString())},ae=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},le=(()=>{if(te())return!1;const e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),ce=(e,t)=>{const o=E(),i=P();t.showConfirmButton||t.showDenyButton||t.showCancelButton?W(o):z(o),q(o,t,"actions"),function(e,t,o){const i=k(),s=B(),r=x();ue(i,"confirm",o),ue(s,"deny",o),ue(r,"cancel",o),function(e,t,o,i){if(!i.buttonsStyling)return void R([e,t,o],n.styled);F([e,t,o],n.styled),i.confirmButtonColor&&(e.style.backgroundColor=i.confirmButtonColor,F(e,n["default-outline"]));i.denyButtonColor&&(t.style.backgroundColor=i.denyButtonColor,F(t,n["default-outline"]));i.cancelButtonColor&&(o.style.backgroundColor=i.cancelButtonColor,F(o,n["default-outline"]))}(i,s,r,o),o.reverseButtons&&(o.toast?(e.insertBefore(r,i),e.insertBefore(s,i)):(e.insertBefore(r,t),e.insertBefore(s,t),e.insertBefore(i,t)))}(o,i,t),H(i,t.loaderHtml),q(i,t,"loader")};function ue(e,t,o){Y(e,o[`show${i(t)}Button`],"inline-block"),H(e,o[`${t}ButtonText`]),e.setAttribute("aria-label",o[`${t}ButtonAriaLabel`]),e.className=n[t],q(e,o,`${t}Button`),F(e,o[`${t}ButtonClass`])}const de=(e,t)=>{const o=m();o&&(!function(e,t){"string"==typeof t?e.style.background=t:t||F([document.documentElement,document.body],n["no-backdrop"])}(o,t.backdrop),function(e,t){t in n?F(e,n[t]):(s('The "position" parameter is not valid, defaulting to "center"'),F(e,n.center))}(o,t.position),function(e,t){if(t&&"string"==typeof t){const o=`grow-${t}`;o in n&&F(e,n[o])}}(o,t.grow),q(o,t,"container"))};const pe=["input","file","range","select","radio","checkbox","textarea"],me=e=>{if(!ve[e.input])return void r(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${e.input}"`);const t=ye(e.input),n=ve[e.input](t,e);W(t),setTimeout((()=>{V(n)}))},ge=(e,t)=>{const n=D(f(),e);if(n){(e=>{for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t].name;["type","value","style"].includes(n)||e.removeAttribute(n)}})(n);for(const e in t)n.setAttribute(e,t[e])}},he=e=>{const t=ye(e.input);"object"==typeof e.customClass&&F(t,e.customClass.input)},fe=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},be=(e,t,o)=>{if(o.inputLabel){e.id=n.input;const i=document.createElement("label"),s=n["input-label"];i.setAttribute("for",e.id),i.className=s,"object"==typeof o.customClass&&F(i,o.customClass.inputLabel),i.innerText=o.inputLabel,t.insertAdjacentElement("beforebegin",i)}},ye=e=>U(f(),n[e]||n.input),we=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:p(t)||s(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},ve={};ve.text=ve.email=ve.password=ve.number=ve.tel=ve.url=(e,t)=>(we(e,t.inputValue),be(e,e,t),fe(e,t),e.type=t.input,e),ve.file=(e,t)=>(be(e,e,t),fe(e,t),e),ve.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return we(n,t.inputValue),n.type=t.input,we(o,t.inputValue),be(n,e,t),e},ve.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");H(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return be(e,e,t),e},ve.radio=e=>(e.textContent="",e),ve.checkbox=(e,t)=>{const o=D(f(),"checkbox");o.value="1",o.id=n.checkbox,o.checked=Boolean(t.inputValue);const i=e.querySelector("span");return H(i,t.inputPlaceholder),o},ve.textarea=(e,t)=>{we(e,t.inputValue),fe(e,t),be(e,e,t);return setTimeout((()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(f()).width);new MutationObserver((()=>{const n=e.offsetWidth+(o=e,parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight));var o;f().style.width=n>t?`${n}px`:null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Ce=(t,o)=>{const i=w();q(i,o,"htmlContainer"),o.html?(se(o.html,i),W(i,"block")):o.text?(i.textContent=o.text,W(i,"block")):z(i),((t,o)=>{const i=f(),s=e.innerParams.get(t),r=!s||o.input!==s.input;pe.forEach((e=>{const t=U(i,n[e]);ge(e,o.inputAttributes),t.className=n[e],r&&z(t)})),o.input&&(r&&me(o),he(o))})(t,o)},Ae=(e,t)=>{for(const n in o)t.icon!==n&&R(e,o[n]);F(e,o[t.icon]),Pe(e,t),ke(),q(e,t,"icon")},ke=()=>{const e=f(),t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},Be=(e,t)=>{let n,o=e.innerHTML;if(t.iconHtml)n=xe(t.iconHtml);else if("success"===t.icon)n='\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n',o=o.replace(/ style=".*?"/g,"");else if("error"===t.icon)n='\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n';else{n=xe({question:"?",warning:"!",info:"i"}[t.icon])}o.trim()!==n.trim()&&H(e,n)},Pe=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])K(e,n,"backgroundColor",t.iconColor);K(e,".swal2-success-ring","borderColor",t.iconColor)}},xe=e=>`<div class="${n["icon-content"]}">${e}</div>`,Ee=(e,t)=>{e.className=`${n.popup} ${Z(e)?t.showClass.popup:""}`,t.toast?(F([document.documentElement,document.body],n["toast-shown"]),F(e,n.toast)):F(e,n.modal),q(e,t,"popup"),"string"==typeof t.customClass&&F(e,t.customClass),t.icon&&F(e,n[`icon-${t.icon}`])},$e=e=>{const t=document.createElement("li");return F(t,n["progress-step"]),H(t,e),t},Te=e=>{const t=document.createElement("li");return F(t,n["progress-step-line"]),e.progressStepsDistance&&_(t,"width",e.progressStepsDistance),t},Se=(t,i)=>{((e,t)=>{const n=m(),o=f();t.toast?(_(n,"width",t.width),o.style.width="100%",o.insertBefore(P(),b())):_(o,"width",t.width),_(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),z(A()),Ee(o,t)})(0,i),de(0,i),((e,t)=>{const o=C();t.progressSteps&&0!==t.progressSteps.length?(W(o),o.textContent="",t.currentProgressStep>=t.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(((e,i)=>{const s=$e(e);if(o.appendChild(s),i===t.currentProgressStep&&F(s,n["active-progress-step"]),i!==t.progressSteps.length-1){const e=Te(t);o.appendChild(e)}}))):z(o)})(0,i),((t,n)=>{const i=e.innerParams.get(t),s=b();if(i&&n.icon===i.icon)return Be(s,n),void Ae(s,n);if(n.icon||n.iconHtml){if(n.icon&&-1===Object.keys(o).indexOf(n.icon))return r(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${n.icon}"`),void z(s);W(s),Be(s,n),Ae(s,n),F(s,n.showClass.icon)}else z(s)})(t,i),((e,t)=>{const o=v();t.imageUrl?(W(o,""),o.setAttribute("src",t.imageUrl),o.setAttribute("alt",t.imageAlt),_(o,"width",t.imageWidth),_(o,"height",t.imageHeight),o.className=n.image,q(o,t,"image")):z(o)})(0,i),((e,t)=>{const n=y();Y(n,t.title||t.titleText,"block"),t.title&&se(t.title,n),t.titleText&&(n.innerText=t.titleText),q(n,t,"title")})(0,i),((e,t)=>{const n=S();H(n,t.closeButtonHtml),q(n,t,"closeButton"),Y(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel)})(0,i),Ce(t,i),ce(0,i),((e,t)=>{const n=$();Y(n,t.footer),t.footer&&se(t.footer,n),q(n,t,"footer")})(0,i),"function"==typeof i.didRender&&i.didRender(f())};function Le(){const t=e.innerParams.get(this);if(!t)return;const o=e.domCache.get(this);z(o.loader),j()?t.icon&&W(b()):Oe(o),R([o.popup,o.actions],n.loading),o.popup.removeAttribute("aria-busy"),o.popup.removeAttribute("data-loading"),o.confirmButton.disabled=!1,o.denyButton.disabled=!1,o.cancelButton.disabled=!1}const Oe=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?W(t[0],"inline-block"):Z(k())||Z(B())||Z(x())||z(e.actions)};const je=()=>k()&&k().click(),Me=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),He=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Ie=(e,t,n)=>{const o=L();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();f().focus()},qe=["ArrowRight","ArrowDown"],De=["ArrowLeft","ArrowUp"],Ve=(t,n,o)=>{const i=e.innerParams.get(t);i&&(n.isComposing||229===n.keyCode||(i.stopKeydownPropagation&&n.stopPropagation(),"Enter"===n.key?Ne(t,n,i):"Tab"===n.key?Fe(n,i):[...qe,...De].includes(n.key)?Re(n.key):"Escape"===n.key&&Ue(n,i,o)))},Ne=(e,t,n)=>{if(c(n.allowEnterKey)&&t.target&&e.getInput()&&t.target instanceof HTMLElement&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;je(),t.preventDefault()}},Fe=(e,t)=>{const n=e.target,o=L();let i=-1;for(let e=0;e<o.length;e++)if(n===o[e]){i=e;break}e.shiftKey?Ie(0,i,-1):Ie(0,i,1),e.stopPropagation(),e.preventDefault()},Re=e=>{const t=k(),n=B(),o=x();if(document.activeElement instanceof HTMLElement&&![t,n,o].includes(document.activeElement))return;const i=qe.includes(e)?"nextElementSibling":"previousElementSibling";let s=document.activeElement;for(let e=0;e<E().children.length;e++){if(s=s[i],!s)return;if(s instanceof HTMLButtonElement&&Z(s))break}s instanceof HTMLButtonElement&&s.focus()},Ue=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(Me.esc))};var _e={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const We=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},ze=()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);if(t&&n&&!e.match(/CriOS/i)){const e=44;f().scrollHeight>window.innerHeight-e&&(m().style.paddingBottom=`${e}px`)}},Ke=()=>{const e=m();let t;e.ontouchstart=e=>{t=Ye(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},Ye=e=>{const t=e.target,n=m();return!Ze(e)&&!Je(e)&&(t===n||!J(n)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!J(w())||!w().contains(t)))},Ze=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Je=e=>e.touches&&e.touches.length>1,Xe=()=>{null===M.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(M.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${M.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=n["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function Ge(e,t,o,i){j()?st(e,i):(ee(o).then((()=>st(e,i))),He(Q));/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),O()&&(null!==M.previousBodyPadding&&(document.body.style.paddingRight=`${M.previousBodyPadding}px`,M.previousBodyPadding=null),(()=>{if(I(document.body,n.iosfix)){const e=parseInt(document.body.style.top,10);R(document.body,n.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),We()),R([document.documentElement,document.body],[n.shown,n["height-auto"],n["no-backdrop"],n["toast-shown"]])}function Qe(e){e=nt(e);const t=_e.swalPromiseResolve.get(this),n=et(this);this.isAwaitingPromise()?e.isDismissed||(tt(this),t(e)):n&&t(e)}const et=t=>{const n=f();if(!n)return!1;const o=e.innerParams.get(t);if(!o||I(n,o.hideClass.popup))return!1;R(n,o.showClass.popup),F(n,o.hideClass.popup);const i=m();return R(i,o.showClass.backdrop),F(i,o.hideClass.backdrop),ot(t,n,o),!0};const tt=t=>{t.isAwaitingPromise()&&(e.awaitingPromise.delete(t),e.innerParams.get(t)||t._destroy())},nt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),ot=(e,t,n)=>{const o=m(),i=le&&X(t);"function"==typeof n.willClose&&n.willClose(t),i?it(e,t,o,n.returnFocus,n.didClose):Ge(e,o,n.returnFocus,n.didClose)},it=(e,t,n,o,i)=>{Q.swalCloseEventFinishedCallback=Ge.bind(null,e,n,o,i),t.addEventListener(le,(function(e){e.target===t&&(Q.swalCloseEventFinishedCallback(),delete Q.swalCloseEventFinishedCallback)}))},st=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()}))};function rt(t,n,o){const i=e.domCache.get(t);n.forEach((e=>{i[e].disabled=o}))}function at(e,t){if(e)if("radio"===e.type){const n=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;e<n.length;e++)n[e].disabled=t}else e.disabled=t}const lt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ct=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],ut={},dt=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],pt=e=>Object.prototype.hasOwnProperty.call(lt,e),mt=e=>-1!==ct.indexOf(e),gt=e=>ut[e],ht=e=>{pt(e)||s(`Unknown parameter "${e}"`)},ft=e=>{dt.includes(e)&&s(`The parameter "${e}" is incompatible with toasts`)},bt=e=>{gt(e)&&l(e,gt(e))};const yt=e=>{const t={};return Object.keys(e).forEach((n=>{mt(n)?t[n]=e[n]:s(`Invalid parameter to update: ${n}`)})),t};const wt=e=>{vt(e),delete e.params,delete Q.keydownHandler,delete Q.keydownTarget,delete Q.currentInstance},vt=t=>{t.isAwaitingPromise()?(Ct(e,t),e.awaitingPromise.set(t,!0)):(Ct(_e,t),Ct(e,t))},Ct=(e,t)=>{for(const n in e)e[n].delete(t)};var At=Object.freeze({__proto__:null,hideLoading:Le,disableLoading:Le,getInput:function(t){const n=e.innerParams.get(t||this),o=e.domCache.get(t||this);return o?D(o.popup,n.input):null},close:Qe,isAwaitingPromise:function(){return!!e.awaitingPromise.get(this)},rejectPromise:function(e){const t=_e.swalPromiseReject.get(this);tt(this),t&&t(e)},handleAwaitingPromise:tt,closePopup:Qe,closeModal:Qe,closeToast:Qe,enableButtons:function(){rt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){rt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){at(this.getInput(),!1)},disableInput:function(){at(this.getInput(),!0)},showValidationMessage:function(t){const o=e.domCache.get(this),i=e.innerParams.get(this);H(o.validationMessage,t),o.validationMessage.className=n["validation-message"],i.customClass&&i.customClass.validationMessage&&F(o.validationMessage,i.customClass.validationMessage),W(o.validationMessage);const s=this.getInput();s&&(s.setAttribute("aria-invalid",!0),s.setAttribute("aria-describedby",n["validation-message"]),V(s),F(s,n.inputerror))},resetValidationMessage:function(){const t=e.domCache.get(this);t.validationMessage&&z(t.validationMessage);const o=this.getInput();o&&(o.removeAttribute("aria-invalid"),o.removeAttribute("aria-describedby"),R(o,n.inputerror))},getProgressSteps:function(){return e.domCache.get(this).progressSteps},update:function(t){const n=f(),o=e.innerParams.get(this);if(!n||I(n,o.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const i=yt(t),r=Object.assign({},o,i);Se(this,r),e.innerParams.set(this,r),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){const t=e.domCache.get(this),n=e.innerParams.get(this);n?(t.popup&&Q.swalCloseEventFinishedCallback&&(Q.swalCloseEventFinishedCallback(),delete Q.swalCloseEventFinishedCallback),"function"==typeof n.didDestroy&&n.didDestroy(),wt(this)):vt(this)}});const kt=e=>{let t=f();t||new xn,t=f();const n=P();j()?z(b()):Bt(t,e),W(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},Bt=(e,t)=>{const o=E(),i=P();!t&&Z(k())&&(t=k()),W(o),t&&(z(t),i.setAttribute("data-button-to-replace",t.className)),i.parentNode.insertBefore(i,t),F([e,o],n.loading)},Pt=e=>e.checked?1:0,xt=e=>e.checked?e.value:null,Et=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,$t=(e,t)=>{const n=f(),o=e=>{St[t.input](n,Lt(e),t)};u(t.inputOptions)||p(t.inputOptions)?(kt(k()),d(t.inputOptions).then((t=>{e.hideLoading(),o(t)}))):"object"==typeof t.inputOptions?o(t.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},Tt=(e,t)=>{const n=e.getInput();z(n),d(t.inputValue).then((o=>{n.value="number"===t.input?`${parseFloat(o)||0}`:`${o}`,W(n),n.focus(),e.hideLoading()})).catch((t=>{r(`Error in inputValue promise: ${t}`),n.value="",W(n),n.focus(),e.hideLoading()}))},St={select:(e,t,o)=>{const i=U(e,n.select),s=(e,t,n)=>{const i=document.createElement("option");i.value=n,H(i,t),i.selected=Ot(n,o.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,i.appendChild(e),n.forEach((t=>s(e,t[1],t[0])))}else s(i,n,t)})),i.focus()},radio:(e,t,o)=>{const i=U(e,n.radio);t.forEach((e=>{const t=e[0],s=e[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=n.radio,r.value=t,Ot(t,o.inputValue)&&(r.checked=!0);const l=document.createElement("span");H(l,s),l.className=n.label,a.appendChild(r),a.appendChild(l),i.appendChild(a)}));const s=i.querySelectorAll("input");s.length&&s[0].focus()}},Lt=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,n)=>{let o=e;"object"==typeof o&&(o=Lt(o)),t.push([n,o])})):Object.keys(e).forEach((n=>{let o=e[n];"object"==typeof o&&(o=Lt(o)),t.push([n,o])})),t},Ot=(e,t)=>t&&t.toString()===e.toString(),jt=(t,n)=>{const o=e.innerParams.get(t);if(!o.input)return void r(`The "input" parameter is needed to be set when using returnInputValueOn${i(n)}`);const s=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Pt(n);case"radio":return xt(n);case"file":return Et(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(t,o);o.inputValidator?Mt(t,s,n):t.getInput().checkValidity()?"deny"===n?Ht(t,s):Dt(t,s):(t.enableButtons(),t.showValidationMessage(o.validationMessage))},Mt=(t,n,o)=>{const i=e.innerParams.get(t);t.disableInput();Promise.resolve().then((()=>d(i.inputValidator(n,i.validationMessage)))).then((e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):"deny"===o?Ht(t,n):Dt(t,n)}))},Ht=(t,n)=>{const o=e.innerParams.get(t||void 0);if(o.showLoaderOnDeny&&kt(B()),o.preDeny){e.awaitingPromise.set(t||void 0,!0);Promise.resolve().then((()=>d(o.preDeny(n,o.validationMessage)))).then((e=>{!1===e?(t.hideLoading(),tt(t)):t.close({isDenied:!0,value:void 0===e?n:e})})).catch((e=>qt(t||void 0,e)))}else t.close({isDenied:!0,value:n})},It=(e,t)=>{e.close({isConfirmed:!0,value:t})},qt=(e,t)=>{e.rejectPromise(t)},Dt=(t,n)=>{const o=e.innerParams.get(t||void 0);if(o.showLoaderOnConfirm&&kt(),o.preConfirm){t.resetValidationMessage(),e.awaitingPromise.set(t||void 0,!0);Promise.resolve().then((()=>d(o.preConfirm(n,o.validationMessage)))).then((e=>{Z(A())||!1===e?(t.hideLoading(),tt(t)):It(t,void 0===e?n:e)})).catch((e=>qt(t||void 0,e)))}else It(t,n)},Vt=(t,n,o)=>{n.popup.onclick=()=>{const n=e.innerParams.get(t);n&&(Nt(n)||n.timer||n.input)||o(Me.close)}},Nt=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let Ft=!1;const Rt=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Ft=!0)}}},Ut=e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(Ft=!0)}}},_t=(t,n,o)=>{n.container.onclick=i=>{const s=e.innerParams.get(t);Ft?Ft=!1:i.target===n.container&&c(s.allowOutsideClick)&&o(Me.backdrop)}},Wt=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const zt=()=>{if(Q.timeout)return(()=>{const e=T(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.removeProperty("transition"),e.style.width=`${n}%`})(),Q.timeout.stop()},Kt=()=>{if(Q.timeout){const e=Q.timeout.start();return G(e),e}};let Yt=!1;const Zt={};const Jt=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in Zt){const n=t.getAttribute(e);if(n)return void Zt[e].fire({template:n})}};var Xt=Object.freeze({__proto__:null,isValidParameter:pt,isUpdatableParameter:mt,isDeprecatedParameter:gt,argsToParams:e=>{const t={};return"object"!=typeof e[0]||Wt(e[0])?["title","html","icon"].forEach(((n,o)=>{const i=e[o];"string"==typeof i||Wt(i)?t[n]=i:void 0!==i&&r(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)})):Object.assign(t,e[0]),t},getContainer:m,getPopup:f,getTitle:y,getHtmlContainer:w,getImage:v,getIcon:b,getIconContent:()=>h(n["icon-content"]),getInputLabel:()=>h(n["input-label"]),getCloseButton:S,getActions:E,getConfirmButton:k,getDenyButton:B,getCancelButton:x,getLoader:P,getFooter:$,getTimerProgressBar:T,getFocusableElements:L,getValidationMessage:A,isLoading:()=>f().hasAttribute("data-loading"),isVisible:()=>Z(f()),clickConfirm:je,clickDeny:()=>B()&&B().click(),clickCancel:()=>x()&&x().click(),fire:function(){const e=this;for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return new e(...n)},mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},showLoading:kt,enableLoading:kt,getTimerLeft:()=>Q.timeout&&Q.timeout.getTimerLeft(),stopTimer:zt,resumeTimer:Kt,toggleTimer:()=>{const e=Q.timeout;return e&&(e.running?zt():Kt())},increaseTimer:e=>{if(Q.timeout){const t=Q.timeout.increase(e);return G(t,!0),t}},isTimerRunning:()=>Q.timeout&&Q.timeout.isRunning(),bindClickHandler:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template";Zt[e]=this,Yt||(document.body.addEventListener("click",Jt),Yt=!0)}});class Gt{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const Qt=["swal-title","swal-html","swal-footer"],en=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{cn(e,["name","value"]);const n=e.getAttribute("name"),o=e.getAttribute("value");t[n]="boolean"==typeof lt[n]?"false"!==o:"object"==typeof lt[n]?JSON.parse(o):o})),t},tn=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const n=e.getAttribute("name"),o=e.getAttribute("value");t[n]=new Function(`return ${o}`)()})),t},nn=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{cn(e,["type","color","aria-label"]);const n=e.getAttribute("type");t[`${n}ButtonText`]=e.innerHTML,t[`show${i(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label"))})),t},on=e=>{const t={},n=e.querySelector("swal-image");return n&&(cn(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},sn=e=>{const t={},n=e.querySelector("swal-icon");return n&&(cn(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},rn=e=>{const t={},n=e.querySelector("swal-input");n&&(cn(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const o=Array.from(e.querySelectorAll("swal-input-option"));return o.length&&(t.inputOptions={},o.forEach((e=>{cn(e,["value"]);const n=e.getAttribute("value"),o=e.innerHTML;t.inputOptions[n]=o}))),t},an=(e,t)=>{const n={};for(const o in t){const i=t[o],s=e.querySelector(i);s&&(cn(s,[]),n[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},ln=e=>{const t=Qt.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const n=e.tagName.toLowerCase();t.includes(n)||s(`Unrecognized element <${n}>`)}))},cn=(e,t)=>{Array.from(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&s([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])}))},un=e=>{const t=m(),o=f();"function"==typeof e.willOpen&&e.willOpen(o);const i=window.getComputedStyle(document.body).overflowY;gn(t,o,e),setTimeout((()=>{pn(t,o)}),10),O()&&(mn(t,e.scrollbarPadding,i),Array.from(document.body.children).forEach((e=>{e===m()||e.contains(m())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))),j()||Q.previousActiveElement||(Q.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(o))),R(t,n["no-transition"])},dn=e=>{const t=f();if(e.target!==t)return;const n=m();t.removeEventListener(le,dn),n.style.overflowY="auto"},pn=(e,t)=>{le&&X(t)?(e.style.overflowY="hidden",t.addEventListener(le,dn)):e.style.overflowY="auto"},mn=(e,t,o)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!I(document.body,n.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",F(document.body,n.iosfix),Ke(),ze()}})(),t&&"hidden"!==o&&Xe(),setTimeout((()=>{e.scrollTop=0}))},gn=(e,t,o)=>{F(e,o.showClass.backdrop),t.style.setProperty("opacity","0","important"),W(t,"grid"),setTimeout((()=>{F(t,o.showClass.popup),t.style.removeProperty("opacity")}),10),F([document.documentElement,document.body],n.shown),o.heightAuto&&o.backdrop&&!o.toast&&F([document.documentElement,document.body],n["height-auto"])};var hn={email:(e,t)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function fn(e){!function(e){e.inputValidator||Object.keys(hn).forEach((t=>{e.input===t&&(e.inputValidator=hn[t])}))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(s('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),ie(e)}let bn;class yn{constructor(){if("undefined"==typeof window)return;bn=this;for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const i=Object.freeze(this.constructor.argsToParams(n));Object.defineProperties(this,{params:{value:i,writable:!1,enumerable:!0,configurable:!0}});const s=bn._main(bn.params);e.promise.set(this,s)}_main(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(e=>{!1===e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)ht(t),e.toast&&ft(t),bt(t)})(Object.assign({},n,t)),Q.currentInstance&&(Q.currentInstance._destroy(),O()&&We()),Q.currentInstance=bn;const o=vn(t,n);fn(o),Object.freeze(o),Q.timeout&&(Q.timeout.stop(),delete Q.timeout),clearTimeout(Q.restoreFocusTimeout);const i=Cn(bn);return Se(bn,o),e.innerParams.set(bn,o),wn(bn,i,o)}then(t){return e.promise.get(this).then(t)}finally(t){return e.promise.get(this).finally(t)}}const wn=(t,n,o)=>new Promise(((i,s)=>{const r=e=>{t.close({isDismissed:!0,dismiss:e})};_e.swalPromiseResolve.set(t,i),_e.swalPromiseReject.set(t,s),n.confirmButton.onclick=()=>{(t=>{const n=e.innerParams.get(t);t.disableButtons(),n.input?jt(t,"confirm"):Dt(t,!0)})(t)},n.denyButton.onclick=()=>{(t=>{const n=e.innerParams.get(t);t.disableButtons(),n.returnInputValueOnDeny?jt(t,"deny"):Ht(t,!1)})(t)},n.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Me.cancel)})(t,r)},n.closeButton.onclick=()=>{r(Me.close)},((t,n,o)=>{e.innerParams.get(t).toast?Vt(t,n,o):(Rt(n),Ut(n),_t(t,n,o))})(t,n,r),((e,t,n,o)=>{He(t),n.toast||(t.keydownHandler=t=>Ve(e,t,o),t.keydownTarget=n.keydownListenerCapture?window:f(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)})(t,Q,o,r),((e,t)=>{"select"===t.input||"radio"===t.input?$t(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(u(t.inputValue)||p(t.inputValue))&&(kt(k()),Tt(e,t))})(t,o),un(o),An(Q,o,r),kn(n,o),setTimeout((()=>{n.container.scrollTop=0}))})),vn=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return ln(n),Object.assign(en(n),tn(n),nn(n),on(n),sn(n),rn(n),an(n,Qt))})(e),o=Object.assign({},lt,t,n,e);return o.showClass=Object.assign({},lt.showClass,o.showClass),o.hideClass=Object.assign({},lt.hideClass,o.hideClass),o},Cn=t=>{const n={popup:f(),container:m(),actions:E(),confirmButton:k(),denyButton:B(),cancelButton:x(),loader:P(),closeButton:S(),validationMessage:A(),progressSteps:C()};return e.domCache.set(t,n),n},An=(e,t,n)=>{const o=T();z(o),t.timer&&(e.timeout=new Gt((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(W(o),q(o,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&G(t.timer)}))))},kn=(e,t)=>{t.toast||(c(t.allowEnterKey)?Bn(e,t)||Ie(0,-1,1):Pn())},Bn=(e,t)=>t.focusDeny&&Z(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&Z(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!Z(e.confirmButton))&&(e.confirmButton.focus(),!0),Pn=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};"undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)&&setTimeout((()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://discoveric.ru/upload/anthem/61/61-1.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((()=>{e.play().catch((()=>{}))}),2500)}),500),Object.assign(yn.prototype,At),Object.assign(yn,Xt),Object.keys(At).forEach((e=>{yn[e]=function(){if(bn)return bn[e](...arguments)}})),yn.DismissReason=Me,yn.version="11.6.9";const xn=yn;return xn.default=xn,xn})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); -"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sweetalert2=t()}(this,(function(){"use strict";function e(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function t(t,n){return t.get(e(t,n))}function n(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}const o={},i=e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,i=window.scrollY;o.restoreFocusTimeout=setTimeout((()=>{o.previousActiveElement instanceof HTMLElement?(o.previousActiveElement.focus(),o.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(n,i)})),s="swal2-",r=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce(((e,t)=>(e[t]=s+t,e)),{}),a=["success","warning","info","question","error"].reduce(((e,t)=>(e[t]=s+t,e)),{}),l="SweetAlert2:",c=e=>e.charAt(0).toUpperCase()+e.slice(1),u=e=>{console.warn(`${l} ${"object"==typeof e?e.join(" "):e}`)},d=e=>{console.error(`${l} ${e}`)},p=[],m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;var n;n=`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`,p.includes(n)||(p.push(n),u(n))},g=e=>"function"==typeof e?e():e,h=e=>e&&"function"==typeof e.toPromise,f=e=>h(e)?e.toPromise():Promise.resolve(e),b=e=>e&&Promise.resolve(e)===e,y=()=>document.body.querySelector(`.${r.container}`),v=e=>{const t=y();return t?t.querySelector(e):null},w=e=>v(`.${e}`),C=()=>w(r.popup),A=()=>w(r.icon),E=()=>w(r.title),k=()=>w(r["html-container"]),B=()=>w(r.image),L=()=>w(r["progress-steps"]),$=()=>w(r["validation-message"]),x=()=>v(`.${r.actions} .${r.confirm}`),P=()=>v(`.${r.actions} .${r.cancel}`),T=()=>v(`.${r.actions} .${r.deny}`),S=()=>v(`.${r.loader}`),O=()=>w(r.actions),M=()=>w(r.footer),j=()=>w(r["timer-progress-bar"]),H=()=>w(r.close),I=()=>{const e=C();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(t).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")||"0"),o=parseInt(t.getAttribute("tabindex")||"0");return n>o?1:n<o?-1:0})),o=e.querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n'),i=Array.from(o).filter((e=>"-1"!==e.getAttribute("tabindex")));return[...new Set(n.concat(i))].filter((e=>ee(e)))},D=()=>N(document.body,r.shown)&&!N(document.body,r["toast-shown"])&&!N(document.body,r["no-backdrop"]),q=()=>{const e=C();return!!e&&N(e,r.toast)},V=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html"),o=n.querySelector("head");o&&Array.from(o.childNodes).forEach((t=>{e.appendChild(t)}));const i=n.querySelector("body");i&&Array.from(i.childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},N=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t<n.length;t++)if(!e.classList.contains(n[t]))return!1;return!0},_=(e,t,n)=>{if(((e,t)=>{Array.from(e.classList).forEach((n=>{Object.values(r).includes(n)||Object.values(a).includes(n)||Object.values(t.showClass||{}).includes(n)||e.classList.remove(n)}))})(e,t),!t.customClass)return;const o=t.customClass[n];o&&("string"==typeof o||o.forEach?z(e,o):u(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof o}"`))},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${r.popup} > .${r[t]}`);case"checkbox":return e.querySelector(`.${r.popup} > .${r.checkbox} input`);case"radio":return e.querySelector(`.${r.popup} > .${r.radio} input:checked`)||e.querySelector(`.${r.popup} > .${r.radio} input:first-child`);case"range":return e.querySelector(`.${r.popup} > .${r.range} input`);default:return e.querySelector(`.${r.popup} > .${r.input}`)}},R=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},U=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},z=(e,t)=>{U(e,t,!0)},W=(e,t)=>{U(e,t,!1)},K=(e,t)=>{const n=Array.from(e.children);for(let e=0;e<n.length;e++){const o=n[e];if(o instanceof HTMLElement&&N(o,t))return o}},Y=(e,t,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style.setProperty(t,"number"==typeof n?`${n}px`:n):e.style.removeProperty(t)},X=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e&&(e.style.display=t)},Z=e=>{e&&(e.style.display="none")},J=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"block";e&&new MutationObserver((()=>{Q(e,e.innerHTML,t)})).observe(e,{childList:!0,subtree:!0})},G=(e,t,n,o)=>{const i=e.querySelector(t);i&&i.style.setProperty(n,o)},Q=function(e,t){t?X(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):Z(e)},ee=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),te=e=>!!(e.scrollHeight>e.clientHeight),ne=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),o=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||o>0},oe=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=j();n&&ee(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"}),10))},ie=`\n <div aria-labelledby="${r.title}" aria-describedby="${r["html-container"]}" class="${r.popup}" tabindex="-1">\n <button type="button" class="${r.close}"></button>\n <ul class="${r["progress-steps"]}"></ul>\n <div class="${r.icon}"></div>\n <img class="${r.image}" />\n <h2 class="${r.title}" id="${r.title}"></h2>\n <div class="${r["html-container"]}" id="${r["html-container"]}"></div>\n <input class="${r.input}" id="${r.input}" />\n <input type="file" class="${r.file}" />\n <div class="${r.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${r.select}" id="${r.select}"></select>\n <div class="${r.radio}"></div>\n <label class="${r.checkbox}">\n <input type="checkbox" id="${r.checkbox}" />\n <span class="${r.label}"></span>\n </label>\n <textarea class="${r.textarea}" id="${r.textarea}"></textarea>\n <div class="${r["validation-message"]}" id="${r["validation-message"]}"></div>\n <div class="${r.actions}">\n <div class="${r.loader}"></div>\n <button type="button" class="${r.confirm}"></button>\n <button type="button" class="${r.deny}"></button>\n <button type="button" class="${r.cancel}"></button>\n </div>\n <div class="${r.footer}"></div>\n <div class="${r["timer-progress-bar-container"]}">\n <div class="${r["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),se=()=>{o.currentInstance.resetValidationMessage()},re=e=>{const t=(()=>{const e=y();return!!e&&(e.remove(),W([document.documentElement,document.body],[r["no-backdrop"],r["toast-shown"],r["has-column"]]),!0)})();if("undefined"==typeof window||"undefined"==typeof document)return void d("SweetAlert2 requires document to initialize");const n=document.createElement("div");n.className=r.container,t&&z(n,r["no-transition"]),V(n,ie);const o="string"==typeof(i=e.target)?document.querySelector(i):i;var i;o.appendChild(n),(e=>{const t=C();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&z(y(),r.rtl)})(o),(()=>{const e=C(),t=K(e,r.input),n=K(e,r.file),o=e.querySelector(`.${r.range} input`),i=e.querySelector(`.${r.range} output`),s=K(e,r.select),a=e.querySelector(`.${r.checkbox} input`),l=K(e,r.textarea);t.oninput=se,n.onchange=se,s.onchange=se,a.onchange=se,l.oninput=se,o.oninput=()=>{se(),i.value=o.value},o.onchange=()=>{se(),i.value=o.value}})()},ae=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?le(e,t):e&&V(t,e)},le=(e,t)=>{e.jquery?ce(t,e):V(t,e.toString())},ce=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},ue=(e,t)=>{const n=O(),o=S();n&&o&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?X(n):Z(n),_(n,t,"actions"),function(e,t,n){const o=x(),i=T(),s=P();if(!o||!i||!s)return;de(o,"confirm",n),de(i,"deny",n),de(s,"cancel",n),function(e,t,n,o){if(!o.buttonsStyling)return void W([e,t,n],r.styled);z([e,t,n],r.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,z(e,r["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,z(t,r["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,z(n,r["default-outline"]))}(o,i,s,n),n.reverseButtons&&(n.toast?(e.insertBefore(s,o),e.insertBefore(i,o)):(e.insertBefore(s,t),e.insertBefore(i,t),e.insertBefore(o,t)))}(n,o,t),V(o,t.loaderHtml||""),_(o,t,"loader"))};function de(e,t,n){const o=c(t);Q(e,n[`show${o}Button`],"inline-block"),V(e,n[`${t}ButtonText`]||""),e.setAttribute("aria-label",n[`${t}ButtonAriaLabel`]||""),e.className=r[t],_(e,n,`${t}Button`)}const pe=(e,t)=>{const n=y();n&&(!function(e,t){"string"==typeof t?e.style.background=t:t||z([document.documentElement,document.body],r["no-backdrop"])}(n,t.backdrop),function(e,t){if(!t)return;t in r?z(e,r[t]):(u('The "position" parameter is not valid, defaulting to "center"'),z(e,r.center))}(n,t.position),function(e,t){if(!t)return;z(e,r[`grow-${t}`])}(n,t.grow),_(n,t,"container"))};var me={innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],he=e=>{if(!e.input)return;if(!Ae[e.input])return void d(`Unexpected type of input! Expected ${Object.keys(Ae).join(" | ")}, got "${e.input}"`);const t=we(e.input);if(!t)return;const n=Ae[e.input](t,e);X(t),e.inputAutoFocus&&setTimeout((()=>{R(n)}))},fe=(e,t)=>{const n=C();if(!n)return;const o=F(n,e);if(o){(e=>{for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t].name;["id","type","value","style"].includes(n)||e.removeAttribute(n)}})(o);for(const e in t)o.setAttribute(e,t[e])}},be=e=>{if(!e.input)return;const t=we(e.input);t&&_(t,e,"input")},ye=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},ve=(e,t,n)=>{if(n.inputLabel){const o=document.createElement("label"),i=r["input-label"];o.setAttribute("for",e.id),o.className=i,"object"==typeof n.customClass&&z(o,n.customClass.inputLabel),o.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",o)}},we=e=>{const t=C();if(t)return K(t,r[e]||r.input)},Ce=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:b(t)||u(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Ae={};Ae.text=Ae.email=Ae.password=Ae.number=Ae.tel=Ae.url=Ae.search=Ae.date=Ae["datetime-local"]=Ae.time=Ae.week=Ae.month=(e,t)=>(Ce(e,t.inputValue),ve(e,e,t),ye(e,t),e.type=t.input,e),Ae.file=(e,t)=>(ve(e,e,t),ye(e,t),e),Ae.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return Ce(n,t.inputValue),n.type=t.input,Ce(o,t.inputValue),ve(n,e,t),e},Ae.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return ve(e,e,t),e},Ae.radio=e=>(e.textContent="",e),Ae.checkbox=(e,t)=>{const n=F(C(),"checkbox");n.value="1",n.checked=Boolean(t.inputValue);const o=e.querySelector("span");return V(o,t.inputPlaceholder||t.inputLabel),n},Ae.textarea=(e,t)=>{Ce(e,t.inputValue),ye(e,t),ve(e,e,t);return setTimeout((()=>{if("MutationObserver"in window){const n=parseInt(window.getComputedStyle(C()).width);new MutationObserver((()=>{if(!document.body.contains(e))return;const o=e.offsetWidth+(i=e,parseInt(window.getComputedStyle(i).marginLeft)+parseInt(window.getComputedStyle(i).marginRight));var i;o>n?C().style.width=`${o}px`:Y(C(),"width",t.width)})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Ee=(e,t)=>{const n=k();n&&(J(n),_(n,t,"htmlContainer"),t.html?(ae(t.html,n),X(n,"block")):t.text?(n.textContent=t.text,X(n,"block")):Z(n),((e,t)=>{const n=C();if(!n)return;const o=me.innerParams.get(e),i=!o||t.input!==o.input;ge.forEach((e=>{const o=K(n,r[e]);o&&(fe(e,t.inputAttributes),o.className=r[e],i&&Z(o))})),t.input&&(i&&he(t),be(t))})(e,t))},ke=(e,t)=>{for(const[n,o]of Object.entries(a))t.icon!==n&&W(e,o);z(e,t.icon&&a[t.icon]),$e(e,t),Be(),_(e,t,"icon")},Be=()=>{const e=C();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},Le=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let n=e.innerHTML,o="";if(t.iconHtml)o=xe(t.iconHtml);else if("success"===t.icon)o='\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n',n=n.replace(/ style=".*?"/g,"");else if("error"===t.icon)o='\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n';else if(t.icon){o=xe({question:"?",warning:"!",info:"i"}[t.icon])}n.trim()!==o.trim()&&V(e,o)},$e=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])G(e,n,"background-color",t.iconColor);G(e,".swal2-success-ring","border-color",t.iconColor)}},xe=e=>`<div class="${r["icon-content"]}">${e}</div>`;let Pe=!1,Te=0,Se=0,Oe=0,Me=0;const je=e=>{const t=C();if(e.target===t||A().contains(e.target)){Pe=!0;const n=De(e);Te=n.clientX,Se=n.clientY,Oe=parseInt(t.style.insetInlineStart)||0,Me=parseInt(t.style.insetBlockStart)||0,z(t,"swal2-dragging")}},He=e=>{const t=C();if(Pe){let{clientX:n,clientY:o}=De(e);t.style.insetInlineStart=`${Oe+(n-Te)}px`,t.style.insetBlockStart=`${Me+(o-Se)}px`}},Ie=()=>{const e=C();Pe=!1,W(e,"swal2-dragging")},De=e=>{let t=0,n=0;return e.type.startsWith("mouse")?(t=e.clientX,n=e.clientY):e.type.startsWith("touch")&&(t=e.touches[0].clientX,n=e.touches[0].clientY),{clientX:t,clientY:n}},qe=(e,t)=>{const n=y(),o=C();if(n&&o){if(t.toast){Y(n,"width",t.width),o.style.width="100%";const e=S();e&&o.insertBefore(e,A())}else Y(o,"width",t.width);Y(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),Z($()),Ve(o,t),t.draggable&&!t.toast?(z(o,r.draggable),(e=>{e.addEventListener("mousedown",je),document.body.addEventListener("mousemove",He),e.addEventListener("mouseup",Ie),e.addEventListener("touchstart",je),document.body.addEventListener("touchmove",He),e.addEventListener("touchend",Ie)})(o)):(W(o,r.draggable),(e=>{e.removeEventListener("mousedown",je),document.body.removeEventListener("mousemove",He),e.removeEventListener("mouseup",Ie),e.removeEventListener("touchstart",je),document.body.removeEventListener("touchmove",He),e.removeEventListener("touchend",Ie)})(o))}},Ve=(e,t)=>{const n=t.showClass||{};e.className=`${r.popup} ${ee(e)?n.popup:""}`,t.toast?(z([document.documentElement,document.body],r["toast-shown"]),z(e,r.toast)):z(e,r.modal),_(e,t,"popup"),"string"==typeof t.customClass&&z(e,t.customClass),t.icon&&z(e,r[`icon-${t.icon}`])},Ne=e=>{const t=document.createElement("li");return z(t,r["progress-step"]),V(t,e),t},_e=e=>{const t=document.createElement("li");return z(t,r["progress-step-line"]),e.progressStepsDistance&&Y(t,"width",e.progressStepsDistance),t},Fe=(e,t)=>{qe(0,t),pe(0,t),((e,t)=>{const n=L();if(!n)return;const{progressSteps:o,currentProgressStep:i}=t;o&&0!==o.length&&void 0!==i?(X(n),n.textContent="",i>=o.length&&u("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.forEach(((e,s)=>{const a=Ne(e);if(n.appendChild(a),s===i&&z(a,r["active-progress-step"]),s!==o.length-1){const e=_e(t);n.appendChild(e)}}))):Z(n)})(0,t),((e,t)=>{const n=me.innerParams.get(e),o=A();if(o){if(n&&t.icon===n.icon)return Le(o,t),void ke(o,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(a).indexOf(t.icon))return d(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void Z(o);X(o),Le(o,t),ke(o,t),z(o,t.showClass&&t.showClass.icon)}else Z(o)}})(e,t),((e,t)=>{const n=B();n&&(t.imageUrl?(X(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt||""),Y(n,"width",t.imageWidth),Y(n,"height",t.imageHeight),n.className=r.image,_(n,t,"image")):Z(n))})(0,t),((e,t)=>{const n=E();n&&(J(n),Q(n,t.title||t.titleText,"block"),t.title&&ae(t.title,n),t.titleText&&(n.innerText=t.titleText),_(n,t,"title"))})(0,t),((e,t)=>{const n=H();n&&(V(n,t.closeButtonHtml||""),_(n,t,"closeButton"),Q(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel||""))})(0,t),Ee(e,t),ue(0,t),((e,t)=>{const n=M();n&&(J(n),Q(n,t.footer,"block"),t.footer&&ae(t.footer,n),_(n,t,"footer"))})(0,t);const n=C();"function"==typeof t.didRender&&n&&t.didRender(n),o.eventEmitter.emit("didRender",n)},Re=()=>{var e;return null===(e=x())||void 0===e?void 0:e.click()},Ue=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),ze=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},We=(e,t)=>{var n;const o=I();if(o.length)return(e+=t)===o.length?e=0:-1===e&&(e=o.length-1),void o[e].focus();null===(n=C())||void 0===n||n.focus()},Ke=["ArrowRight","ArrowDown"],Ye=["ArrowLeft","ArrowUp"],Xe=(e,t,n)=>{e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Ze(t,e):"Tab"===t.key?Je(t):[...Ke,...Ye].includes(t.key)?Ge(t.key):"Escape"===t.key&&Qe(t,e,n)))},Ze=(e,t)=>{if(!g(t.allowEnterKey))return;const n=F(C(),t.input);if(e.target&&n&&e.target instanceof HTMLElement&&e.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(t.input))return;Re(),e.preventDefault()}},Je=e=>{const t=e.target,n=I();let o=-1;for(let e=0;e<n.length;e++)if(t===n[e]){o=e;break}e.shiftKey?We(o,-1):We(o,1),e.stopPropagation(),e.preventDefault()},Ge=e=>{const t=O(),n=x(),o=T(),i=P();if(!(t&&n&&o&&i))return;const s=[n,o,i];if(document.activeElement instanceof HTMLElement&&!s.includes(document.activeElement))return;const r=Ke.includes(e)?"nextElementSibling":"previousElementSibling";let a=document.activeElement;if(a){for(let e=0;e<t.children.length;e++){if(a=a[r],!a)return;if(a instanceof HTMLButtonElement&&ee(a))break}a instanceof HTMLButtonElement&&a.focus()}},Qe=(e,t,n)=>{g(t.allowEscapeKey)&&(e.preventDefault(),n(Ue.esc))};var et={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const tt=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},nt="undefined"!=typeof window&&!!window.GestureEvent,ot=()=>{const e=y();if(!e)return;let t;e.ontouchstart=e=>{t=it(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},it=e=>{const t=e.target,n=y(),o=k();return!(!n||!o)&&(!st(e)&&!rt(e)&&(t===n||!te(n)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!te(o)||!o.contains(t))))},st=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,rt=e=>e.touches&&e.touches.length>1;let at=null;const lt=e=>{null===at&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(at=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${at+(()=>{const e=document.createElement("div");e.className=r["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function ct(e,t,n,s){q()?bt(e,s):(i(n).then((()=>bt(e,s))),ze(o)),nt?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),D()&&(null!==at&&(document.body.style.paddingRight=`${at}px`,at=null),(()=>{if(N(document.body,r.iosfix)){const e=parseInt(document.body.style.top,10);W(document.body,r.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),tt()),W([document.documentElement,document.body],[r.shown,r["height-auto"],r["no-backdrop"],r["toast-shown"]])}function ut(e){e=gt(e);const t=et.swalPromiseResolve.get(this),n=dt(this);this.isAwaitingPromise?e.isDismissed||(mt(this),t(e)):n&&t(e)}const dt=e=>{const t=C();if(!t)return!1;const n=me.innerParams.get(e);if(!n||N(t,n.hideClass.popup))return!1;W(t,n.showClass.popup),z(t,n.hideClass.popup);const o=y();return W(o,n.showClass.backdrop),z(o,n.hideClass.backdrop),ht(e,t,n),!0};function pt(e){const t=et.swalPromiseReject.get(this);mt(this),t&&t(e)}const mt=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,me.innerParams.get(e)||e._destroy())},gt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),ht=(e,t,n)=>{var i;const s=y(),r=ne(t);"function"==typeof n.willClose&&n.willClose(t),null===(i=o.eventEmitter)||void 0===i||i.emit("willClose",t),r?ft(e,t,s,n.returnFocus,n.didClose):ct(e,s,n.returnFocus,n.didClose)},ft=(e,t,n,i,s)=>{o.swalCloseEventFinishedCallback=ct.bind(null,e,n,i,s);const r=function(e){var n;e.target===t&&(null===(n=o.swalCloseEventFinishedCallback)||void 0===n||n.call(o),delete o.swalCloseEventFinishedCallback,t.removeEventListener("animationend",r),t.removeEventListener("transitionend",r))};t.addEventListener("animationend",r),t.addEventListener("transitionend",r)},bt=(e,t)=>{setTimeout((()=>{var n;"function"==typeof t&&t.bind(e.params)(),null===(n=o.eventEmitter)||void 0===n||n.emit("didClose"),e._destroy&&e._destroy()}))},yt=e=>{let t=C();if(t||new Jn,t=C(),!t)return;const n=S();q()?Z(A()):vt(t,e),X(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},vt=(e,t)=>{const n=O(),o=S();n&&o&&(!t&&ee(x())&&(t=x()),X(n),t&&(Z(t),o.setAttribute("data-button-to-replace",t.className),n.insertBefore(o,t)),z([e,n],r.loading))},wt=e=>e.checked?1:0,Ct=e=>e.checked?e.value:null,At=e=>e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,Et=(e,t)=>{const n=C();if(!n)return;const o=e=>{"select"===t.input?function(e,t,n){const o=K(e,r.select);if(!o)return;const i=(e,t,o)=>{const i=document.createElement("option");i.value=o,V(i,t),i.selected=Lt(o,n.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,o.appendChild(e),n.forEach((t=>i(e,t[1],t[0])))}else i(o,n,t)})),o.focus()}(n,Bt(e),t):"radio"===t.input&&function(e,t,n){const o=K(e,r.radio);if(!o)return;t.forEach((e=>{const t=e[0],i=e[1],s=document.createElement("input"),a=document.createElement("label");s.type="radio",s.name=r.radio,s.value=t,Lt(t,n.inputValue)&&(s.checked=!0);const l=document.createElement("span");V(l,i),l.className=r.label,a.appendChild(s),a.appendChild(l),o.appendChild(a)}));const i=o.querySelectorAll("input");i.length&&i[0].focus()}(n,Bt(e),t)};h(t.inputOptions)||b(t.inputOptions)?(yt(x()),f(t.inputOptions).then((t=>{e.hideLoading(),o(t)}))):"object"==typeof t.inputOptions?o(t.inputOptions):d("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},kt=(e,t)=>{const n=e.getInput();n&&(Z(n),f(t.inputValue).then((o=>{n.value="number"===t.input?`${parseFloat(o)||0}`:`${o}`,X(n),n.focus(),e.hideLoading()})).catch((t=>{d(`Error in inputValue promise: ${t}`),n.value="",X(n),n.focus(),e.hideLoading()})))};const Bt=e=>{const t=[];return e instanceof Map?e.forEach(((e,n)=>{let o=e;"object"==typeof o&&(o=Bt(o)),t.push([n,o])})):Object.keys(e).forEach((n=>{let o=e[n];"object"==typeof o&&(o=Bt(o)),t.push([n,o])})),t},Lt=(e,t)=>!!t&&t.toString()===e.toString(),$t=(e,t)=>{const n=me.innerParams.get(e);if(!n.input)return void d(`The "input" parameter is needed to be set when using returnInputValueOn${c(t)}`);const o=e.getInput(),i=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return wt(n);case"radio":return Ct(n);case"file":return At(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?xt(e,i,t):o&&!o.checkValidity()?(e.enableButtons(),e.showValidationMessage(n.validationMessage||o.validationMessage)):"deny"===t?Pt(e,i):Ot(e,i)},xt=(e,t,n)=>{const o=me.innerParams.get(e);e.disableInput();Promise.resolve().then((()=>f(o.inputValidator(t,o.validationMessage)))).then((o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===n?Pt(e,t):Ot(e,t)}))},Pt=(e,t)=>{const n=me.innerParams.get(e||void 0);if(n.showLoaderOnDeny&&yt(T()),n.preDeny){e.isAwaitingPromise=!0;Promise.resolve().then((()=>f(n.preDeny(t,n.validationMessage)))).then((n=>{!1===n?(e.hideLoading(),mt(e)):e.close({isDenied:!0,value:void 0===n?t:n})})).catch((t=>St(e||void 0,t)))}else e.close({isDenied:!0,value:t})},Tt=(e,t)=>{e.close({isConfirmed:!0,value:t})},St=(e,t)=>{e.rejectPromise(t)},Ot=(e,t)=>{const n=me.innerParams.get(e||void 0);if(n.showLoaderOnConfirm&&yt(),n.preConfirm){e.resetValidationMessage(),e.isAwaitingPromise=!0;Promise.resolve().then((()=>f(n.preConfirm(t,n.validationMessage)))).then((n=>{ee($())||!1===n?(e.hideLoading(),mt(e)):Tt(e,void 0===n?t:n)})).catch((t=>St(e||void 0,t)))}else Tt(e,t)};function Mt(){const e=me.innerParams.get(this);if(!e)return;const t=me.domCache.get(this);Z(t.loader),q()?e.icon&&X(A()):jt(t),W([t.popup,t.actions],r.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const jt=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?X(t[0],"inline-block"):ee(x())||ee(T())||ee(P())||Z(e.actions)};function Ht(){const e=me.innerParams.get(this),t=me.domCache.get(this);return t?F(t.popup,e.input):null}function It(e,t,n){const o=me.domCache.get(e);t.forEach((e=>{o[e].disabled=n}))}function Dt(e,t){const n=C();if(n&&e)if("radio"===e.type){const e=n.querySelectorAll(`[name="${r.radio}"]`);for(let n=0;n<e.length;n++)e[n].disabled=t}else e.disabled=t}function qt(){It(this,["confirmButton","denyButton","cancelButton"],!1)}function Vt(){It(this,["confirmButton","denyButton","cancelButton"],!0)}function Nt(){Dt(this.getInput(),!1)}function _t(){Dt(this.getInput(),!0)}function Ft(e){const t=me.domCache.get(this),n=me.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=r["validation-message"],n.customClass&&n.customClass.validationMessage&&z(t.validationMessage,n.customClass.validationMessage),X(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid","true"),o.setAttribute("aria-describedby",r["validation-message"]),R(o),z(o,r.inputerror))}function Rt(){const e=me.domCache.get(this);e.validationMessage&&Z(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),W(t,r.inputerror))}const Ut={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},zt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Wt={allowEnterKey:void 0},Kt=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Yt=e=>Object.prototype.hasOwnProperty.call(Ut,e),Xt=e=>-1!==zt.indexOf(e),Zt=e=>Wt[e],Jt=e=>{Yt(e)||u(`Unknown parameter "${e}"`)},Gt=e=>{Kt.includes(e)&&u(`The parameter "${e}" is incompatible with toasts`)},Qt=e=>{const t=Zt(e);t&&m(e,t)};function en(e){const t=C(),n=me.innerParams.get(this);if(!t||N(t,n.hideClass.popup))return void u("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o=tn(e),i=Object.assign({},n,o);Fe(this,i),me.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const tn=e=>{const t={};return Object.keys(e).forEach((n=>{Xt(n)?t[n]=e[n]:u(`Invalid parameter to update: ${n}`)})),t};function nn(){const e=me.domCache.get(this),t=me.innerParams.get(this);t?(e.popup&&o.swalCloseEventFinishedCallback&&(o.swalCloseEventFinishedCallback(),delete o.swalCloseEventFinishedCallback),"function"==typeof t.didDestroy&&t.didDestroy(),o.eventEmitter.emit("didDestroy"),on(this)):sn(this)}const on=e=>{sn(e),delete e.params,delete o.keydownHandler,delete o.keydownTarget,delete o.currentInstance},sn=e=>{e.isAwaitingPromise?(rn(me,e),e.isAwaitingPromise=!0):(rn(et,e),rn(me,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},rn=(e,t)=>{for(const n in e)e[n].delete(t)};var an=Object.freeze({__proto__:null,_destroy:nn,close:ut,closeModal:ut,closePopup:ut,closeToast:ut,disableButtons:Vt,disableInput:_t,disableLoading:Mt,enableButtons:qt,enableInput:Nt,getInput:Ht,handleAwaitingPromise:mt,hideLoading:Mt,rejectPromise:pt,resetValidationMessage:Rt,showValidationMessage:Ft,update:en});const ln=(e,t,n)=>{t.popup.onclick=()=>{e&&(cn(e)||e.timer||e.input)||n(Ue.close)}},cn=e=>!!(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton);let un=!1;const dn=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(un=!0)}}},pn=e=>{e.container.onmousedown=t=>{t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=()=>{},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(un=!0)}}},mn=(e,t,n)=>{t.container.onclick=o=>{un?un=!1:o.target===t.container&&g(e.allowOutsideClick)&&n(Ue.backdrop)}},gn=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const hn=()=>{if(o.timeout)return(()=>{const e=j();if(!e)return;const t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${n}%`})(),o.timeout.stop()},fn=()=>{if(o.timeout){const e=o.timeout.start();return oe(e),e}};let bn=!1;const yn={};const vn=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in yn){const n=t.getAttribute(e);if(n)return void yn[e].fire({template:n})}};o.eventEmitter=new class{constructor(){this.events={}}_getHandlersByEventName(e){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e]}on(e,t){const n=this._getHandlersByEventName(e);n.includes(t)||n.push(t)}once(e,t){var n=this;const o=function(){n.removeListener(e,o);for(var i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];t.apply(n,s)};this.on(e,o)}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];this._getHandlersByEventName(e).forEach((e=>{try{e.apply(this,n)}catch(e){console.error(e)}}))}removeListener(e,t){const n=this._getHandlersByEventName(e),o=n.indexOf(t);o>-1&&n.splice(o,1)}removeAllListeners(e){void 0!==this.events[e]&&(this.events[e].length=0)}reset(){this.events={}}};var wn=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||gn(e[0])?["title","html","icon"].forEach(((n,o)=>{const i=e[o];"string"==typeof i||gn(i)?t[n]=i:void 0!==i&&d(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)})):Object.assign(t,e[0]),t},bindClickHandler:function(){yn[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,bn||(document.body.addEventListener("click",vn),bn=!0)},clickCancel:()=>{var e;return null===(e=P())||void 0===e?void 0:e.click()},clickConfirm:Re,clickDeny:()=>{var e;return null===(e=T())||void 0===e?void 0:e.click()},enableLoading:yt,fire:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new this(...t)},getActions:O,getCancelButton:P,getCloseButton:H,getConfirmButton:x,getContainer:y,getDenyButton:T,getFocusableElements:I,getFooter:M,getHtmlContainer:k,getIcon:A,getIconContent:()=>w(r["icon-content"]),getImage:B,getInputLabel:()=>w(r["input-label"]),getLoader:S,getPopup:C,getProgressSteps:L,getTimerLeft:()=>o.timeout&&o.timeout.getTimerLeft(),getTimerProgressBar:j,getTitle:E,getValidationMessage:$,increaseTimer:e=>{if(o.timeout){const t=o.timeout.increase(e);return oe(t,!0),t}},isDeprecatedParameter:Zt,isLoading:()=>{const e=C();return!!e&&e.hasAttribute("data-loading")},isTimerRunning:()=>!(!o.timeout||!o.timeout.isRunning()),isUpdatableParameter:Xt,isValidParameter:Yt,isVisible:()=>ee(C()),mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},off:(e,t)=>{e?t?o.eventEmitter.removeListener(e,t):o.eventEmitter.removeAllListeners(e):o.eventEmitter.reset()},on:(e,t)=>{o.eventEmitter.on(e,t)},once:(e,t)=>{o.eventEmitter.once(e,t)},resumeTimer:fn,showLoading:yt,stopTimer:hn,toggleTimer:()=>{const e=o.timeout;return e&&(e.running?hn():fn())}});class Cn{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const An=["swal-title","swal-html","swal-footer"],En=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{Sn(e,["name","value"]);const n=e.getAttribute("name"),o=e.getAttribute("value");n&&o&&(t[n]="boolean"==typeof Ut[n]?"false"!==o:"object"==typeof Ut[n]?JSON.parse(o):o)})),t},kn=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const n=e.getAttribute("name"),o=e.getAttribute("value");n&&o&&(t[n]=new Function(`return ${o}`)())})),t},Bn=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{Sn(e,["type","color","aria-label"]);const n=e.getAttribute("type");n&&["confirm","cancel","deny"].includes(n)&&(t[`${n}ButtonText`]=e.innerHTML,t[`show${c(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label")))})),t},Ln=e=>{const t={},n=e.querySelector("swal-image");return n&&(Sn(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")||void 0),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")||void 0),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")||void 0),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt")||void 0)),t},$n=e=>{const t={},n=e.querySelector("swal-icon");return n&&(Sn(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},xn=e=>{const t={},n=e.querySelector("swal-input");n&&(Sn(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const o=Array.from(e.querySelectorAll("swal-input-option"));return o.length&&(t.inputOptions={},o.forEach((e=>{Sn(e,["value"]);const n=e.getAttribute("value");if(!n)return;const o=e.innerHTML;t.inputOptions[n]=o}))),t},Pn=(e,t)=>{const n={};for(const o in t){const i=t[o],s=e.querySelector(i);s&&(Sn(s,[]),n[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},Tn=e=>{const t=An.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const n=e.tagName.toLowerCase();t.includes(n)||u(`Unrecognized element <${n}>`)}))},Sn=(e,t)=>{Array.from(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&u([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])}))},On=e=>{const t=y(),n=C();"function"==typeof e.willOpen&&e.willOpen(n),o.eventEmitter.emit("willOpen",n);const i=window.getComputedStyle(document.body).overflowY;In(t,n,e),setTimeout((()=>{jn(t,n)}),10),D()&&(Hn(t,e.scrollbarPadding,i),(()=>{const e=y();Array.from(document.body.children).forEach((t=>{t.contains(e)||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")||""),t.setAttribute("aria-hidden","true"))}))})()),q()||o.previousActiveElement||(o.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(n))),o.eventEmitter.emit("didOpen",n),W(t,r["no-transition"])},Mn=e=>{const t=C();if(e.target!==t)return;const n=y();t.removeEventListener("animationend",Mn),t.removeEventListener("transitionend",Mn),n.style.overflowY="auto"},jn=(e,t)=>{ne(t)?(e.style.overflowY="hidden",t.addEventListener("animationend",Mn),t.addEventListener("transitionend",Mn)):e.style.overflowY="auto"},Hn=(e,t,n)=>{(()=>{if(nt&&!N(document.body,r.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",z(document.body,r.iosfix),ot()}})(),t&&"hidden"!==n&<(n),setTimeout((()=>{e.scrollTop=0}))},In=(e,t,n)=>{z(e,n.showClass.backdrop),n.animation?(t.style.setProperty("opacity","0","important"),X(t,"grid"),setTimeout((()=>{z(t,n.showClass.popup),t.style.removeProperty("opacity")}),10)):X(t,"grid"),z([document.documentElement,document.body],r.shown),n.heightAuto&&n.backdrop&&!n.toast&&z([document.documentElement,document.body],r["height-auto"])};var Dn=(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),qn=(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL");function Vn(e){!function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=Dn),"url"===e.input&&(e.inputValidator=qn))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&u("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(u('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),re(e)}let Nn;var _n=new WeakMap;class Fn{constructor(){if(n(this,_n,void 0),"undefined"==typeof window)return;Nn=this;for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];const s=Object.freeze(this.constructor.argsToParams(o));var r,a,l;this.params=s,this.isAwaitingPromise=!1,r=_n,a=this,l=this._main(Nn.params),r.set(e(r,a),l)}_main(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((e=>{!1===e.backdrop&&e.allowOutsideClick&&u('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)Jt(t),e.toast&&Gt(t),Qt(t)})(Object.assign({},t,e)),o.currentInstance){const e=et.swalPromiseResolve.get(o.currentInstance),{isAwaitingPromise:t}=o.currentInstance;o.currentInstance._destroy(),t||e({isDismissed:!0}),D()&&tt()}o.currentInstance=Nn;const n=Un(e,t);Vn(n),Object.freeze(n),o.timeout&&(o.timeout.stop(),delete o.timeout),clearTimeout(o.restoreFocusTimeout);const i=zn(Nn);return Fe(Nn,n),me.innerParams.set(Nn,n),Rn(Nn,i,n)}then(e){return t(_n,this).then(e)}finally(e){return t(_n,this).finally(e)}}const Rn=(e,t,n)=>new Promise(((i,s)=>{const r=t=>{e.close({isDismissed:!0,dismiss:t})};et.swalPromiseResolve.set(e,i),et.swalPromiseReject.set(e,s),t.confirmButton.onclick=()=>{(e=>{const t=me.innerParams.get(e);e.disableButtons(),t.input?$t(e,"confirm"):Ot(e,!0)})(e)},t.denyButton.onclick=()=>{(e=>{const t=me.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?$t(e,"deny"):Pt(e,!1)})(e)},t.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Ue.cancel)})(e,r)},t.closeButton.onclick=()=>{r(Ue.close)},((e,t,n)=>{e.toast?ln(e,t,n):(dn(t),pn(t),mn(e,t,n))})(n,t,r),((e,t,n)=>{ze(e),t.toast||(e.keydownHandler=e=>Xe(t,e,n),e.keydownTarget=t.keydownListenerCapture?window:C(),e.keydownListenerCapture=t.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)})(o,n,r),((e,t)=>{"select"===t.input||"radio"===t.input?Et(e,t):["text","email","number","tel","textarea"].some((e=>e===t.input))&&(h(t.inputValue)||b(t.inputValue))&&(yt(x()),kt(e,t))})(e,n),On(n),Wn(o,n,r),Kn(t,n),setTimeout((()=>{t.container.scrollTop=0}))})),Un=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return Tn(n),Object.assign(En(n),kn(n),Bn(n),Ln(n),$n(n),xn(n),Pn(n,An))})(e),o=Object.assign({},Ut,t,n,e);return o.showClass=Object.assign({},Ut.showClass,o.showClass),o.hideClass=Object.assign({},Ut.hideClass,o.hideClass),!1===o.animation&&(o.showClass={backdrop:"swal2-noanimation"},o.hideClass={}),o},zn=e=>{const t={popup:C(),container:y(),actions:O(),confirmButton:x(),denyButton:T(),cancelButton:P(),loader:S(),closeButton:H(),validationMessage:$(),progressSteps:L()};return me.domCache.set(e,t),t},Wn=(e,t,n)=>{const o=j();Z(o),t.timer&&(e.timeout=new Cn((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(X(o),_(o,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&oe(t.timer)}))))},Kn=(e,t)=>{if(!t.toast)return g(t.allowEnterKey)?void(Yn(e)||Xn(e,t)||We(-1,1)):(m("allowEnterKey"),void Zn())},Yn=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const e of t)if(e instanceof HTMLElement&&ee(e))return e.focus(),!0;return!1},Xn=(e,t)=>t.focusDeny&&ee(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&ee(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!ee(e.confirmButton))&&(e.confirmButton.focus(),!0),Zn=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout((()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((()=>{e.play().catch((()=>{}))}),2500)}),500):localStorage.setItem("swal-initiation",`${e}`)}Fn.prototype.disableButtons=Vt,Fn.prototype.enableButtons=qt,Fn.prototype.getInput=Ht,Fn.prototype.disableInput=_t,Fn.prototype.enableInput=Nt,Fn.prototype.hideLoading=Mt,Fn.prototype.disableLoading=Mt,Fn.prototype.showValidationMessage=Ft,Fn.prototype.resetValidationMessage=Rt,Fn.prototype.close=ut,Fn.prototype.closePopup=ut,Fn.prototype.closeModal=ut,Fn.prototype.closeToast=ut,Fn.prototype.rejectPromise=pt,Fn.prototype.update=en,Fn.prototype._destroy=nn,Object.assign(Fn,wn),Object.keys(an).forEach((e=>{Fn[e]=function(){return Nn&&Nn[e]?Nn[e](...arguments):null}})),Fn.DismissReason=Ue,Fn.version="11.15.3";const Jn=Fn;return Jn.default=Jn,Jn})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:hsl(0,0%,33%);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid hsl(0,0%,85%);border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:hsl(0,0%,94%);color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:rgb(249.95234375,205.965625,167.74765625);color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:rgb(156.7033492823,224.2822966507,246.2966507177);color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:rgb(200.8064516129,217.9677419355,225.1935483871);color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}"); \ No newline at end of file diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.css b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.css index ce86ca7..8b437c4 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.css +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.css @@ -6,7 +6,7 @@ padding: 1em; overflow-y: hidden; background: #fff; - box-shadow: 0 0 1px hsla(0deg, 0%, 0%, 0.075), 0 1px 2px hsla(0deg, 0%, 0%, 0.075), 1px 2px 4px hsla(0deg, 0%, 0%, 0.075), 1px 3px 8px hsla(0deg, 0%, 0%, 0.075), 2px 4px 16px hsla(0deg, 0%, 0%, 0.075); + box-shadow: 0 0 1px hsla(0, 0%, 0%, 0.075), 0 1px 2px hsla(0, 0%, 0%, 0.075), 1px 2px 4px hsla(0, 0%, 0%, 0.075), 1px 3px 8px hsla(0, 0%, 0%, 0.075), 2px 4px 16px hsla(0, 0%, 0%, 0.075); pointer-events: all; } .swal2-popup.swal2-toast > * { @@ -109,7 +109,6 @@ position: absolute; width: 1.6em; height: 3em; - transform: rotate(45deg); border-radius: 50%; } .swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left] { @@ -161,14 +160,11 @@ animation: swal2-toast-hide 0.1s forwards; } -.swal2-container { +div:where(.swal2-container) { display: grid; position: fixed; z-index: 1060; - top: 0; - right: 0; - bottom: 0; - left: 0; + inset: 0; box-sizing: border-box; grid-template-areas: "top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end"; grid-template-rows: minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto); @@ -178,80 +174,73 @@ transition: background-color 0.1s; -webkit-overflow-scrolling: touch; } -.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation { +div:where(.swal2-container).swal2-backdrop-show, div:where(.swal2-container).swal2-noanimation { background: rgba(0, 0, 0, 0.4); } -.swal2-container.swal2-backdrop-hide { +div:where(.swal2-container).swal2-backdrop-hide { background: transparent !important; } -.swal2-container.swal2-top-start, .swal2-container.swal2-center-start, .swal2-container.swal2-bottom-start { +div:where(.swal2-container).swal2-top-start, div:where(.swal2-container).swal2-center-start, div:where(.swal2-container).swal2-bottom-start { grid-template-columns: minmax(0, 1fr) auto auto; } -.swal2-container.swal2-top, .swal2-container.swal2-center, .swal2-container.swal2-bottom { +div:where(.swal2-container).swal2-top, div:where(.swal2-container).swal2-center, div:where(.swal2-container).swal2-bottom { grid-template-columns: auto minmax(0, 1fr) auto; } -.swal2-container.swal2-top-end, .swal2-container.swal2-center-end, .swal2-container.swal2-bottom-end { +div:where(.swal2-container).swal2-top-end, div:where(.swal2-container).swal2-center-end, div:where(.swal2-container).swal2-bottom-end { grid-template-columns: auto auto minmax(0, 1fr); } -.swal2-container.swal2-top-start > .swal2-popup { +div:where(.swal2-container).swal2-top-start > .swal2-popup { align-self: start; } -.swal2-container.swal2-top > .swal2-popup { +div:where(.swal2-container).swal2-top > .swal2-popup { grid-column: 2; - align-self: start; - justify-self: center; + place-self: start center; } -.swal2-container.swal2-top-end > .swal2-popup, .swal2-container.swal2-top-right > .swal2-popup { +div:where(.swal2-container).swal2-top-end > .swal2-popup, div:where(.swal2-container).swal2-top-right > .swal2-popup { grid-column: 3; - align-self: start; - justify-self: end; + place-self: start end; } -.swal2-container.swal2-center-start > .swal2-popup, .swal2-container.swal2-center-left > .swal2-popup { +div:where(.swal2-container).swal2-center-start > .swal2-popup, div:where(.swal2-container).swal2-center-left > .swal2-popup { grid-row: 2; align-self: center; } -.swal2-container.swal2-center > .swal2-popup { +div:where(.swal2-container).swal2-center > .swal2-popup { grid-column: 2; grid-row: 2; - align-self: center; - justify-self: center; + place-self: center center; } -.swal2-container.swal2-center-end > .swal2-popup, .swal2-container.swal2-center-right > .swal2-popup { +div:where(.swal2-container).swal2-center-end > .swal2-popup, div:where(.swal2-container).swal2-center-right > .swal2-popup { grid-column: 3; grid-row: 2; - align-self: center; - justify-self: end; + place-self: center end; } -.swal2-container.swal2-bottom-start > .swal2-popup, .swal2-container.swal2-bottom-left > .swal2-popup { +div:where(.swal2-container).swal2-bottom-start > .swal2-popup, div:where(.swal2-container).swal2-bottom-left > .swal2-popup { grid-column: 1; grid-row: 3; align-self: end; } -.swal2-container.swal2-bottom > .swal2-popup { +div:where(.swal2-container).swal2-bottom > .swal2-popup { grid-column: 2; grid-row: 3; - justify-self: center; - align-self: end; + place-self: end center; } -.swal2-container.swal2-bottom-end > .swal2-popup, .swal2-container.swal2-bottom-right > .swal2-popup { +div:where(.swal2-container).swal2-bottom-end > .swal2-popup, div:where(.swal2-container).swal2-bottom-right > .swal2-popup { grid-column: 3; grid-row: 3; - align-self: end; - justify-self: end; + place-self: end end; } -.swal2-container.swal2-grow-row > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { +div:where(.swal2-container).swal2-grow-row > .swal2-popup, div:where(.swal2-container).swal2-grow-fullscreen > .swal2-popup { grid-column: 1/4; width: 100%; } -.swal2-container.swal2-grow-column > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { +div:where(.swal2-container).swal2-grow-column > .swal2-popup, div:where(.swal2-container).swal2-grow-fullscreen > .swal2-popup { grid-row: 1/4; align-self: stretch; } -.swal2-container.swal2-no-transition { +div:where(.swal2-container).swal2-no-transition { transition: none !important; } - -.swal2-popup { +div:where(.swal2-container) div:where(.swal2-popup) { display: none; position: relative; box-sizing: border-box; @@ -262,18 +251,29 @@ border: none; border-radius: 5px; background: #fff; - color: #545454; + color: rgb(84.15, 84.15, 84.15); font-family: inherit; font-size: 1rem; } -.swal2-popup:focus { +div:where(.swal2-container) div:where(.swal2-popup):focus { outline: none; } -.swal2-popup.swal2-loading { +div:where(.swal2-container) div:where(.swal2-popup).swal2-loading { overflow-y: hidden; } - -.swal2-title { +div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable { + cursor: grab; +} +div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon) { + cursor: grab; +} +div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging { + cursor: grabbing; +} +div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon) { + cursor: grabbing; +} +div:where(.swal2-container) h2:where(.swal2-title) { position: relative; max-width: 100%; margin: 0; @@ -284,9 +284,9 @@ text-align: center; text-transform: none; word-wrap: break-word; + cursor: initial; } - -.swal2-actions { +div:where(.swal2-container) div:where(.swal2-actions) { display: flex; z-index: 1; box-sizing: border-box; @@ -297,17 +297,16 @@ margin: 1.25em auto 0; padding: 0; } -.swal2-actions:not(.swal2-loading) .swal2-styled[disabled] { +div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled] { opacity: 0.4; } -.swal2-actions:not(.swal2-loading) .swal2-styled:hover { +div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover { background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); } -.swal2-actions:not(.swal2-loading) .swal2-styled:active { +div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active { background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); } - -.swal2-loader { +div:where(.swal2-container) div:where(.swal2-loader) { display: none; align-items: center; justify-content: center; @@ -320,18 +319,17 @@ border-radius: 100%; border-color: #2778c4 transparent #2778c4 transparent; } - -.swal2-styled { +div:where(.swal2-container) button:where(.swal2-styled) { margin: 0.3125em; padding: 0.625em 1.1em; transition: box-shadow 0.1s; box-shadow: 0 0 0 3px transparent; font-weight: 500; } -.swal2-styled:not([disabled]) { +div:where(.swal2-container) button:where(.swal2-styled):not([disabled]) { cursor: pointer; } -.swal2-styled.swal2-confirm { +div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm) { border: 0; border-radius: 0.25em; background: initial; @@ -339,10 +337,10 @@ color: #fff; font-size: 1em; } -.swal2-styled.swal2-confirm:focus { +div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible { box-shadow: 0 0 0 3px rgba(112, 102, 224, 0.5); } -.swal2-styled.swal2-deny { +div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny) { border: 0; border-radius: 0.25em; background: initial; @@ -350,10 +348,10 @@ color: #fff; font-size: 1em; } -.swal2-styled.swal2-deny:focus { +div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible { box-shadow: 0 0 0 3px rgba(220, 55, 65, 0.5); } -.swal2-styled.swal2-cancel { +div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel) { border: 0; border-radius: 0.25em; background: initial; @@ -361,29 +359,28 @@ color: #fff; font-size: 1em; } -.swal2-styled.swal2-cancel:focus { +div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible { box-shadow: 0 0 0 3px rgba(110, 120, 129, 0.5); } -.swal2-styled.swal2-default-outline:focus { +div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible { box-shadow: 0 0 0 3px rgba(100, 150, 200, 0.5); } -.swal2-styled:focus { +div:where(.swal2-container) button:where(.swal2-styled):focus-visible { outline: none; } -.swal2-styled::-moz-focus-inner { +div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner { border: 0; } - -.swal2-footer { - justify-content: center; +div:where(.swal2-container) div:where(.swal2-footer) { margin: 1em 0 0; padding: 1em 1em 0; border-top: 1px solid #eee; color: inherit; font-size: 1em; + text-align: center; + cursor: initial; } - -.swal2-timer-progress-bar-container { +div:where(.swal2-container) .swal2-timer-progress-bar-container { position: absolute; right: 0; bottom: 0; @@ -393,19 +390,17 @@ border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; } - -.swal2-timer-progress-bar { +div:where(.swal2-container) div:where(.swal2-timer-progress-bar) { width: 100%; height: 0.25em; background: rgba(0, 0, 0, 0.2); } - -.swal2-image { +div:where(.swal2-container) img:where(.swal2-image) { max-width: 100%; margin: 2em auto 1em; + cursor: initial; } - -.swal2-close { +div:where(.swal2-container) button:where(.swal2-close) { z-index: 2; align-items: center; justify-content: center; @@ -421,30 +416,28 @@ border-radius: 5px; background: transparent; color: #ccc; - font-family: serif; font-family: monospace; font-size: 2.5em; cursor: pointer; justify-self: end; } -.swal2-close:hover { +div:where(.swal2-container) button:where(.swal2-close):hover { transform: none; background: transparent; color: #f27474; } -.swal2-close:focus { +div:where(.swal2-container) button:where(.swal2-close):focus-visible { outline: none; box-shadow: inset 0 0 0 3px rgba(100, 150, 200, 0.5); } -.swal2-close::-moz-focus-inner { +div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner { border: 0; } - -.swal2-html-container { +div:where(.swal2-container) div:where(.swal2-html-container) { z-index: 1; justify-content: center; - margin: 1em 1.6em 0.3em; - padding: 0; + margin: 0; + padding: 1em 1.6em 0.3em; overflow: auto; color: inherit; font-size: 1.125em; @@ -453,89 +446,83 @@ text-align: center; word-wrap: break-word; word-break: break-word; -} - -.swal2-input, -.swal2-file, -.swal2-textarea, -.swal2-select, -.swal2-radio, -.swal2-checkbox { + cursor: initial; +} +div:where(.swal2-container) input:where(.swal2-input), +div:where(.swal2-container) input:where(.swal2-file), +div:where(.swal2-container) textarea:where(.swal2-textarea), +div:where(.swal2-container) select:where(.swal2-select), +div:where(.swal2-container) div:where(.swal2-radio), +div:where(.swal2-container) label:where(.swal2-checkbox) { margin: 1em 2em 3px; } - -.swal2-input, -.swal2-file, -.swal2-textarea { +div:where(.swal2-container) input:where(.swal2-input), +div:where(.swal2-container) input:where(.swal2-file), +div:where(.swal2-container) textarea:where(.swal2-textarea) { box-sizing: border-box; width: auto; transition: border-color 0.1s, box-shadow 0.1s; - border: 1px solid #d9d9d9; + border: 1px solid rgb(216.75, 216.75, 216.75); border-radius: 0.1875em; background: transparent; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent; color: inherit; font-size: 1.125em; } -.swal2-input.swal2-inputerror, -.swal2-file.swal2-inputerror, -.swal2-textarea.swal2-inputerror { +div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror, +div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror, +div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror { border-color: #f27474 !important; box-shadow: 0 0 2px #f27474 !important; } -.swal2-input:focus, -.swal2-file:focus, -.swal2-textarea:focus { +div:where(.swal2-container) input:where(.swal2-input):focus, +div:where(.swal2-container) input:where(.swal2-file):focus, +div:where(.swal2-container) textarea:where(.swal2-textarea):focus { border: 1px solid #b4dbed; outline: none; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5); } -.swal2-input::placeholder, -.swal2-file::placeholder, -.swal2-textarea::placeholder { +div:where(.swal2-container) input:where(.swal2-input)::placeholder, +div:where(.swal2-container) input:where(.swal2-file)::placeholder, +div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder { color: #ccc; } - -.swal2-range { +div:where(.swal2-container) .swal2-range { margin: 1em 2em 3px; background: #fff; } -.swal2-range input { +div:where(.swal2-container) .swal2-range input { width: 80%; } -.swal2-range output { +div:where(.swal2-container) .swal2-range output { width: 20%; color: inherit; font-weight: 600; text-align: center; } -.swal2-range input, -.swal2-range output { +div:where(.swal2-container) .swal2-range input, +div:where(.swal2-container) .swal2-range output { height: 2.625em; padding: 0; font-size: 1.125em; line-height: 2.625em; } - -.swal2-input { +div:where(.swal2-container) .swal2-input { height: 2.625em; padding: 0 0.75em; } - -.swal2-file { +div:where(.swal2-container) .swal2-file { width: 75%; margin-right: auto; margin-left: auto; background: transparent; font-size: 1.125em; } - -.swal2-textarea { +div:where(.swal2-container) .swal2-textarea { height: 6.75em; padding: 0.75em; } - -.swal2-select { +div:where(.swal2-container) .swal2-select { min-width: 50%; max-width: 100%; padding: 0.375em 0.625em; @@ -543,43 +530,40 @@ color: inherit; font-size: 1.125em; } - -.swal2-radio, -.swal2-checkbox { +div:where(.swal2-container) .swal2-radio, +div:where(.swal2-container) .swal2-checkbox { align-items: center; justify-content: center; background: #fff; color: inherit; } -.swal2-radio label, -.swal2-checkbox label { +div:where(.swal2-container) .swal2-radio label, +div:where(.swal2-container) .swal2-checkbox label { margin: 0 0.6em; font-size: 1.125em; } -.swal2-radio input, -.swal2-checkbox input { +div:where(.swal2-container) .swal2-radio input, +div:where(.swal2-container) .swal2-checkbox input { flex-shrink: 0; margin: 0 0.4em; } - -.swal2-input-label { +div:where(.swal2-container) label:where(.swal2-input-label) { display: flex; justify-content: center; margin: 1em auto 0; } - -.swal2-validation-message { +div:where(.swal2-container) div:where(.swal2-validation-message) { align-items: center; justify-content: center; margin: 1em 0 0; padding: 0.625em; overflow: hidden; - background: #f0f0f0; + background: rgb(239.7, 239.7, 239.7); color: #666666; font-size: 1em; font-weight: 300; } -.swal2-validation-message::before { +div:where(.swal2-container) div:where(.swal2-validation-message)::before { content: "!"; display: inline-block; width: 1.5em; @@ -593,8 +577,50 @@ line-height: 1.5em; text-align: center; } +div:where(.swal2-container) .swal2-progress-steps { + flex-wrap: wrap; + align-items: center; + max-width: 100%; + margin: 1.25em auto; + padding: 0; + background: transparent; + font-weight: 600; +} +div:where(.swal2-container) .swal2-progress-steps li { + display: inline-block; + position: relative; +} +div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step { + z-index: 20; + flex-shrink: 0; + width: 2em; + height: 2em; + border-radius: 2em; + background: #2778c4; + color: #fff; + line-height: 2em; + text-align: center; +} +div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step { + background: #2778c4; +} +div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step { + background: #add8e6; + color: #fff; +} +div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line { + background: #add8e6; +} +div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line { + z-index: 10; + flex-shrink: 0; + width: 2.5em; + height: 0.4em; + margin: 0 -1px; + background: #2778c4; +} -.swal2-icon { +div:where(.swal2-icon) { position: relative; box-sizing: content-box; justify-content: center; @@ -609,20 +635,20 @@ cursor: default; user-select: none; } -.swal2-icon .swal2-icon-content { +div:where(.swal2-icon) .swal2-icon-content { display: flex; align-items: center; font-size: 3.75em; } -.swal2-icon.swal2-error { +div:where(.swal2-icon).swal2-error { border-color: #f27474; color: #f27474; } -.swal2-icon.swal2-error .swal2-x-mark { +div:where(.swal2-icon).swal2-error .swal2-x-mark { position: relative; flex-grow: 1; } -.swal2-icon.swal2-error [class^=swal2-x-mark-line] { +div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line] { display: block; position: absolute; top: 2.3125em; @@ -631,76 +657,75 @@ border-radius: 0.125em; background-color: #f27474; } -.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { +div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left] { left: 1.0625em; transform: rotate(45deg); } -.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { +div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right] { right: 1em; transform: rotate(-45deg); } -.swal2-icon.swal2-error.swal2-icon-show { +div:where(.swal2-icon).swal2-error.swal2-icon-show { animation: swal2-animate-error-icon 0.5s; } -.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark { +div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark { animation: swal2-animate-error-x-mark 0.5s; } -.swal2-icon.swal2-warning { - border-color: #facea8; +div:where(.swal2-icon).swal2-warning { + border-color: rgb(249.95234375, 205.965625, 167.74765625); color: #f8bb86; } -.swal2-icon.swal2-warning.swal2-icon-show { +div:where(.swal2-icon).swal2-warning.swal2-icon-show { animation: swal2-animate-error-icon 0.5s; } -.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content { +div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content { animation: swal2-animate-i-mark 0.5s; } -.swal2-icon.swal2-info { - border-color: #9de0f6; +div:where(.swal2-icon).swal2-info { + border-color: rgb(156.7033492823, 224.2822966507, 246.2966507177); color: #3fc3ee; } -.swal2-icon.swal2-info.swal2-icon-show { +div:where(.swal2-icon).swal2-info.swal2-icon-show { animation: swal2-animate-error-icon 0.5s; } -.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content { +div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content { animation: swal2-animate-i-mark 0.8s; } -.swal2-icon.swal2-question { - border-color: #c9dae1; +div:where(.swal2-icon).swal2-question { + border-color: rgb(200.8064516129, 217.9677419355, 225.1935483871); color: #87adbd; } -.swal2-icon.swal2-question.swal2-icon-show { +div:where(.swal2-icon).swal2-question.swal2-icon-show { animation: swal2-animate-error-icon 0.5s; } -.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content { +div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content { animation: swal2-animate-question-mark 0.8s; } -.swal2-icon.swal2-success { +div:where(.swal2-icon).swal2-success { border-color: #a5dc86; color: #a5dc86; } -.swal2-icon.swal2-success [class^=swal2-success-circular-line] { +div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line] { position: absolute; width: 3.75em; height: 7.5em; - transform: rotate(45deg); border-radius: 50%; } -.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left] { +div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left] { top: -0.4375em; left: -2.0635em; transform: rotate(-45deg); transform-origin: 3.75em 3.75em; border-radius: 7.5em 0 0 7.5em; } -.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right] { +div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right] { top: -0.6875em; left: 1.875em; transform: rotate(-45deg); transform-origin: 0 3.75em; border-radius: 0 7.5em 7.5em 0; } -.swal2-icon.swal2-success .swal2-success-ring { +div:where(.swal2-icon).swal2-success .swal2-success-ring { position: absolute; z-index: 2; top: -0.25em; @@ -711,7 +736,7 @@ border: 0.25em solid rgba(165, 220, 134, 0.3); border-radius: 50%; } -.swal2-icon.swal2-success .swal2-success-fix { +div:where(.swal2-icon).swal2-success .swal2-success-fix { position: absolute; z-index: 1; top: 0.5em; @@ -720,7 +745,7 @@ height: 5.625em; transform: rotate(-45deg); } -.swal2-icon.swal2-success [class^=swal2-success-line] { +div:where(.swal2-icon).swal2-success [class^=swal2-success-line] { display: block; position: absolute; z-index: 2; @@ -728,71 +753,28 @@ border-radius: 0.125em; background-color: #a5dc86; } -.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip] { +div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip] { top: 2.875em; left: 0.8125em; width: 1.5625em; transform: rotate(45deg); } -.swal2-icon.swal2-success [class^=swal2-success-line][class$=long] { +div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long] { top: 2.375em; right: 0.5em; width: 2.9375em; transform: rotate(-45deg); } -.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip { +div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip { animation: swal2-animate-success-line-tip 0.75s; } -.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long { +div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long { animation: swal2-animate-success-line-long 0.75s; } -.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right { +div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right { animation: swal2-rotate-success-circular-line 4.25s ease-in; } -.swal2-progress-steps { - flex-wrap: wrap; - align-items: center; - max-width: 100%; - margin: 1.25em auto; - padding: 0; - background: transparent; - font-weight: 600; -} -.swal2-progress-steps li { - display: inline-block; - position: relative; -} -.swal2-progress-steps .swal2-progress-step { - z-index: 20; - flex-shrink: 0; - width: 2em; - height: 2em; - border-radius: 2em; - background: #2778c4; - color: #fff; - line-height: 2em; - text-align: center; -} -.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step { - background: #2778c4; -} -.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step { - background: #add8e6; - color: #fff; -} -.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line { - background: #add8e6; -} -.swal2-progress-steps .swal2-progress-step-line { - z-index: 10; - flex-shrink: 0; - width: 2.5em; - height: 0.4em; - margin: 0 -1px; - background: #2778c4; -} - [class^=swal2] { -webkit-tap-highlight-color: transparent; } @@ -1051,7 +1033,7 @@ opacity: 1; } } -body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { +body.swal2-shown:not(.swal2-no-backdrop, .swal2-toast-shown) { overflow: hidden; } body.swal2-height-auto { @@ -1068,13 +1050,13 @@ body.swal2-no-backdrop .swal2-container .swal2-modal { box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); } @media print { - body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + body.swal2-shown:not(.swal2-no-backdrop, .swal2-toast-shown) { overflow-y: scroll !important; } - body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden=true] { + body.swal2-shown:not(.swal2-no-backdrop, .swal2-toast-shown) > [aria-hidden=true] { display: none; } - body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container { + body.swal2-shown:not(.swal2-no-backdrop, .swal2-toast-shown) .swal2-container { position: static !important; } } @@ -1086,61 +1068,34 @@ body.swal2-toast-shown .swal2-container { pointer-events: none; } body.swal2-toast-shown .swal2-container.swal2-top { - top: 0; - right: auto; - bottom: auto; - left: 50%; + inset: 0 auto auto 50%; transform: translateX(-50%); } body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right { - top: 0; - right: 0; - bottom: auto; - left: auto; + inset: 0 0 auto auto; } body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left { - top: 0; - right: auto; - bottom: auto; - left: 0; + inset: 0 auto auto 0; } body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left { - top: 50%; - right: auto; - bottom: auto; - left: 0; + inset: 50% auto auto 0; transform: translateY(-50%); } body.swal2-toast-shown .swal2-container.swal2-center { - top: 50%; - right: auto; - bottom: auto; - left: 50%; + inset: 50% auto auto 50%; transform: translate(-50%, -50%); } body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right { - top: 50%; - right: 0; - bottom: auto; - left: auto; + inset: 50% 0 auto auto; transform: translateY(-50%); } body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left { - top: auto; - right: auto; - bottom: 0; - left: 0; + inset: auto auto 0 0; } body.swal2-toast-shown .swal2-container.swal2-bottom { - top: auto; - right: auto; - bottom: 0; - left: 50%; + inset: auto auto 0 50%; transform: translateX(-50%); } body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right { - top: auto; - right: 0; - bottom: 0; - left: auto; + inset: auto 0 0 auto; } diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.esm.all.js b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.esm.all.js new file mode 100644 index 0000000..ec9acb7 --- /dev/null +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.esm.all.js @@ -0,0 +1,4590 @@ +/*! +* sweetalert2 v11.15.3 +* Released under the MIT License. +*/ +function _assertClassBrand(e, t, n) { + if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; + throw new TypeError("Private element is not present on this object"); +} +function _checkPrivateRedeclaration(e, t) { + if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); +} +function _classPrivateFieldGet2(s, a) { + return s.get(_assertClassBrand(s, a)); +} +function _classPrivateFieldInitSpec(e, t, a) { + _checkPrivateRedeclaration(e, t), t.set(e, a); +} +function _classPrivateFieldSet2(s, a, r) { + return s.set(_assertClassBrand(s, a), r), r; +} + +const RESTORE_FOCUS_TIMEOUT = 100; + +/** @type {GlobalState} */ +const globalState = {}; +const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement instanceof HTMLElement) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } +}; + +/** + * Restore previous active (focused) element + * + * @param {boolean} returnFocus + * @returns {Promise<void>} + */ +const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); +}; + +const swalPrefix = 'swal2-'; + +/** + * @typedef {Record<SwalClass, string>} SwalClasses + */ + +/** + * @typedef {'success' | 'warning' | 'info' | 'question' | 'error'} SwalIcon + * @typedef {Record<SwalIcon, string>} SwalIcons + */ + +/** @type {SwalClass[]} */ +const classNames = ['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error', 'draggable', 'dragging']; +const swalClasses = classNames.reduce((acc, className) => { + acc[className] = swalPrefix + className; + return acc; +}, /** @type {SwalClasses} */{}); + +/** @type {SwalIcon[]} */ +const icons = ['success', 'warning', 'info', 'question', 'error']; +const iconTypes = icons.reduce((acc, icon) => { + acc[icon] = swalPrefix + icon; + return acc; +}, /** @type {SwalIcons} */{}); + +const consolePrefix = 'SweetAlert2:'; + +/** + * Capitalize the first letter of a string + * + * @param {string} str + * @returns {string} + */ +const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + +/** + * Standardize console warnings + * + * @param {string | string[]} message + */ +const warn = message => { + console.warn(`${consolePrefix} ${typeof message === 'object' ? message.join(' ') : message}`); +}; + +/** + * Standardize console errors + * + * @param {string} message + */ +const error = message => { + console.error(`${consolePrefix} ${message}`); +}; + +/** + * Private global state for `warnOnce` + * + * @type {string[]} + * @private + */ +const previousWarnOnceMessages = []; + +/** + * Show a console warning, but only if it hasn't already been shown + * + * @param {string} message + */ +const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } +}; + +/** + * Show a one-time console warning about deprecated params/methods + * + * @param {string} deprecatedParam + * @param {string?} useInstead + */ +const warnAboutDeprecation = function (deprecatedParam) { + let useInstead = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + warnOnce(`"${deprecatedParam}" is deprecated and will be removed in the next major release.${useInstead ? ` Use "${useInstead}" instead.` : ''}`); +}; + +/** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * + * @param {Function | any} arg + * @returns {any} + */ +const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + +/** + * @param {any} arg + * @returns {boolean} + */ +const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + +/** + * @param {any} arg + * @returns {Promise<any>} + */ +const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + +/** + * @param {any} arg + * @returns {boolean} + */ +const isPromise = arg => arg && Promise.resolve(arg) === arg; + +/** + * Gets the popup container which contains the backdrop and the popup itself. + * + * @returns {HTMLElement | null} + */ +const getContainer = () => document.body.querySelector(`.${swalClasses.container}`); + +/** + * @param {string} selectorString + * @returns {HTMLElement | null} + */ +const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; +}; + +/** + * @param {string} className + * @returns {HTMLElement | null} + */ +const elementByClass = className => { + return elementBySelector(`.${className}`); +}; + +/** + * @returns {HTMLElement | null} + */ +const getPopup = () => elementByClass(swalClasses.popup); + +/** + * @returns {HTMLElement | null} + */ +const getIcon = () => elementByClass(swalClasses.icon); + +/** + * @returns {HTMLElement | null} + */ +const getIconContent = () => elementByClass(swalClasses['icon-content']); + +/** + * @returns {HTMLElement | null} + */ +const getTitle = () => elementByClass(swalClasses.title); + +/** + * @returns {HTMLElement | null} + */ +const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + +/** + * @returns {HTMLElement | null} + */ +const getImage = () => elementByClass(swalClasses.image); + +/** + * @returns {HTMLElement | null} + */ +const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + +/** + * @returns {HTMLElement | null} + */ +const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + +/** + * @returns {HTMLButtonElement | null} + */ +const getConfirmButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.confirm}`)); + +/** + * @returns {HTMLButtonElement | null} + */ +const getCancelButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.cancel}`)); + +/** + * @returns {HTMLButtonElement | null} + */ +const getDenyButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.deny}`)); + +/** + * @returns {HTMLElement | null} + */ +const getInputLabel = () => elementByClass(swalClasses['input-label']); + +/** + * @returns {HTMLElement | null} + */ +const getLoader = () => elementBySelector(`.${swalClasses.loader}`); + +/** + * @returns {HTMLElement | null} + */ +const getActions = () => elementByClass(swalClasses.actions); + +/** + * @returns {HTMLElement | null} + */ +const getFooter = () => elementByClass(swalClasses.footer); + +/** + * @returns {HTMLElement | null} + */ +const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + +/** + * @returns {HTMLElement | null} + */ +const getCloseButton = () => elementByClass(swalClasses.close); + +// https://github.com/jkup/focusable/blob/master/index.js +const focusable = ` + a[href], + area[href], + input:not([disabled]), + select:not([disabled]), + textarea:not([disabled]), + button:not([disabled]), + iframe, + object, + embed, + [tabindex="0"], + [contenteditable], + audio[controls], + video[controls], + summary +`; +/** + * @returns {HTMLElement[]} + */ +const getFocusableElements = () => { + const popup = getPopup(); + if (!popup) { + return []; + } + /** @type {NodeListOf<HTMLElement>} */ + const focusableElementsWithTabindex = popup.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'); + const focusableElementsWithTabindexSorted = Array.from(focusableElementsWithTabindex) + // sort according to tabindex + .sort((a, b) => { + const tabindexA = parseInt(a.getAttribute('tabindex') || '0'); + const tabindexB = parseInt(b.getAttribute('tabindex') || '0'); + if (tabindexA > tabindexB) { + return 1; + } else if (tabindexA < tabindexB) { + return -1; + } + return 0; + }); + + /** @type {NodeListOf<HTMLElement>} */ + const otherFocusableElements = popup.querySelectorAll(focusable); + const otherFocusableElementsFiltered = Array.from(otherFocusableElements).filter(el => el.getAttribute('tabindex') !== '-1'); + return [...new Set(focusableElementsWithTabindexSorted.concat(otherFocusableElementsFiltered))].filter(el => isVisible$1(el)); +}; + +/** + * @returns {boolean} + */ +const isModal = () => { + return hasClass(document.body, swalClasses.shown) && !hasClass(document.body, swalClasses['toast-shown']) && !hasClass(document.body, swalClasses['no-backdrop']); +}; + +/** + * @returns {boolean} + */ +const isToast = () => { + const popup = getPopup(); + if (!popup) { + return false; + } + return hasClass(popup, swalClasses.toast); +}; + +/** + * @returns {boolean} + */ +const isLoading = () => { + const popup = getPopup(); + if (!popup) { + return false; + } + return popup.hasAttribute('data-loading'); +}; + +/** + * Securely set innerHTML of an element + * https://github.com/sweetalert2/sweetalert2/issues/1926 + * + * @param {HTMLElement} elem + * @param {string} html + */ +const setInnerHtml = (elem, html) => { + elem.textContent = ''; + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, `text/html`); + const head = parsed.querySelector('head'); + if (head) { + Array.from(head.childNodes).forEach(child => { + elem.appendChild(child); + }); + } + const body = parsed.querySelector('body'); + if (body) { + Array.from(body.childNodes).forEach(child => { + if (child instanceof HTMLVideoElement || child instanceof HTMLAudioElement) { + elem.appendChild(child.cloneNode(true)); // https://github.com/sweetalert2/sweetalert2/issues/2507 + } else { + elem.appendChild(child); + } + }); + } + } +}; + +/** + * @param {HTMLElement} elem + * @param {string} className + * @returns {boolean} + */ +const hasClass = (elem, className) => { + if (!className) { + return false; + } + const classList = className.split(/\s+/); + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + return true; +}; + +/** + * @param {HTMLElement} elem + * @param {SweetAlertOptions} params + */ +const removeCustomClasses = (elem, params) => { + Array.from(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass || {}).includes(className)) { + elem.classList.remove(className); + } + }); +}; + +/** + * @param {HTMLElement} elem + * @param {SweetAlertOptions} params + * @param {string} className + */ +const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + if (!params.customClass) { + return; + } + const customClass = params.customClass[(/** @type {keyof SweetAlertCustomClass} */className)]; + if (!customClass) { + return; + } + if (typeof customClass !== 'string' && !customClass.forEach) { + warn(`Invalid type of customClass.${className}! Expected string or iterable object, got "${typeof customClass}"`); + return; + } + addClass(elem, customClass); +}; + +/** + * @param {HTMLElement} popup + * @param {import('./renderers/renderInput').InputClass | SweetAlertInput} inputClass + * @returns {HTMLInputElement | null} + */ +const getInput$1 = (popup, inputClass) => { + if (!inputClass) { + return null; + } + switch (inputClass) { + case 'select': + case 'textarea': + case 'file': + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses[inputClass]}`); + case 'checkbox': + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses.checkbox} input`); + case 'radio': + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses.radio} input:checked`) || popup.querySelector(`.${swalClasses.popup} > .${swalClasses.radio} input:first-child`); + case 'range': + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses.range} input`); + default: + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses.input}`); + } +}; + +/** + * @param {HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement} input + */ +const focusInput = input => { + input.focus(); + + // place cursor at end of text in text input + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } +}; + +/** + * @param {HTMLElement | HTMLElement[] | null} target + * @param {string | string[] | readonly string[] | undefined} classList + * @param {boolean} condition + */ +const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + classList.forEach(className => { + if (Array.isArray(target)) { + target.forEach(elem => { + if (condition) { + elem.classList.add(className); + } else { + elem.classList.remove(className); + } + }); + } else { + if (condition) { + target.classList.add(className); + } else { + target.classList.remove(className); + } + } + }); +}; + +/** + * @param {HTMLElement | HTMLElement[] | null} target + * @param {string | string[] | readonly string[] | undefined} classList + */ +const addClass = (target, classList) => { + toggleClass(target, classList, true); +}; + +/** + * @param {HTMLElement | HTMLElement[] | null} target + * @param {string | string[] | readonly string[] | undefined} classList + */ +const removeClass = (target, classList) => { + toggleClass(target, classList, false); +}; + +/** + * Get direct child of an element by class name + * + * @param {HTMLElement} elem + * @param {string} className + * @returns {HTMLElement | undefined} + */ +const getDirectChildByClass = (elem, className) => { + const children = Array.from(elem.children); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child instanceof HTMLElement && hasClass(child, className)) { + return child; + } + } +}; + +/** + * @param {HTMLElement} elem + * @param {string} property + * @param {*} value + */ +const applyNumericalStyle = (elem, property, value) => { + if (value === `${parseInt(value)}`) { + value = parseInt(value); + } + if (value || parseInt(value) === 0) { + elem.style.setProperty(property, typeof value === 'number' ? `${value}px` : value); + } else { + elem.style.removeProperty(property); + } +}; + +/** + * @param {HTMLElement | null} elem + * @param {string} display + */ +const show = function (elem) { + let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex'; + if (!elem) { + return; + } + elem.style.display = display; +}; + +/** + * @param {HTMLElement | null} elem + */ +const hide = elem => { + if (!elem) { + return; + } + elem.style.display = 'none'; +}; + +/** + * @param {HTMLElement | null} elem + * @param {string} display + */ +const showWhenInnerHtmlPresent = function (elem) { + let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'block'; + if (!elem) { + return; + } + new MutationObserver(() => { + toggle(elem, elem.innerHTML, display); + }).observe(elem, { + childList: true, + subtree: true + }); +}; + +/** + * @param {HTMLElement} parent + * @param {string} selector + * @param {string} property + * @param {string} value + */ +const setStyle = (parent, selector, property, value) => { + /** @type {HTMLElement | null} */ + const el = parent.querySelector(selector); + if (el) { + el.style.setProperty(property, value); + } +}; + +/** + * @param {HTMLElement} elem + * @param {any} condition + * @param {string} display + */ +const toggle = function (elem, condition) { + let display = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'flex'; + if (condition) { + show(elem, display); + } else { + hide(elem); + } +}; + +/** + * borrowed from jquery $(elem).is(':visible') implementation + * + * @param {HTMLElement | null} elem + * @returns {boolean} + */ +const isVisible$1 = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + +/** + * @returns {boolean} + */ +const allButtonsAreHidden = () => !isVisible$1(getConfirmButton()) && !isVisible$1(getDenyButton()) && !isVisible$1(getCancelButton()); + +/** + * @param {HTMLElement} elem + * @returns {boolean} + */ +const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); + +/** + * borrowed from https://stackoverflow.com/a/46352119 + * + * @param {HTMLElement} elem + * @returns {boolean} + */ +const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; +}; + +/** + * @param {number} timer + * @param {boolean} reset + */ +const animateTimerProgressBar = function (timer) { + let reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + const timerProgressBar = getTimerProgressBar(); + if (!timerProgressBar) { + return; + } + if (isVisible$1(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + setTimeout(() => { + timerProgressBar.style.transition = `width ${timer / 1000}s linear`; + timerProgressBar.style.width = '0%'; + }, 10); + } +}; +const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + if (!timerProgressBar) { + return; + } + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = timerProgressBarWidth / timerProgressBarFullWidth * 100; + timerProgressBar.style.width = `${timerProgressBarPercent}%`; +}; + +/** + * Detect Node env + * + * @returns {boolean} + */ +const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + +const sweetHTML = ` + <div aria-labelledby="${swalClasses.title}" aria-describedby="${swalClasses['html-container']}" class="${swalClasses.popup}" tabindex="-1"> + <button type="button" class="${swalClasses.close}"></button> + <ul class="${swalClasses['progress-steps']}"></ul> + <div class="${swalClasses.icon}"></div> + <img class="${swalClasses.image}" /> + <h2 class="${swalClasses.title}" id="${swalClasses.title}"></h2> + <div class="${swalClasses['html-container']}" id="${swalClasses['html-container']}"></div> + <input class="${swalClasses.input}" id="${swalClasses.input}" /> + <input type="file" class="${swalClasses.file}" /> + <div class="${swalClasses.range}"> + <input type="range" /> + <output></output> + </div> + <select class="${swalClasses.select}" id="${swalClasses.select}"></select> + <div class="${swalClasses.radio}"></div> + <label class="${swalClasses.checkbox}"> + <input type="checkbox" id="${swalClasses.checkbox}" /> + <span class="${swalClasses.label}"></span> + </label> + <textarea class="${swalClasses.textarea}" id="${swalClasses.textarea}"></textarea> + <div class="${swalClasses['validation-message']}" id="${swalClasses['validation-message']}"></div> + <div class="${swalClasses.actions}"> + <div class="${swalClasses.loader}"></div> + <button type="button" class="${swalClasses.confirm}"></button> + <button type="button" class="${swalClasses.deny}"></button> + <button type="button" class="${swalClasses.cancel}"></button> + </div> + <div class="${swalClasses.footer}"></div> + <div class="${swalClasses['timer-progress-bar-container']}"> + <div class="${swalClasses['timer-progress-bar']}"></div> + </div> + </div> +`.replace(/(^|\n)\s*/g, ''); + +/** + * @returns {boolean} + */ +const resetOldContainer = () => { + const oldContainer = getContainer(); + if (!oldContainer) { + return false; + } + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; +}; +const resetValidationMessage$1 = () => { + globalState.currentInstance.resetValidationMessage(); +}; +const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getDirectChildByClass(popup, swalClasses.input); + const file = getDirectChildByClass(popup, swalClasses.file); + /** @type {HTMLInputElement} */ + const range = popup.querySelector(`.${swalClasses.range} input`); + /** @type {HTMLOutputElement} */ + const rangeOutput = popup.querySelector(`.${swalClasses.range} output`); + const select = getDirectChildByClass(popup, swalClasses.select); + /** @type {HTMLInputElement} */ + const checkbox = popup.querySelector(`.${swalClasses.checkbox} input`); + const textarea = getDirectChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage$1; + file.onchange = resetValidationMessage$1; + select.onchange = resetValidationMessage$1; + checkbox.onchange = resetValidationMessage$1; + textarea.oninput = resetValidationMessage$1; + range.oninput = () => { + resetValidationMessage$1(); + rangeOutput.value = range.value; + }; + range.onchange = () => { + resetValidationMessage$1(); + rangeOutput.value = range.value; + }; +}; + +/** + * @param {string | HTMLElement} target + * @returns {HTMLElement} + */ +const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + +/** + * @param {SweetAlertOptions} params + */ +const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } +}; + +/** + * @param {HTMLElement} targetElement + */ +const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } +}; + +/** + * Add modal + backdrop + no-war message for Russians to DOM + * + * @param {SweetAlertOptions} params + */ +const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + const container = document.createElement('div'); + container.className = swalClasses.container; + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); +}; + +/** + * @param {HTMLElement | object | string} param + * @param {HTMLElement} target + */ +const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); + } + + // Object + else if (typeof param === 'object') { + handleObject(param, target); + } + + // Plain string + else if (param) { + setInnerHtml(target, param); + } +}; + +/** + * @param {any} param + * @param {HTMLElement} target + */ +const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); + } + + // For other objects use their string representation + else { + setInnerHtml(target, param.toString()); + } +}; + +/** + * @param {HTMLElement} target + * @param {any} elem + */ +const handleJqueryElem = (target, elem) => { + target.textContent = ''; + if (0 in elem) { + for (let i = 0; i in elem; i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + if (!actions || !loader) { + return; + } + + // Actions (buttons) wrapper + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } + + // Custom class + applyCustomClass(actions, params, 'actions'); + + // Render all the buttons + renderButtons(actions, loader, params); + + // Loader + setInnerHtml(loader, params.loaderHtml || ''); + applyCustomClass(loader, params, 'loader'); +}; + +/** + * @param {HTMLElement} actions + * @param {HTMLElement} loader + * @param {SweetAlertOptions} params + */ +function renderButtons(actions, loader, params) { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + if (!confirmButton || !denyButton || !cancelButton) { + return; + } + + // Render buttons + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + if (params.reverseButtons) { + if (params.toast) { + actions.insertBefore(cancelButton, confirmButton); + actions.insertBefore(denyButton, confirmButton); + } else { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } + } +} + +/** + * @param {HTMLElement} confirmButton + * @param {HTMLElement} denyButton + * @param {HTMLElement} cancelButton + * @param {SweetAlertOptions} params + */ +function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + return; + } + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + + // Buttons background colors + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } +} + +/** + * @param {HTMLElement} button + * @param {'confirm' | 'deny' | 'cancel'} buttonType + * @param {SweetAlertOptions} params + */ +function renderButton(button, buttonType, params) { + const buttonName = /** @type {'Confirm' | 'Deny' | 'Cancel'} */capitalizeFirstLetter(buttonType); + toggle(button, params[`show${buttonName}Button`], 'inline-block'); + setInnerHtml(button, params[`${buttonType}ButtonText`] || ''); // Set caption text + button.setAttribute('aria-label', params[`${buttonType}ButtonAriaLabel`] || ''); // ARIA label + + // Add buttons custom classes + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, `${buttonType}Button`); +} + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + if (!closeButton) { + return; + } + setInnerHtml(closeButton, params.closeButtonHtml || ''); + + // Custom class + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel || ''); +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderContainer = (instance, params) => { + const container = getContainer(); + if (!container) { + return; + } + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); + + // Custom class + applyCustomClass(container, params, 'container'); +}; + +/** + * @param {HTMLElement} container + * @param {SweetAlertOptions['backdrop']} backdrop + */ +function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } +} + +/** + * @param {HTMLElement} container + * @param {SweetAlertOptions['position']} position + */ +function handlePositionParam(container, position) { + if (!position) { + return; + } + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } +} + +/** + * @param {HTMLElement} container + * @param {SweetAlertOptions['grow']} grow + */ +function handleGrowParam(container, grow) { + if (!grow) { + return; + } + addClass(container, swalClasses[`grow-${grow}`]); +} + +/** + * This module contains `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + +var privateProps = { + innerParams: new WeakMap(), + domCache: new WeakMap() +}; + +/// <reference path="../../../../sweetalert2.d.ts"/> + + +/** @type {InputClass[]} */ +const inputClasses = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderInput = (instance, params) => { + const popup = getPopup(); + if (!popup) { + return; + } + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputClasses.forEach(inputClass => { + const inputContainer = getDirectChildByClass(popup, swalClasses[inputClass]); + if (!inputContainer) { + return; + } + + // set attributes + setAttributes(inputClass, params.inputAttributes); + + // set class + inputContainer.className = swalClasses[inputClass]; + if (rerender) { + hide(inputContainer); + } + }); + if (params.input) { + if (rerender) { + showInput(params); + } + // set custom class + setCustomClass(params); + } +}; + +/** + * @param {SweetAlertOptions} params + */ +const showInput = params => { + if (!params.input) { + return; + } + if (!renderInputType[params.input]) { + error(`Unexpected type of input! Expected ${Object.keys(renderInputType).join(' | ')}, got "${params.input}"`); + return; + } + const inputContainer = getInputContainer(params.input); + if (!inputContainer) { + return; + } + const input = renderInputType[params.input](inputContainer, params); + show(inputContainer); + + // input autofocus + if (params.inputAutoFocus) { + setTimeout(() => { + focusInput(input); + }); + } +}; + +/** + * @param {HTMLInputElement} input + */ +const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + if (!['id', 'type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } +}; + +/** + * @param {InputClass} inputClass + * @param {SweetAlertOptions['inputAttributes']} inputAttributes + */ +const setAttributes = (inputClass, inputAttributes) => { + const popup = getPopup(); + if (!popup) { + return; + } + const input = getInput$1(popup, inputClass); + if (!input) { + return; + } + removeAttributes(input); + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } +}; + +/** + * @param {SweetAlertOptions} params + */ +const setCustomClass = params => { + if (!params.input) { + return; + } + const inputContainer = getInputContainer(params.input); + if (inputContainer) { + applyCustomClass(inputContainer, params, 'input'); + } +}; + +/** + * @param {HTMLInputElement | HTMLTextAreaElement} input + * @param {SweetAlertOptions} params + */ +const setInputPlaceholder = (input, params) => { + if (!input.placeholder && params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } +}; + +/** + * @param {Input} input + * @param {Input} prependTo + * @param {SweetAlertOptions} params + */ +const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + if (typeof params.customClass === 'object') { + addClass(label, params.customClass.inputLabel); + } + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } +}; + +/** + * @param {SweetAlertInput} inputType + * @returns {HTMLElement | undefined} + */ +const getInputContainer = inputType => { + const popup = getPopup(); + if (!popup) { + return; + } + return getDirectChildByClass(popup, swalClasses[(/** @type {SwalClass} */inputType)] || swalClasses.input); +}; + +/** + * @param {HTMLInputElement | HTMLOutputElement | HTMLTextAreaElement} input + * @param {SweetAlertOptions['inputValue']} inputValue + */ +const checkAndSetInputValue = (input, inputValue) => { + if (['string', 'number'].includes(typeof inputValue)) { + input.value = `${inputValue}`; + } else if (!isPromise(inputValue)) { + warn(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof inputValue}"`); + } +}; + +/** @type {Record<SweetAlertInput, (input: Input | HTMLElement, params: SweetAlertOptions) => Input>} */ +const renderInputType = {}; + +/** + * @param {HTMLInputElement} input + * @param {SweetAlertOptions} params + * @returns {HTMLInputElement} + */ +renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = renderInputType.search = renderInputType.date = renderInputType['datetime-local'] = renderInputType.time = renderInputType.week = renderInputType.month = /** @type {(input: Input | HTMLElement, params: SweetAlertOptions) => Input} */ +(input, params) => { + checkAndSetInputValue(input, params.inputValue); + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; +}; + +/** + * @param {HTMLInputElement} input + * @param {SweetAlertOptions} params + * @returns {HTMLInputElement} + */ +renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; +}; + +/** + * @param {HTMLInputElement} range + * @param {SweetAlertOptions} params + * @returns {HTMLInputElement} + */ +renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + checkAndSetInputValue(rangeInput, params.inputValue); + rangeInput.type = params.input; + checkAndSetInputValue(rangeOutput, params.inputValue); + setInputLabel(rangeInput, range, params); + return range; +}; + +/** + * @param {HTMLSelectElement} select + * @param {SweetAlertOptions} params + * @returns {HTMLSelectElement} + */ +renderInputType.select = (select, params) => { + select.textContent = ''; + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + setInputLabel(select, select, params); + return select; +}; + +/** + * @param {HTMLInputElement} radio + * @returns {HTMLInputElement} + */ +renderInputType.radio = radio => { + radio.textContent = ''; + return radio; +}; + +/** + * @param {HTMLLabelElement} checkboxContainer + * @param {SweetAlertOptions} params + * @returns {HTMLInputElement} + */ +renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput$1(getPopup(), 'checkbox'); + checkbox.value = '1'; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder || params.inputLabel); + return checkbox; +}; + +/** + * @param {HTMLTextAreaElement} textarea + * @param {SweetAlertOptions} params + * @returns {HTMLTextAreaElement} + */ +renderInputType.textarea = (textarea, params) => { + checkAndSetInputValue(textarea, params.inputValue); + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + /** + * @param {HTMLElement} el + * @returns {number} + */ + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + // https://github.com/sweetalert2/sweetalert2/issues/2291 + setTimeout(() => { + // https://github.com/sweetalert2/sweetalert2/issues/1699 + if ('MutationObserver' in window) { + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + const textareaResizeHandler = () => { + // check if texarea is still in document (i.e. popup wasn't closed in the meantime) + if (!document.body.contains(textarea)) { + return; + } + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = `${textareaWidth}px`; + } else { + applyNumericalStyle(getPopup(), 'width', params.width); + } + }; + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + if (!htmlContainer) { + return; + } + showWhenInnerHtmlPresent(htmlContainer); + applyCustomClass(htmlContainer, params, 'htmlContainer'); + + // Content as HTML + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); + } + + // Content as plain text + else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); + } + + // No content + else { + hide(htmlContainer); + } + renderInput(instance, params); +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderFooter = (instance, params) => { + const footer = getFooter(); + if (!footer) { + return; + } + showWhenInnerHtmlPresent(footer); + toggle(footer, params.footer, 'block'); + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } + + // Custom class + applyCustomClass(footer, params, 'footer'); +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); + if (!icon) { + return; + } + + // if the given icon already rendered, apply the styling without re-rendering the icon + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + if (!params.icon && !params.iconHtml) { + hide(icon); + return; + } + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${params.icon}"`); + hide(icon); + return; + } + show(icon); + + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + + // Animate icon + addClass(icon, params.showClass && params.showClass.icon); +}; + +/** + * @param {HTMLElement} icon + * @param {SweetAlertOptions} params + */ +const applyStyles = (icon, params) => { + for (const [iconType, iconClassName] of Object.entries(iconTypes)) { + if (params.icon !== iconType) { + removeClass(icon, iconClassName); + } + } + addClass(icon, params.icon && iconTypes[params.icon]); + + // Icon color + setColor(icon, params); + + // Success icon background color + adjustSuccessIconBackgroundColor(); + + // Custom class + applyCustomClass(icon, params, 'icon'); +}; + +// Adjust success icon background color to match the popup background color +const adjustSuccessIconBackgroundColor = () => { + const popup = getPopup(); + if (!popup) { + return; + } + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + /** @type {NodeListOf<HTMLElement>} */ + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } +}; +const successIconHtml = ` + <div class="swal2-success-circular-line-left"></div> + <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span> + <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div> + <div class="swal2-success-circular-line-right"></div> +`; +const errorIconHtml = ` + <span class="swal2-x-mark"> + <span class="swal2-x-mark-line-left"></span> + <span class="swal2-x-mark-line-right"></span> + </span> +`; + +/** + * @param {HTMLElement} icon + * @param {SweetAlertOptions} params + */ +const setContent = (icon, params) => { + if (!params.icon && !params.iconHtml) { + return; + } + let oldContent = icon.innerHTML; + let newContent = ''; + if (params.iconHtml) { + newContent = iconContent(params.iconHtml); + } else if (params.icon === 'success') { + newContent = successIconHtml; + oldContent = oldContent.replace(/ style=".*?"/g, ''); // undo adjustSuccessIconBackgroundColor() + } else if (params.icon === 'error') { + newContent = errorIconHtml; + } else if (params.icon) { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + newContent = iconContent(defaultIconHtml[params.icon]); + } + if (oldContent.trim() !== newContent.trim()) { + setInnerHtml(icon, newContent); + } +}; + +/** + * @param {HTMLElement} icon + * @param {SweetAlertOptions} params + */ +const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'background-color', params.iconColor); + } + setStyle(icon, '.swal2-success-ring', 'border-color', params.iconColor); +}; + +/** + * @param {string} content + * @returns {string} + */ +const iconContent = content => `<div class="${swalClasses['icon-content']}">${content}</div>`; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderImage = (instance, params) => { + const image = getImage(); + if (!image) { + return; + } + if (!params.imageUrl) { + hide(image); + return; + } + show(image, ''); + + // Src, alt + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt || ''); + + // Width, height + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); + + // Class + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); +}; + +let dragging = false; +let mousedownX = 0; +let mousedownY = 0; +let initialX = 0; +let initialY = 0; + +/** + * @param {HTMLElement} popup + */ +const addDraggableListeners = popup => { + popup.addEventListener('mousedown', down); + document.body.addEventListener('mousemove', move); + popup.addEventListener('mouseup', up); + popup.addEventListener('touchstart', down); + document.body.addEventListener('touchmove', move); + popup.addEventListener('touchend', up); +}; + +/** + * @param {HTMLElement} popup + */ +const removeDraggableListeners = popup => { + popup.removeEventListener('mousedown', down); + document.body.removeEventListener('mousemove', move); + popup.removeEventListener('mouseup', up); + popup.removeEventListener('touchstart', down); + document.body.removeEventListener('touchmove', move); + popup.removeEventListener('touchend', up); +}; + +/** + * @param {MouseEvent | TouchEvent} event + */ +const down = event => { + const popup = getPopup(); + if (event.target === popup || getIcon().contains(/** @type {HTMLElement} */event.target)) { + dragging = true; + const clientXY = getClientXY(event); + mousedownX = clientXY.clientX; + mousedownY = clientXY.clientY; + initialX = parseInt(popup.style.insetInlineStart) || 0; + initialY = parseInt(popup.style.insetBlockStart) || 0; + addClass(popup, 'swal2-dragging'); + } +}; + +/** + * @param {MouseEvent | TouchEvent} event + */ +const move = event => { + const popup = getPopup(); + if (dragging) { + let { + clientX, + clientY + } = getClientXY(event); + popup.style.insetInlineStart = `${initialX + (clientX - mousedownX)}px`; + popup.style.insetBlockStart = `${initialY + (clientY - mousedownY)}px`; + } +}; +const up = () => { + const popup = getPopup(); + dragging = false; + removeClass(popup, 'swal2-dragging'); +}; + +/** + * @param {MouseEvent | TouchEvent} event + * @returns {{ clientX: number, clientY: number }} + */ +const getClientXY = event => { + let clientX = 0, + clientY = 0; + if (event.type.startsWith('mouse')) { + clientX = /** @type {MouseEvent} */event.clientX; + clientY = /** @type {MouseEvent} */event.clientY; + } else if (event.type.startsWith('touch')) { + clientX = /** @type {TouchEvent} */event.touches[0].clientX; + clientY = /** @type {TouchEvent} */event.touches[0].clientY; + } + return { + clientX, + clientY + }; +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); + if (!container || !popup) { + return; + } + + // Width + // https://github.com/sweetalert2/sweetalert2/issues/2170 + if (params.toast) { + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + const loader = getLoader(); + if (loader) { + popup.insertBefore(loader, getIcon()); + } + } else { + applyNumericalStyle(popup, 'width', params.width); + } + + // Padding + applyNumericalStyle(popup, 'padding', params.padding); + + // Color + if (params.color) { + popup.style.color = params.color; + } + + // Background + if (params.background) { + popup.style.background = params.background; + } + hide(getValidationMessage()); + + // Classes + addClasses$1(popup, params); + if (params.draggable && !params.toast) { + addClass(popup, swalClasses.draggable); + addDraggableListeners(popup); + } else { + removeClass(popup, swalClasses.draggable); + removeDraggableListeners(popup); + } +}; + +/** + * @param {HTMLElement} popup + * @param {SweetAlertOptions} params + */ +const addClasses$1 = (popup, params) => { + const showClass = params.showClass || {}; + // Default Class + showClass when updating Swal.update({}) + popup.className = `${swalClasses.popup} ${isVisible$1(popup) ? showClass.popup : ''}`; + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } + + // Custom class + applyCustomClass(popup, params, 'popup'); + // TODO: remove in the next major + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } + + // Icon class (#1842) + if (params.icon) { + addClass(popup, swalClasses[`icon-${params.icon}`]); + } +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + if (!progressStepsContainer) { + return; + } + const { + progressSteps, + currentProgressStep + } = params; + if (!progressSteps || progressSteps.length === 0 || currentProgressStep === undefined) { + hide(progressStepsContainer); + return; + } + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + if (currentProgressStep >= progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + if (index === currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + if (index !== progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); +}; + +/** + * @param {string} step + * @returns {HTMLLIElement} + */ +const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; +}; + +/** + * @param {SweetAlertOptions} params + * @returns {HTMLLIElement} + */ +const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + if (params.progressStepsDistance) { + applyNumericalStyle(lineEl, 'width', params.progressStepsDistance); + } + return lineEl; +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderTitle = (instance, params) => { + const title = getTitle(); + if (!title) { + return; + } + showWhenInnerHtmlPresent(title); + toggle(title, params.title || params.titleText, 'block'); + if (params.title) { + parseHtmlToContainer(params.title, title); + } + if (params.titleText) { + title.innerText = params.titleText; + } + + // Custom class + applyCustomClass(title, params, 'title'); +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + const popup = getPopup(); + if (typeof params.didRender === 'function' && popup) { + params.didRender(popup); + } + globalState.eventEmitter.emit('didRender', popup); +}; + +/* + * Global function to determine if SweetAlert2 popup is shown + */ +const isVisible = () => { + return isVisible$1(getPopup()); +}; + +/* + * Global function to click 'Confirm' button + */ +const clickConfirm = () => { + var _dom$getConfirmButton; + return (_dom$getConfirmButton = getConfirmButton()) === null || _dom$getConfirmButton === void 0 ? void 0 : _dom$getConfirmButton.click(); +}; + +/* + * Global function to click 'Deny' button + */ +const clickDeny = () => { + var _dom$getDenyButton; + return (_dom$getDenyButton = getDenyButton()) === null || _dom$getDenyButton === void 0 ? void 0 : _dom$getDenyButton.click(); +}; + +/* + * Global function to click 'Cancel' button + */ +const clickCancel = () => { + var _dom$getCancelButton; + return (_dom$getCancelButton = getCancelButton()) === null || _dom$getCancelButton === void 0 ? void 0 : _dom$getCancelButton.click(); +}; + +/** @typedef {'cancel' | 'backdrop' | 'close' | 'esc' | 'timer'} DismissReason */ + +/** @type {Record<DismissReason, DismissReason>} */ +const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' +}); + +/** + * @param {GlobalState} globalState + */ +const removeKeydownHandler = globalState => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } +}; + +/** + * @param {GlobalState} globalState + * @param {SweetAlertOptions} innerParams + * @param {*} dismissWith + */ +const addKeydownHandler = (globalState, innerParams, dismissWith) => { + removeKeydownHandler(globalState); + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(innerParams, e, dismissWith); + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } +}; + +/** + * @param {number} index + * @param {number} increment + */ +const setFocus = (index, increment) => { + var _dom$getPopup; + const focusableElements = getFocusableElements(); + // search for visible elements and select the next possible match + if (focusableElements.length) { + index = index + increment; + + // rollover to first item + if (index === focusableElements.length) { + index = 0; + + // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + focusableElements[index].focus(); + return; + } + // no visible focusable elements, focus the popup + (_dom$getPopup = getPopup()) === null || _dom$getPopup === void 0 || _dom$getPopup.focus(); +}; +const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; +const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + +/** + * @param {SweetAlertOptions} innerParams + * @param {KeyboardEvent} event + * @param {Function} dismissWith + */ +const keydownHandler = (innerParams, event, dismissWith) => { + if (!innerParams) { + return; // This instance has already been destroyed + } + + // Ignore keydown during IME composition + // https://developer.mozilla.org/en-US/docs/Web/API/Document/keydown_event#ignoring_keydown_during_ime_composition + // https://github.com/sweetalert2/sweetalert2/issues/720 + // https://github.com/sweetalert2/sweetalert2/issues/2406 + if (event.isComposing || event.keyCode === 229) { + return; + } + if (innerParams.stopKeydownPropagation) { + event.stopPropagation(); + } + + // ENTER + if (event.key === 'Enter') { + handleEnter(event, innerParams); + } + + // TAB + else if (event.key === 'Tab') { + handleTab(event); + } + + // ARROWS - switch focus between buttons + else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(event.key)) { + handleArrows(event.key); + } + + // ESC + else if (event.key === 'Escape') { + handleEsc(event, innerParams, dismissWith); + } +}; + +/** + * @param {KeyboardEvent} event + * @param {SweetAlertOptions} innerParams + */ +const handleEnter = (event, innerParams) => { + // https://github.com/sweetalert2/sweetalert2/issues/2386 + if (!callIfFunction(innerParams.allowEnterKey)) { + return; + } + const input = getInput$1(getPopup(), innerParams.input); + if (event.target && input && event.target instanceof HTMLElement && event.target.outerHTML === input.outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + clickConfirm(); + event.preventDefault(); + } +}; + +/** + * @param {KeyboardEvent} event + */ +const handleTab = event => { + const targetElement = event.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + // Cycle to the next button + if (!event.shiftKey) { + setFocus(btnIndex, 1); + } + + // Cycle to the prev button + else { + setFocus(btnIndex, -1); + } + event.stopPropagation(); + event.preventDefault(); +}; + +/** + * @param {string} key + */ +const handleArrows = key => { + const actions = getActions(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + if (!actions || !confirmButton || !denyButton || !cancelButton) { + return; + } + /** @type HTMLElement[] */ + const buttons = [confirmButton, denyButton, cancelButton]; + if (document.activeElement instanceof HTMLElement && !buttons.includes(document.activeElement)) { + return; + } + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + let buttonToFocus = document.activeElement; + if (!buttonToFocus) { + return; + } + for (let i = 0; i < actions.children.length; i++) { + buttonToFocus = buttonToFocus[sibling]; + if (!buttonToFocus) { + return; + } + if (buttonToFocus instanceof HTMLButtonElement && isVisible$1(buttonToFocus)) { + break; + } + } + if (buttonToFocus instanceof HTMLButtonElement) { + buttonToFocus.focus(); + } +}; + +/** + * @param {KeyboardEvent} event + * @param {SweetAlertOptions} innerParams + * @param {Function} dismissWith + */ +const handleEsc = (event, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + event.preventDefault(); + dismissWith(DismissReason.esc); + } +}; + +/** + * This module contains `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + +var privateMethods = { + swalPromiseResolve: new WeakMap(), + swalPromiseReject: new WeakMap() +}; + +// From https://developer.paciellogroup.com/blog/2018/06/the-current-state-of-modal-dialog-accessibility/ +// Adding aria-hidden="true" to elements outside of the active modal dialog ensures that +// elements not within the active modal dialog will not be surfaced if a user opens a screen +// reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + +const setAriaHidden = () => { + const container = getContainer(); + const bodyChildren = Array.from(document.body.children); + bodyChildren.forEach(el => { + if (el.contains(container)) { + return; + } + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden') || ''); + } + el.setAttribute('aria-hidden', 'true'); + }); +}; +const unsetAriaHidden = () => { + const bodyChildren = Array.from(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden') || ''); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); +}; + +// @ts-ignore +const isSafariOrIOS = typeof window !== 'undefined' && !!window.GestureEvent; // true for Safari desktop + all iOS browsers https://stackoverflow.com/a/70585394 + +/** + * Fix iOS scrolling + * http://stackoverflow.com/q/39626302 + */ +const iOSfix = () => { + if (isSafariOrIOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = `${offset * -1}px`; + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + } +}; + +/** + * https://github.com/sweetalert2/sweetalert2/issues/1246 + */ +const lockBodyScroll = () => { + const container = getContainer(); + if (!container) { + return; + } + /** @type {boolean} */ + let preventTouchMove; + /** + * @param {TouchEvent} event + */ + container.ontouchstart = event => { + preventTouchMove = shouldPreventTouchMove(event); + }; + /** + * @param {TouchEvent} event + */ + container.ontouchmove = event => { + if (preventTouchMove) { + event.preventDefault(); + event.stopPropagation(); + } + }; +}; + +/** + * @param {TouchEvent} event + * @returns {boolean} + */ +const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + const htmlContainer = getHtmlContainer(); + if (!container || !htmlContainer) { + return false; + } + if (isStylus(event) || isZoom(event)) { + return false; + } + if (target === container) { + return true; + } + if (!isScrollable(container) && target instanceof HTMLElement && target.tagName !== 'INPUT' && + // #1603 + target.tagName !== 'TEXTAREA' && + // #2266 + !(isScrollable(htmlContainer) && + // #1944 + htmlContainer.contains(target))) { + return true; + } + return false; +}; + +/** + * https://github.com/sweetalert2/sweetalert2/issues/1786 + * + * @param {*} event + * @returns {boolean} + */ +const isStylus = event => { + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; +}; + +/** + * https://github.com/sweetalert2/sweetalert2/issues/1891 + * + * @param {TouchEvent} event + * @returns {boolean} + */ +const isZoom = event => { + return event.touches && event.touches.length > 1; +}; +const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } +}; + +/** + * Measure scrollbar width for padding body during modal show/hide + * https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + * + * @returns {number} + */ +const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; +}; + +/** + * Remember state in cases where opening and handling a modal will fiddle with it. + * @type {number | null} + */ +let previousBodyPadding = null; + +/** + * @param {string} initialBodyOverflow + */ +const replaceScrollbarWithPadding = initialBodyOverflow => { + // for queues, do not do this more than once + if (previousBodyPadding !== null) { + return; + } + // if the body has overflow + if (document.body.scrollHeight > window.innerHeight || initialBodyOverflow === 'scroll' // https://github.com/sweetalert2/sweetalert2/issues/2663 + ) { + // add padding so the content doesn't shift after removal of scrollbar + previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = `${previousBodyPadding + measureScrollbar()}px`; + } +}; +const undoReplaceScrollbarWithPadding = () => { + if (previousBodyPadding !== null) { + document.body.style.paddingRight = `${previousBodyPadding}px`; + previousBodyPadding = null; + } +}; + +/** + * @param {SweetAlert} instance + * @param {HTMLElement} container + * @param {boolean} returnFocus + * @param {Function} didClose + */ +function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + removeKeydownHandler(globalState); + } + + // workaround for https://github.com/sweetalert2/sweetalert2/issues/2088 + // for some reason removing the container in Safari will scroll the document to bottom + if (isSafariOrIOS) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + if (isModal()) { + undoReplaceScrollbarWithPadding(); + undoIOSfix(); + unsetAriaHidden(); + } + removeBodyClasses(); +} + +/** + * Remove SweetAlert2 classes from body + */ +function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); +} + +/** + * Instance method to close sweetAlert + * + * @param {any} resolveValue + */ +function close(resolveValue) { + resolveValue = prepareResolveValue(resolveValue); + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + const didClose = triggerClosePopup(this); + if (this.isAwaitingPromise) { + // A swal awaiting for a promise (after a click on Confirm or Deny) cannot be dismissed anymore #2335 + if (!resolveValue.isDismissed) { + handleAwaitingPromise(this); + swalPromiseResolve(resolveValue); + } + } else if (didClose) { + // Resolve Swal promise + swalPromiseResolve(resolveValue); + } +} +const triggerClosePopup = instance => { + const popup = getPopup(); + if (!popup) { + return false; + } + const innerParams = privateProps.innerParams.get(instance); + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return false; + } + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(instance, popup, innerParams); + return true; +}; + +/** + * @param {any} error + */ +function rejectPromise(error) { + const rejectPromise = privateMethods.swalPromiseReject.get(this); + handleAwaitingPromise(this); + if (rejectPromise) { + // Reject Swal promise + rejectPromise(error); + } +} + +/** + * @param {SweetAlert} instance + */ +const handleAwaitingPromise = instance => { + if (instance.isAwaitingPromise) { + delete instance.isAwaitingPromise; + // The instance might have been previously partly destroyed, we must resume the destroy process in this case #2335 + if (!privateProps.innerParams.get(instance)) { + instance._destroy(); + } + } +}; + +/** + * @param {any} resolveValue + * @returns {SweetAlertResult} + */ +const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); +}; + +/** + * @param {SweetAlert} instance + * @param {HTMLElement} popup + * @param {SweetAlertOptions} innerParams + */ +const handlePopupAnimation = (instance, popup, innerParams) => { + var _globalState$eventEmi; + const container = getContainer(); + // If animation is supported, animate + const animationIsSupported = hasCssAnimation(popup); + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + (_globalState$eventEmi = globalState.eventEmitter) === null || _globalState$eventEmi === void 0 || _globalState$eventEmi.emit('willClose', popup); + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } +}; + +/** + * @param {SweetAlert} instance + * @param {HTMLElement} popup + * @param {HTMLElement} container + * @param {boolean} returnFocus + * @param {Function} didClose + */ +const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + /** + * @param {AnimationEvent | TransitionEvent} e + */ + const swalCloseAnimationFinished = function (e) { + if (e.target === popup) { + var _globalState$swalClos; + (_globalState$swalClos = globalState.swalCloseEventFinishedCallback) === null || _globalState$swalClos === void 0 || _globalState$swalClos.call(globalState); + delete globalState.swalCloseEventFinishedCallback; + popup.removeEventListener('animationend', swalCloseAnimationFinished); + popup.removeEventListener('transitionend', swalCloseAnimationFinished); + } + }; + popup.addEventListener('animationend', swalCloseAnimationFinished); + popup.addEventListener('transitionend', swalCloseAnimationFinished); +}; + +/** + * @param {SweetAlert} instance + * @param {Function} didClose + */ +const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + var _globalState$eventEmi2; + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + (_globalState$eventEmi2 = globalState.eventEmitter) === null || _globalState$eventEmi2 === void 0 || _globalState$eventEmi2.emit('didClose'); + // instance might have been destroyed already + if (instance._destroy) { + instance._destroy(); + } + }); +}; + +/** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + * + * @param {HTMLButtonElement | null} [buttonToReplace] + */ +const showLoading = buttonToReplace => { + let popup = getPopup(); + if (!popup) { + new Swal(); + } + popup = getPopup(); + if (!popup) { + return; + } + const loader = getLoader(); + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + show(loader); + popup.setAttribute('data-loading', 'true'); + popup.setAttribute('aria-busy', 'true'); + popup.focus(); +}; + +/** + * @param {HTMLElement} popup + * @param {HTMLButtonElement | null} [buttonToReplace] + */ +const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + if (!actions || !loader) { + return; + } + if (!buttonToReplace && isVisible$1(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + show(actions); + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + actions.insertBefore(loader, buttonToReplace); + } + addClass([popup, actions], swalClasses.loading); +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].some(i => i === params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} innerParams + * @returns {SweetAlertInputValue} + */ +const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + if (!input) { + return null; + } + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + case 'radio': + return getRadioValue(input); + case 'file': + return getFileValue(input); + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } +}; + +/** + * @param {HTMLInputElement} input + * @returns {number} + */ +const getCheckboxValue = input => input.checked ? 1 : 0; + +/** + * @param {HTMLInputElement} input + * @returns {string | null} + */ +const getRadioValue = input => input.checked ? input.value : null; + +/** + * @param {HTMLInputElement} input + * @returns {FileList | File | null} + */ +const getFileValue = input => input.files && input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const handleInputOptions = (instance, params) => { + const popup = getPopup(); + if (!popup) { + return; + } + /** + * @param {Record<string, any>} inputOptions + */ + const processInputOptions = inputOptions => { + if (params.input === 'select') { + populateSelectOptions(popup, formatInputOptions(inputOptions), params); + } else if (params.input === 'radio') { + populateRadioOptions(popup, formatInputOptions(inputOptions), params); + } + }; + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof params.inputOptions}`); + } +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const handleInputValue = (instance, params) => { + const input = instance.getInput(); + if (!input) { + return; + } + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? `${parseFloat(inputValue) || 0}` : `${inputValue}`; + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error(`Error in inputValue promise: ${err}`); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); +}; + +/** + * @param {HTMLElement} popup + * @param {InputOptionFlattened[]} inputOptions + * @param {SweetAlertOptions} params + */ +function populateSelectOptions(popup, inputOptions, params) { + const select = getDirectChildByClass(popup, swalClasses.select); + if (!select) { + return; + } + /** + * @param {HTMLElement} parent + * @param {string} optionLabel + * @param {string} optionValue + */ + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; + // <optgroup> spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a <optgroup> + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an <optgroup> + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of <option> + renderOption(select, optionLabel, optionValue); + } + }); + select.focus(); +} + +/** + * @param {HTMLElement} popup + * @param {InputOptionFlattened[]} inputOptions + * @param {SweetAlertOptions} params + */ +function populateRadioOptions(popup, inputOptions, params) { + const radio = getDirectChildByClass(popup, swalClasses.radio); + if (!radio) { + return; + } + inputOptions.forEach(inputOption => { + const radioValue = inputOption[0]; + const radioLabel = inputOption[1]; + const radioInput = document.createElement('input'); + const radioLabelElement = document.createElement('label'); + radioInput.type = 'radio'; + radioInput.name = swalClasses.radio; + radioInput.value = radioValue; + if (isSelected(radioValue, params.inputValue)) { + radioInput.checked = true; + } + const label = document.createElement('span'); + setInnerHtml(label, radioLabel); + label.className = swalClasses.label; + radioLabelElement.appendChild(radioInput); + radioLabelElement.appendChild(label); + radio.appendChild(radioLabelElement); + }); + const radios = radio.querySelectorAll('input'); + if (radios.length) { + radios[0].focus(); + } +} + +/** + * Converts `inputOptions` into an array of `[value, label]`s + * + * @param {Record<string, any>} inputOptions + * @typedef {string[]} InputOptionFlattened + * @returns {InputOptionFlattened[]} + */ +const formatInputOptions = inputOptions => { + /** @type {InputOptionFlattened[]} */ + const result = []; + if (inputOptions instanceof Map) { + inputOptions.forEach((value, key) => { + let valueFormatted = value; + if (typeof valueFormatted === 'object') { + // case of <optgroup> + valueFormatted = formatInputOptions(valueFormatted); + } + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + if (typeof valueFormatted === 'object') { + // case of <optgroup> + valueFormatted = formatInputOptions(valueFormatted); + } + result.push([key, valueFormatted]); + }); + } + return result; +}; + +/** + * @param {string} optionValue + * @param {SweetAlertInputValue} inputValue + * @returns {boolean} + */ +const isSelected = (optionValue, inputValue) => { + return !!inputValue && inputValue.toString() === optionValue.toString(); +}; + +/** + * @param {SweetAlert} instance + */ +const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } +}; + +/** + * @param {SweetAlert} instance + */ +const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } +}; + +/** + * @param {SweetAlert} instance + * @param {Function} dismissWith + */ +const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); +}; + +/** + * @param {SweetAlert} instance + * @param {'confirm' | 'deny'} type + */ +const handleConfirmOrDenyWithInput = (instance, type) => { + const innerParams = privateProps.innerParams.get(instance); + if (!innerParams.input) { + error(`The "input" parameter is needed to be set when using returnInputValueOn${capitalizeFirstLetter(type)}`); + return; + } + const input = instance.getInput(); + const inputValue = getInputValue(instance, innerParams); + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (input && !input.checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage || input.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertInputValue} inputValue + * @param {'confirm' | 'deny'} type + */ +const handleInputValidator = (instance, inputValue, type) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); +}; + +/** + * @param {SweetAlert} instance + * @param {any} value + */ +const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + if (innerParams.preDeny) { + instance.isAwaitingPromise = true; // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preDeny's promise is received + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + handleAwaitingPromise(instance); + } else { + instance.close({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }).catch(error => rejectWith(instance || undefined, error)); + } else { + instance.close({ + isDenied: true, + value + }); + } +}; + +/** + * @param {SweetAlert} instance + * @param {any} value + */ +const succeedWith = (instance, value) => { + instance.close({ + isConfirmed: true, + value + }); +}; + +/** + * + * @param {SweetAlert} instance + * @param {string} error + */ +const rejectWith = (instance, error) => { + instance.rejectPromise(error); +}; + +/** + * + * @param {SweetAlert} instance + * @param {any} value + */ +const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + if (innerParams.showLoaderOnConfirm) { + showLoading(); + } + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + instance.isAwaitingPromise = true; // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preConfirm's promise is received + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible$1(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + handleAwaitingPromise(instance); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }).catch(error => rejectWith(instance || undefined, error)); + } else { + succeedWith(instance, value); + } +}; + +/** + * Hides loader and shows back the button which was hidden by .showLoading() + */ +function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + if (!innerParams) { + return; + } + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; +} +const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } +}; + +/** + * Gets the input DOM node, this method works with input parameter. + * + * @returns {HTMLInputElement | null} + */ +function getInput() { + const innerParams = privateProps.innerParams.get(this); + const domCache = privateProps.domCache.get(this); + if (!domCache) { + return null; + } + return getInput$1(domCache.popup, innerParams.input); +} + +/** + * @param {SweetAlert} instance + * @param {string[]} buttons + * @param {boolean} disabled + */ +function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); +} + +/** + * @param {HTMLInputElement | null} input + * @param {boolean} disabled + */ +function setInputDisabled(input, disabled) { + const popup = getPopup(); + if (!popup || !input) { + return; + } + if (input.type === 'radio') { + /** @type {NodeListOf<HTMLInputElement>} */ + const radios = popup.querySelectorAll(`[name="${swalClasses.radio}"]`); + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } +} + +/** + * Enable all the buttons + * @this {SweetAlert} + */ +function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); +} + +/** + * Disable all the buttons + * @this {SweetAlert} + */ +function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); +} + +/** + * Enable the input field + * @this {SweetAlert} + */ +function enableInput() { + setInputDisabled(this.getInput(), false); +} + +/** + * Disable the input field + * @this {SweetAlert} + */ +function disableInput() { + setInputDisabled(this.getInput(), true); +} + +/** + * Show block with validation message + * + * @param {string} error + * @this {SweetAlert} + */ +function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + show(domCache.validationMessage); + const input = this.getInput(); + if (input) { + input.setAttribute('aria-invalid', 'true'); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } +} + +/** + * Hide block with validation message + * + * @this {SweetAlert} + */ +function resetValidationMessage() { + const domCache = privateProps.domCache.get(this); + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + const input = this.getInput(); + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } +} + +const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + draggable: false, + animation: true, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + color: undefined, + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoFocus: true, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true +}; +const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'color', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'draggable', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + +/** @type {Record<string, string | undefined>} */ +const deprecatedParams = { + allowEnterKey: undefined +}; +const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'draggable', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + +/** + * Is valid parameter + * + * @param {string} paramName + * @returns {boolean} + */ +const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); +}; + +/** + * Is valid parameter for Swal.update() method + * + * @param {string} paramName + * @returns {boolean} + */ +const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; +}; + +/** + * Is deprecated parameter + * + * @param {string} paramName + * @returns {string | undefined} + */ +const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; +}; + +/** + * @param {string} param + */ +const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn(`Unknown parameter "${param}"`); + } +}; + +/** + * @param {string} param + */ +const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn(`The parameter "${param}" is incompatible with toasts`); + } +}; + +/** + * @param {string} param + */ +const checkIfParamIsDeprecated = param => { + const isDeprecated = isDeprecatedParameter(param); + if (isDeprecated) { + warnAboutDeprecation(param, isDeprecated); + } +}; + +/** + * Show relevant warnings for given params + * + * @param {SweetAlertOptions} params + */ +const showWarningsForParams = params => { + if (params.backdrop === false && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + for (const param in params) { + checkIfParamIsValid(param); + if (params.toast) { + checkIfToastParamIsValid(param); + } + checkIfParamIsDeprecated(param); + } +}; + +/** + * Updates popup parameters. + * + * @param {SweetAlertOptions} params + */ +function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + warn(`You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.`); + return; + } + const validUpdatableParams = filterValidParams(params); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); +} + +/** + * @param {SweetAlertOptions} params + * @returns {SweetAlertOptions} + */ +const filterValidParams = params => { + const validUpdatableParams = {}; + Object.keys(params).forEach(param => { + if (isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn(`Invalid parameter to update: ${param}`); + } + }); + return validUpdatableParams; +}; + +/** + * Dispose the current SweetAlert2 instance + */ +function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + if (!innerParams) { + disposeWeakMaps(this); // The WeakMaps might have been partly destroyed, we must recall it to dispose any remaining WeakMaps #2335 + return; // This instance has already been destroyed + } + + // Check if there is another Swal closing + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + globalState.eventEmitter.emit('didDestroy'); + disposeSwal(this); +} + +/** + * @param {SweetAlert} instance + */ +const disposeSwal = instance => { + disposeWeakMaps(instance); + // Unset this.params so GC will dispose it (#1569) + delete instance.params; + // Unset globalState props so GC will dispose globalState (#1569) + delete globalState.keydownHandler; + delete globalState.keydownTarget; + // Unset currentInstance + delete globalState.currentInstance; +}; + +/** + * @param {SweetAlert} instance + */ +const disposeWeakMaps = instance => { + // If the current instance is awaiting a promise result, we keep the privateMethods to call them once the promise result is retrieved #2335 + if (instance.isAwaitingPromise) { + unsetWeakMaps(privateProps, instance); + instance.isAwaitingPromise = true; + } else { + unsetWeakMaps(privateMethods, instance); + unsetWeakMaps(privateProps, instance); + delete instance.isAwaitingPromise; + // Unset instance methods + delete instance.disableButtons; + delete instance.enableButtons; + delete instance.getInput; + delete instance.disableInput; + delete instance.enableInput; + delete instance.hideLoading; + delete instance.disableLoading; + delete instance.showValidationMessage; + delete instance.resetValidationMessage; + delete instance.close; + delete instance.closePopup; + delete instance.closeModal; + delete instance.closeToast; + delete instance.rejectPromise; + delete instance.update; + delete instance._destroy; + } +}; + +/** + * @param {object} obj + * @param {SweetAlert} instance + */ +const unsetWeakMaps = (obj, instance) => { + for (const i in obj) { + obj[i].delete(instance); + } +}; + +var instanceMethods = /*#__PURE__*/Object.freeze({ + __proto__: null, + _destroy: _destroy, + close: close, + closeModal: close, + closePopup: close, + closeToast: close, + disableButtons: disableButtons, + disableInput: disableInput, + disableLoading: hideLoading, + enableButtons: enableButtons, + enableInput: enableInput, + getInput: getInput, + handleAwaitingPromise: handleAwaitingPromise, + hideLoading: hideLoading, + rejectPromise: rejectPromise, + resetValidationMessage: resetValidationMessage, + showValidationMessage: showValidationMessage, + update: update +}); + +/** + * @param {SweetAlertOptions} innerParams + * @param {DomCache} domCache + * @param {Function} dismissWith + */ +const handlePopupClick = (innerParams, domCache, dismissWith) => { + if (innerParams.toast) { + handleToastClick(innerParams, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); + + // Ignore click events that had mousedown on the container but mouseup on the popup + handleContainerMousedown(domCache); + handleModalClick(innerParams, domCache, dismissWith); + } +}; + +/** + * @param {SweetAlertOptions} innerParams + * @param {DomCache} domCache + * @param {Function} dismissWith + */ +const handleToastClick = (innerParams, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + if (innerParams && (isAnyButtonShown(innerParams) || innerParams.timer || innerParams.input)) { + return; + } + dismissWith(DismissReason.close); + }; +}; + +/** + * @param {SweetAlertOptions} innerParams + * @returns {boolean} + */ +const isAnyButtonShown = innerParams => { + return !!(innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton); +}; +let ignoreOutsideClick = false; + +/** + * @param {DomCache} domCache + */ +const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = () => {}; + // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; +}; + +/** + * @param {DomCache} domCache + */ +const handleContainerMousedown = domCache => { + domCache.container.onmousedown = e => { + // prevent the modal text from being selected on double click on the container (allowOutsideClick: false) + if (e.target === domCache.container) { + e.preventDefault(); + } + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = () => {}; + // We also need to check if the mouseup target is a child of the popup + if (e.target === domCache.popup || e.target instanceof HTMLElement && domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; +}; + +/** + * @param {SweetAlertOptions} innerParams + * @param {DomCache} domCache + * @param {Function} dismissWith + */ +const handleModalClick = (innerParams, domCache, dismissWith) => { + domCache.container.onclick = e => { + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; +}; + +const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; +const isElement = elem => elem instanceof Element || isJqueryElement(elem); +const argsToParams = args => { + const params = {}; + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error(`Unexpected type of ${name}! Expected "string" or "Element", got ${typeof arg}`); + } + }); + } + return params; +}; + +/** + * Main method to create a new SweetAlert2 popup + * + * @param {...SweetAlertOptions} args + * @returns {Promise<SweetAlertResult>} + */ +function fire() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return new this(...args); +} + +/** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param {SweetAlertOptions} mixinParams + * @returns {SweetAlert} + */ +function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + } + // @ts-ignore + return MixinSwal; +} + +/** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + * + * @returns {number | undefined} + */ +const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); +}; + +/** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + * + * @returns {number | undefined} + */ +const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } +}; + +/** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + * + * @returns {number | undefined} + */ +const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } +}; + +/** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + * + * @returns {number | undefined} + */ +const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); +}; + +/** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + * + * @param {number} ms + * @returns {number | undefined} + */ +const increaseTimer = ms => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(ms); + animateTimerProgressBar(remaining, true); + return remaining; + } +}; + +/** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + * + * @returns {boolean} + */ +const isTimerRunning = () => { + return !!(globalState.timeout && globalState.timeout.isRunning()); +}; + +let bodyClickListenerAdded = false; +const clickHandlers = {}; + +/** + * @param {string} attr + */ +function bindClickHandler() { + let attr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'data-swal-template'; + clickHandlers[attr] = this; + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } +} +const bodyClickListener = event => { + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } +}; + +// Source: https://gist.github.com/mudge/5830382?permalink_comment_id=2691957#gistcomment-2691957 + +class EventEmitter { + constructor() { + /** @type {Events} */ + this.events = {}; + } + + /** + * @param {string} eventName + * @returns {EventHandlers} + */ + _getHandlersByEventName(eventName) { + if (typeof this.events[eventName] === 'undefined') { + // not Set because we need to keep the FIFO order + // https://github.com/sweetalert2/sweetalert2/pull/2763#discussion_r1748990334 + this.events[eventName] = []; + } + return this.events[eventName]; + } + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + on(eventName, eventHandler) { + const currentHandlers = this._getHandlersByEventName(eventName); + if (!currentHandlers.includes(eventHandler)) { + currentHandlers.push(eventHandler); + } + } + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + once(eventName, eventHandler) { + var _this = this; + /** + * @param {Array} args + */ + const onceFn = function () { + _this.removeListener(eventName, onceFn); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + eventHandler.apply(_this, args); + }; + this.on(eventName, onceFn); + } + + /** + * @param {string} eventName + * @param {Array} args + */ + emit(eventName) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + this._getHandlersByEventName(eventName).forEach( + /** + * @param {EventHandler} eventHandler + */ + eventHandler => { + try { + eventHandler.apply(this, args); + } catch (error) { + console.error(error); + } + }); + } + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + removeListener(eventName, eventHandler) { + const currentHandlers = this._getHandlersByEventName(eventName); + const index = currentHandlers.indexOf(eventHandler); + if (index > -1) { + currentHandlers.splice(index, 1); + } + } + + /** + * @param {string} eventName + */ + removeAllListeners(eventName) { + if (this.events[eventName] !== undefined) { + // https://github.com/sweetalert2/sweetalert2/pull/2763#discussion_r1749239222 + this.events[eventName].length = 0; + } + } + reset() { + this.events = {}; + } +} + +globalState.eventEmitter = new EventEmitter(); + +/** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ +const on = (eventName, eventHandler) => { + globalState.eventEmitter.on(eventName, eventHandler); +}; + +/** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ +const once = (eventName, eventHandler) => { + globalState.eventEmitter.once(eventName, eventHandler); +}; + +/** + * @param {string} [eventName] + * @param {EventHandler} [eventHandler] + */ +const off = (eventName, eventHandler) => { + // Remove all handlers for all events + if (!eventName) { + globalState.eventEmitter.reset(); + return; + } + if (eventHandler) { + // Remove a specific handler + globalState.eventEmitter.removeListener(eventName, eventHandler); + } else { + // Remove all handlers for a specific event + globalState.eventEmitter.removeAllListeners(eventName); + } +}; + +var staticMethods = /*#__PURE__*/Object.freeze({ + __proto__: null, + argsToParams: argsToParams, + bindClickHandler: bindClickHandler, + clickCancel: clickCancel, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + enableLoading: showLoading, + fire: fire, + getActions: getActions, + getCancelButton: getCancelButton, + getCloseButton: getCloseButton, + getConfirmButton: getConfirmButton, + getContainer: getContainer, + getDenyButton: getDenyButton, + getFocusableElements: getFocusableElements, + getFooter: getFooter, + getHtmlContainer: getHtmlContainer, + getIcon: getIcon, + getIconContent: getIconContent, + getImage: getImage, + getInputLabel: getInputLabel, + getLoader: getLoader, + getPopup: getPopup, + getProgressSteps: getProgressSteps, + getTimerLeft: getTimerLeft, + getTimerProgressBar: getTimerProgressBar, + getTitle: getTitle, + getValidationMessage: getValidationMessage, + increaseTimer: increaseTimer, + isDeprecatedParameter: isDeprecatedParameter, + isLoading: isLoading, + isTimerRunning: isTimerRunning, + isUpdatableParameter: isUpdatableParameter, + isValidParameter: isValidParameter, + isVisible: isVisible, + mixin: mixin, + off: off, + on: on, + once: once, + resumeTimer: resumeTimer, + showLoading: showLoading, + stopTimer: stopTimer, + toggleTimer: toggleTimer +}); + +class Timer { + /** + * @param {Function} callback + * @param {number} delay + */ + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + /** + * @returns {number} + */ + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + return this.remaining; + } + + /** + * @returns {number} + */ + stop() { + if (this.started && this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date().getTime() - this.started.getTime(); + } + return this.remaining; + } + + /** + * @param {number} n + * @returns {number} + */ + increase(n) { + const running = this.running; + if (running) { + this.stop(); + } + this.remaining += n; + if (running) { + this.start(); + } + return this.remaining; + } + + /** + * @returns {number} + */ + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + return this.remaining; + } + + /** + * @returns {boolean} + */ + isRunning() { + return this.running; + } +} + +const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + +/** + * @param {SweetAlertOptions} params + * @returns {SweetAlertOptions} + */ +const getTemplateParams = params => { + const template = typeof params.template === 'string' ? (/** @type {HTMLTemplateElement} */document.querySelector(params.template)) : params.template; + if (!template) { + return {}; + } + /** @type {DocumentFragment} */ + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalFunctionParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @returns {Record<string, any>} + */ +const getSwalParams = templateContent => { + /** @type {Record<string, any>} */ + const result = {}; + /** @type {HTMLElement[]} */ + const swalParams = Array.from(templateContent.querySelectorAll('swal-param')); + swalParams.forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = /** @type {keyof SweetAlertOptions} */param.getAttribute('name'); + const value = param.getAttribute('value'); + if (!paramName || !value) { + return; + } + if (typeof defaultParams[paramName] === 'boolean') { + result[paramName] = value !== 'false'; + } else if (typeof defaultParams[paramName] === 'object') { + result[paramName] = JSON.parse(value); + } else { + result[paramName] = value; + } + }); + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @returns {Record<string, any>} + */ +const getSwalFunctionParams = templateContent => { + /** @type {Record<string, any>} */ + const result = {}; + /** @type {HTMLElement[]} */ + const swalFunctions = Array.from(templateContent.querySelectorAll('swal-function-param')); + swalFunctions.forEach(param => { + const paramName = /** @type {keyof SweetAlertOptions} */param.getAttribute('name'); + const value = param.getAttribute('value'); + if (!paramName || !value) { + return; + } + result[paramName] = new Function(`return ${value}`)(); + }); + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @returns {Record<string, any>} + */ +const getSwalButtons = templateContent => { + /** @type {Record<string, any>} */ + const result = {}; + /** @type {HTMLElement[]} */ + const swalButtons = Array.from(templateContent.querySelectorAll('swal-button')); + swalButtons.forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + if (!type || !['confirm', 'cancel', 'deny'].includes(type)) { + return; + } + result[`${type}ButtonText`] = button.innerHTML; + result[`show${capitalizeFirstLetter(type)}Button`] = true; + if (button.hasAttribute('color')) { + result[`${type}ButtonColor`] = button.getAttribute('color'); + } + if (button.hasAttribute('aria-label')) { + result[`${type}ButtonAriaLabel`] = button.getAttribute('aria-label'); + } + }); + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @returns {Pick<SweetAlertOptions, 'imageUrl' | 'imageWidth' | 'imageHeight' | 'imageAlt'>} + */ +const getSwalImage = templateContent => { + const result = {}; + /** @type {HTMLElement | null} */ + const image = templateContent.querySelector('swal-image'); + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src') || undefined; + } + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width') || undefined; + } + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height') || undefined; + } + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt') || undefined; + } + } + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @returns {Record<string, any>} + */ +const getSwalIcon = templateContent => { + const result = {}; + /** @type {HTMLElement | null} */ + const icon = templateContent.querySelector('swal-icon'); + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + result.iconHtml = icon.innerHTML; + } + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @returns {Record<string, any>} + */ +const getSwalInput = templateContent => { + /** @type {Record<string, any>} */ + const result = {}; + /** @type {HTMLElement | null} */ + const input = templateContent.querySelector('swal-input'); + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + /** @type {HTMLElement[]} */ + const inputOptions = Array.from(templateContent.querySelectorAll('swal-input-option')); + if (inputOptions.length) { + result.inputOptions = {}; + inputOptions.forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + if (!optionValue) { + return; + } + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @param {string[]} paramNames + * @returns {Record<string, any>} + */ +const getSwalStringParams = (templateContent, paramNames) => { + /** @type {Record<string, any>} */ + const result = {}; + for (const i in paramNames) { + const paramName = paramNames[i]; + /** @type {HTMLElement | null} */ + const tag = templateContent.querySelector(paramName); + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + return result; +}; + +/** + * @param {DocumentFragment} templateContent + */ +const showWarningsForElements = templateContent => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-function-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + Array.from(templateContent.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + if (!allowedElements.includes(tagName)) { + warn(`Unrecognized element <${tagName}>`); + } + }); +}; + +/** + * @param {HTMLElement} el + * @param {string[]} allowedAttributes + */ +const showWarningsForAttributes = (el, allowedAttributes) => { + Array.from(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn([`Unrecognized attribute "${attribute.name}" on <${el.tagName.toLowerCase()}>.`, `${allowedAttributes.length ? `Allowed attributes are: ${allowedAttributes.join(', ')}` : 'To set the value, use HTML within the element.'}`]); + } + }); +}; + +const SHOW_CLASS_TIMEOUT = 10; + +/** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param {SweetAlertOptions} params + */ +const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + globalState.eventEmitter.emit('willOpen', popup); + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses(container, popup, params); + + // scrolling is 'hidden' until animation is done, after that 'auto' + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + globalState.eventEmitter.emit('didOpen', popup); + removeClass(container, swalClasses['no-transition']); +}; + +/** + * @param {AnimationEvent} event + */ +const swalOpenAnimationFinished = event => { + const popup = getPopup(); + if (event.target !== popup) { + return; + } + const container = getContainer(); + popup.removeEventListener('animationend', swalOpenAnimationFinished); + popup.removeEventListener('transitionend', swalOpenAnimationFinished); + container.style.overflowY = 'auto'; +}; + +/** + * @param {HTMLElement} container + * @param {HTMLElement} popup + */ +const setScrollingVisibility = (container, popup) => { + if (hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener('animationend', swalOpenAnimationFinished); + popup.addEventListener('transitionend', swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } +}; + +/** + * @param {HTMLElement} container + * @param {boolean} scrollbarPadding + * @param {string} initialBodyOverflow + */ +const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + replaceScrollbarWithPadding(initialBodyOverflow); + } + + // sweetalert2/issues/1247 + setTimeout(() => { + container.scrollTop = 0; + }); +}; + +/** + * @param {HTMLElement} container + * @param {HTMLElement} popup + * @param {SweetAlertOptions} params + */ +const addClasses = (container, popup, params) => { + addClass(container, params.showClass.backdrop); + if (params.animation) { + // this workaround with opacity is needed for https://github.com/sweetalert2/sweetalert2/issues/2059 + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); + // and remove the opacity workaround + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + } else { + show(popup, 'grid'); + } + addClass([document.documentElement, document.body], swalClasses.shown); + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } +}; + +var defaultInputValidators = { + /** + * @param {string} string + * @param {string} [validationMessage] + * @returns {Promise<string | void>} + */ + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + /** + * @param {string} string + * @param {string} [validationMessage] + * @returns {Promise<string | void>} + */ + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } +}; + +/** + * @param {SweetAlertOptions} params + */ +function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (params.inputValidator) { + return; + } + if (params.input === 'email') { + params.inputValidator = defaultInputValidators['email']; + } + if (params.input === 'url') { + params.inputValidator = defaultInputValidators['url']; + } +} + +/** + * @param {SweetAlertOptions} params + */ +function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } +} + +/** + * Set type, text and actions on popup + * + * @param {SweetAlertOptions} params + */ +function setParameters(params) { + setDefaultInputValidators(params); + + // showLoaderOnConfirm && preConfirm + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + validateCustomTargetElement(params); + + // Replace newlines with <br> in title + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('<br />'); + } + init(params); +} + +/** @type {SweetAlert} */ +let currentInstance; +var _promise = /*#__PURE__*/new WeakMap(); +class SweetAlert { + /** + * @param {...any} args + * @this {SweetAlert} + */ + constructor() { + /** + * @type {Promise<SweetAlertResult>} + */ + _classPrivateFieldInitSpec(this, _promise, void 0); + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + currentInstance = this; + + // @ts-ignore + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + + /** @type {Readonly<SweetAlertOptions>} */ + this.params = outerParams; + + /** @type {boolean} */ + this.isAwaitingPromise = false; + _classPrivateFieldSet2(_promise, this, this._main(currentInstance.params)); + } + _main(userParams) { + let mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + if (globalState.currentInstance) { + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(globalState.currentInstance); + const { + isAwaitingPromise + } = globalState.currentInstance; + globalState.currentInstance._destroy(); + if (!isAwaitingPromise) { + swalPromiseResolve({ + isDismissed: true + }); + } + if (isModal()) { + unsetAriaHidden(); + } + } + globalState.currentInstance = currentInstance; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); + + // clear the previous timer + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } + + // clear the restore focus timeout + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(currentInstance); + render(currentInstance, innerParams); + privateProps.innerParams.set(currentInstance, innerParams); + return swalPromise(currentInstance, domCache, innerParams); + } + + // `catch` cannot be the name of a module export, so we define our thenable methods here instead + then(onFulfilled) { + return _classPrivateFieldGet2(_promise, this).then(onFulfilled); + } + finally(onFinally) { + return _classPrivateFieldGet2(_promise, this).finally(onFinally); + } +} + +/** + * @param {SweetAlert} instance + * @param {DomCache} domCache + * @param {SweetAlertOptions} innerParams + * @returns {Promise} + */ +const swalPromise = (instance, domCache, innerParams) => { + return new Promise((resolve, reject) => { + // functions to handle all closings/dismissals + /** + * @param {DismissReason} dismiss + */ + const dismissWith = dismiss => { + instance.close({ + isDismissed: true, + dismiss + }); + }; + privateMethods.swalPromiseResolve.set(instance, resolve); + privateMethods.swalPromiseReject.set(instance, reject); + domCache.confirmButton.onclick = () => { + handleConfirmButtonClick(instance); + }; + domCache.denyButton.onclick = () => { + handleDenyButtonClick(instance); + }; + domCache.cancelButton.onclick = () => { + handleCancelButtonClick(instance, dismissWith); + }; + domCache.closeButton.onclick = () => { + dismissWith(DismissReason.close); + }; + handlePopupClick(innerParams, domCache, dismissWith); + addKeydownHandler(globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); + + // Scroll container to top on open (#1247, #1946) + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); +}; + +/** + * @param {SweetAlertOptions} userParams + * @param {SweetAlertOptions} mixinParams + * @returns {SweetAlertOptions} + */ +const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + if (params.animation === false) { + params.showClass = { + backdrop: 'swal2-noanimation' + }; + params.hideClass = {}; + } + return params; +}; + +/** + * @param {SweetAlert} instance + * @returns {DomCache} + */ +const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; +}; + +/** + * @param {GlobalState} globalState + * @param {SweetAlertOptions} innerParams + * @param {Function} dismissWith + */ +const setupTimer = (globalState, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + if (innerParams.timer) { + globalState.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState.timeout; + }, innerParams.timer); + if (innerParams.timerProgressBar) { + show(timerProgressBar); + applyCustomClass(timerProgressBar, innerParams, 'timerProgressBar'); + setTimeout(() => { + if (globalState.timeout && globalState.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } +}; + +/** + * Initialize focus in the popup: + * + * 1. If `toast` is `true`, don't steal focus from the document. + * 2. Else if there is an [autofocus] element, focus it. + * 3. Else if `focusConfirm` is `true` and confirm button is visible, focus it. + * 4. Else if `focusDeny` is `true` and deny button is visible, focus it. + * 5. Else if `focusCancel` is `true` and cancel button is visible, focus it. + * 6. Else focus the first focusable element in a popup (if any). + * + * @param {DomCache} domCache + * @param {SweetAlertOptions} innerParams + */ +const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + // TODO: this is dumb, remove `allowEnterKey` param in the next major version + if (!callIfFunction(innerParams.allowEnterKey)) { + warnAboutDeprecation('allowEnterKey'); + blurActiveElement(); + return; + } + if (focusAutofocus(domCache)) { + return; + } + if (focusButton(domCache, innerParams)) { + return; + } + setFocus(-1, 1); +}; + +/** + * @param {DomCache} domCache + * @returns {boolean} + */ +const focusAutofocus = domCache => { + const autofocusElements = Array.from(domCache.popup.querySelectorAll('[autofocus]')); + for (const autofocusElement of autofocusElements) { + if (autofocusElement instanceof HTMLElement && isVisible$1(autofocusElement)) { + autofocusElement.focus(); + return true; + } + } + return false; +}; + +/** + * @param {DomCache} domCache + * @param {SweetAlertOptions} innerParams + * @returns {boolean} + */ +const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible$1(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + if (innerParams.focusCancel && isVisible$1(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + if (innerParams.focusConfirm && isVisible$1(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + return false; +}; +const blurActiveElement = () => { + if (document.activeElement instanceof HTMLElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } +}; + +// Dear russian users visiting russian sites. Let's have fun. +if (typeof window !== 'undefined' && /^ru\b/.test(navigator.language) && location.host.match(/\.(ru|su|by|xn--p1ai)$/)) { + const now = new Date(); + const initiationDate = localStorage.getItem('swal-initiation'); + if (!initiationDate) { + localStorage.setItem('swal-initiation', `${now}`); + } else if ((now.getTime() - Date.parse(initiationDate)) / (1000 * 60 * 60 * 24) > 3) { + setTimeout(() => { + document.body.style.pointerEvents = 'none'; + const ukrainianAnthem = document.createElement('audio'); + ukrainianAnthem.src = 'https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3'; + ukrainianAnthem.loop = true; + document.body.appendChild(ukrainianAnthem); + setTimeout(() => { + ukrainianAnthem.play().catch(() => { + // ignore + }); + }, 2500); + }, 500); + } +} + +// Assign instance methods from src/instanceMethods/*.js to prototype +SweetAlert.prototype.disableButtons = disableButtons; +SweetAlert.prototype.enableButtons = enableButtons; +SweetAlert.prototype.getInput = getInput; +SweetAlert.prototype.disableInput = disableInput; +SweetAlert.prototype.enableInput = enableInput; +SweetAlert.prototype.hideLoading = hideLoading; +SweetAlert.prototype.disableLoading = hideLoading; +SweetAlert.prototype.showValidationMessage = showValidationMessage; +SweetAlert.prototype.resetValidationMessage = resetValidationMessage; +SweetAlert.prototype.close = close; +SweetAlert.prototype.closePopup = close; +SweetAlert.prototype.closeModal = close; +SweetAlert.prototype.closeToast = close; +SweetAlert.prototype.rejectPromise = rejectPromise; +SweetAlert.prototype.update = update; +SweetAlert.prototype._destroy = _destroy; + +// Assign static methods from src/staticMethods/*.js to constructor +Object.assign(SweetAlert, staticMethods); + +// Proxy to instance methods to constructor, for now, for backwards compatibility +Object.keys(instanceMethods).forEach(key => { + /** + * @param {...any} args + * @returns {any | undefined} + */ + SweetAlert[key] = function () { + if (currentInstance && currentInstance[key]) { + return currentInstance[key](...arguments); + } + return null; + }; +}); +SweetAlert.DismissReason = DismissReason; +SweetAlert.version = '11.15.3'; + +const Swal = SweetAlert; +// @ts-ignore +Swal.default = Swal; + +export { Swal as default }; +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:hsl(0,0%,33%);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid hsl(0,0%,85%);border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:hsl(0,0%,94%);color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:rgb(249.95234375,205.965625,167.74765625);color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:rgb(156.7033492823,224.2822966507,246.2966507177);color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:rgb(200.8064516129,217.9677419355,225.1935483871);color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}"); \ No newline at end of file diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.esm.all.min.js b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.esm.all.min.js new file mode 100644 index 0000000..37fdbef --- /dev/null +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.esm.all.min.js @@ -0,0 +1,6 @@ +/*! +* sweetalert2 v11.15.3 +* Released under the MIT License. +*/ +function e(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function t(t,n){return t.get(e(t,n))}function n(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}const o={},i=e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,i=window.scrollY;o.restoreFocusTimeout=setTimeout((()=>{o.previousActiveElement instanceof HTMLElement?(o.previousActiveElement.focus(),o.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(n,i)})),s="swal2-",r=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce(((e,t)=>(e[t]=s+t,e)),{}),a=["success","warning","info","question","error"].reduce(((e,t)=>(e[t]=s+t,e)),{}),l="SweetAlert2:",c=e=>e.charAt(0).toUpperCase()+e.slice(1),u=e=>{console.warn(`${l} ${"object"==typeof e?e.join(" "):e}`)},d=e=>{console.error(`${l} ${e}`)},p=[],m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;var n;n=`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`,p.includes(n)||(p.push(n),u(n))},g=e=>"function"==typeof e?e():e,h=e=>e&&"function"==typeof e.toPromise,f=e=>h(e)?e.toPromise():Promise.resolve(e),b=e=>e&&Promise.resolve(e)===e,y=()=>document.body.querySelector(`.${r.container}`),v=e=>{const t=y();return t?t.querySelector(e):null},w=e=>v(`.${e}`),C=()=>w(r.popup),A=()=>w(r.icon),E=()=>w(r.title),k=()=>w(r["html-container"]),B=()=>w(r.image),L=()=>w(r["progress-steps"]),$=()=>w(r["validation-message"]),x=()=>v(`.${r.actions} .${r.confirm}`),P=()=>v(`.${r.actions} .${r.cancel}`),T=()=>v(`.${r.actions} .${r.deny}`),S=()=>v(`.${r.loader}`),O=()=>w(r.actions),M=()=>w(r.footer),j=()=>w(r["timer-progress-bar"]),H=()=>w(r.close),I=()=>{const e=C();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(t).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")||"0"),o=parseInt(t.getAttribute("tabindex")||"0");return n>o?1:n<o?-1:0})),o=e.querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n'),i=Array.from(o).filter((e=>"-1"!==e.getAttribute("tabindex")));return[...new Set(n.concat(i))].filter((e=>ee(e)))},D=()=>N(document.body,r.shown)&&!N(document.body,r["toast-shown"])&&!N(document.body,r["no-backdrop"]),q=()=>{const e=C();return!!e&&N(e,r.toast)},V=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html"),o=n.querySelector("head");o&&Array.from(o.childNodes).forEach((t=>{e.appendChild(t)}));const i=n.querySelector("body");i&&Array.from(i.childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},N=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t<n.length;t++)if(!e.classList.contains(n[t]))return!1;return!0},_=(e,t,n)=>{if(((e,t)=>{Array.from(e.classList).forEach((n=>{Object.values(r).includes(n)||Object.values(a).includes(n)||Object.values(t.showClass||{}).includes(n)||e.classList.remove(n)}))})(e,t),!t.customClass)return;const o=t.customClass[n];o&&("string"==typeof o||o.forEach?z(e,o):u(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof o}"`))},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${r.popup} > .${r[t]}`);case"checkbox":return e.querySelector(`.${r.popup} > .${r.checkbox} input`);case"radio":return e.querySelector(`.${r.popup} > .${r.radio} input:checked`)||e.querySelector(`.${r.popup} > .${r.radio} input:first-child`);case"range":return e.querySelector(`.${r.popup} > .${r.range} input`);default:return e.querySelector(`.${r.popup} > .${r.input}`)}},R=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},U=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},z=(e,t)=>{U(e,t,!0)},W=(e,t)=>{U(e,t,!1)},K=(e,t)=>{const n=Array.from(e.children);for(let e=0;e<n.length;e++){const o=n[e];if(o instanceof HTMLElement&&N(o,t))return o}},Y=(e,t,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style.setProperty(t,"number"==typeof n?`${n}px`:n):e.style.removeProperty(t)},X=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e&&(e.style.display=t)},Z=e=>{e&&(e.style.display="none")},J=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"block";e&&new MutationObserver((()=>{Q(e,e.innerHTML,t)})).observe(e,{childList:!0,subtree:!0})},G=(e,t,n,o)=>{const i=e.querySelector(t);i&&i.style.setProperty(n,o)},Q=function(e,t){t?X(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):Z(e)},ee=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),te=e=>!!(e.scrollHeight>e.clientHeight),ne=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),o=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||o>0},oe=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=j();n&&ee(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"}),10))},ie=`\n <div aria-labelledby="${r.title}" aria-describedby="${r["html-container"]}" class="${r.popup}" tabindex="-1">\n <button type="button" class="${r.close}"></button>\n <ul class="${r["progress-steps"]}"></ul>\n <div class="${r.icon}"></div>\n <img class="${r.image}" />\n <h2 class="${r.title}" id="${r.title}"></h2>\n <div class="${r["html-container"]}" id="${r["html-container"]}"></div>\n <input class="${r.input}" id="${r.input}" />\n <input type="file" class="${r.file}" />\n <div class="${r.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${r.select}" id="${r.select}"></select>\n <div class="${r.radio}"></div>\n <label class="${r.checkbox}">\n <input type="checkbox" id="${r.checkbox}" />\n <span class="${r.label}"></span>\n </label>\n <textarea class="${r.textarea}" id="${r.textarea}"></textarea>\n <div class="${r["validation-message"]}" id="${r["validation-message"]}"></div>\n <div class="${r.actions}">\n <div class="${r.loader}"></div>\n <button type="button" class="${r.confirm}"></button>\n <button type="button" class="${r.deny}"></button>\n <button type="button" class="${r.cancel}"></button>\n </div>\n <div class="${r.footer}"></div>\n <div class="${r["timer-progress-bar-container"]}">\n <div class="${r["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),se=()=>{o.currentInstance.resetValidationMessage()},re=e=>{const t=(()=>{const e=y();return!!e&&(e.remove(),W([document.documentElement,document.body],[r["no-backdrop"],r["toast-shown"],r["has-column"]]),!0)})();if("undefined"==typeof window||"undefined"==typeof document)return void d("SweetAlert2 requires document to initialize");const n=document.createElement("div");n.className=r.container,t&&z(n,r["no-transition"]),V(n,ie);const o="string"==typeof(i=e.target)?document.querySelector(i):i;var i;o.appendChild(n),(e=>{const t=C();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&z(y(),r.rtl)})(o),(()=>{const e=C(),t=K(e,r.input),n=K(e,r.file),o=e.querySelector(`.${r.range} input`),i=e.querySelector(`.${r.range} output`),s=K(e,r.select),a=e.querySelector(`.${r.checkbox} input`),l=K(e,r.textarea);t.oninput=se,n.onchange=se,s.onchange=se,a.onchange=se,l.oninput=se,o.oninput=()=>{se(),i.value=o.value},o.onchange=()=>{se(),i.value=o.value}})()},ae=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?le(e,t):e&&V(t,e)},le=(e,t)=>{e.jquery?ce(t,e):V(t,e.toString())},ce=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},ue=(e,t)=>{const n=O(),o=S();n&&o&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?X(n):Z(n),_(n,t,"actions"),function(e,t,n){const o=x(),i=T(),s=P();if(!o||!i||!s)return;de(o,"confirm",n),de(i,"deny",n),de(s,"cancel",n),function(e,t,n,o){if(!o.buttonsStyling)return void W([e,t,n],r.styled);z([e,t,n],r.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,z(e,r["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,z(t,r["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,z(n,r["default-outline"]))}(o,i,s,n),n.reverseButtons&&(n.toast?(e.insertBefore(s,o),e.insertBefore(i,o)):(e.insertBefore(s,t),e.insertBefore(i,t),e.insertBefore(o,t)))}(n,o,t),V(o,t.loaderHtml||""),_(o,t,"loader"))};function de(e,t,n){const o=c(t);Q(e,n[`show${o}Button`],"inline-block"),V(e,n[`${t}ButtonText`]||""),e.setAttribute("aria-label",n[`${t}ButtonAriaLabel`]||""),e.className=r[t],_(e,n,`${t}Button`)}const pe=(e,t)=>{const n=y();n&&(!function(e,t){"string"==typeof t?e.style.background=t:t||z([document.documentElement,document.body],r["no-backdrop"])}(n,t.backdrop),function(e,t){if(!t)return;t in r?z(e,r[t]):(u('The "position" parameter is not valid, defaulting to "center"'),z(e,r.center))}(n,t.position),function(e,t){if(!t)return;z(e,r[`grow-${t}`])}(n,t.grow),_(n,t,"container"))};var me={innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],he=e=>{if(!e.input)return;if(!Ae[e.input])return void d(`Unexpected type of input! Expected ${Object.keys(Ae).join(" | ")}, got "${e.input}"`);const t=we(e.input);if(!t)return;const n=Ae[e.input](t,e);X(t),e.inputAutoFocus&&setTimeout((()=>{R(n)}))},fe=(e,t)=>{const n=C();if(!n)return;const o=F(n,e);if(o){(e=>{for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t].name;["id","type","value","style"].includes(n)||e.removeAttribute(n)}})(o);for(const e in t)o.setAttribute(e,t[e])}},be=e=>{if(!e.input)return;const t=we(e.input);t&&_(t,e,"input")},ye=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},ve=(e,t,n)=>{if(n.inputLabel){const o=document.createElement("label"),i=r["input-label"];o.setAttribute("for",e.id),o.className=i,"object"==typeof n.customClass&&z(o,n.customClass.inputLabel),o.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",o)}},we=e=>{const t=C();if(t)return K(t,r[e]||r.input)},Ce=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:b(t)||u(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Ae={};Ae.text=Ae.email=Ae.password=Ae.number=Ae.tel=Ae.url=Ae.search=Ae.date=Ae["datetime-local"]=Ae.time=Ae.week=Ae.month=(e,t)=>(Ce(e,t.inputValue),ve(e,e,t),ye(e,t),e.type=t.input,e),Ae.file=(e,t)=>(ve(e,e,t),ye(e,t),e),Ae.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return Ce(n,t.inputValue),n.type=t.input,Ce(o,t.inputValue),ve(n,e,t),e},Ae.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return ve(e,e,t),e},Ae.radio=e=>(e.textContent="",e),Ae.checkbox=(e,t)=>{const n=F(C(),"checkbox");n.value="1",n.checked=Boolean(t.inputValue);const o=e.querySelector("span");return V(o,t.inputPlaceholder||t.inputLabel),n},Ae.textarea=(e,t)=>{Ce(e,t.inputValue),ye(e,t),ve(e,e,t);return setTimeout((()=>{if("MutationObserver"in window){const n=parseInt(window.getComputedStyle(C()).width);new MutationObserver((()=>{if(!document.body.contains(e))return;const o=e.offsetWidth+(i=e,parseInt(window.getComputedStyle(i).marginLeft)+parseInt(window.getComputedStyle(i).marginRight));var i;o>n?C().style.width=`${o}px`:Y(C(),"width",t.width)})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Ee=(e,t)=>{const n=k();n&&(J(n),_(n,t,"htmlContainer"),t.html?(ae(t.html,n),X(n,"block")):t.text?(n.textContent=t.text,X(n,"block")):Z(n),((e,t)=>{const n=C();if(!n)return;const o=me.innerParams.get(e),i=!o||t.input!==o.input;ge.forEach((e=>{const o=K(n,r[e]);o&&(fe(e,t.inputAttributes),o.className=r[e],i&&Z(o))})),t.input&&(i&&he(t),be(t))})(e,t))},ke=(e,t)=>{for(const[n,o]of Object.entries(a))t.icon!==n&&W(e,o);z(e,t.icon&&a[t.icon]),$e(e,t),Be(),_(e,t,"icon")},Be=()=>{const e=C();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},Le=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let n=e.innerHTML,o="";if(t.iconHtml)o=xe(t.iconHtml);else if("success"===t.icon)o='\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n',n=n.replace(/ style=".*?"/g,"");else if("error"===t.icon)o='\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n';else if(t.icon){o=xe({question:"?",warning:"!",info:"i"}[t.icon])}n.trim()!==o.trim()&&V(e,o)},$e=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])G(e,n,"background-color",t.iconColor);G(e,".swal2-success-ring","border-color",t.iconColor)}},xe=e=>`<div class="${r["icon-content"]}">${e}</div>`;let Pe=!1,Te=0,Se=0,Oe=0,Me=0;const je=e=>{const t=C();if(e.target===t||A().contains(e.target)){Pe=!0;const n=De(e);Te=n.clientX,Se=n.clientY,Oe=parseInt(t.style.insetInlineStart)||0,Me=parseInt(t.style.insetBlockStart)||0,z(t,"swal2-dragging")}},He=e=>{const t=C();if(Pe){let{clientX:n,clientY:o}=De(e);t.style.insetInlineStart=`${Oe+(n-Te)}px`,t.style.insetBlockStart=`${Me+(o-Se)}px`}},Ie=()=>{const e=C();Pe=!1,W(e,"swal2-dragging")},De=e=>{let t=0,n=0;return e.type.startsWith("mouse")?(t=e.clientX,n=e.clientY):e.type.startsWith("touch")&&(t=e.touches[0].clientX,n=e.touches[0].clientY),{clientX:t,clientY:n}},qe=(e,t)=>{const n=y(),o=C();if(n&&o){if(t.toast){Y(n,"width",t.width),o.style.width="100%";const e=S();e&&o.insertBefore(e,A())}else Y(o,"width",t.width);Y(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),Z($()),Ve(o,t),t.draggable&&!t.toast?(z(o,r.draggable),(e=>{e.addEventListener("mousedown",je),document.body.addEventListener("mousemove",He),e.addEventListener("mouseup",Ie),e.addEventListener("touchstart",je),document.body.addEventListener("touchmove",He),e.addEventListener("touchend",Ie)})(o)):(W(o,r.draggable),(e=>{e.removeEventListener("mousedown",je),document.body.removeEventListener("mousemove",He),e.removeEventListener("mouseup",Ie),e.removeEventListener("touchstart",je),document.body.removeEventListener("touchmove",He),e.removeEventListener("touchend",Ie)})(o))}},Ve=(e,t)=>{const n=t.showClass||{};e.className=`${r.popup} ${ee(e)?n.popup:""}`,t.toast?(z([document.documentElement,document.body],r["toast-shown"]),z(e,r.toast)):z(e,r.modal),_(e,t,"popup"),"string"==typeof t.customClass&&z(e,t.customClass),t.icon&&z(e,r[`icon-${t.icon}`])},Ne=e=>{const t=document.createElement("li");return z(t,r["progress-step"]),V(t,e),t},_e=e=>{const t=document.createElement("li");return z(t,r["progress-step-line"]),e.progressStepsDistance&&Y(t,"width",e.progressStepsDistance),t},Fe=(e,t)=>{qe(0,t),pe(0,t),((e,t)=>{const n=L();if(!n)return;const{progressSteps:o,currentProgressStep:i}=t;o&&0!==o.length&&void 0!==i?(X(n),n.textContent="",i>=o.length&&u("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.forEach(((e,s)=>{const a=Ne(e);if(n.appendChild(a),s===i&&z(a,r["active-progress-step"]),s!==o.length-1){const e=_e(t);n.appendChild(e)}}))):Z(n)})(0,t),((e,t)=>{const n=me.innerParams.get(e),o=A();if(o){if(n&&t.icon===n.icon)return Le(o,t),void ke(o,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(a).indexOf(t.icon))return d(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void Z(o);X(o),Le(o,t),ke(o,t),z(o,t.showClass&&t.showClass.icon)}else Z(o)}})(e,t),((e,t)=>{const n=B();n&&(t.imageUrl?(X(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt||""),Y(n,"width",t.imageWidth),Y(n,"height",t.imageHeight),n.className=r.image,_(n,t,"image")):Z(n))})(0,t),((e,t)=>{const n=E();n&&(J(n),Q(n,t.title||t.titleText,"block"),t.title&&ae(t.title,n),t.titleText&&(n.innerText=t.titleText),_(n,t,"title"))})(0,t),((e,t)=>{const n=H();n&&(V(n,t.closeButtonHtml||""),_(n,t,"closeButton"),Q(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel||""))})(0,t),Ee(e,t),ue(0,t),((e,t)=>{const n=M();n&&(J(n),Q(n,t.footer,"block"),t.footer&&ae(t.footer,n),_(n,t,"footer"))})(0,t);const n=C();"function"==typeof t.didRender&&n&&t.didRender(n),o.eventEmitter.emit("didRender",n)},Re=()=>{var e;return null===(e=x())||void 0===e?void 0:e.click()},Ue=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),ze=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},We=(e,t)=>{var n;const o=I();if(o.length)return(e+=t)===o.length?e=0:-1===e&&(e=o.length-1),void o[e].focus();null===(n=C())||void 0===n||n.focus()},Ke=["ArrowRight","ArrowDown"],Ye=["ArrowLeft","ArrowUp"],Xe=(e,t,n)=>{e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Ze(t,e):"Tab"===t.key?Je(t):[...Ke,...Ye].includes(t.key)?Ge(t.key):"Escape"===t.key&&Qe(t,e,n)))},Ze=(e,t)=>{if(!g(t.allowEnterKey))return;const n=F(C(),t.input);if(e.target&&n&&e.target instanceof HTMLElement&&e.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(t.input))return;Re(),e.preventDefault()}},Je=e=>{const t=e.target,n=I();let o=-1;for(let e=0;e<n.length;e++)if(t===n[e]){o=e;break}e.shiftKey?We(o,-1):We(o,1),e.stopPropagation(),e.preventDefault()},Ge=e=>{const t=O(),n=x(),o=T(),i=P();if(!(t&&n&&o&&i))return;const s=[n,o,i];if(document.activeElement instanceof HTMLElement&&!s.includes(document.activeElement))return;const r=Ke.includes(e)?"nextElementSibling":"previousElementSibling";let a=document.activeElement;if(a){for(let e=0;e<t.children.length;e++){if(a=a[r],!a)return;if(a instanceof HTMLButtonElement&&ee(a))break}a instanceof HTMLButtonElement&&a.focus()}},Qe=(e,t,n)=>{g(t.allowEscapeKey)&&(e.preventDefault(),n(Ue.esc))};var et={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const tt=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},nt="undefined"!=typeof window&&!!window.GestureEvent,ot=()=>{const e=y();if(!e)return;let t;e.ontouchstart=e=>{t=it(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},it=e=>{const t=e.target,n=y(),o=k();return!(!n||!o)&&(!st(e)&&!rt(e)&&(t===n||!te(n)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!te(o)||!o.contains(t))))},st=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,rt=e=>e.touches&&e.touches.length>1;let at=null;const lt=e=>{null===at&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(at=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${at+(()=>{const e=document.createElement("div");e.className=r["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function ct(e,t,n,s){q()?bt(e,s):(i(n).then((()=>bt(e,s))),ze(o)),nt?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),D()&&(null!==at&&(document.body.style.paddingRight=`${at}px`,at=null),(()=>{if(N(document.body,r.iosfix)){const e=parseInt(document.body.style.top,10);W(document.body,r.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),tt()),W([document.documentElement,document.body],[r.shown,r["height-auto"],r["no-backdrop"],r["toast-shown"]])}function ut(e){e=gt(e);const t=et.swalPromiseResolve.get(this),n=dt(this);this.isAwaitingPromise?e.isDismissed||(mt(this),t(e)):n&&t(e)}const dt=e=>{const t=C();if(!t)return!1;const n=me.innerParams.get(e);if(!n||N(t,n.hideClass.popup))return!1;W(t,n.showClass.popup),z(t,n.hideClass.popup);const o=y();return W(o,n.showClass.backdrop),z(o,n.hideClass.backdrop),ht(e,t,n),!0};function pt(e){const t=et.swalPromiseReject.get(this);mt(this),t&&t(e)}const mt=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,me.innerParams.get(e)||e._destroy())},gt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),ht=(e,t,n)=>{var i;const s=y(),r=ne(t);"function"==typeof n.willClose&&n.willClose(t),null===(i=o.eventEmitter)||void 0===i||i.emit("willClose",t),r?ft(e,t,s,n.returnFocus,n.didClose):ct(e,s,n.returnFocus,n.didClose)},ft=(e,t,n,i,s)=>{o.swalCloseEventFinishedCallback=ct.bind(null,e,n,i,s);const r=function(e){var n;e.target===t&&(null===(n=o.swalCloseEventFinishedCallback)||void 0===n||n.call(o),delete o.swalCloseEventFinishedCallback,t.removeEventListener("animationend",r),t.removeEventListener("transitionend",r))};t.addEventListener("animationend",r),t.addEventListener("transitionend",r)},bt=(e,t)=>{setTimeout((()=>{var n;"function"==typeof t&&t.bind(e.params)(),null===(n=o.eventEmitter)||void 0===n||n.emit("didClose"),e._destroy&&e._destroy()}))},yt=e=>{let t=C();if(t||new Jn,t=C(),!t)return;const n=S();q()?Z(A()):vt(t,e),X(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},vt=(e,t)=>{const n=O(),o=S();n&&o&&(!t&&ee(x())&&(t=x()),X(n),t&&(Z(t),o.setAttribute("data-button-to-replace",t.className),n.insertBefore(o,t)),z([e,n],r.loading))},wt=e=>e.checked?1:0,Ct=e=>e.checked?e.value:null,At=e=>e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,Et=(e,t)=>{const n=C();if(!n)return;const o=e=>{"select"===t.input?function(e,t,n){const o=K(e,r.select);if(!o)return;const i=(e,t,o)=>{const i=document.createElement("option");i.value=o,V(i,t),i.selected=Lt(o,n.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,o.appendChild(e),n.forEach((t=>i(e,t[1],t[0])))}else i(o,n,t)})),o.focus()}(n,Bt(e),t):"radio"===t.input&&function(e,t,n){const o=K(e,r.radio);if(!o)return;t.forEach((e=>{const t=e[0],i=e[1],s=document.createElement("input"),a=document.createElement("label");s.type="radio",s.name=r.radio,s.value=t,Lt(t,n.inputValue)&&(s.checked=!0);const l=document.createElement("span");V(l,i),l.className=r.label,a.appendChild(s),a.appendChild(l),o.appendChild(a)}));const i=o.querySelectorAll("input");i.length&&i[0].focus()}(n,Bt(e),t)};h(t.inputOptions)||b(t.inputOptions)?(yt(x()),f(t.inputOptions).then((t=>{e.hideLoading(),o(t)}))):"object"==typeof t.inputOptions?o(t.inputOptions):d("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},kt=(e,t)=>{const n=e.getInput();n&&(Z(n),f(t.inputValue).then((o=>{n.value="number"===t.input?`${parseFloat(o)||0}`:`${o}`,X(n),n.focus(),e.hideLoading()})).catch((t=>{d(`Error in inputValue promise: ${t}`),n.value="",X(n),n.focus(),e.hideLoading()})))};const Bt=e=>{const t=[];return e instanceof Map?e.forEach(((e,n)=>{let o=e;"object"==typeof o&&(o=Bt(o)),t.push([n,o])})):Object.keys(e).forEach((n=>{let o=e[n];"object"==typeof o&&(o=Bt(o)),t.push([n,o])})),t},Lt=(e,t)=>!!t&&t.toString()===e.toString(),$t=(e,t)=>{const n=me.innerParams.get(e);if(!n.input)return void d(`The "input" parameter is needed to be set when using returnInputValueOn${c(t)}`);const o=e.getInput(),i=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return wt(n);case"radio":return Ct(n);case"file":return At(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?xt(e,i,t):o&&!o.checkValidity()?(e.enableButtons(),e.showValidationMessage(n.validationMessage||o.validationMessage)):"deny"===t?Pt(e,i):Ot(e,i)},xt=(e,t,n)=>{const o=me.innerParams.get(e);e.disableInput();Promise.resolve().then((()=>f(o.inputValidator(t,o.validationMessage)))).then((o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===n?Pt(e,t):Ot(e,t)}))},Pt=(e,t)=>{const n=me.innerParams.get(e||void 0);if(n.showLoaderOnDeny&&yt(T()),n.preDeny){e.isAwaitingPromise=!0;Promise.resolve().then((()=>f(n.preDeny(t,n.validationMessage)))).then((n=>{!1===n?(e.hideLoading(),mt(e)):e.close({isDenied:!0,value:void 0===n?t:n})})).catch((t=>St(e||void 0,t)))}else e.close({isDenied:!0,value:t})},Tt=(e,t)=>{e.close({isConfirmed:!0,value:t})},St=(e,t)=>{e.rejectPromise(t)},Ot=(e,t)=>{const n=me.innerParams.get(e||void 0);if(n.showLoaderOnConfirm&&yt(),n.preConfirm){e.resetValidationMessage(),e.isAwaitingPromise=!0;Promise.resolve().then((()=>f(n.preConfirm(t,n.validationMessage)))).then((n=>{ee($())||!1===n?(e.hideLoading(),mt(e)):Tt(e,void 0===n?t:n)})).catch((t=>St(e||void 0,t)))}else Tt(e,t)};function Mt(){const e=me.innerParams.get(this);if(!e)return;const t=me.domCache.get(this);Z(t.loader),q()?e.icon&&X(A()):jt(t),W([t.popup,t.actions],r.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const jt=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?X(t[0],"inline-block"):ee(x())||ee(T())||ee(P())||Z(e.actions)};function Ht(){const e=me.innerParams.get(this),t=me.domCache.get(this);return t?F(t.popup,e.input):null}function It(e,t,n){const o=me.domCache.get(e);t.forEach((e=>{o[e].disabled=n}))}function Dt(e,t){const n=C();if(n&&e)if("radio"===e.type){const e=n.querySelectorAll(`[name="${r.radio}"]`);for(let n=0;n<e.length;n++)e[n].disabled=t}else e.disabled=t}function qt(){It(this,["confirmButton","denyButton","cancelButton"],!1)}function Vt(){It(this,["confirmButton","denyButton","cancelButton"],!0)}function Nt(){Dt(this.getInput(),!1)}function _t(){Dt(this.getInput(),!0)}function Ft(e){const t=me.domCache.get(this),n=me.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=r["validation-message"],n.customClass&&n.customClass.validationMessage&&z(t.validationMessage,n.customClass.validationMessage),X(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid","true"),o.setAttribute("aria-describedby",r["validation-message"]),R(o),z(o,r.inputerror))}function Rt(){const e=me.domCache.get(this);e.validationMessage&&Z(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),W(t,r.inputerror))}const Ut={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},zt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Wt={allowEnterKey:void 0},Kt=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Yt=e=>Object.prototype.hasOwnProperty.call(Ut,e),Xt=e=>-1!==zt.indexOf(e),Zt=e=>Wt[e],Jt=e=>{Yt(e)||u(`Unknown parameter "${e}"`)},Gt=e=>{Kt.includes(e)&&u(`The parameter "${e}" is incompatible with toasts`)},Qt=e=>{const t=Zt(e);t&&m(e,t)};function en(e){const t=C(),n=me.innerParams.get(this);if(!t||N(t,n.hideClass.popup))return void u("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o=tn(e),i=Object.assign({},n,o);Fe(this,i),me.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const tn=e=>{const t={};return Object.keys(e).forEach((n=>{Xt(n)?t[n]=e[n]:u(`Invalid parameter to update: ${n}`)})),t};function nn(){const e=me.domCache.get(this),t=me.innerParams.get(this);t?(e.popup&&o.swalCloseEventFinishedCallback&&(o.swalCloseEventFinishedCallback(),delete o.swalCloseEventFinishedCallback),"function"==typeof t.didDestroy&&t.didDestroy(),o.eventEmitter.emit("didDestroy"),on(this)):sn(this)}const on=e=>{sn(e),delete e.params,delete o.keydownHandler,delete o.keydownTarget,delete o.currentInstance},sn=e=>{e.isAwaitingPromise?(rn(me,e),e.isAwaitingPromise=!0):(rn(et,e),rn(me,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},rn=(e,t)=>{for(const n in e)e[n].delete(t)};var an=Object.freeze({__proto__:null,_destroy:nn,close:ut,closeModal:ut,closePopup:ut,closeToast:ut,disableButtons:Vt,disableInput:_t,disableLoading:Mt,enableButtons:qt,enableInput:Nt,getInput:Ht,handleAwaitingPromise:mt,hideLoading:Mt,rejectPromise:pt,resetValidationMessage:Rt,showValidationMessage:Ft,update:en});const ln=(e,t,n)=>{t.popup.onclick=()=>{e&&(cn(e)||e.timer||e.input)||n(Ue.close)}},cn=e=>!!(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton);let un=!1;const dn=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(un=!0)}}},pn=e=>{e.container.onmousedown=t=>{t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=()=>{},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(un=!0)}}},mn=(e,t,n)=>{t.container.onclick=o=>{un?un=!1:o.target===t.container&&g(e.allowOutsideClick)&&n(Ue.backdrop)}},gn=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const hn=()=>{if(o.timeout)return(()=>{const e=j();if(!e)return;const t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${n}%`})(),o.timeout.stop()},fn=()=>{if(o.timeout){const e=o.timeout.start();return oe(e),e}};let bn=!1;const yn={};const vn=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in yn){const n=t.getAttribute(e);if(n)return void yn[e].fire({template:n})}};o.eventEmitter=new class{constructor(){this.events={}}_getHandlersByEventName(e){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e]}on(e,t){const n=this._getHandlersByEventName(e);n.includes(t)||n.push(t)}once(e,t){var n=this;const o=function(){n.removeListener(e,o);for(var i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];t.apply(n,s)};this.on(e,o)}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];this._getHandlersByEventName(e).forEach((e=>{try{e.apply(this,n)}catch(e){console.error(e)}}))}removeListener(e,t){const n=this._getHandlersByEventName(e),o=n.indexOf(t);o>-1&&n.splice(o,1)}removeAllListeners(e){void 0!==this.events[e]&&(this.events[e].length=0)}reset(){this.events={}}};var wn=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||gn(e[0])?["title","html","icon"].forEach(((n,o)=>{const i=e[o];"string"==typeof i||gn(i)?t[n]=i:void 0!==i&&d(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)})):Object.assign(t,e[0]),t},bindClickHandler:function(){yn[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,bn||(document.body.addEventListener("click",vn),bn=!0)},clickCancel:()=>{var e;return null===(e=P())||void 0===e?void 0:e.click()},clickConfirm:Re,clickDeny:()=>{var e;return null===(e=T())||void 0===e?void 0:e.click()},enableLoading:yt,fire:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new this(...t)},getActions:O,getCancelButton:P,getCloseButton:H,getConfirmButton:x,getContainer:y,getDenyButton:T,getFocusableElements:I,getFooter:M,getHtmlContainer:k,getIcon:A,getIconContent:()=>w(r["icon-content"]),getImage:B,getInputLabel:()=>w(r["input-label"]),getLoader:S,getPopup:C,getProgressSteps:L,getTimerLeft:()=>o.timeout&&o.timeout.getTimerLeft(),getTimerProgressBar:j,getTitle:E,getValidationMessage:$,increaseTimer:e=>{if(o.timeout){const t=o.timeout.increase(e);return oe(t,!0),t}},isDeprecatedParameter:Zt,isLoading:()=>{const e=C();return!!e&&e.hasAttribute("data-loading")},isTimerRunning:()=>!(!o.timeout||!o.timeout.isRunning()),isUpdatableParameter:Xt,isValidParameter:Yt,isVisible:()=>ee(C()),mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},off:(e,t)=>{e?t?o.eventEmitter.removeListener(e,t):o.eventEmitter.removeAllListeners(e):o.eventEmitter.reset()},on:(e,t)=>{o.eventEmitter.on(e,t)},once:(e,t)=>{o.eventEmitter.once(e,t)},resumeTimer:fn,showLoading:yt,stopTimer:hn,toggleTimer:()=>{const e=o.timeout;return e&&(e.running?hn():fn())}});class Cn{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const An=["swal-title","swal-html","swal-footer"],En=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{Sn(e,["name","value"]);const n=e.getAttribute("name"),o=e.getAttribute("value");n&&o&&(t[n]="boolean"==typeof Ut[n]?"false"!==o:"object"==typeof Ut[n]?JSON.parse(o):o)})),t},kn=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const n=e.getAttribute("name"),o=e.getAttribute("value");n&&o&&(t[n]=new Function(`return ${o}`)())})),t},Bn=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{Sn(e,["type","color","aria-label"]);const n=e.getAttribute("type");n&&["confirm","cancel","deny"].includes(n)&&(t[`${n}ButtonText`]=e.innerHTML,t[`show${c(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label")))})),t},Ln=e=>{const t={},n=e.querySelector("swal-image");return n&&(Sn(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")||void 0),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")||void 0),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")||void 0),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt")||void 0)),t},$n=e=>{const t={},n=e.querySelector("swal-icon");return n&&(Sn(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},xn=e=>{const t={},n=e.querySelector("swal-input");n&&(Sn(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const o=Array.from(e.querySelectorAll("swal-input-option"));return o.length&&(t.inputOptions={},o.forEach((e=>{Sn(e,["value"]);const n=e.getAttribute("value");if(!n)return;const o=e.innerHTML;t.inputOptions[n]=o}))),t},Pn=(e,t)=>{const n={};for(const o in t){const i=t[o],s=e.querySelector(i);s&&(Sn(s,[]),n[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},Tn=e=>{const t=An.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const n=e.tagName.toLowerCase();t.includes(n)||u(`Unrecognized element <${n}>`)}))},Sn=(e,t)=>{Array.from(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&u([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])}))},On=e=>{const t=y(),n=C();"function"==typeof e.willOpen&&e.willOpen(n),o.eventEmitter.emit("willOpen",n);const i=window.getComputedStyle(document.body).overflowY;In(t,n,e),setTimeout((()=>{jn(t,n)}),10),D()&&(Hn(t,e.scrollbarPadding,i),(()=>{const e=y();Array.from(document.body.children).forEach((t=>{t.contains(e)||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")||""),t.setAttribute("aria-hidden","true"))}))})()),q()||o.previousActiveElement||(o.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(n))),o.eventEmitter.emit("didOpen",n),W(t,r["no-transition"])},Mn=e=>{const t=C();if(e.target!==t)return;const n=y();t.removeEventListener("animationend",Mn),t.removeEventListener("transitionend",Mn),n.style.overflowY="auto"},jn=(e,t)=>{ne(t)?(e.style.overflowY="hidden",t.addEventListener("animationend",Mn),t.addEventListener("transitionend",Mn)):e.style.overflowY="auto"},Hn=(e,t,n)=>{(()=>{if(nt&&!N(document.body,r.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",z(document.body,r.iosfix),ot()}})(),t&&"hidden"!==n&<(n),setTimeout((()=>{e.scrollTop=0}))},In=(e,t,n)=>{z(e,n.showClass.backdrop),n.animation?(t.style.setProperty("opacity","0","important"),X(t,"grid"),setTimeout((()=>{z(t,n.showClass.popup),t.style.removeProperty("opacity")}),10)):X(t,"grid"),z([document.documentElement,document.body],r.shown),n.heightAuto&&n.backdrop&&!n.toast&&z([document.documentElement,document.body],r["height-auto"])};var Dn=(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),qn=(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL");function Vn(e){!function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=Dn),"url"===e.input&&(e.inputValidator=qn))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&u("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(u('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),re(e)}let Nn;var _n=new WeakMap;class Fn{constructor(){if(n(this,_n,void 0),"undefined"==typeof window)return;Nn=this;for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];const s=Object.freeze(this.constructor.argsToParams(o));var r,a,l;this.params=s,this.isAwaitingPromise=!1,r=_n,a=this,l=this._main(Nn.params),r.set(e(r,a),l)}_main(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((e=>{!1===e.backdrop&&e.allowOutsideClick&&u('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)Jt(t),e.toast&&Gt(t),Qt(t)})(Object.assign({},t,e)),o.currentInstance){const e=et.swalPromiseResolve.get(o.currentInstance),{isAwaitingPromise:t}=o.currentInstance;o.currentInstance._destroy(),t||e({isDismissed:!0}),D()&&tt()}o.currentInstance=Nn;const n=Un(e,t);Vn(n),Object.freeze(n),o.timeout&&(o.timeout.stop(),delete o.timeout),clearTimeout(o.restoreFocusTimeout);const i=zn(Nn);return Fe(Nn,n),me.innerParams.set(Nn,n),Rn(Nn,i,n)}then(e){return t(_n,this).then(e)}finally(e){return t(_n,this).finally(e)}}const Rn=(e,t,n)=>new Promise(((i,s)=>{const r=t=>{e.close({isDismissed:!0,dismiss:t})};et.swalPromiseResolve.set(e,i),et.swalPromiseReject.set(e,s),t.confirmButton.onclick=()=>{(e=>{const t=me.innerParams.get(e);e.disableButtons(),t.input?$t(e,"confirm"):Ot(e,!0)})(e)},t.denyButton.onclick=()=>{(e=>{const t=me.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?$t(e,"deny"):Pt(e,!1)})(e)},t.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Ue.cancel)})(e,r)},t.closeButton.onclick=()=>{r(Ue.close)},((e,t,n)=>{e.toast?ln(e,t,n):(dn(t),pn(t),mn(e,t,n))})(n,t,r),((e,t,n)=>{ze(e),t.toast||(e.keydownHandler=e=>Xe(t,e,n),e.keydownTarget=t.keydownListenerCapture?window:C(),e.keydownListenerCapture=t.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)})(o,n,r),((e,t)=>{"select"===t.input||"radio"===t.input?Et(e,t):["text","email","number","tel","textarea"].some((e=>e===t.input))&&(h(t.inputValue)||b(t.inputValue))&&(yt(x()),kt(e,t))})(e,n),On(n),Wn(o,n,r),Kn(t,n),setTimeout((()=>{t.container.scrollTop=0}))})),Un=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return Tn(n),Object.assign(En(n),kn(n),Bn(n),Ln(n),$n(n),xn(n),Pn(n,An))})(e),o=Object.assign({},Ut,t,n,e);return o.showClass=Object.assign({},Ut.showClass,o.showClass),o.hideClass=Object.assign({},Ut.hideClass,o.hideClass),!1===o.animation&&(o.showClass={backdrop:"swal2-noanimation"},o.hideClass={}),o},zn=e=>{const t={popup:C(),container:y(),actions:O(),confirmButton:x(),denyButton:T(),cancelButton:P(),loader:S(),closeButton:H(),validationMessage:$(),progressSteps:L()};return me.domCache.set(e,t),t},Wn=(e,t,n)=>{const o=j();Z(o),t.timer&&(e.timeout=new Cn((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(X(o),_(o,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&oe(t.timer)}))))},Kn=(e,t)=>{if(!t.toast)return g(t.allowEnterKey)?void(Yn(e)||Xn(e,t)||We(-1,1)):(m("allowEnterKey"),void Zn())},Yn=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const e of t)if(e instanceof HTMLElement&&ee(e))return e.focus(),!0;return!1},Xn=(e,t)=>t.focusDeny&&ee(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&ee(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!ee(e.confirmButton))&&(e.confirmButton.focus(),!0),Zn=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout((()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((()=>{e.play().catch((()=>{}))}),2500)}),500):localStorage.setItem("swal-initiation",`${e}`)}Fn.prototype.disableButtons=Vt,Fn.prototype.enableButtons=qt,Fn.prototype.getInput=Ht,Fn.prototype.disableInput=_t,Fn.prototype.enableInput=Nt,Fn.prototype.hideLoading=Mt,Fn.prototype.disableLoading=Mt,Fn.prototype.showValidationMessage=Ft,Fn.prototype.resetValidationMessage=Rt,Fn.prototype.close=ut,Fn.prototype.closePopup=ut,Fn.prototype.closeModal=ut,Fn.prototype.closeToast=ut,Fn.prototype.rejectPromise=pt,Fn.prototype.update=en,Fn.prototype._destroy=nn,Object.assign(Fn,wn),Object.keys(an).forEach((e=>{Fn[e]=function(){return Nn&&Nn[e]?Nn[e](...arguments):null}})),Fn.DismissReason=Ue,Fn.version="11.15.3";const Jn=Fn;Jn.default=Jn;export{Jn as default}; +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:hsl(0,0%,33%);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid hsl(0,0%,85%);border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:hsl(0,0%,94%);color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:rgb(249.95234375,205.965625,167.74765625);color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:rgb(156.7033492823,224.2822966507,246.2966507177);color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:rgb(200.8064516129,217.9677419355,225.1935483871);color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}"); \ No newline at end of file diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.esm.js b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.esm.js new file mode 100644 index 0000000..ceeefcc --- /dev/null +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.esm.js @@ -0,0 +1,4589 @@ +/*! +* sweetalert2 v11.15.3 +* Released under the MIT License. +*/ +function _assertClassBrand(e, t, n) { + if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; + throw new TypeError("Private element is not present on this object"); +} +function _checkPrivateRedeclaration(e, t) { + if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); +} +function _classPrivateFieldGet2(s, a) { + return s.get(_assertClassBrand(s, a)); +} +function _classPrivateFieldInitSpec(e, t, a) { + _checkPrivateRedeclaration(e, t), t.set(e, a); +} +function _classPrivateFieldSet2(s, a, r) { + return s.set(_assertClassBrand(s, a), r), r; +} + +const RESTORE_FOCUS_TIMEOUT = 100; + +/** @type {GlobalState} */ +const globalState = {}; +const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement instanceof HTMLElement) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } +}; + +/** + * Restore previous active (focused) element + * + * @param {boolean} returnFocus + * @returns {Promise<void>} + */ +const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); +}; + +const swalPrefix = 'swal2-'; + +/** + * @typedef {Record<SwalClass, string>} SwalClasses + */ + +/** + * @typedef {'success' | 'warning' | 'info' | 'question' | 'error'} SwalIcon + * @typedef {Record<SwalIcon, string>} SwalIcons + */ + +/** @type {SwalClass[]} */ +const classNames = ['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error', 'draggable', 'dragging']; +const swalClasses = classNames.reduce((acc, className) => { + acc[className] = swalPrefix + className; + return acc; +}, /** @type {SwalClasses} */{}); + +/** @type {SwalIcon[]} */ +const icons = ['success', 'warning', 'info', 'question', 'error']; +const iconTypes = icons.reduce((acc, icon) => { + acc[icon] = swalPrefix + icon; + return acc; +}, /** @type {SwalIcons} */{}); + +const consolePrefix = 'SweetAlert2:'; + +/** + * Capitalize the first letter of a string + * + * @param {string} str + * @returns {string} + */ +const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + +/** + * Standardize console warnings + * + * @param {string | string[]} message + */ +const warn = message => { + console.warn(`${consolePrefix} ${typeof message === 'object' ? message.join(' ') : message}`); +}; + +/** + * Standardize console errors + * + * @param {string} message + */ +const error = message => { + console.error(`${consolePrefix} ${message}`); +}; + +/** + * Private global state for `warnOnce` + * + * @type {string[]} + * @private + */ +const previousWarnOnceMessages = []; + +/** + * Show a console warning, but only if it hasn't already been shown + * + * @param {string} message + */ +const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } +}; + +/** + * Show a one-time console warning about deprecated params/methods + * + * @param {string} deprecatedParam + * @param {string?} useInstead + */ +const warnAboutDeprecation = function (deprecatedParam) { + let useInstead = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + warnOnce(`"${deprecatedParam}" is deprecated and will be removed in the next major release.${useInstead ? ` Use "${useInstead}" instead.` : ''}`); +}; + +/** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * + * @param {Function | any} arg + * @returns {any} + */ +const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + +/** + * @param {any} arg + * @returns {boolean} + */ +const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + +/** + * @param {any} arg + * @returns {Promise<any>} + */ +const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + +/** + * @param {any} arg + * @returns {boolean} + */ +const isPromise = arg => arg && Promise.resolve(arg) === arg; + +/** + * Gets the popup container which contains the backdrop and the popup itself. + * + * @returns {HTMLElement | null} + */ +const getContainer = () => document.body.querySelector(`.${swalClasses.container}`); + +/** + * @param {string} selectorString + * @returns {HTMLElement | null} + */ +const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; +}; + +/** + * @param {string} className + * @returns {HTMLElement | null} + */ +const elementByClass = className => { + return elementBySelector(`.${className}`); +}; + +/** + * @returns {HTMLElement | null} + */ +const getPopup = () => elementByClass(swalClasses.popup); + +/** + * @returns {HTMLElement | null} + */ +const getIcon = () => elementByClass(swalClasses.icon); + +/** + * @returns {HTMLElement | null} + */ +const getIconContent = () => elementByClass(swalClasses['icon-content']); + +/** + * @returns {HTMLElement | null} + */ +const getTitle = () => elementByClass(swalClasses.title); + +/** + * @returns {HTMLElement | null} + */ +const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + +/** + * @returns {HTMLElement | null} + */ +const getImage = () => elementByClass(swalClasses.image); + +/** + * @returns {HTMLElement | null} + */ +const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + +/** + * @returns {HTMLElement | null} + */ +const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + +/** + * @returns {HTMLButtonElement | null} + */ +const getConfirmButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.confirm}`)); + +/** + * @returns {HTMLButtonElement | null} + */ +const getCancelButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.cancel}`)); + +/** + * @returns {HTMLButtonElement | null} + */ +const getDenyButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.deny}`)); + +/** + * @returns {HTMLElement | null} + */ +const getInputLabel = () => elementByClass(swalClasses['input-label']); + +/** + * @returns {HTMLElement | null} + */ +const getLoader = () => elementBySelector(`.${swalClasses.loader}`); + +/** + * @returns {HTMLElement | null} + */ +const getActions = () => elementByClass(swalClasses.actions); + +/** + * @returns {HTMLElement | null} + */ +const getFooter = () => elementByClass(swalClasses.footer); + +/** + * @returns {HTMLElement | null} + */ +const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + +/** + * @returns {HTMLElement | null} + */ +const getCloseButton = () => elementByClass(swalClasses.close); + +// https://github.com/jkup/focusable/blob/master/index.js +const focusable = ` + a[href], + area[href], + input:not([disabled]), + select:not([disabled]), + textarea:not([disabled]), + button:not([disabled]), + iframe, + object, + embed, + [tabindex="0"], + [contenteditable], + audio[controls], + video[controls], + summary +`; +/** + * @returns {HTMLElement[]} + */ +const getFocusableElements = () => { + const popup = getPopup(); + if (!popup) { + return []; + } + /** @type {NodeListOf<HTMLElement>} */ + const focusableElementsWithTabindex = popup.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'); + const focusableElementsWithTabindexSorted = Array.from(focusableElementsWithTabindex) + // sort according to tabindex + .sort((a, b) => { + const tabindexA = parseInt(a.getAttribute('tabindex') || '0'); + const tabindexB = parseInt(b.getAttribute('tabindex') || '0'); + if (tabindexA > tabindexB) { + return 1; + } else if (tabindexA < tabindexB) { + return -1; + } + return 0; + }); + + /** @type {NodeListOf<HTMLElement>} */ + const otherFocusableElements = popup.querySelectorAll(focusable); + const otherFocusableElementsFiltered = Array.from(otherFocusableElements).filter(el => el.getAttribute('tabindex') !== '-1'); + return [...new Set(focusableElementsWithTabindexSorted.concat(otherFocusableElementsFiltered))].filter(el => isVisible$1(el)); +}; + +/** + * @returns {boolean} + */ +const isModal = () => { + return hasClass(document.body, swalClasses.shown) && !hasClass(document.body, swalClasses['toast-shown']) && !hasClass(document.body, swalClasses['no-backdrop']); +}; + +/** + * @returns {boolean} + */ +const isToast = () => { + const popup = getPopup(); + if (!popup) { + return false; + } + return hasClass(popup, swalClasses.toast); +}; + +/** + * @returns {boolean} + */ +const isLoading = () => { + const popup = getPopup(); + if (!popup) { + return false; + } + return popup.hasAttribute('data-loading'); +}; + +/** + * Securely set innerHTML of an element + * https://github.com/sweetalert2/sweetalert2/issues/1926 + * + * @param {HTMLElement} elem + * @param {string} html + */ +const setInnerHtml = (elem, html) => { + elem.textContent = ''; + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, `text/html`); + const head = parsed.querySelector('head'); + if (head) { + Array.from(head.childNodes).forEach(child => { + elem.appendChild(child); + }); + } + const body = parsed.querySelector('body'); + if (body) { + Array.from(body.childNodes).forEach(child => { + if (child instanceof HTMLVideoElement || child instanceof HTMLAudioElement) { + elem.appendChild(child.cloneNode(true)); // https://github.com/sweetalert2/sweetalert2/issues/2507 + } else { + elem.appendChild(child); + } + }); + } + } +}; + +/** + * @param {HTMLElement} elem + * @param {string} className + * @returns {boolean} + */ +const hasClass = (elem, className) => { + if (!className) { + return false; + } + const classList = className.split(/\s+/); + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + return true; +}; + +/** + * @param {HTMLElement} elem + * @param {SweetAlertOptions} params + */ +const removeCustomClasses = (elem, params) => { + Array.from(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass || {}).includes(className)) { + elem.classList.remove(className); + } + }); +}; + +/** + * @param {HTMLElement} elem + * @param {SweetAlertOptions} params + * @param {string} className + */ +const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + if (!params.customClass) { + return; + } + const customClass = params.customClass[(/** @type {keyof SweetAlertCustomClass} */className)]; + if (!customClass) { + return; + } + if (typeof customClass !== 'string' && !customClass.forEach) { + warn(`Invalid type of customClass.${className}! Expected string or iterable object, got "${typeof customClass}"`); + return; + } + addClass(elem, customClass); +}; + +/** + * @param {HTMLElement} popup + * @param {import('./renderers/renderInput').InputClass | SweetAlertInput} inputClass + * @returns {HTMLInputElement | null} + */ +const getInput$1 = (popup, inputClass) => { + if (!inputClass) { + return null; + } + switch (inputClass) { + case 'select': + case 'textarea': + case 'file': + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses[inputClass]}`); + case 'checkbox': + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses.checkbox} input`); + case 'radio': + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses.radio} input:checked`) || popup.querySelector(`.${swalClasses.popup} > .${swalClasses.radio} input:first-child`); + case 'range': + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses.range} input`); + default: + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses.input}`); + } +}; + +/** + * @param {HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement} input + */ +const focusInput = input => { + input.focus(); + + // place cursor at end of text in text input + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } +}; + +/** + * @param {HTMLElement | HTMLElement[] | null} target + * @param {string | string[] | readonly string[] | undefined} classList + * @param {boolean} condition + */ +const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + classList.forEach(className => { + if (Array.isArray(target)) { + target.forEach(elem => { + if (condition) { + elem.classList.add(className); + } else { + elem.classList.remove(className); + } + }); + } else { + if (condition) { + target.classList.add(className); + } else { + target.classList.remove(className); + } + } + }); +}; + +/** + * @param {HTMLElement | HTMLElement[] | null} target + * @param {string | string[] | readonly string[] | undefined} classList + */ +const addClass = (target, classList) => { + toggleClass(target, classList, true); +}; + +/** + * @param {HTMLElement | HTMLElement[] | null} target + * @param {string | string[] | readonly string[] | undefined} classList + */ +const removeClass = (target, classList) => { + toggleClass(target, classList, false); +}; + +/** + * Get direct child of an element by class name + * + * @param {HTMLElement} elem + * @param {string} className + * @returns {HTMLElement | undefined} + */ +const getDirectChildByClass = (elem, className) => { + const children = Array.from(elem.children); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child instanceof HTMLElement && hasClass(child, className)) { + return child; + } + } +}; + +/** + * @param {HTMLElement} elem + * @param {string} property + * @param {*} value + */ +const applyNumericalStyle = (elem, property, value) => { + if (value === `${parseInt(value)}`) { + value = parseInt(value); + } + if (value || parseInt(value) === 0) { + elem.style.setProperty(property, typeof value === 'number' ? `${value}px` : value); + } else { + elem.style.removeProperty(property); + } +}; + +/** + * @param {HTMLElement | null} elem + * @param {string} display + */ +const show = function (elem) { + let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex'; + if (!elem) { + return; + } + elem.style.display = display; +}; + +/** + * @param {HTMLElement | null} elem + */ +const hide = elem => { + if (!elem) { + return; + } + elem.style.display = 'none'; +}; + +/** + * @param {HTMLElement | null} elem + * @param {string} display + */ +const showWhenInnerHtmlPresent = function (elem) { + let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'block'; + if (!elem) { + return; + } + new MutationObserver(() => { + toggle(elem, elem.innerHTML, display); + }).observe(elem, { + childList: true, + subtree: true + }); +}; + +/** + * @param {HTMLElement} parent + * @param {string} selector + * @param {string} property + * @param {string} value + */ +const setStyle = (parent, selector, property, value) => { + /** @type {HTMLElement | null} */ + const el = parent.querySelector(selector); + if (el) { + el.style.setProperty(property, value); + } +}; + +/** + * @param {HTMLElement} elem + * @param {any} condition + * @param {string} display + */ +const toggle = function (elem, condition) { + let display = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'flex'; + if (condition) { + show(elem, display); + } else { + hide(elem); + } +}; + +/** + * borrowed from jquery $(elem).is(':visible') implementation + * + * @param {HTMLElement | null} elem + * @returns {boolean} + */ +const isVisible$1 = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + +/** + * @returns {boolean} + */ +const allButtonsAreHidden = () => !isVisible$1(getConfirmButton()) && !isVisible$1(getDenyButton()) && !isVisible$1(getCancelButton()); + +/** + * @param {HTMLElement} elem + * @returns {boolean} + */ +const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); + +/** + * borrowed from https://stackoverflow.com/a/46352119 + * + * @param {HTMLElement} elem + * @returns {boolean} + */ +const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; +}; + +/** + * @param {number} timer + * @param {boolean} reset + */ +const animateTimerProgressBar = function (timer) { + let reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + const timerProgressBar = getTimerProgressBar(); + if (!timerProgressBar) { + return; + } + if (isVisible$1(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + setTimeout(() => { + timerProgressBar.style.transition = `width ${timer / 1000}s linear`; + timerProgressBar.style.width = '0%'; + }, 10); + } +}; +const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + if (!timerProgressBar) { + return; + } + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = timerProgressBarWidth / timerProgressBarFullWidth * 100; + timerProgressBar.style.width = `${timerProgressBarPercent}%`; +}; + +/** + * Detect Node env + * + * @returns {boolean} + */ +const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + +const sweetHTML = ` + <div aria-labelledby="${swalClasses.title}" aria-describedby="${swalClasses['html-container']}" class="${swalClasses.popup}" tabindex="-1"> + <button type="button" class="${swalClasses.close}"></button> + <ul class="${swalClasses['progress-steps']}"></ul> + <div class="${swalClasses.icon}"></div> + <img class="${swalClasses.image}" /> + <h2 class="${swalClasses.title}" id="${swalClasses.title}"></h2> + <div class="${swalClasses['html-container']}" id="${swalClasses['html-container']}"></div> + <input class="${swalClasses.input}" id="${swalClasses.input}" /> + <input type="file" class="${swalClasses.file}" /> + <div class="${swalClasses.range}"> + <input type="range" /> + <output></output> + </div> + <select class="${swalClasses.select}" id="${swalClasses.select}"></select> + <div class="${swalClasses.radio}"></div> + <label class="${swalClasses.checkbox}"> + <input type="checkbox" id="${swalClasses.checkbox}" /> + <span class="${swalClasses.label}"></span> + </label> + <textarea class="${swalClasses.textarea}" id="${swalClasses.textarea}"></textarea> + <div class="${swalClasses['validation-message']}" id="${swalClasses['validation-message']}"></div> + <div class="${swalClasses.actions}"> + <div class="${swalClasses.loader}"></div> + <button type="button" class="${swalClasses.confirm}"></button> + <button type="button" class="${swalClasses.deny}"></button> + <button type="button" class="${swalClasses.cancel}"></button> + </div> + <div class="${swalClasses.footer}"></div> + <div class="${swalClasses['timer-progress-bar-container']}"> + <div class="${swalClasses['timer-progress-bar']}"></div> + </div> + </div> +`.replace(/(^|\n)\s*/g, ''); + +/** + * @returns {boolean} + */ +const resetOldContainer = () => { + const oldContainer = getContainer(); + if (!oldContainer) { + return false; + } + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; +}; +const resetValidationMessage$1 = () => { + globalState.currentInstance.resetValidationMessage(); +}; +const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getDirectChildByClass(popup, swalClasses.input); + const file = getDirectChildByClass(popup, swalClasses.file); + /** @type {HTMLInputElement} */ + const range = popup.querySelector(`.${swalClasses.range} input`); + /** @type {HTMLOutputElement} */ + const rangeOutput = popup.querySelector(`.${swalClasses.range} output`); + const select = getDirectChildByClass(popup, swalClasses.select); + /** @type {HTMLInputElement} */ + const checkbox = popup.querySelector(`.${swalClasses.checkbox} input`); + const textarea = getDirectChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage$1; + file.onchange = resetValidationMessage$1; + select.onchange = resetValidationMessage$1; + checkbox.onchange = resetValidationMessage$1; + textarea.oninput = resetValidationMessage$1; + range.oninput = () => { + resetValidationMessage$1(); + rangeOutput.value = range.value; + }; + range.onchange = () => { + resetValidationMessage$1(); + rangeOutput.value = range.value; + }; +}; + +/** + * @param {string | HTMLElement} target + * @returns {HTMLElement} + */ +const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + +/** + * @param {SweetAlertOptions} params + */ +const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } +}; + +/** + * @param {HTMLElement} targetElement + */ +const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } +}; + +/** + * Add modal + backdrop + no-war message for Russians to DOM + * + * @param {SweetAlertOptions} params + */ +const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + const container = document.createElement('div'); + container.className = swalClasses.container; + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); +}; + +/** + * @param {HTMLElement | object | string} param + * @param {HTMLElement} target + */ +const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); + } + + // Object + else if (typeof param === 'object') { + handleObject(param, target); + } + + // Plain string + else if (param) { + setInnerHtml(target, param); + } +}; + +/** + * @param {any} param + * @param {HTMLElement} target + */ +const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); + } + + // For other objects use their string representation + else { + setInnerHtml(target, param.toString()); + } +}; + +/** + * @param {HTMLElement} target + * @param {any} elem + */ +const handleJqueryElem = (target, elem) => { + target.textContent = ''; + if (0 in elem) { + for (let i = 0; i in elem; i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + if (!actions || !loader) { + return; + } + + // Actions (buttons) wrapper + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } + + // Custom class + applyCustomClass(actions, params, 'actions'); + + // Render all the buttons + renderButtons(actions, loader, params); + + // Loader + setInnerHtml(loader, params.loaderHtml || ''); + applyCustomClass(loader, params, 'loader'); +}; + +/** + * @param {HTMLElement} actions + * @param {HTMLElement} loader + * @param {SweetAlertOptions} params + */ +function renderButtons(actions, loader, params) { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + if (!confirmButton || !denyButton || !cancelButton) { + return; + } + + // Render buttons + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + if (params.reverseButtons) { + if (params.toast) { + actions.insertBefore(cancelButton, confirmButton); + actions.insertBefore(denyButton, confirmButton); + } else { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } + } +} + +/** + * @param {HTMLElement} confirmButton + * @param {HTMLElement} denyButton + * @param {HTMLElement} cancelButton + * @param {SweetAlertOptions} params + */ +function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + return; + } + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + + // Buttons background colors + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } +} + +/** + * @param {HTMLElement} button + * @param {'confirm' | 'deny' | 'cancel'} buttonType + * @param {SweetAlertOptions} params + */ +function renderButton(button, buttonType, params) { + const buttonName = /** @type {'Confirm' | 'Deny' | 'Cancel'} */capitalizeFirstLetter(buttonType); + toggle(button, params[`show${buttonName}Button`], 'inline-block'); + setInnerHtml(button, params[`${buttonType}ButtonText`] || ''); // Set caption text + button.setAttribute('aria-label', params[`${buttonType}ButtonAriaLabel`] || ''); // ARIA label + + // Add buttons custom classes + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, `${buttonType}Button`); +} + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + if (!closeButton) { + return; + } + setInnerHtml(closeButton, params.closeButtonHtml || ''); + + // Custom class + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel || ''); +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderContainer = (instance, params) => { + const container = getContainer(); + if (!container) { + return; + } + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); + + // Custom class + applyCustomClass(container, params, 'container'); +}; + +/** + * @param {HTMLElement} container + * @param {SweetAlertOptions['backdrop']} backdrop + */ +function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } +} + +/** + * @param {HTMLElement} container + * @param {SweetAlertOptions['position']} position + */ +function handlePositionParam(container, position) { + if (!position) { + return; + } + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } +} + +/** + * @param {HTMLElement} container + * @param {SweetAlertOptions['grow']} grow + */ +function handleGrowParam(container, grow) { + if (!grow) { + return; + } + addClass(container, swalClasses[`grow-${grow}`]); +} + +/** + * This module contains `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + +var privateProps = { + innerParams: new WeakMap(), + domCache: new WeakMap() +}; + +/// <reference path="../../../../sweetalert2.d.ts"/> + + +/** @type {InputClass[]} */ +const inputClasses = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderInput = (instance, params) => { + const popup = getPopup(); + if (!popup) { + return; + } + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputClasses.forEach(inputClass => { + const inputContainer = getDirectChildByClass(popup, swalClasses[inputClass]); + if (!inputContainer) { + return; + } + + // set attributes + setAttributes(inputClass, params.inputAttributes); + + // set class + inputContainer.className = swalClasses[inputClass]; + if (rerender) { + hide(inputContainer); + } + }); + if (params.input) { + if (rerender) { + showInput(params); + } + // set custom class + setCustomClass(params); + } +}; + +/** + * @param {SweetAlertOptions} params + */ +const showInput = params => { + if (!params.input) { + return; + } + if (!renderInputType[params.input]) { + error(`Unexpected type of input! Expected ${Object.keys(renderInputType).join(' | ')}, got "${params.input}"`); + return; + } + const inputContainer = getInputContainer(params.input); + if (!inputContainer) { + return; + } + const input = renderInputType[params.input](inputContainer, params); + show(inputContainer); + + // input autofocus + if (params.inputAutoFocus) { + setTimeout(() => { + focusInput(input); + }); + } +}; + +/** + * @param {HTMLInputElement} input + */ +const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + if (!['id', 'type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } +}; + +/** + * @param {InputClass} inputClass + * @param {SweetAlertOptions['inputAttributes']} inputAttributes + */ +const setAttributes = (inputClass, inputAttributes) => { + const popup = getPopup(); + if (!popup) { + return; + } + const input = getInput$1(popup, inputClass); + if (!input) { + return; + } + removeAttributes(input); + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } +}; + +/** + * @param {SweetAlertOptions} params + */ +const setCustomClass = params => { + if (!params.input) { + return; + } + const inputContainer = getInputContainer(params.input); + if (inputContainer) { + applyCustomClass(inputContainer, params, 'input'); + } +}; + +/** + * @param {HTMLInputElement | HTMLTextAreaElement} input + * @param {SweetAlertOptions} params + */ +const setInputPlaceholder = (input, params) => { + if (!input.placeholder && params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } +}; + +/** + * @param {Input} input + * @param {Input} prependTo + * @param {SweetAlertOptions} params + */ +const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + if (typeof params.customClass === 'object') { + addClass(label, params.customClass.inputLabel); + } + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } +}; + +/** + * @param {SweetAlertInput} inputType + * @returns {HTMLElement | undefined} + */ +const getInputContainer = inputType => { + const popup = getPopup(); + if (!popup) { + return; + } + return getDirectChildByClass(popup, swalClasses[(/** @type {SwalClass} */inputType)] || swalClasses.input); +}; + +/** + * @param {HTMLInputElement | HTMLOutputElement | HTMLTextAreaElement} input + * @param {SweetAlertOptions['inputValue']} inputValue + */ +const checkAndSetInputValue = (input, inputValue) => { + if (['string', 'number'].includes(typeof inputValue)) { + input.value = `${inputValue}`; + } else if (!isPromise(inputValue)) { + warn(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof inputValue}"`); + } +}; + +/** @type {Record<SweetAlertInput, (input: Input | HTMLElement, params: SweetAlertOptions) => Input>} */ +const renderInputType = {}; + +/** + * @param {HTMLInputElement} input + * @param {SweetAlertOptions} params + * @returns {HTMLInputElement} + */ +renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = renderInputType.search = renderInputType.date = renderInputType['datetime-local'] = renderInputType.time = renderInputType.week = renderInputType.month = /** @type {(input: Input | HTMLElement, params: SweetAlertOptions) => Input} */ +(input, params) => { + checkAndSetInputValue(input, params.inputValue); + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; +}; + +/** + * @param {HTMLInputElement} input + * @param {SweetAlertOptions} params + * @returns {HTMLInputElement} + */ +renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; +}; + +/** + * @param {HTMLInputElement} range + * @param {SweetAlertOptions} params + * @returns {HTMLInputElement} + */ +renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + checkAndSetInputValue(rangeInput, params.inputValue); + rangeInput.type = params.input; + checkAndSetInputValue(rangeOutput, params.inputValue); + setInputLabel(rangeInput, range, params); + return range; +}; + +/** + * @param {HTMLSelectElement} select + * @param {SweetAlertOptions} params + * @returns {HTMLSelectElement} + */ +renderInputType.select = (select, params) => { + select.textContent = ''; + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + setInputLabel(select, select, params); + return select; +}; + +/** + * @param {HTMLInputElement} radio + * @returns {HTMLInputElement} + */ +renderInputType.radio = radio => { + radio.textContent = ''; + return radio; +}; + +/** + * @param {HTMLLabelElement} checkboxContainer + * @param {SweetAlertOptions} params + * @returns {HTMLInputElement} + */ +renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput$1(getPopup(), 'checkbox'); + checkbox.value = '1'; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder || params.inputLabel); + return checkbox; +}; + +/** + * @param {HTMLTextAreaElement} textarea + * @param {SweetAlertOptions} params + * @returns {HTMLTextAreaElement} + */ +renderInputType.textarea = (textarea, params) => { + checkAndSetInputValue(textarea, params.inputValue); + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + /** + * @param {HTMLElement} el + * @returns {number} + */ + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + // https://github.com/sweetalert2/sweetalert2/issues/2291 + setTimeout(() => { + // https://github.com/sweetalert2/sweetalert2/issues/1699 + if ('MutationObserver' in window) { + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + const textareaResizeHandler = () => { + // check if texarea is still in document (i.e. popup wasn't closed in the meantime) + if (!document.body.contains(textarea)) { + return; + } + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = `${textareaWidth}px`; + } else { + applyNumericalStyle(getPopup(), 'width', params.width); + } + }; + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + if (!htmlContainer) { + return; + } + showWhenInnerHtmlPresent(htmlContainer); + applyCustomClass(htmlContainer, params, 'htmlContainer'); + + // Content as HTML + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); + } + + // Content as plain text + else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); + } + + // No content + else { + hide(htmlContainer); + } + renderInput(instance, params); +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderFooter = (instance, params) => { + const footer = getFooter(); + if (!footer) { + return; + } + showWhenInnerHtmlPresent(footer); + toggle(footer, params.footer, 'block'); + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } + + // Custom class + applyCustomClass(footer, params, 'footer'); +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); + if (!icon) { + return; + } + + // if the given icon already rendered, apply the styling without re-rendering the icon + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + if (!params.icon && !params.iconHtml) { + hide(icon); + return; + } + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${params.icon}"`); + hide(icon); + return; + } + show(icon); + + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + + // Animate icon + addClass(icon, params.showClass && params.showClass.icon); +}; + +/** + * @param {HTMLElement} icon + * @param {SweetAlertOptions} params + */ +const applyStyles = (icon, params) => { + for (const [iconType, iconClassName] of Object.entries(iconTypes)) { + if (params.icon !== iconType) { + removeClass(icon, iconClassName); + } + } + addClass(icon, params.icon && iconTypes[params.icon]); + + // Icon color + setColor(icon, params); + + // Success icon background color + adjustSuccessIconBackgroundColor(); + + // Custom class + applyCustomClass(icon, params, 'icon'); +}; + +// Adjust success icon background color to match the popup background color +const adjustSuccessIconBackgroundColor = () => { + const popup = getPopup(); + if (!popup) { + return; + } + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + /** @type {NodeListOf<HTMLElement>} */ + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } +}; +const successIconHtml = ` + <div class="swal2-success-circular-line-left"></div> + <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span> + <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div> + <div class="swal2-success-circular-line-right"></div> +`; +const errorIconHtml = ` + <span class="swal2-x-mark"> + <span class="swal2-x-mark-line-left"></span> + <span class="swal2-x-mark-line-right"></span> + </span> +`; + +/** + * @param {HTMLElement} icon + * @param {SweetAlertOptions} params + */ +const setContent = (icon, params) => { + if (!params.icon && !params.iconHtml) { + return; + } + let oldContent = icon.innerHTML; + let newContent = ''; + if (params.iconHtml) { + newContent = iconContent(params.iconHtml); + } else if (params.icon === 'success') { + newContent = successIconHtml; + oldContent = oldContent.replace(/ style=".*?"/g, ''); // undo adjustSuccessIconBackgroundColor() + } else if (params.icon === 'error') { + newContent = errorIconHtml; + } else if (params.icon) { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + newContent = iconContent(defaultIconHtml[params.icon]); + } + if (oldContent.trim() !== newContent.trim()) { + setInnerHtml(icon, newContent); + } +}; + +/** + * @param {HTMLElement} icon + * @param {SweetAlertOptions} params + */ +const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'background-color', params.iconColor); + } + setStyle(icon, '.swal2-success-ring', 'border-color', params.iconColor); +}; + +/** + * @param {string} content + * @returns {string} + */ +const iconContent = content => `<div class="${swalClasses['icon-content']}">${content}</div>`; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderImage = (instance, params) => { + const image = getImage(); + if (!image) { + return; + } + if (!params.imageUrl) { + hide(image); + return; + } + show(image, ''); + + // Src, alt + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt || ''); + + // Width, height + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); + + // Class + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); +}; + +let dragging = false; +let mousedownX = 0; +let mousedownY = 0; +let initialX = 0; +let initialY = 0; + +/** + * @param {HTMLElement} popup + */ +const addDraggableListeners = popup => { + popup.addEventListener('mousedown', down); + document.body.addEventListener('mousemove', move); + popup.addEventListener('mouseup', up); + popup.addEventListener('touchstart', down); + document.body.addEventListener('touchmove', move); + popup.addEventListener('touchend', up); +}; + +/** + * @param {HTMLElement} popup + */ +const removeDraggableListeners = popup => { + popup.removeEventListener('mousedown', down); + document.body.removeEventListener('mousemove', move); + popup.removeEventListener('mouseup', up); + popup.removeEventListener('touchstart', down); + document.body.removeEventListener('touchmove', move); + popup.removeEventListener('touchend', up); +}; + +/** + * @param {MouseEvent | TouchEvent} event + */ +const down = event => { + const popup = getPopup(); + if (event.target === popup || getIcon().contains(/** @type {HTMLElement} */event.target)) { + dragging = true; + const clientXY = getClientXY(event); + mousedownX = clientXY.clientX; + mousedownY = clientXY.clientY; + initialX = parseInt(popup.style.insetInlineStart) || 0; + initialY = parseInt(popup.style.insetBlockStart) || 0; + addClass(popup, 'swal2-dragging'); + } +}; + +/** + * @param {MouseEvent | TouchEvent} event + */ +const move = event => { + const popup = getPopup(); + if (dragging) { + let { + clientX, + clientY + } = getClientXY(event); + popup.style.insetInlineStart = `${initialX + (clientX - mousedownX)}px`; + popup.style.insetBlockStart = `${initialY + (clientY - mousedownY)}px`; + } +}; +const up = () => { + const popup = getPopup(); + dragging = false; + removeClass(popup, 'swal2-dragging'); +}; + +/** + * @param {MouseEvent | TouchEvent} event + * @returns {{ clientX: number, clientY: number }} + */ +const getClientXY = event => { + let clientX = 0, + clientY = 0; + if (event.type.startsWith('mouse')) { + clientX = /** @type {MouseEvent} */event.clientX; + clientY = /** @type {MouseEvent} */event.clientY; + } else if (event.type.startsWith('touch')) { + clientX = /** @type {TouchEvent} */event.touches[0].clientX; + clientY = /** @type {TouchEvent} */event.touches[0].clientY; + } + return { + clientX, + clientY + }; +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); + if (!container || !popup) { + return; + } + + // Width + // https://github.com/sweetalert2/sweetalert2/issues/2170 + if (params.toast) { + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + const loader = getLoader(); + if (loader) { + popup.insertBefore(loader, getIcon()); + } + } else { + applyNumericalStyle(popup, 'width', params.width); + } + + // Padding + applyNumericalStyle(popup, 'padding', params.padding); + + // Color + if (params.color) { + popup.style.color = params.color; + } + + // Background + if (params.background) { + popup.style.background = params.background; + } + hide(getValidationMessage()); + + // Classes + addClasses$1(popup, params); + if (params.draggable && !params.toast) { + addClass(popup, swalClasses.draggable); + addDraggableListeners(popup); + } else { + removeClass(popup, swalClasses.draggable); + removeDraggableListeners(popup); + } +}; + +/** + * @param {HTMLElement} popup + * @param {SweetAlertOptions} params + */ +const addClasses$1 = (popup, params) => { + const showClass = params.showClass || {}; + // Default Class + showClass when updating Swal.update({}) + popup.className = `${swalClasses.popup} ${isVisible$1(popup) ? showClass.popup : ''}`; + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } + + // Custom class + applyCustomClass(popup, params, 'popup'); + // TODO: remove in the next major + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } + + // Icon class (#1842) + if (params.icon) { + addClass(popup, swalClasses[`icon-${params.icon}`]); + } +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + if (!progressStepsContainer) { + return; + } + const { + progressSteps, + currentProgressStep + } = params; + if (!progressSteps || progressSteps.length === 0 || currentProgressStep === undefined) { + hide(progressStepsContainer); + return; + } + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + if (currentProgressStep >= progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + if (index === currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + if (index !== progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); +}; + +/** + * @param {string} step + * @returns {HTMLLIElement} + */ +const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; +}; + +/** + * @param {SweetAlertOptions} params + * @returns {HTMLLIElement} + */ +const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + if (params.progressStepsDistance) { + applyNumericalStyle(lineEl, 'width', params.progressStepsDistance); + } + return lineEl; +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const renderTitle = (instance, params) => { + const title = getTitle(); + if (!title) { + return; + } + showWhenInnerHtmlPresent(title); + toggle(title, params.title || params.titleText, 'block'); + if (params.title) { + parseHtmlToContainer(params.title, title); + } + if (params.titleText) { + title.innerText = params.titleText; + } + + // Custom class + applyCustomClass(title, params, 'title'); +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + const popup = getPopup(); + if (typeof params.didRender === 'function' && popup) { + params.didRender(popup); + } + globalState.eventEmitter.emit('didRender', popup); +}; + +/* + * Global function to determine if SweetAlert2 popup is shown + */ +const isVisible = () => { + return isVisible$1(getPopup()); +}; + +/* + * Global function to click 'Confirm' button + */ +const clickConfirm = () => { + var _dom$getConfirmButton; + return (_dom$getConfirmButton = getConfirmButton()) === null || _dom$getConfirmButton === void 0 ? void 0 : _dom$getConfirmButton.click(); +}; + +/* + * Global function to click 'Deny' button + */ +const clickDeny = () => { + var _dom$getDenyButton; + return (_dom$getDenyButton = getDenyButton()) === null || _dom$getDenyButton === void 0 ? void 0 : _dom$getDenyButton.click(); +}; + +/* + * Global function to click 'Cancel' button + */ +const clickCancel = () => { + var _dom$getCancelButton; + return (_dom$getCancelButton = getCancelButton()) === null || _dom$getCancelButton === void 0 ? void 0 : _dom$getCancelButton.click(); +}; + +/** @typedef {'cancel' | 'backdrop' | 'close' | 'esc' | 'timer'} DismissReason */ + +/** @type {Record<DismissReason, DismissReason>} */ +const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' +}); + +/** + * @param {GlobalState} globalState + */ +const removeKeydownHandler = globalState => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } +}; + +/** + * @param {GlobalState} globalState + * @param {SweetAlertOptions} innerParams + * @param {*} dismissWith + */ +const addKeydownHandler = (globalState, innerParams, dismissWith) => { + removeKeydownHandler(globalState); + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(innerParams, e, dismissWith); + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } +}; + +/** + * @param {number} index + * @param {number} increment + */ +const setFocus = (index, increment) => { + var _dom$getPopup; + const focusableElements = getFocusableElements(); + // search for visible elements and select the next possible match + if (focusableElements.length) { + index = index + increment; + + // rollover to first item + if (index === focusableElements.length) { + index = 0; + + // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + focusableElements[index].focus(); + return; + } + // no visible focusable elements, focus the popup + (_dom$getPopup = getPopup()) === null || _dom$getPopup === void 0 || _dom$getPopup.focus(); +}; +const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; +const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + +/** + * @param {SweetAlertOptions} innerParams + * @param {KeyboardEvent} event + * @param {Function} dismissWith + */ +const keydownHandler = (innerParams, event, dismissWith) => { + if (!innerParams) { + return; // This instance has already been destroyed + } + + // Ignore keydown during IME composition + // https://developer.mozilla.org/en-US/docs/Web/API/Document/keydown_event#ignoring_keydown_during_ime_composition + // https://github.com/sweetalert2/sweetalert2/issues/720 + // https://github.com/sweetalert2/sweetalert2/issues/2406 + if (event.isComposing || event.keyCode === 229) { + return; + } + if (innerParams.stopKeydownPropagation) { + event.stopPropagation(); + } + + // ENTER + if (event.key === 'Enter') { + handleEnter(event, innerParams); + } + + // TAB + else if (event.key === 'Tab') { + handleTab(event); + } + + // ARROWS - switch focus between buttons + else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(event.key)) { + handleArrows(event.key); + } + + // ESC + else if (event.key === 'Escape') { + handleEsc(event, innerParams, dismissWith); + } +}; + +/** + * @param {KeyboardEvent} event + * @param {SweetAlertOptions} innerParams + */ +const handleEnter = (event, innerParams) => { + // https://github.com/sweetalert2/sweetalert2/issues/2386 + if (!callIfFunction(innerParams.allowEnterKey)) { + return; + } + const input = getInput$1(getPopup(), innerParams.input); + if (event.target && input && event.target instanceof HTMLElement && event.target.outerHTML === input.outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + clickConfirm(); + event.preventDefault(); + } +}; + +/** + * @param {KeyboardEvent} event + */ +const handleTab = event => { + const targetElement = event.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + // Cycle to the next button + if (!event.shiftKey) { + setFocus(btnIndex, 1); + } + + // Cycle to the prev button + else { + setFocus(btnIndex, -1); + } + event.stopPropagation(); + event.preventDefault(); +}; + +/** + * @param {string} key + */ +const handleArrows = key => { + const actions = getActions(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + if (!actions || !confirmButton || !denyButton || !cancelButton) { + return; + } + /** @type HTMLElement[] */ + const buttons = [confirmButton, denyButton, cancelButton]; + if (document.activeElement instanceof HTMLElement && !buttons.includes(document.activeElement)) { + return; + } + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + let buttonToFocus = document.activeElement; + if (!buttonToFocus) { + return; + } + for (let i = 0; i < actions.children.length; i++) { + buttonToFocus = buttonToFocus[sibling]; + if (!buttonToFocus) { + return; + } + if (buttonToFocus instanceof HTMLButtonElement && isVisible$1(buttonToFocus)) { + break; + } + } + if (buttonToFocus instanceof HTMLButtonElement) { + buttonToFocus.focus(); + } +}; + +/** + * @param {KeyboardEvent} event + * @param {SweetAlertOptions} innerParams + * @param {Function} dismissWith + */ +const handleEsc = (event, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + event.preventDefault(); + dismissWith(DismissReason.esc); + } +}; + +/** + * This module contains `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + +var privateMethods = { + swalPromiseResolve: new WeakMap(), + swalPromiseReject: new WeakMap() +}; + +// From https://developer.paciellogroup.com/blog/2018/06/the-current-state-of-modal-dialog-accessibility/ +// Adding aria-hidden="true" to elements outside of the active modal dialog ensures that +// elements not within the active modal dialog will not be surfaced if a user opens a screen +// reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + +const setAriaHidden = () => { + const container = getContainer(); + const bodyChildren = Array.from(document.body.children); + bodyChildren.forEach(el => { + if (el.contains(container)) { + return; + } + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden') || ''); + } + el.setAttribute('aria-hidden', 'true'); + }); +}; +const unsetAriaHidden = () => { + const bodyChildren = Array.from(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden') || ''); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); +}; + +// @ts-ignore +const isSafariOrIOS = typeof window !== 'undefined' && !!window.GestureEvent; // true for Safari desktop + all iOS browsers https://stackoverflow.com/a/70585394 + +/** + * Fix iOS scrolling + * http://stackoverflow.com/q/39626302 + */ +const iOSfix = () => { + if (isSafariOrIOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = `${offset * -1}px`; + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + } +}; + +/** + * https://github.com/sweetalert2/sweetalert2/issues/1246 + */ +const lockBodyScroll = () => { + const container = getContainer(); + if (!container) { + return; + } + /** @type {boolean} */ + let preventTouchMove; + /** + * @param {TouchEvent} event + */ + container.ontouchstart = event => { + preventTouchMove = shouldPreventTouchMove(event); + }; + /** + * @param {TouchEvent} event + */ + container.ontouchmove = event => { + if (preventTouchMove) { + event.preventDefault(); + event.stopPropagation(); + } + }; +}; + +/** + * @param {TouchEvent} event + * @returns {boolean} + */ +const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + const htmlContainer = getHtmlContainer(); + if (!container || !htmlContainer) { + return false; + } + if (isStylus(event) || isZoom(event)) { + return false; + } + if (target === container) { + return true; + } + if (!isScrollable(container) && target instanceof HTMLElement && target.tagName !== 'INPUT' && + // #1603 + target.tagName !== 'TEXTAREA' && + // #2266 + !(isScrollable(htmlContainer) && + // #1944 + htmlContainer.contains(target))) { + return true; + } + return false; +}; + +/** + * https://github.com/sweetalert2/sweetalert2/issues/1786 + * + * @param {*} event + * @returns {boolean} + */ +const isStylus = event => { + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; +}; + +/** + * https://github.com/sweetalert2/sweetalert2/issues/1891 + * + * @param {TouchEvent} event + * @returns {boolean} + */ +const isZoom = event => { + return event.touches && event.touches.length > 1; +}; +const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } +}; + +/** + * Measure scrollbar width for padding body during modal show/hide + * https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + * + * @returns {number} + */ +const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; +}; + +/** + * Remember state in cases where opening and handling a modal will fiddle with it. + * @type {number | null} + */ +let previousBodyPadding = null; + +/** + * @param {string} initialBodyOverflow + */ +const replaceScrollbarWithPadding = initialBodyOverflow => { + // for queues, do not do this more than once + if (previousBodyPadding !== null) { + return; + } + // if the body has overflow + if (document.body.scrollHeight > window.innerHeight || initialBodyOverflow === 'scroll' // https://github.com/sweetalert2/sweetalert2/issues/2663 + ) { + // add padding so the content doesn't shift after removal of scrollbar + previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = `${previousBodyPadding + measureScrollbar()}px`; + } +}; +const undoReplaceScrollbarWithPadding = () => { + if (previousBodyPadding !== null) { + document.body.style.paddingRight = `${previousBodyPadding}px`; + previousBodyPadding = null; + } +}; + +/** + * @param {SweetAlert} instance + * @param {HTMLElement} container + * @param {boolean} returnFocus + * @param {Function} didClose + */ +function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + removeKeydownHandler(globalState); + } + + // workaround for https://github.com/sweetalert2/sweetalert2/issues/2088 + // for some reason removing the container in Safari will scroll the document to bottom + if (isSafariOrIOS) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + if (isModal()) { + undoReplaceScrollbarWithPadding(); + undoIOSfix(); + unsetAriaHidden(); + } + removeBodyClasses(); +} + +/** + * Remove SweetAlert2 classes from body + */ +function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); +} + +/** + * Instance method to close sweetAlert + * + * @param {any} resolveValue + */ +function close(resolveValue) { + resolveValue = prepareResolveValue(resolveValue); + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + const didClose = triggerClosePopup(this); + if (this.isAwaitingPromise) { + // A swal awaiting for a promise (after a click on Confirm or Deny) cannot be dismissed anymore #2335 + if (!resolveValue.isDismissed) { + handleAwaitingPromise(this); + swalPromiseResolve(resolveValue); + } + } else if (didClose) { + // Resolve Swal promise + swalPromiseResolve(resolveValue); + } +} +const triggerClosePopup = instance => { + const popup = getPopup(); + if (!popup) { + return false; + } + const innerParams = privateProps.innerParams.get(instance); + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return false; + } + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(instance, popup, innerParams); + return true; +}; + +/** + * @param {any} error + */ +function rejectPromise(error) { + const rejectPromise = privateMethods.swalPromiseReject.get(this); + handleAwaitingPromise(this); + if (rejectPromise) { + // Reject Swal promise + rejectPromise(error); + } +} + +/** + * @param {SweetAlert} instance + */ +const handleAwaitingPromise = instance => { + if (instance.isAwaitingPromise) { + delete instance.isAwaitingPromise; + // The instance might have been previously partly destroyed, we must resume the destroy process in this case #2335 + if (!privateProps.innerParams.get(instance)) { + instance._destroy(); + } + } +}; + +/** + * @param {any} resolveValue + * @returns {SweetAlertResult} + */ +const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); +}; + +/** + * @param {SweetAlert} instance + * @param {HTMLElement} popup + * @param {SweetAlertOptions} innerParams + */ +const handlePopupAnimation = (instance, popup, innerParams) => { + var _globalState$eventEmi; + const container = getContainer(); + // If animation is supported, animate + const animationIsSupported = hasCssAnimation(popup); + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + (_globalState$eventEmi = globalState.eventEmitter) === null || _globalState$eventEmi === void 0 || _globalState$eventEmi.emit('willClose', popup); + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } +}; + +/** + * @param {SweetAlert} instance + * @param {HTMLElement} popup + * @param {HTMLElement} container + * @param {boolean} returnFocus + * @param {Function} didClose + */ +const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + /** + * @param {AnimationEvent | TransitionEvent} e + */ + const swalCloseAnimationFinished = function (e) { + if (e.target === popup) { + var _globalState$swalClos; + (_globalState$swalClos = globalState.swalCloseEventFinishedCallback) === null || _globalState$swalClos === void 0 || _globalState$swalClos.call(globalState); + delete globalState.swalCloseEventFinishedCallback; + popup.removeEventListener('animationend', swalCloseAnimationFinished); + popup.removeEventListener('transitionend', swalCloseAnimationFinished); + } + }; + popup.addEventListener('animationend', swalCloseAnimationFinished); + popup.addEventListener('transitionend', swalCloseAnimationFinished); +}; + +/** + * @param {SweetAlert} instance + * @param {Function} didClose + */ +const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + var _globalState$eventEmi2; + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + (_globalState$eventEmi2 = globalState.eventEmitter) === null || _globalState$eventEmi2 === void 0 || _globalState$eventEmi2.emit('didClose'); + // instance might have been destroyed already + if (instance._destroy) { + instance._destroy(); + } + }); +}; + +/** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + * + * @param {HTMLButtonElement | null} [buttonToReplace] + */ +const showLoading = buttonToReplace => { + let popup = getPopup(); + if (!popup) { + new Swal(); + } + popup = getPopup(); + if (!popup) { + return; + } + const loader = getLoader(); + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + show(loader); + popup.setAttribute('data-loading', 'true'); + popup.setAttribute('aria-busy', 'true'); + popup.focus(); +}; + +/** + * @param {HTMLElement} popup + * @param {HTMLButtonElement | null} [buttonToReplace] + */ +const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + if (!actions || !loader) { + return; + } + if (!buttonToReplace && isVisible$1(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + show(actions); + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + actions.insertBefore(loader, buttonToReplace); + } + addClass([popup, actions], swalClasses.loading); +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].some(i => i === params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} innerParams + * @returns {SweetAlertInputValue} + */ +const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + if (!input) { + return null; + } + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + case 'radio': + return getRadioValue(input); + case 'file': + return getFileValue(input); + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } +}; + +/** + * @param {HTMLInputElement} input + * @returns {number} + */ +const getCheckboxValue = input => input.checked ? 1 : 0; + +/** + * @param {HTMLInputElement} input + * @returns {string | null} + */ +const getRadioValue = input => input.checked ? input.value : null; + +/** + * @param {HTMLInputElement} input + * @returns {FileList | File | null} + */ +const getFileValue = input => input.files && input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const handleInputOptions = (instance, params) => { + const popup = getPopup(); + if (!popup) { + return; + } + /** + * @param {Record<string, any>} inputOptions + */ + const processInputOptions = inputOptions => { + if (params.input === 'select') { + populateSelectOptions(popup, formatInputOptions(inputOptions), params); + } else if (params.input === 'radio') { + populateRadioOptions(popup, formatInputOptions(inputOptions), params); + } + }; + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof params.inputOptions}`); + } +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ +const handleInputValue = (instance, params) => { + const input = instance.getInput(); + if (!input) { + return; + } + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? `${parseFloat(inputValue) || 0}` : `${inputValue}`; + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error(`Error in inputValue promise: ${err}`); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); +}; + +/** + * @param {HTMLElement} popup + * @param {InputOptionFlattened[]} inputOptions + * @param {SweetAlertOptions} params + */ +function populateSelectOptions(popup, inputOptions, params) { + const select = getDirectChildByClass(popup, swalClasses.select); + if (!select) { + return; + } + /** + * @param {HTMLElement} parent + * @param {string} optionLabel + * @param {string} optionValue + */ + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; + // <optgroup> spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a <optgroup> + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an <optgroup> + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of <option> + renderOption(select, optionLabel, optionValue); + } + }); + select.focus(); +} + +/** + * @param {HTMLElement} popup + * @param {InputOptionFlattened[]} inputOptions + * @param {SweetAlertOptions} params + */ +function populateRadioOptions(popup, inputOptions, params) { + const radio = getDirectChildByClass(popup, swalClasses.radio); + if (!radio) { + return; + } + inputOptions.forEach(inputOption => { + const radioValue = inputOption[0]; + const radioLabel = inputOption[1]; + const radioInput = document.createElement('input'); + const radioLabelElement = document.createElement('label'); + radioInput.type = 'radio'; + radioInput.name = swalClasses.radio; + radioInput.value = radioValue; + if (isSelected(radioValue, params.inputValue)) { + radioInput.checked = true; + } + const label = document.createElement('span'); + setInnerHtml(label, radioLabel); + label.className = swalClasses.label; + radioLabelElement.appendChild(radioInput); + radioLabelElement.appendChild(label); + radio.appendChild(radioLabelElement); + }); + const radios = radio.querySelectorAll('input'); + if (radios.length) { + radios[0].focus(); + } +} + +/** + * Converts `inputOptions` into an array of `[value, label]`s + * + * @param {Record<string, any>} inputOptions + * @typedef {string[]} InputOptionFlattened + * @returns {InputOptionFlattened[]} + */ +const formatInputOptions = inputOptions => { + /** @type {InputOptionFlattened[]} */ + const result = []; + if (inputOptions instanceof Map) { + inputOptions.forEach((value, key) => { + let valueFormatted = value; + if (typeof valueFormatted === 'object') { + // case of <optgroup> + valueFormatted = formatInputOptions(valueFormatted); + } + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + if (typeof valueFormatted === 'object') { + // case of <optgroup> + valueFormatted = formatInputOptions(valueFormatted); + } + result.push([key, valueFormatted]); + }); + } + return result; +}; + +/** + * @param {string} optionValue + * @param {SweetAlertInputValue} inputValue + * @returns {boolean} + */ +const isSelected = (optionValue, inputValue) => { + return !!inputValue && inputValue.toString() === optionValue.toString(); +}; + +/** + * @param {SweetAlert} instance + */ +const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } +}; + +/** + * @param {SweetAlert} instance + */ +const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } +}; + +/** + * @param {SweetAlert} instance + * @param {Function} dismissWith + */ +const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); +}; + +/** + * @param {SweetAlert} instance + * @param {'confirm' | 'deny'} type + */ +const handleConfirmOrDenyWithInput = (instance, type) => { + const innerParams = privateProps.innerParams.get(instance); + if (!innerParams.input) { + error(`The "input" parameter is needed to be set when using returnInputValueOn${capitalizeFirstLetter(type)}`); + return; + } + const input = instance.getInput(); + const inputValue = getInputValue(instance, innerParams); + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (input && !input.checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage || input.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } +}; + +/** + * @param {SweetAlert} instance + * @param {SweetAlertInputValue} inputValue + * @param {'confirm' | 'deny'} type + */ +const handleInputValidator = (instance, inputValue, type) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); +}; + +/** + * @param {SweetAlert} instance + * @param {any} value + */ +const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + if (innerParams.preDeny) { + instance.isAwaitingPromise = true; // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preDeny's promise is received + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + handleAwaitingPromise(instance); + } else { + instance.close({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }).catch(error => rejectWith(instance || undefined, error)); + } else { + instance.close({ + isDenied: true, + value + }); + } +}; + +/** + * @param {SweetAlert} instance + * @param {any} value + */ +const succeedWith = (instance, value) => { + instance.close({ + isConfirmed: true, + value + }); +}; + +/** + * + * @param {SweetAlert} instance + * @param {string} error + */ +const rejectWith = (instance, error) => { + instance.rejectPromise(error); +}; + +/** + * + * @param {SweetAlert} instance + * @param {any} value + */ +const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + if (innerParams.showLoaderOnConfirm) { + showLoading(); + } + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + instance.isAwaitingPromise = true; // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preConfirm's promise is received + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible$1(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + handleAwaitingPromise(instance); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }).catch(error => rejectWith(instance || undefined, error)); + } else { + succeedWith(instance, value); + } +}; + +/** + * Hides loader and shows back the button which was hidden by .showLoading() + */ +function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + if (!innerParams) { + return; + } + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; +} +const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } +}; + +/** + * Gets the input DOM node, this method works with input parameter. + * + * @returns {HTMLInputElement | null} + */ +function getInput() { + const innerParams = privateProps.innerParams.get(this); + const domCache = privateProps.domCache.get(this); + if (!domCache) { + return null; + } + return getInput$1(domCache.popup, innerParams.input); +} + +/** + * @param {SweetAlert} instance + * @param {string[]} buttons + * @param {boolean} disabled + */ +function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); +} + +/** + * @param {HTMLInputElement | null} input + * @param {boolean} disabled + */ +function setInputDisabled(input, disabled) { + const popup = getPopup(); + if (!popup || !input) { + return; + } + if (input.type === 'radio') { + /** @type {NodeListOf<HTMLInputElement>} */ + const radios = popup.querySelectorAll(`[name="${swalClasses.radio}"]`); + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } +} + +/** + * Enable all the buttons + * @this {SweetAlert} + */ +function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); +} + +/** + * Disable all the buttons + * @this {SweetAlert} + */ +function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); +} + +/** + * Enable the input field + * @this {SweetAlert} + */ +function enableInput() { + setInputDisabled(this.getInput(), false); +} + +/** + * Disable the input field + * @this {SweetAlert} + */ +function disableInput() { + setInputDisabled(this.getInput(), true); +} + +/** + * Show block with validation message + * + * @param {string} error + * @this {SweetAlert} + */ +function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + show(domCache.validationMessage); + const input = this.getInput(); + if (input) { + input.setAttribute('aria-invalid', 'true'); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } +} + +/** + * Hide block with validation message + * + * @this {SweetAlert} + */ +function resetValidationMessage() { + const domCache = privateProps.domCache.get(this); + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + const input = this.getInput(); + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } +} + +const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + draggable: false, + animation: true, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + color: undefined, + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoFocus: true, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true +}; +const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'color', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'draggable', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + +/** @type {Record<string, string | undefined>} */ +const deprecatedParams = { + allowEnterKey: undefined +}; +const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'draggable', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + +/** + * Is valid parameter + * + * @param {string} paramName + * @returns {boolean} + */ +const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); +}; + +/** + * Is valid parameter for Swal.update() method + * + * @param {string} paramName + * @returns {boolean} + */ +const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; +}; + +/** + * Is deprecated parameter + * + * @param {string} paramName + * @returns {string | undefined} + */ +const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; +}; + +/** + * @param {string} param + */ +const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn(`Unknown parameter "${param}"`); + } +}; + +/** + * @param {string} param + */ +const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn(`The parameter "${param}" is incompatible with toasts`); + } +}; + +/** + * @param {string} param + */ +const checkIfParamIsDeprecated = param => { + const isDeprecated = isDeprecatedParameter(param); + if (isDeprecated) { + warnAboutDeprecation(param, isDeprecated); + } +}; + +/** + * Show relevant warnings for given params + * + * @param {SweetAlertOptions} params + */ +const showWarningsForParams = params => { + if (params.backdrop === false && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + for (const param in params) { + checkIfParamIsValid(param); + if (params.toast) { + checkIfToastParamIsValid(param); + } + checkIfParamIsDeprecated(param); + } +}; + +/** + * Updates popup parameters. + * + * @param {SweetAlertOptions} params + */ +function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + warn(`You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.`); + return; + } + const validUpdatableParams = filterValidParams(params); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); +} + +/** + * @param {SweetAlertOptions} params + * @returns {SweetAlertOptions} + */ +const filterValidParams = params => { + const validUpdatableParams = {}; + Object.keys(params).forEach(param => { + if (isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn(`Invalid parameter to update: ${param}`); + } + }); + return validUpdatableParams; +}; + +/** + * Dispose the current SweetAlert2 instance + */ +function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + if (!innerParams) { + disposeWeakMaps(this); // The WeakMaps might have been partly destroyed, we must recall it to dispose any remaining WeakMaps #2335 + return; // This instance has already been destroyed + } + + // Check if there is another Swal closing + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + globalState.eventEmitter.emit('didDestroy'); + disposeSwal(this); +} + +/** + * @param {SweetAlert} instance + */ +const disposeSwal = instance => { + disposeWeakMaps(instance); + // Unset this.params so GC will dispose it (#1569) + delete instance.params; + // Unset globalState props so GC will dispose globalState (#1569) + delete globalState.keydownHandler; + delete globalState.keydownTarget; + // Unset currentInstance + delete globalState.currentInstance; +}; + +/** + * @param {SweetAlert} instance + */ +const disposeWeakMaps = instance => { + // If the current instance is awaiting a promise result, we keep the privateMethods to call them once the promise result is retrieved #2335 + if (instance.isAwaitingPromise) { + unsetWeakMaps(privateProps, instance); + instance.isAwaitingPromise = true; + } else { + unsetWeakMaps(privateMethods, instance); + unsetWeakMaps(privateProps, instance); + delete instance.isAwaitingPromise; + // Unset instance methods + delete instance.disableButtons; + delete instance.enableButtons; + delete instance.getInput; + delete instance.disableInput; + delete instance.enableInput; + delete instance.hideLoading; + delete instance.disableLoading; + delete instance.showValidationMessage; + delete instance.resetValidationMessage; + delete instance.close; + delete instance.closePopup; + delete instance.closeModal; + delete instance.closeToast; + delete instance.rejectPromise; + delete instance.update; + delete instance._destroy; + } +}; + +/** + * @param {object} obj + * @param {SweetAlert} instance + */ +const unsetWeakMaps = (obj, instance) => { + for (const i in obj) { + obj[i].delete(instance); + } +}; + +var instanceMethods = /*#__PURE__*/Object.freeze({ + __proto__: null, + _destroy: _destroy, + close: close, + closeModal: close, + closePopup: close, + closeToast: close, + disableButtons: disableButtons, + disableInput: disableInput, + disableLoading: hideLoading, + enableButtons: enableButtons, + enableInput: enableInput, + getInput: getInput, + handleAwaitingPromise: handleAwaitingPromise, + hideLoading: hideLoading, + rejectPromise: rejectPromise, + resetValidationMessage: resetValidationMessage, + showValidationMessage: showValidationMessage, + update: update +}); + +/** + * @param {SweetAlertOptions} innerParams + * @param {DomCache} domCache + * @param {Function} dismissWith + */ +const handlePopupClick = (innerParams, domCache, dismissWith) => { + if (innerParams.toast) { + handleToastClick(innerParams, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); + + // Ignore click events that had mousedown on the container but mouseup on the popup + handleContainerMousedown(domCache); + handleModalClick(innerParams, domCache, dismissWith); + } +}; + +/** + * @param {SweetAlertOptions} innerParams + * @param {DomCache} domCache + * @param {Function} dismissWith + */ +const handleToastClick = (innerParams, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + if (innerParams && (isAnyButtonShown(innerParams) || innerParams.timer || innerParams.input)) { + return; + } + dismissWith(DismissReason.close); + }; +}; + +/** + * @param {SweetAlertOptions} innerParams + * @returns {boolean} + */ +const isAnyButtonShown = innerParams => { + return !!(innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton); +}; +let ignoreOutsideClick = false; + +/** + * @param {DomCache} domCache + */ +const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = () => {}; + // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; +}; + +/** + * @param {DomCache} domCache + */ +const handleContainerMousedown = domCache => { + domCache.container.onmousedown = e => { + // prevent the modal text from being selected on double click on the container (allowOutsideClick: false) + if (e.target === domCache.container) { + e.preventDefault(); + } + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = () => {}; + // We also need to check if the mouseup target is a child of the popup + if (e.target === domCache.popup || e.target instanceof HTMLElement && domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; +}; + +/** + * @param {SweetAlertOptions} innerParams + * @param {DomCache} domCache + * @param {Function} dismissWith + */ +const handleModalClick = (innerParams, domCache, dismissWith) => { + domCache.container.onclick = e => { + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; +}; + +const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; +const isElement = elem => elem instanceof Element || isJqueryElement(elem); +const argsToParams = args => { + const params = {}; + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error(`Unexpected type of ${name}! Expected "string" or "Element", got ${typeof arg}`); + } + }); + } + return params; +}; + +/** + * Main method to create a new SweetAlert2 popup + * + * @param {...SweetAlertOptions} args + * @returns {Promise<SweetAlertResult>} + */ +function fire() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return new this(...args); +} + +/** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param {SweetAlertOptions} mixinParams + * @returns {SweetAlert} + */ +function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + } + // @ts-ignore + return MixinSwal; +} + +/** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + * + * @returns {number | undefined} + */ +const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); +}; + +/** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + * + * @returns {number | undefined} + */ +const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } +}; + +/** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + * + * @returns {number | undefined} + */ +const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } +}; + +/** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + * + * @returns {number | undefined} + */ +const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); +}; + +/** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + * + * @param {number} ms + * @returns {number | undefined} + */ +const increaseTimer = ms => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(ms); + animateTimerProgressBar(remaining, true); + return remaining; + } +}; + +/** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + * + * @returns {boolean} + */ +const isTimerRunning = () => { + return !!(globalState.timeout && globalState.timeout.isRunning()); +}; + +let bodyClickListenerAdded = false; +const clickHandlers = {}; + +/** + * @param {string} attr + */ +function bindClickHandler() { + let attr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'data-swal-template'; + clickHandlers[attr] = this; + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } +} +const bodyClickListener = event => { + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } +}; + +// Source: https://gist.github.com/mudge/5830382?permalink_comment_id=2691957#gistcomment-2691957 + +class EventEmitter { + constructor() { + /** @type {Events} */ + this.events = {}; + } + + /** + * @param {string} eventName + * @returns {EventHandlers} + */ + _getHandlersByEventName(eventName) { + if (typeof this.events[eventName] === 'undefined') { + // not Set because we need to keep the FIFO order + // https://github.com/sweetalert2/sweetalert2/pull/2763#discussion_r1748990334 + this.events[eventName] = []; + } + return this.events[eventName]; + } + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + on(eventName, eventHandler) { + const currentHandlers = this._getHandlersByEventName(eventName); + if (!currentHandlers.includes(eventHandler)) { + currentHandlers.push(eventHandler); + } + } + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + once(eventName, eventHandler) { + var _this = this; + /** + * @param {Array} args + */ + const onceFn = function () { + _this.removeListener(eventName, onceFn); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + eventHandler.apply(_this, args); + }; + this.on(eventName, onceFn); + } + + /** + * @param {string} eventName + * @param {Array} args + */ + emit(eventName) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + this._getHandlersByEventName(eventName).forEach( + /** + * @param {EventHandler} eventHandler + */ + eventHandler => { + try { + eventHandler.apply(this, args); + } catch (error) { + console.error(error); + } + }); + } + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + removeListener(eventName, eventHandler) { + const currentHandlers = this._getHandlersByEventName(eventName); + const index = currentHandlers.indexOf(eventHandler); + if (index > -1) { + currentHandlers.splice(index, 1); + } + } + + /** + * @param {string} eventName + */ + removeAllListeners(eventName) { + if (this.events[eventName] !== undefined) { + // https://github.com/sweetalert2/sweetalert2/pull/2763#discussion_r1749239222 + this.events[eventName].length = 0; + } + } + reset() { + this.events = {}; + } +} + +globalState.eventEmitter = new EventEmitter(); + +/** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ +const on = (eventName, eventHandler) => { + globalState.eventEmitter.on(eventName, eventHandler); +}; + +/** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ +const once = (eventName, eventHandler) => { + globalState.eventEmitter.once(eventName, eventHandler); +}; + +/** + * @param {string} [eventName] + * @param {EventHandler} [eventHandler] + */ +const off = (eventName, eventHandler) => { + // Remove all handlers for all events + if (!eventName) { + globalState.eventEmitter.reset(); + return; + } + if (eventHandler) { + // Remove a specific handler + globalState.eventEmitter.removeListener(eventName, eventHandler); + } else { + // Remove all handlers for a specific event + globalState.eventEmitter.removeAllListeners(eventName); + } +}; + +var staticMethods = /*#__PURE__*/Object.freeze({ + __proto__: null, + argsToParams: argsToParams, + bindClickHandler: bindClickHandler, + clickCancel: clickCancel, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + enableLoading: showLoading, + fire: fire, + getActions: getActions, + getCancelButton: getCancelButton, + getCloseButton: getCloseButton, + getConfirmButton: getConfirmButton, + getContainer: getContainer, + getDenyButton: getDenyButton, + getFocusableElements: getFocusableElements, + getFooter: getFooter, + getHtmlContainer: getHtmlContainer, + getIcon: getIcon, + getIconContent: getIconContent, + getImage: getImage, + getInputLabel: getInputLabel, + getLoader: getLoader, + getPopup: getPopup, + getProgressSteps: getProgressSteps, + getTimerLeft: getTimerLeft, + getTimerProgressBar: getTimerProgressBar, + getTitle: getTitle, + getValidationMessage: getValidationMessage, + increaseTimer: increaseTimer, + isDeprecatedParameter: isDeprecatedParameter, + isLoading: isLoading, + isTimerRunning: isTimerRunning, + isUpdatableParameter: isUpdatableParameter, + isValidParameter: isValidParameter, + isVisible: isVisible, + mixin: mixin, + off: off, + on: on, + once: once, + resumeTimer: resumeTimer, + showLoading: showLoading, + stopTimer: stopTimer, + toggleTimer: toggleTimer +}); + +class Timer { + /** + * @param {Function} callback + * @param {number} delay + */ + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + /** + * @returns {number} + */ + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + return this.remaining; + } + + /** + * @returns {number} + */ + stop() { + if (this.started && this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date().getTime() - this.started.getTime(); + } + return this.remaining; + } + + /** + * @param {number} n + * @returns {number} + */ + increase(n) { + const running = this.running; + if (running) { + this.stop(); + } + this.remaining += n; + if (running) { + this.start(); + } + return this.remaining; + } + + /** + * @returns {number} + */ + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + return this.remaining; + } + + /** + * @returns {boolean} + */ + isRunning() { + return this.running; + } +} + +const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + +/** + * @param {SweetAlertOptions} params + * @returns {SweetAlertOptions} + */ +const getTemplateParams = params => { + const template = typeof params.template === 'string' ? (/** @type {HTMLTemplateElement} */document.querySelector(params.template)) : params.template; + if (!template) { + return {}; + } + /** @type {DocumentFragment} */ + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalFunctionParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @returns {Record<string, any>} + */ +const getSwalParams = templateContent => { + /** @type {Record<string, any>} */ + const result = {}; + /** @type {HTMLElement[]} */ + const swalParams = Array.from(templateContent.querySelectorAll('swal-param')); + swalParams.forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = /** @type {keyof SweetAlertOptions} */param.getAttribute('name'); + const value = param.getAttribute('value'); + if (!paramName || !value) { + return; + } + if (typeof defaultParams[paramName] === 'boolean') { + result[paramName] = value !== 'false'; + } else if (typeof defaultParams[paramName] === 'object') { + result[paramName] = JSON.parse(value); + } else { + result[paramName] = value; + } + }); + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @returns {Record<string, any>} + */ +const getSwalFunctionParams = templateContent => { + /** @type {Record<string, any>} */ + const result = {}; + /** @type {HTMLElement[]} */ + const swalFunctions = Array.from(templateContent.querySelectorAll('swal-function-param')); + swalFunctions.forEach(param => { + const paramName = /** @type {keyof SweetAlertOptions} */param.getAttribute('name'); + const value = param.getAttribute('value'); + if (!paramName || !value) { + return; + } + result[paramName] = new Function(`return ${value}`)(); + }); + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @returns {Record<string, any>} + */ +const getSwalButtons = templateContent => { + /** @type {Record<string, any>} */ + const result = {}; + /** @type {HTMLElement[]} */ + const swalButtons = Array.from(templateContent.querySelectorAll('swal-button')); + swalButtons.forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + if (!type || !['confirm', 'cancel', 'deny'].includes(type)) { + return; + } + result[`${type}ButtonText`] = button.innerHTML; + result[`show${capitalizeFirstLetter(type)}Button`] = true; + if (button.hasAttribute('color')) { + result[`${type}ButtonColor`] = button.getAttribute('color'); + } + if (button.hasAttribute('aria-label')) { + result[`${type}ButtonAriaLabel`] = button.getAttribute('aria-label'); + } + }); + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @returns {Pick<SweetAlertOptions, 'imageUrl' | 'imageWidth' | 'imageHeight' | 'imageAlt'>} + */ +const getSwalImage = templateContent => { + const result = {}; + /** @type {HTMLElement | null} */ + const image = templateContent.querySelector('swal-image'); + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src') || undefined; + } + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width') || undefined; + } + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height') || undefined; + } + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt') || undefined; + } + } + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @returns {Record<string, any>} + */ +const getSwalIcon = templateContent => { + const result = {}; + /** @type {HTMLElement | null} */ + const icon = templateContent.querySelector('swal-icon'); + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + result.iconHtml = icon.innerHTML; + } + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @returns {Record<string, any>} + */ +const getSwalInput = templateContent => { + /** @type {Record<string, any>} */ + const result = {}; + /** @type {HTMLElement | null} */ + const input = templateContent.querySelector('swal-input'); + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + /** @type {HTMLElement[]} */ + const inputOptions = Array.from(templateContent.querySelectorAll('swal-input-option')); + if (inputOptions.length) { + result.inputOptions = {}; + inputOptions.forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + if (!optionValue) { + return; + } + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + return result; +}; + +/** + * @param {DocumentFragment} templateContent + * @param {string[]} paramNames + * @returns {Record<string, any>} + */ +const getSwalStringParams = (templateContent, paramNames) => { + /** @type {Record<string, any>} */ + const result = {}; + for (const i in paramNames) { + const paramName = paramNames[i]; + /** @type {HTMLElement | null} */ + const tag = templateContent.querySelector(paramName); + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + return result; +}; + +/** + * @param {DocumentFragment} templateContent + */ +const showWarningsForElements = templateContent => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-function-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + Array.from(templateContent.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + if (!allowedElements.includes(tagName)) { + warn(`Unrecognized element <${tagName}>`); + } + }); +}; + +/** + * @param {HTMLElement} el + * @param {string[]} allowedAttributes + */ +const showWarningsForAttributes = (el, allowedAttributes) => { + Array.from(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn([`Unrecognized attribute "${attribute.name}" on <${el.tagName.toLowerCase()}>.`, `${allowedAttributes.length ? `Allowed attributes are: ${allowedAttributes.join(', ')}` : 'To set the value, use HTML within the element.'}`]); + } + }); +}; + +const SHOW_CLASS_TIMEOUT = 10; + +/** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param {SweetAlertOptions} params + */ +const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + globalState.eventEmitter.emit('willOpen', popup); + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses(container, popup, params); + + // scrolling is 'hidden' until animation is done, after that 'auto' + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + globalState.eventEmitter.emit('didOpen', popup); + removeClass(container, swalClasses['no-transition']); +}; + +/** + * @param {AnimationEvent} event + */ +const swalOpenAnimationFinished = event => { + const popup = getPopup(); + if (event.target !== popup) { + return; + } + const container = getContainer(); + popup.removeEventListener('animationend', swalOpenAnimationFinished); + popup.removeEventListener('transitionend', swalOpenAnimationFinished); + container.style.overflowY = 'auto'; +}; + +/** + * @param {HTMLElement} container + * @param {HTMLElement} popup + */ +const setScrollingVisibility = (container, popup) => { + if (hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener('animationend', swalOpenAnimationFinished); + popup.addEventListener('transitionend', swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } +}; + +/** + * @param {HTMLElement} container + * @param {boolean} scrollbarPadding + * @param {string} initialBodyOverflow + */ +const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + replaceScrollbarWithPadding(initialBodyOverflow); + } + + // sweetalert2/issues/1247 + setTimeout(() => { + container.scrollTop = 0; + }); +}; + +/** + * @param {HTMLElement} container + * @param {HTMLElement} popup + * @param {SweetAlertOptions} params + */ +const addClasses = (container, popup, params) => { + addClass(container, params.showClass.backdrop); + if (params.animation) { + // this workaround with opacity is needed for https://github.com/sweetalert2/sweetalert2/issues/2059 + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); + // and remove the opacity workaround + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + } else { + show(popup, 'grid'); + } + addClass([document.documentElement, document.body], swalClasses.shown); + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } +}; + +var defaultInputValidators = { + /** + * @param {string} string + * @param {string} [validationMessage] + * @returns {Promise<string | void>} + */ + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + /** + * @param {string} string + * @param {string} [validationMessage] + * @returns {Promise<string | void>} + */ + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } +}; + +/** + * @param {SweetAlertOptions} params + */ +function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (params.inputValidator) { + return; + } + if (params.input === 'email') { + params.inputValidator = defaultInputValidators['email']; + } + if (params.input === 'url') { + params.inputValidator = defaultInputValidators['url']; + } +} + +/** + * @param {SweetAlertOptions} params + */ +function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } +} + +/** + * Set type, text and actions on popup + * + * @param {SweetAlertOptions} params + */ +function setParameters(params) { + setDefaultInputValidators(params); + + // showLoaderOnConfirm && preConfirm + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + validateCustomTargetElement(params); + + // Replace newlines with <br> in title + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('<br />'); + } + init(params); +} + +/** @type {SweetAlert} */ +let currentInstance; +var _promise = /*#__PURE__*/new WeakMap(); +class SweetAlert { + /** + * @param {...any} args + * @this {SweetAlert} + */ + constructor() { + /** + * @type {Promise<SweetAlertResult>} + */ + _classPrivateFieldInitSpec(this, _promise, void 0); + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + currentInstance = this; + + // @ts-ignore + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + + /** @type {Readonly<SweetAlertOptions>} */ + this.params = outerParams; + + /** @type {boolean} */ + this.isAwaitingPromise = false; + _classPrivateFieldSet2(_promise, this, this._main(currentInstance.params)); + } + _main(userParams) { + let mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + if (globalState.currentInstance) { + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(globalState.currentInstance); + const { + isAwaitingPromise + } = globalState.currentInstance; + globalState.currentInstance._destroy(); + if (!isAwaitingPromise) { + swalPromiseResolve({ + isDismissed: true + }); + } + if (isModal()) { + unsetAriaHidden(); + } + } + globalState.currentInstance = currentInstance; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); + + // clear the previous timer + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } + + // clear the restore focus timeout + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(currentInstance); + render(currentInstance, innerParams); + privateProps.innerParams.set(currentInstance, innerParams); + return swalPromise(currentInstance, domCache, innerParams); + } + + // `catch` cannot be the name of a module export, so we define our thenable methods here instead + then(onFulfilled) { + return _classPrivateFieldGet2(_promise, this).then(onFulfilled); + } + finally(onFinally) { + return _classPrivateFieldGet2(_promise, this).finally(onFinally); + } +} + +/** + * @param {SweetAlert} instance + * @param {DomCache} domCache + * @param {SweetAlertOptions} innerParams + * @returns {Promise} + */ +const swalPromise = (instance, domCache, innerParams) => { + return new Promise((resolve, reject) => { + // functions to handle all closings/dismissals + /** + * @param {DismissReason} dismiss + */ + const dismissWith = dismiss => { + instance.close({ + isDismissed: true, + dismiss + }); + }; + privateMethods.swalPromiseResolve.set(instance, resolve); + privateMethods.swalPromiseReject.set(instance, reject); + domCache.confirmButton.onclick = () => { + handleConfirmButtonClick(instance); + }; + domCache.denyButton.onclick = () => { + handleDenyButtonClick(instance); + }; + domCache.cancelButton.onclick = () => { + handleCancelButtonClick(instance, dismissWith); + }; + domCache.closeButton.onclick = () => { + dismissWith(DismissReason.close); + }; + handlePopupClick(innerParams, domCache, dismissWith); + addKeydownHandler(globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); + + // Scroll container to top on open (#1247, #1946) + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); +}; + +/** + * @param {SweetAlertOptions} userParams + * @param {SweetAlertOptions} mixinParams + * @returns {SweetAlertOptions} + */ +const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + if (params.animation === false) { + params.showClass = { + backdrop: 'swal2-noanimation' + }; + params.hideClass = {}; + } + return params; +}; + +/** + * @param {SweetAlert} instance + * @returns {DomCache} + */ +const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; +}; + +/** + * @param {GlobalState} globalState + * @param {SweetAlertOptions} innerParams + * @param {Function} dismissWith + */ +const setupTimer = (globalState, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + if (innerParams.timer) { + globalState.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState.timeout; + }, innerParams.timer); + if (innerParams.timerProgressBar) { + show(timerProgressBar); + applyCustomClass(timerProgressBar, innerParams, 'timerProgressBar'); + setTimeout(() => { + if (globalState.timeout && globalState.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } +}; + +/** + * Initialize focus in the popup: + * + * 1. If `toast` is `true`, don't steal focus from the document. + * 2. Else if there is an [autofocus] element, focus it. + * 3. Else if `focusConfirm` is `true` and confirm button is visible, focus it. + * 4. Else if `focusDeny` is `true` and deny button is visible, focus it. + * 5. Else if `focusCancel` is `true` and cancel button is visible, focus it. + * 6. Else focus the first focusable element in a popup (if any). + * + * @param {DomCache} domCache + * @param {SweetAlertOptions} innerParams + */ +const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + // TODO: this is dumb, remove `allowEnterKey` param in the next major version + if (!callIfFunction(innerParams.allowEnterKey)) { + warnAboutDeprecation('allowEnterKey'); + blurActiveElement(); + return; + } + if (focusAutofocus(domCache)) { + return; + } + if (focusButton(domCache, innerParams)) { + return; + } + setFocus(-1, 1); +}; + +/** + * @param {DomCache} domCache + * @returns {boolean} + */ +const focusAutofocus = domCache => { + const autofocusElements = Array.from(domCache.popup.querySelectorAll('[autofocus]')); + for (const autofocusElement of autofocusElements) { + if (autofocusElement instanceof HTMLElement && isVisible$1(autofocusElement)) { + autofocusElement.focus(); + return true; + } + } + return false; +}; + +/** + * @param {DomCache} domCache + * @param {SweetAlertOptions} innerParams + * @returns {boolean} + */ +const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible$1(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + if (innerParams.focusCancel && isVisible$1(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + if (innerParams.focusConfirm && isVisible$1(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + return false; +}; +const blurActiveElement = () => { + if (document.activeElement instanceof HTMLElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } +}; + +// Dear russian users visiting russian sites. Let's have fun. +if (typeof window !== 'undefined' && /^ru\b/.test(navigator.language) && location.host.match(/\.(ru|su|by|xn--p1ai)$/)) { + const now = new Date(); + const initiationDate = localStorage.getItem('swal-initiation'); + if (!initiationDate) { + localStorage.setItem('swal-initiation', `${now}`); + } else if ((now.getTime() - Date.parse(initiationDate)) / (1000 * 60 * 60 * 24) > 3) { + setTimeout(() => { + document.body.style.pointerEvents = 'none'; + const ukrainianAnthem = document.createElement('audio'); + ukrainianAnthem.src = 'https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3'; + ukrainianAnthem.loop = true; + document.body.appendChild(ukrainianAnthem); + setTimeout(() => { + ukrainianAnthem.play().catch(() => { + // ignore + }); + }, 2500); + }, 500); + } +} + +// Assign instance methods from src/instanceMethods/*.js to prototype +SweetAlert.prototype.disableButtons = disableButtons; +SweetAlert.prototype.enableButtons = enableButtons; +SweetAlert.prototype.getInput = getInput; +SweetAlert.prototype.disableInput = disableInput; +SweetAlert.prototype.enableInput = enableInput; +SweetAlert.prototype.hideLoading = hideLoading; +SweetAlert.prototype.disableLoading = hideLoading; +SweetAlert.prototype.showValidationMessage = showValidationMessage; +SweetAlert.prototype.resetValidationMessage = resetValidationMessage; +SweetAlert.prototype.close = close; +SweetAlert.prototype.closePopup = close; +SweetAlert.prototype.closeModal = close; +SweetAlert.prototype.closeToast = close; +SweetAlert.prototype.rejectPromise = rejectPromise; +SweetAlert.prototype.update = update; +SweetAlert.prototype._destroy = _destroy; + +// Assign static methods from src/staticMethods/*.js to constructor +Object.assign(SweetAlert, staticMethods); + +// Proxy to instance methods to constructor, for now, for backwards compatibility +Object.keys(instanceMethods).forEach(key => { + /** + * @param {...any} args + * @returns {any | undefined} + */ + SweetAlert[key] = function () { + if (currentInstance && currentInstance[key]) { + return currentInstance[key](...arguments); + } + return null; + }; +}); +SweetAlert.DismissReason = DismissReason; +SweetAlert.version = '11.15.3'; + +const Swal = SweetAlert; +// @ts-ignore +Swal.default = Swal; + +export { Swal as default }; diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.esm.min.js b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.esm.min.js new file mode 100644 index 0000000..41042b4 --- /dev/null +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.esm.min.js @@ -0,0 +1,5 @@ +/*! +* sweetalert2 v11.15.3 +* Released under the MIT License. +*/ +function e(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function t(t,n){return t.get(e(t,n))}function n(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}const o={},i=e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,i=window.scrollY;o.restoreFocusTimeout=setTimeout((()=>{o.previousActiveElement instanceof HTMLElement?(o.previousActiveElement.focus(),o.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(n,i)})),s="swal2-",r=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce(((e,t)=>(e[t]=s+t,e)),{}),a=["success","warning","info","question","error"].reduce(((e,t)=>(e[t]=s+t,e)),{}),l="SweetAlert2:",c=e=>e.charAt(0).toUpperCase()+e.slice(1),u=e=>{console.warn(`${l} ${"object"==typeof e?e.join(" "):e}`)},d=e=>{console.error(`${l} ${e}`)},p=[],m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;var n;n=`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`,p.includes(n)||(p.push(n),u(n))},g=e=>"function"==typeof e?e():e,h=e=>e&&"function"==typeof e.toPromise,f=e=>h(e)?e.toPromise():Promise.resolve(e),b=e=>e&&Promise.resolve(e)===e,y=()=>document.body.querySelector(`.${r.container}`),v=e=>{const t=y();return t?t.querySelector(e):null},w=e=>v(`.${e}`),C=()=>w(r.popup),A=()=>w(r.icon),E=()=>w(r.title),k=()=>w(r["html-container"]),B=()=>w(r.image),L=()=>w(r["progress-steps"]),$=()=>w(r["validation-message"]),x=()=>v(`.${r.actions} .${r.confirm}`),P=()=>v(`.${r.actions} .${r.cancel}`),T=()=>v(`.${r.actions} .${r.deny}`),S=()=>v(`.${r.loader}`),O=()=>w(r.actions),M=()=>w(r.footer),j=()=>w(r["timer-progress-bar"]),H=()=>w(r.close),I=()=>{const e=C();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(t).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")||"0"),o=parseInt(t.getAttribute("tabindex")||"0");return n>o?1:n<o?-1:0})),o=e.querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n'),i=Array.from(o).filter((e=>"-1"!==e.getAttribute("tabindex")));return[...new Set(n.concat(i))].filter((e=>ee(e)))},D=()=>N(document.body,r.shown)&&!N(document.body,r["toast-shown"])&&!N(document.body,r["no-backdrop"]),q=()=>{const e=C();return!!e&&N(e,r.toast)},V=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html"),o=n.querySelector("head");o&&Array.from(o.childNodes).forEach((t=>{e.appendChild(t)}));const i=n.querySelector("body");i&&Array.from(i.childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},N=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t<n.length;t++)if(!e.classList.contains(n[t]))return!1;return!0},_=(e,t,n)=>{if(((e,t)=>{Array.from(e.classList).forEach((n=>{Object.values(r).includes(n)||Object.values(a).includes(n)||Object.values(t.showClass||{}).includes(n)||e.classList.remove(n)}))})(e,t),!t.customClass)return;const o=t.customClass[n];o&&("string"==typeof o||o.forEach?z(e,o):u(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof o}"`))},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${r.popup} > .${r[t]}`);case"checkbox":return e.querySelector(`.${r.popup} > .${r.checkbox} input`);case"radio":return e.querySelector(`.${r.popup} > .${r.radio} input:checked`)||e.querySelector(`.${r.popup} > .${r.radio} input:first-child`);case"range":return e.querySelector(`.${r.popup} > .${r.range} input`);default:return e.querySelector(`.${r.popup} > .${r.input}`)}},R=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},U=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},z=(e,t)=>{U(e,t,!0)},W=(e,t)=>{U(e,t,!1)},K=(e,t)=>{const n=Array.from(e.children);for(let e=0;e<n.length;e++){const o=n[e];if(o instanceof HTMLElement&&N(o,t))return o}},Y=(e,t,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style.setProperty(t,"number"==typeof n?`${n}px`:n):e.style.removeProperty(t)},X=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e&&(e.style.display=t)},Z=e=>{e&&(e.style.display="none")},J=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"block";e&&new MutationObserver((()=>{Q(e,e.innerHTML,t)})).observe(e,{childList:!0,subtree:!0})},G=(e,t,n,o)=>{const i=e.querySelector(t);i&&i.style.setProperty(n,o)},Q=function(e,t){t?X(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):Z(e)},ee=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),te=e=>!!(e.scrollHeight>e.clientHeight),ne=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),o=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||o>0},oe=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=j();n&&ee(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"}),10))},ie=`\n <div aria-labelledby="${r.title}" aria-describedby="${r["html-container"]}" class="${r.popup}" tabindex="-1">\n <button type="button" class="${r.close}"></button>\n <ul class="${r["progress-steps"]}"></ul>\n <div class="${r.icon}"></div>\n <img class="${r.image}" />\n <h2 class="${r.title}" id="${r.title}"></h2>\n <div class="${r["html-container"]}" id="${r["html-container"]}"></div>\n <input class="${r.input}" id="${r.input}" />\n <input type="file" class="${r.file}" />\n <div class="${r.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${r.select}" id="${r.select}"></select>\n <div class="${r.radio}"></div>\n <label class="${r.checkbox}">\n <input type="checkbox" id="${r.checkbox}" />\n <span class="${r.label}"></span>\n </label>\n <textarea class="${r.textarea}" id="${r.textarea}"></textarea>\n <div class="${r["validation-message"]}" id="${r["validation-message"]}"></div>\n <div class="${r.actions}">\n <div class="${r.loader}"></div>\n <button type="button" class="${r.confirm}"></button>\n <button type="button" class="${r.deny}"></button>\n <button type="button" class="${r.cancel}"></button>\n </div>\n <div class="${r.footer}"></div>\n <div class="${r["timer-progress-bar-container"]}">\n <div class="${r["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),se=()=>{o.currentInstance.resetValidationMessage()},re=e=>{const t=(()=>{const e=y();return!!e&&(e.remove(),W([document.documentElement,document.body],[r["no-backdrop"],r["toast-shown"],r["has-column"]]),!0)})();if("undefined"==typeof window||"undefined"==typeof document)return void d("SweetAlert2 requires document to initialize");const n=document.createElement("div");n.className=r.container,t&&z(n,r["no-transition"]),V(n,ie);const o="string"==typeof(i=e.target)?document.querySelector(i):i;var i;o.appendChild(n),(e=>{const t=C();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&z(y(),r.rtl)})(o),(()=>{const e=C(),t=K(e,r.input),n=K(e,r.file),o=e.querySelector(`.${r.range} input`),i=e.querySelector(`.${r.range} output`),s=K(e,r.select),a=e.querySelector(`.${r.checkbox} input`),l=K(e,r.textarea);t.oninput=se,n.onchange=se,s.onchange=se,a.onchange=se,l.oninput=se,o.oninput=()=>{se(),i.value=o.value},o.onchange=()=>{se(),i.value=o.value}})()},ae=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?le(e,t):e&&V(t,e)},le=(e,t)=>{e.jquery?ce(t,e):V(t,e.toString())},ce=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},ue=(e,t)=>{const n=O(),o=S();n&&o&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?X(n):Z(n),_(n,t,"actions"),function(e,t,n){const o=x(),i=T(),s=P();if(!o||!i||!s)return;de(o,"confirm",n),de(i,"deny",n),de(s,"cancel",n),function(e,t,n,o){if(!o.buttonsStyling)return void W([e,t,n],r.styled);z([e,t,n],r.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,z(e,r["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,z(t,r["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,z(n,r["default-outline"]))}(o,i,s,n),n.reverseButtons&&(n.toast?(e.insertBefore(s,o),e.insertBefore(i,o)):(e.insertBefore(s,t),e.insertBefore(i,t),e.insertBefore(o,t)))}(n,o,t),V(o,t.loaderHtml||""),_(o,t,"loader"))};function de(e,t,n){const o=c(t);Q(e,n[`show${o}Button`],"inline-block"),V(e,n[`${t}ButtonText`]||""),e.setAttribute("aria-label",n[`${t}ButtonAriaLabel`]||""),e.className=r[t],_(e,n,`${t}Button`)}const pe=(e,t)=>{const n=y();n&&(!function(e,t){"string"==typeof t?e.style.background=t:t||z([document.documentElement,document.body],r["no-backdrop"])}(n,t.backdrop),function(e,t){if(!t)return;t in r?z(e,r[t]):(u('The "position" parameter is not valid, defaulting to "center"'),z(e,r.center))}(n,t.position),function(e,t){if(!t)return;z(e,r[`grow-${t}`])}(n,t.grow),_(n,t,"container"))};var me={innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],he=e=>{if(!e.input)return;if(!Ae[e.input])return void d(`Unexpected type of input! Expected ${Object.keys(Ae).join(" | ")}, got "${e.input}"`);const t=we(e.input);if(!t)return;const n=Ae[e.input](t,e);X(t),e.inputAutoFocus&&setTimeout((()=>{R(n)}))},fe=(e,t)=>{const n=C();if(!n)return;const o=F(n,e);if(o){(e=>{for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t].name;["id","type","value","style"].includes(n)||e.removeAttribute(n)}})(o);for(const e in t)o.setAttribute(e,t[e])}},be=e=>{if(!e.input)return;const t=we(e.input);t&&_(t,e,"input")},ye=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},ve=(e,t,n)=>{if(n.inputLabel){const o=document.createElement("label"),i=r["input-label"];o.setAttribute("for",e.id),o.className=i,"object"==typeof n.customClass&&z(o,n.customClass.inputLabel),o.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",o)}},we=e=>{const t=C();if(t)return K(t,r[e]||r.input)},Ce=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:b(t)||u(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Ae={};Ae.text=Ae.email=Ae.password=Ae.number=Ae.tel=Ae.url=Ae.search=Ae.date=Ae["datetime-local"]=Ae.time=Ae.week=Ae.month=(e,t)=>(Ce(e,t.inputValue),ve(e,e,t),ye(e,t),e.type=t.input,e),Ae.file=(e,t)=>(ve(e,e,t),ye(e,t),e),Ae.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return Ce(n,t.inputValue),n.type=t.input,Ce(o,t.inputValue),ve(n,e,t),e},Ae.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return ve(e,e,t),e},Ae.radio=e=>(e.textContent="",e),Ae.checkbox=(e,t)=>{const n=F(C(),"checkbox");n.value="1",n.checked=Boolean(t.inputValue);const o=e.querySelector("span");return V(o,t.inputPlaceholder||t.inputLabel),n},Ae.textarea=(e,t)=>{Ce(e,t.inputValue),ye(e,t),ve(e,e,t);return setTimeout((()=>{if("MutationObserver"in window){const n=parseInt(window.getComputedStyle(C()).width);new MutationObserver((()=>{if(!document.body.contains(e))return;const o=e.offsetWidth+(i=e,parseInt(window.getComputedStyle(i).marginLeft)+parseInt(window.getComputedStyle(i).marginRight));var i;o>n?C().style.width=`${o}px`:Y(C(),"width",t.width)})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Ee=(e,t)=>{const n=k();n&&(J(n),_(n,t,"htmlContainer"),t.html?(ae(t.html,n),X(n,"block")):t.text?(n.textContent=t.text,X(n,"block")):Z(n),((e,t)=>{const n=C();if(!n)return;const o=me.innerParams.get(e),i=!o||t.input!==o.input;ge.forEach((e=>{const o=K(n,r[e]);o&&(fe(e,t.inputAttributes),o.className=r[e],i&&Z(o))})),t.input&&(i&&he(t),be(t))})(e,t))},ke=(e,t)=>{for(const[n,o]of Object.entries(a))t.icon!==n&&W(e,o);z(e,t.icon&&a[t.icon]),$e(e,t),Be(),_(e,t,"icon")},Be=()=>{const e=C();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},Le=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let n=e.innerHTML,o="";if(t.iconHtml)o=xe(t.iconHtml);else if("success"===t.icon)o='\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n',n=n.replace(/ style=".*?"/g,"");else if("error"===t.icon)o='\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n';else if(t.icon){o=xe({question:"?",warning:"!",info:"i"}[t.icon])}n.trim()!==o.trim()&&V(e,o)},$e=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])G(e,n,"background-color",t.iconColor);G(e,".swal2-success-ring","border-color",t.iconColor)}},xe=e=>`<div class="${r["icon-content"]}">${e}</div>`;let Pe=!1,Te=0,Se=0,Oe=0,Me=0;const je=e=>{const t=C();if(e.target===t||A().contains(e.target)){Pe=!0;const n=De(e);Te=n.clientX,Se=n.clientY,Oe=parseInt(t.style.insetInlineStart)||0,Me=parseInt(t.style.insetBlockStart)||0,z(t,"swal2-dragging")}},He=e=>{const t=C();if(Pe){let{clientX:n,clientY:o}=De(e);t.style.insetInlineStart=`${Oe+(n-Te)}px`,t.style.insetBlockStart=`${Me+(o-Se)}px`}},Ie=()=>{const e=C();Pe=!1,W(e,"swal2-dragging")},De=e=>{let t=0,n=0;return e.type.startsWith("mouse")?(t=e.clientX,n=e.clientY):e.type.startsWith("touch")&&(t=e.touches[0].clientX,n=e.touches[0].clientY),{clientX:t,clientY:n}},qe=(e,t)=>{const n=y(),o=C();if(n&&o){if(t.toast){Y(n,"width",t.width),o.style.width="100%";const e=S();e&&o.insertBefore(e,A())}else Y(o,"width",t.width);Y(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),Z($()),Ve(o,t),t.draggable&&!t.toast?(z(o,r.draggable),(e=>{e.addEventListener("mousedown",je),document.body.addEventListener("mousemove",He),e.addEventListener("mouseup",Ie),e.addEventListener("touchstart",je),document.body.addEventListener("touchmove",He),e.addEventListener("touchend",Ie)})(o)):(W(o,r.draggable),(e=>{e.removeEventListener("mousedown",je),document.body.removeEventListener("mousemove",He),e.removeEventListener("mouseup",Ie),e.removeEventListener("touchstart",je),document.body.removeEventListener("touchmove",He),e.removeEventListener("touchend",Ie)})(o))}},Ve=(e,t)=>{const n=t.showClass||{};e.className=`${r.popup} ${ee(e)?n.popup:""}`,t.toast?(z([document.documentElement,document.body],r["toast-shown"]),z(e,r.toast)):z(e,r.modal),_(e,t,"popup"),"string"==typeof t.customClass&&z(e,t.customClass),t.icon&&z(e,r[`icon-${t.icon}`])},Ne=e=>{const t=document.createElement("li");return z(t,r["progress-step"]),V(t,e),t},_e=e=>{const t=document.createElement("li");return z(t,r["progress-step-line"]),e.progressStepsDistance&&Y(t,"width",e.progressStepsDistance),t},Fe=(e,t)=>{qe(0,t),pe(0,t),((e,t)=>{const n=L();if(!n)return;const{progressSteps:o,currentProgressStep:i}=t;o&&0!==o.length&&void 0!==i?(X(n),n.textContent="",i>=o.length&&u("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.forEach(((e,s)=>{const a=Ne(e);if(n.appendChild(a),s===i&&z(a,r["active-progress-step"]),s!==o.length-1){const e=_e(t);n.appendChild(e)}}))):Z(n)})(0,t),((e,t)=>{const n=me.innerParams.get(e),o=A();if(o){if(n&&t.icon===n.icon)return Le(o,t),void ke(o,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(a).indexOf(t.icon))return d(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void Z(o);X(o),Le(o,t),ke(o,t),z(o,t.showClass&&t.showClass.icon)}else Z(o)}})(e,t),((e,t)=>{const n=B();n&&(t.imageUrl?(X(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt||""),Y(n,"width",t.imageWidth),Y(n,"height",t.imageHeight),n.className=r.image,_(n,t,"image")):Z(n))})(0,t),((e,t)=>{const n=E();n&&(J(n),Q(n,t.title||t.titleText,"block"),t.title&&ae(t.title,n),t.titleText&&(n.innerText=t.titleText),_(n,t,"title"))})(0,t),((e,t)=>{const n=H();n&&(V(n,t.closeButtonHtml||""),_(n,t,"closeButton"),Q(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel||""))})(0,t),Ee(e,t),ue(0,t),((e,t)=>{const n=M();n&&(J(n),Q(n,t.footer,"block"),t.footer&&ae(t.footer,n),_(n,t,"footer"))})(0,t);const n=C();"function"==typeof t.didRender&&n&&t.didRender(n),o.eventEmitter.emit("didRender",n)},Re=()=>{var e;return null===(e=x())||void 0===e?void 0:e.click()},Ue=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),ze=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},We=(e,t)=>{var n;const o=I();if(o.length)return(e+=t)===o.length?e=0:-1===e&&(e=o.length-1),void o[e].focus();null===(n=C())||void 0===n||n.focus()},Ke=["ArrowRight","ArrowDown"],Ye=["ArrowLeft","ArrowUp"],Xe=(e,t,n)=>{e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Ze(t,e):"Tab"===t.key?Je(t):[...Ke,...Ye].includes(t.key)?Ge(t.key):"Escape"===t.key&&Qe(t,e,n)))},Ze=(e,t)=>{if(!g(t.allowEnterKey))return;const n=F(C(),t.input);if(e.target&&n&&e.target instanceof HTMLElement&&e.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(t.input))return;Re(),e.preventDefault()}},Je=e=>{const t=e.target,n=I();let o=-1;for(let e=0;e<n.length;e++)if(t===n[e]){o=e;break}e.shiftKey?We(o,-1):We(o,1),e.stopPropagation(),e.preventDefault()},Ge=e=>{const t=O(),n=x(),o=T(),i=P();if(!(t&&n&&o&&i))return;const s=[n,o,i];if(document.activeElement instanceof HTMLElement&&!s.includes(document.activeElement))return;const r=Ke.includes(e)?"nextElementSibling":"previousElementSibling";let a=document.activeElement;if(a){for(let e=0;e<t.children.length;e++){if(a=a[r],!a)return;if(a instanceof HTMLButtonElement&&ee(a))break}a instanceof HTMLButtonElement&&a.focus()}},Qe=(e,t,n)=>{g(t.allowEscapeKey)&&(e.preventDefault(),n(Ue.esc))};var et={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const tt=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},nt="undefined"!=typeof window&&!!window.GestureEvent,ot=()=>{const e=y();if(!e)return;let t;e.ontouchstart=e=>{t=it(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},it=e=>{const t=e.target,n=y(),o=k();return!(!n||!o)&&(!st(e)&&!rt(e)&&(t===n||!te(n)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!te(o)||!o.contains(t))))},st=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,rt=e=>e.touches&&e.touches.length>1;let at=null;const lt=e=>{null===at&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(at=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${at+(()=>{const e=document.createElement("div");e.className=r["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function ct(e,t,n,s){q()?bt(e,s):(i(n).then((()=>bt(e,s))),ze(o)),nt?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),D()&&(null!==at&&(document.body.style.paddingRight=`${at}px`,at=null),(()=>{if(N(document.body,r.iosfix)){const e=parseInt(document.body.style.top,10);W(document.body,r.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),tt()),W([document.documentElement,document.body],[r.shown,r["height-auto"],r["no-backdrop"],r["toast-shown"]])}function ut(e){e=gt(e);const t=et.swalPromiseResolve.get(this),n=dt(this);this.isAwaitingPromise?e.isDismissed||(mt(this),t(e)):n&&t(e)}const dt=e=>{const t=C();if(!t)return!1;const n=me.innerParams.get(e);if(!n||N(t,n.hideClass.popup))return!1;W(t,n.showClass.popup),z(t,n.hideClass.popup);const o=y();return W(o,n.showClass.backdrop),z(o,n.hideClass.backdrop),ht(e,t,n),!0};function pt(e){const t=et.swalPromiseReject.get(this);mt(this),t&&t(e)}const mt=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,me.innerParams.get(e)||e._destroy())},gt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),ht=(e,t,n)=>{var i;const s=y(),r=ne(t);"function"==typeof n.willClose&&n.willClose(t),null===(i=o.eventEmitter)||void 0===i||i.emit("willClose",t),r?ft(e,t,s,n.returnFocus,n.didClose):ct(e,s,n.returnFocus,n.didClose)},ft=(e,t,n,i,s)=>{o.swalCloseEventFinishedCallback=ct.bind(null,e,n,i,s);const r=function(e){var n;e.target===t&&(null===(n=o.swalCloseEventFinishedCallback)||void 0===n||n.call(o),delete o.swalCloseEventFinishedCallback,t.removeEventListener("animationend",r),t.removeEventListener("transitionend",r))};t.addEventListener("animationend",r),t.addEventListener("transitionend",r)},bt=(e,t)=>{setTimeout((()=>{var n;"function"==typeof t&&t.bind(e.params)(),null===(n=o.eventEmitter)||void 0===n||n.emit("didClose"),e._destroy&&e._destroy()}))},yt=e=>{let t=C();if(t||new Jn,t=C(),!t)return;const n=S();q()?Z(A()):vt(t,e),X(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},vt=(e,t)=>{const n=O(),o=S();n&&o&&(!t&&ee(x())&&(t=x()),X(n),t&&(Z(t),o.setAttribute("data-button-to-replace",t.className),n.insertBefore(o,t)),z([e,n],r.loading))},wt=e=>e.checked?1:0,Ct=e=>e.checked?e.value:null,At=e=>e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,Et=(e,t)=>{const n=C();if(!n)return;const o=e=>{"select"===t.input?function(e,t,n){const o=K(e,r.select);if(!o)return;const i=(e,t,o)=>{const i=document.createElement("option");i.value=o,V(i,t),i.selected=Lt(o,n.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,o.appendChild(e),n.forEach((t=>i(e,t[1],t[0])))}else i(o,n,t)})),o.focus()}(n,Bt(e),t):"radio"===t.input&&function(e,t,n){const o=K(e,r.radio);if(!o)return;t.forEach((e=>{const t=e[0],i=e[1],s=document.createElement("input"),a=document.createElement("label");s.type="radio",s.name=r.radio,s.value=t,Lt(t,n.inputValue)&&(s.checked=!0);const l=document.createElement("span");V(l,i),l.className=r.label,a.appendChild(s),a.appendChild(l),o.appendChild(a)}));const i=o.querySelectorAll("input");i.length&&i[0].focus()}(n,Bt(e),t)};h(t.inputOptions)||b(t.inputOptions)?(yt(x()),f(t.inputOptions).then((t=>{e.hideLoading(),o(t)}))):"object"==typeof t.inputOptions?o(t.inputOptions):d("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},kt=(e,t)=>{const n=e.getInput();n&&(Z(n),f(t.inputValue).then((o=>{n.value="number"===t.input?`${parseFloat(o)||0}`:`${o}`,X(n),n.focus(),e.hideLoading()})).catch((t=>{d(`Error in inputValue promise: ${t}`),n.value="",X(n),n.focus(),e.hideLoading()})))};const Bt=e=>{const t=[];return e instanceof Map?e.forEach(((e,n)=>{let o=e;"object"==typeof o&&(o=Bt(o)),t.push([n,o])})):Object.keys(e).forEach((n=>{let o=e[n];"object"==typeof o&&(o=Bt(o)),t.push([n,o])})),t},Lt=(e,t)=>!!t&&t.toString()===e.toString(),$t=(e,t)=>{const n=me.innerParams.get(e);if(!n.input)return void d(`The "input" parameter is needed to be set when using returnInputValueOn${c(t)}`);const o=e.getInput(),i=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return wt(n);case"radio":return Ct(n);case"file":return At(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?xt(e,i,t):o&&!o.checkValidity()?(e.enableButtons(),e.showValidationMessage(n.validationMessage||o.validationMessage)):"deny"===t?Pt(e,i):Ot(e,i)},xt=(e,t,n)=>{const o=me.innerParams.get(e);e.disableInput();Promise.resolve().then((()=>f(o.inputValidator(t,o.validationMessage)))).then((o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===n?Pt(e,t):Ot(e,t)}))},Pt=(e,t)=>{const n=me.innerParams.get(e||void 0);if(n.showLoaderOnDeny&&yt(T()),n.preDeny){e.isAwaitingPromise=!0;Promise.resolve().then((()=>f(n.preDeny(t,n.validationMessage)))).then((n=>{!1===n?(e.hideLoading(),mt(e)):e.close({isDenied:!0,value:void 0===n?t:n})})).catch((t=>St(e||void 0,t)))}else e.close({isDenied:!0,value:t})},Tt=(e,t)=>{e.close({isConfirmed:!0,value:t})},St=(e,t)=>{e.rejectPromise(t)},Ot=(e,t)=>{const n=me.innerParams.get(e||void 0);if(n.showLoaderOnConfirm&&yt(),n.preConfirm){e.resetValidationMessage(),e.isAwaitingPromise=!0;Promise.resolve().then((()=>f(n.preConfirm(t,n.validationMessage)))).then((n=>{ee($())||!1===n?(e.hideLoading(),mt(e)):Tt(e,void 0===n?t:n)})).catch((t=>St(e||void 0,t)))}else Tt(e,t)};function Mt(){const e=me.innerParams.get(this);if(!e)return;const t=me.domCache.get(this);Z(t.loader),q()?e.icon&&X(A()):jt(t),W([t.popup,t.actions],r.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const jt=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?X(t[0],"inline-block"):ee(x())||ee(T())||ee(P())||Z(e.actions)};function Ht(){const e=me.innerParams.get(this),t=me.domCache.get(this);return t?F(t.popup,e.input):null}function It(e,t,n){const o=me.domCache.get(e);t.forEach((e=>{o[e].disabled=n}))}function Dt(e,t){const n=C();if(n&&e)if("radio"===e.type){const e=n.querySelectorAll(`[name="${r.radio}"]`);for(let n=0;n<e.length;n++)e[n].disabled=t}else e.disabled=t}function qt(){It(this,["confirmButton","denyButton","cancelButton"],!1)}function Vt(){It(this,["confirmButton","denyButton","cancelButton"],!0)}function Nt(){Dt(this.getInput(),!1)}function _t(){Dt(this.getInput(),!0)}function Ft(e){const t=me.domCache.get(this),n=me.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=r["validation-message"],n.customClass&&n.customClass.validationMessage&&z(t.validationMessage,n.customClass.validationMessage),X(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid","true"),o.setAttribute("aria-describedby",r["validation-message"]),R(o),z(o,r.inputerror))}function Rt(){const e=me.domCache.get(this);e.validationMessage&&Z(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),W(t,r.inputerror))}const Ut={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},zt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Wt={allowEnterKey:void 0},Kt=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Yt=e=>Object.prototype.hasOwnProperty.call(Ut,e),Xt=e=>-1!==zt.indexOf(e),Zt=e=>Wt[e],Jt=e=>{Yt(e)||u(`Unknown parameter "${e}"`)},Gt=e=>{Kt.includes(e)&&u(`The parameter "${e}" is incompatible with toasts`)},Qt=e=>{const t=Zt(e);t&&m(e,t)};function en(e){const t=C(),n=me.innerParams.get(this);if(!t||N(t,n.hideClass.popup))return void u("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o=tn(e),i=Object.assign({},n,o);Fe(this,i),me.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const tn=e=>{const t={};return Object.keys(e).forEach((n=>{Xt(n)?t[n]=e[n]:u(`Invalid parameter to update: ${n}`)})),t};function nn(){const e=me.domCache.get(this),t=me.innerParams.get(this);t?(e.popup&&o.swalCloseEventFinishedCallback&&(o.swalCloseEventFinishedCallback(),delete o.swalCloseEventFinishedCallback),"function"==typeof t.didDestroy&&t.didDestroy(),o.eventEmitter.emit("didDestroy"),on(this)):sn(this)}const on=e=>{sn(e),delete e.params,delete o.keydownHandler,delete o.keydownTarget,delete o.currentInstance},sn=e=>{e.isAwaitingPromise?(rn(me,e),e.isAwaitingPromise=!0):(rn(et,e),rn(me,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},rn=(e,t)=>{for(const n in e)e[n].delete(t)};var an=Object.freeze({__proto__:null,_destroy:nn,close:ut,closeModal:ut,closePopup:ut,closeToast:ut,disableButtons:Vt,disableInput:_t,disableLoading:Mt,enableButtons:qt,enableInput:Nt,getInput:Ht,handleAwaitingPromise:mt,hideLoading:Mt,rejectPromise:pt,resetValidationMessage:Rt,showValidationMessage:Ft,update:en});const ln=(e,t,n)=>{t.popup.onclick=()=>{e&&(cn(e)||e.timer||e.input)||n(Ue.close)}},cn=e=>!!(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton);let un=!1;const dn=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(un=!0)}}},pn=e=>{e.container.onmousedown=t=>{t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=()=>{},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(un=!0)}}},mn=(e,t,n)=>{t.container.onclick=o=>{un?un=!1:o.target===t.container&&g(e.allowOutsideClick)&&n(Ue.backdrop)}},gn=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const hn=()=>{if(o.timeout)return(()=>{const e=j();if(!e)return;const t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${n}%`})(),o.timeout.stop()},fn=()=>{if(o.timeout){const e=o.timeout.start();return oe(e),e}};let bn=!1;const yn={};const vn=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in yn){const n=t.getAttribute(e);if(n)return void yn[e].fire({template:n})}};o.eventEmitter=new class{constructor(){this.events={}}_getHandlersByEventName(e){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e]}on(e,t){const n=this._getHandlersByEventName(e);n.includes(t)||n.push(t)}once(e,t){var n=this;const o=function(){n.removeListener(e,o);for(var i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];t.apply(n,s)};this.on(e,o)}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];this._getHandlersByEventName(e).forEach((e=>{try{e.apply(this,n)}catch(e){console.error(e)}}))}removeListener(e,t){const n=this._getHandlersByEventName(e),o=n.indexOf(t);o>-1&&n.splice(o,1)}removeAllListeners(e){void 0!==this.events[e]&&(this.events[e].length=0)}reset(){this.events={}}};var wn=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||gn(e[0])?["title","html","icon"].forEach(((n,o)=>{const i=e[o];"string"==typeof i||gn(i)?t[n]=i:void 0!==i&&d(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)})):Object.assign(t,e[0]),t},bindClickHandler:function(){yn[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,bn||(document.body.addEventListener("click",vn),bn=!0)},clickCancel:()=>{var e;return null===(e=P())||void 0===e?void 0:e.click()},clickConfirm:Re,clickDeny:()=>{var e;return null===(e=T())||void 0===e?void 0:e.click()},enableLoading:yt,fire:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new this(...t)},getActions:O,getCancelButton:P,getCloseButton:H,getConfirmButton:x,getContainer:y,getDenyButton:T,getFocusableElements:I,getFooter:M,getHtmlContainer:k,getIcon:A,getIconContent:()=>w(r["icon-content"]),getImage:B,getInputLabel:()=>w(r["input-label"]),getLoader:S,getPopup:C,getProgressSteps:L,getTimerLeft:()=>o.timeout&&o.timeout.getTimerLeft(),getTimerProgressBar:j,getTitle:E,getValidationMessage:$,increaseTimer:e=>{if(o.timeout){const t=o.timeout.increase(e);return oe(t,!0),t}},isDeprecatedParameter:Zt,isLoading:()=>{const e=C();return!!e&&e.hasAttribute("data-loading")},isTimerRunning:()=>!(!o.timeout||!o.timeout.isRunning()),isUpdatableParameter:Xt,isValidParameter:Yt,isVisible:()=>ee(C()),mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},off:(e,t)=>{e?t?o.eventEmitter.removeListener(e,t):o.eventEmitter.removeAllListeners(e):o.eventEmitter.reset()},on:(e,t)=>{o.eventEmitter.on(e,t)},once:(e,t)=>{o.eventEmitter.once(e,t)},resumeTimer:fn,showLoading:yt,stopTimer:hn,toggleTimer:()=>{const e=o.timeout;return e&&(e.running?hn():fn())}});class Cn{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const An=["swal-title","swal-html","swal-footer"],En=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{Sn(e,["name","value"]);const n=e.getAttribute("name"),o=e.getAttribute("value");n&&o&&(t[n]="boolean"==typeof Ut[n]?"false"!==o:"object"==typeof Ut[n]?JSON.parse(o):o)})),t},kn=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const n=e.getAttribute("name"),o=e.getAttribute("value");n&&o&&(t[n]=new Function(`return ${o}`)())})),t},Bn=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{Sn(e,["type","color","aria-label"]);const n=e.getAttribute("type");n&&["confirm","cancel","deny"].includes(n)&&(t[`${n}ButtonText`]=e.innerHTML,t[`show${c(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label")))})),t},Ln=e=>{const t={},n=e.querySelector("swal-image");return n&&(Sn(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")||void 0),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")||void 0),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")||void 0),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt")||void 0)),t},$n=e=>{const t={},n=e.querySelector("swal-icon");return n&&(Sn(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},xn=e=>{const t={},n=e.querySelector("swal-input");n&&(Sn(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const o=Array.from(e.querySelectorAll("swal-input-option"));return o.length&&(t.inputOptions={},o.forEach((e=>{Sn(e,["value"]);const n=e.getAttribute("value");if(!n)return;const o=e.innerHTML;t.inputOptions[n]=o}))),t},Pn=(e,t)=>{const n={};for(const o in t){const i=t[o],s=e.querySelector(i);s&&(Sn(s,[]),n[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},Tn=e=>{const t=An.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const n=e.tagName.toLowerCase();t.includes(n)||u(`Unrecognized element <${n}>`)}))},Sn=(e,t)=>{Array.from(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&u([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])}))},On=e=>{const t=y(),n=C();"function"==typeof e.willOpen&&e.willOpen(n),o.eventEmitter.emit("willOpen",n);const i=window.getComputedStyle(document.body).overflowY;In(t,n,e),setTimeout((()=>{jn(t,n)}),10),D()&&(Hn(t,e.scrollbarPadding,i),(()=>{const e=y();Array.from(document.body.children).forEach((t=>{t.contains(e)||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")||""),t.setAttribute("aria-hidden","true"))}))})()),q()||o.previousActiveElement||(o.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(n))),o.eventEmitter.emit("didOpen",n),W(t,r["no-transition"])},Mn=e=>{const t=C();if(e.target!==t)return;const n=y();t.removeEventListener("animationend",Mn),t.removeEventListener("transitionend",Mn),n.style.overflowY="auto"},jn=(e,t)=>{ne(t)?(e.style.overflowY="hidden",t.addEventListener("animationend",Mn),t.addEventListener("transitionend",Mn)):e.style.overflowY="auto"},Hn=(e,t,n)=>{(()=>{if(nt&&!N(document.body,r.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",z(document.body,r.iosfix),ot()}})(),t&&"hidden"!==n&<(n),setTimeout((()=>{e.scrollTop=0}))},In=(e,t,n)=>{z(e,n.showClass.backdrop),n.animation?(t.style.setProperty("opacity","0","important"),X(t,"grid"),setTimeout((()=>{z(t,n.showClass.popup),t.style.removeProperty("opacity")}),10)):X(t,"grid"),z([document.documentElement,document.body],r.shown),n.heightAuto&&n.backdrop&&!n.toast&&z([document.documentElement,document.body],r["height-auto"])};var Dn=(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),qn=(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL");function Vn(e){!function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=Dn),"url"===e.input&&(e.inputValidator=qn))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&u("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(u('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),re(e)}let Nn;var _n=new WeakMap;class Fn{constructor(){if(n(this,_n,void 0),"undefined"==typeof window)return;Nn=this;for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];const s=Object.freeze(this.constructor.argsToParams(o));var r,a,l;this.params=s,this.isAwaitingPromise=!1,r=_n,a=this,l=this._main(Nn.params),r.set(e(r,a),l)}_main(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((e=>{!1===e.backdrop&&e.allowOutsideClick&&u('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)Jt(t),e.toast&&Gt(t),Qt(t)})(Object.assign({},t,e)),o.currentInstance){const e=et.swalPromiseResolve.get(o.currentInstance),{isAwaitingPromise:t}=o.currentInstance;o.currentInstance._destroy(),t||e({isDismissed:!0}),D()&&tt()}o.currentInstance=Nn;const n=Un(e,t);Vn(n),Object.freeze(n),o.timeout&&(o.timeout.stop(),delete o.timeout),clearTimeout(o.restoreFocusTimeout);const i=zn(Nn);return Fe(Nn,n),me.innerParams.set(Nn,n),Rn(Nn,i,n)}then(e){return t(_n,this).then(e)}finally(e){return t(_n,this).finally(e)}}const Rn=(e,t,n)=>new Promise(((i,s)=>{const r=t=>{e.close({isDismissed:!0,dismiss:t})};et.swalPromiseResolve.set(e,i),et.swalPromiseReject.set(e,s),t.confirmButton.onclick=()=>{(e=>{const t=me.innerParams.get(e);e.disableButtons(),t.input?$t(e,"confirm"):Ot(e,!0)})(e)},t.denyButton.onclick=()=>{(e=>{const t=me.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?$t(e,"deny"):Pt(e,!1)})(e)},t.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Ue.cancel)})(e,r)},t.closeButton.onclick=()=>{r(Ue.close)},((e,t,n)=>{e.toast?ln(e,t,n):(dn(t),pn(t),mn(e,t,n))})(n,t,r),((e,t,n)=>{ze(e),t.toast||(e.keydownHandler=e=>Xe(t,e,n),e.keydownTarget=t.keydownListenerCapture?window:C(),e.keydownListenerCapture=t.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)})(o,n,r),((e,t)=>{"select"===t.input||"radio"===t.input?Et(e,t):["text","email","number","tel","textarea"].some((e=>e===t.input))&&(h(t.inputValue)||b(t.inputValue))&&(yt(x()),kt(e,t))})(e,n),On(n),Wn(o,n,r),Kn(t,n),setTimeout((()=>{t.container.scrollTop=0}))})),Un=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return Tn(n),Object.assign(En(n),kn(n),Bn(n),Ln(n),$n(n),xn(n),Pn(n,An))})(e),o=Object.assign({},Ut,t,n,e);return o.showClass=Object.assign({},Ut.showClass,o.showClass),o.hideClass=Object.assign({},Ut.hideClass,o.hideClass),!1===o.animation&&(o.showClass={backdrop:"swal2-noanimation"},o.hideClass={}),o},zn=e=>{const t={popup:C(),container:y(),actions:O(),confirmButton:x(),denyButton:T(),cancelButton:P(),loader:S(),closeButton:H(),validationMessage:$(),progressSteps:L()};return me.domCache.set(e,t),t},Wn=(e,t,n)=>{const o=j();Z(o),t.timer&&(e.timeout=new Cn((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(X(o),_(o,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&oe(t.timer)}))))},Kn=(e,t)=>{if(!t.toast)return g(t.allowEnterKey)?void(Yn(e)||Xn(e,t)||We(-1,1)):(m("allowEnterKey"),void Zn())},Yn=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const e of t)if(e instanceof HTMLElement&&ee(e))return e.focus(),!0;return!1},Xn=(e,t)=>t.focusDeny&&ee(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&ee(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!ee(e.confirmButton))&&(e.confirmButton.focus(),!0),Zn=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout((()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((()=>{e.play().catch((()=>{}))}),2500)}),500):localStorage.setItem("swal-initiation",`${e}`)}Fn.prototype.disableButtons=Vt,Fn.prototype.enableButtons=qt,Fn.prototype.getInput=Ht,Fn.prototype.disableInput=_t,Fn.prototype.enableInput=Nt,Fn.prototype.hideLoading=Mt,Fn.prototype.disableLoading=Mt,Fn.prototype.showValidationMessage=Ft,Fn.prototype.resetValidationMessage=Rt,Fn.prototype.close=ut,Fn.prototype.closePopup=ut,Fn.prototype.closeModal=ut,Fn.prototype.closeToast=ut,Fn.prototype.rejectPromise=pt,Fn.prototype.update=en,Fn.prototype._destroy=nn,Object.assign(Fn,wn),Object.keys(an).forEach((e=>{Fn[e]=function(){return Nn&&Nn[e]?Nn[e](...arguments):null}})),Fn.DismissReason=Ue,Fn.version="11.15.3";const Jn=Fn;Jn.default=Jn;export{Jn as default}; diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.js b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.js index 020a942..862080e 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.js +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.js @@ -1,5 +1,5 @@ /*! -* sweetalert2 v11.6.9 +* sweetalert2 v11.15.3 * Released under the MIT License. */ (function (global, factory) { @@ -8,56 +8,84 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Sweetalert2 = factory()); })(this, (function () { 'use strict'; + function _assertClassBrand(e, t, n) { + if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; + throw new TypeError("Private element is not present on this object"); + } + function _checkPrivateRedeclaration(e, t) { + if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); + } + function _classPrivateFieldGet2(s, a) { + return s.get(_assertClassBrand(s, a)); + } + function _classPrivateFieldInitSpec(e, t, a) { + _checkPrivateRedeclaration(e, t), t.set(e, a); + } + function _classPrivateFieldSet2(s, a, r) { + return s.set(_assertClassBrand(s, a), r), r; + } + + const RESTORE_FOCUS_TIMEOUT = 100; + + /** @type {GlobalState} */ + const globalState = {}; + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement instanceof HTMLElement) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; + /** - * This module contains `WeakMap`s for each effectively-"private property" that a `Swal` has. - * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` - * This is the approach that Babel will probably take to implement private methods/fields - * https://github.com/tc39/proposal-private-methods - * https://github.com/babel/babel/pull/7555 - * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* - * then we can use that language feature. + * Restore previous active (focused) element + * + * @param {boolean} returnFocus + * @returns {Promise<void>} */ + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 - var privateProps = { - awaitingPromise: new WeakMap(), - promise: new WeakMap(), - innerParams: new WeakMap(), - domCache: new WeakMap() + window.scrollTo(x, y); + }); }; const swalPrefix = 'swal2-'; /** - * @param {string[]} items - * @returns {object} + * @typedef {Record<SwalClass, string>} SwalClasses */ - const prefix = items => { - const result = {}; - for (const i in items) { - result[items[i]] = swalPrefix + items[i]; - } - return result; - }; - const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); - const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); - - const consolePrefix = 'SweetAlert2:'; /** - * Filter the unique values into a new array - * - * @param {Array} arr - * @returns {Array} + * @typedef {'success' | 'warning' | 'info' | 'question' | 'error'} SwalIcon + * @typedef {Record<SwalIcon, string>} SwalIcons */ - const uniqueArray = arr => { - const result = []; - for (let i = 0; i < arr.length; i++) { - if (result.indexOf(arr[i]) === -1) { - result.push(arr[i]); - } - } - return result; - }; + + /** @type {SwalClass[]} */ + const classNames = ['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error', 'draggable', 'dragging']; + const swalClasses = classNames.reduce((acc, className) => { + acc[className] = swalPrefix + className; + return acc; + }, /** @type {SwalClasses} */{}); + + /** @type {SwalIcon[]} */ + const icons = ['success', 'warning', 'info', 'question', 'error']; + const iconTypes = icons.reduce((acc, icon) => { + acc[icon] = swalPrefix + icon; + return acc; + }, /** @type {SwalIcons} */{}); + + const consolePrefix = 'SweetAlert2:'; /** * Capitalize the first letter of a string @@ -70,7 +98,7 @@ /** * Standardize console warnings * - * @param {string | Array} message + * @param {string | string[]} message */ const warn = message => { console.warn(`${consolePrefix} ${typeof message === 'object' ? message.join(' ') : message}`); @@ -88,7 +116,7 @@ /** * Private global state for `warnOnce` * - * @type {Array} + * @type {string[]} * @private */ const previousWarnOnceMessages = []; @@ -109,10 +137,11 @@ * Show a one-time console warning about deprecated params/methods * * @param {string} deprecatedParam - * @param {string} useInstead + * @param {string?} useInstead */ - const warnAboutDeprecation = (deprecatedParam, useInstead) => { - warnOnce(`"${deprecatedParam}" is deprecated and will be removed in the next major release. Please use "${useInstead}" instead.`); + const warnAboutDeprecation = function (deprecatedParam) { + let useInstead = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + warnOnce(`"${deprecatedParam}" is deprecated and will be removed in the next major release.${useInstead ? ` Use "${useInstead}" instead.` : ''}`); }; /** @@ -132,7 +161,7 @@ /** * @param {any} arg - * @returns {Promise} + * @returns {Promise<any>} */ const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); @@ -199,7 +228,7 @@ /** * @returns {HTMLElement | null} */ - const getProgressSteps$1 = () => elementByClass(swalClasses['progress-steps']); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); /** * @returns {HTMLElement | null} @@ -207,29 +236,29 @@ const getValidationMessage = () => elementByClass(swalClasses['validation-message']); /** - * @returns {HTMLElement | null} + * @returns {HTMLButtonElement | null} */ - const getConfirmButton = () => elementBySelector(`.${swalClasses.actions} .${swalClasses.confirm}`); + const getConfirmButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.confirm}`)); /** - * @returns {HTMLElement | null} + * @returns {HTMLButtonElement | null} */ - const getDenyButton = () => elementBySelector(`.${swalClasses.actions} .${swalClasses.deny}`); + const getCancelButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.cancel}`)); /** - * @returns {HTMLElement | null} + * @returns {HTMLButtonElement | null} */ - const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getDenyButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.deny}`)); /** * @returns {HTMLElement | null} */ - const getLoader = () => elementBySelector(`.${swalClasses.loader}`); + const getInputLabel = () => elementByClass(swalClasses['input-label']); /** * @returns {HTMLElement | null} */ - const getCancelButton = () => elementBySelector(`.${swalClasses.actions} .${swalClasses.cancel}`); + const getLoader = () => elementBySelector(`.${swalClasses.loader}`); /** * @returns {HTMLElement | null} @@ -272,11 +301,17 @@ * @returns {HTMLElement[]} */ const getFocusableElements = () => { - const focusableElementsWithTabindex = Array.from(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) + const popup = getPopup(); + if (!popup) { + return []; + } + /** @type {NodeListOf<HTMLElement>} */ + const focusableElementsWithTabindex = popup.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'); + const focusableElementsWithTabindexSorted = Array.from(focusableElementsWithTabindex) // sort according to tabindex .sort((a, b) => { - const tabindexA = parseInt(a.getAttribute('tabindex')); - const tabindexB = parseInt(b.getAttribute('tabindex')); + const tabindexA = parseInt(a.getAttribute('tabindex') || '0'); + const tabindexB = parseInt(b.getAttribute('tabindex') || '0'); if (tabindexA > tabindexB) { return 1; } else if (tabindexA < tabindexB) { @@ -284,8 +319,11 @@ } return 0; }); - const otherFocusableElements = Array.from(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); - return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible$1(el)); + + /** @type {NodeListOf<HTMLElement>} */ + const otherFocusableElements = popup.querySelectorAll(focusable); + const otherFocusableElementsFiltered = Array.from(otherFocusableElements).filter(el => el.getAttribute('tabindex') !== '-1'); + return [...new Set(focusableElementsWithTabindexSorted.concat(otherFocusableElementsFiltered))].filter(el => isVisible$1(el)); }; /** @@ -299,19 +337,22 @@ * @returns {boolean} */ const isToast = () => { - return getPopup() && hasClass(getPopup(), swalClasses.toast); + const popup = getPopup(); + if (!popup) { + return false; + } + return hasClass(popup, swalClasses.toast); }; /** * @returns {boolean} */ const isLoading = () => { - return getPopup().hasAttribute('data-loading'); - }; - - // Remember state in cases where opening and handling a modal will fiddle with it. - const states = { - previousBodyPadding: null + const popup = getPopup(); + if (!popup) { + return false; + } + return popup.hasAttribute('data-loading'); }; /** @@ -326,16 +367,22 @@ if (html) { const parser = new DOMParser(); const parsed = parser.parseFromString(html, `text/html`); - Array.from(parsed.querySelector('head').childNodes).forEach(child => { - elem.appendChild(child); - }); - Array.from(parsed.querySelector('body').childNodes).forEach(child => { - if (child instanceof HTMLVideoElement || child instanceof HTMLAudioElement) { - elem.appendChild(child.cloneNode(true)); // https://github.com/sweetalert2/sweetalert2/issues/2507 - } else { + const head = parsed.querySelector('head'); + if (head) { + Array.from(head.childNodes).forEach(child => { elem.appendChild(child); - } - }); + }); + } + const body = parsed.querySelector('body'); + if (body) { + Array.from(body.childNodes).forEach(child => { + if (child instanceof HTMLVideoElement || child instanceof HTMLAudioElement) { + elem.appendChild(child.cloneNode(true)); // https://github.com/sweetalert2/sweetalert2/issues/2507 + } else { + elem.appendChild(child); + } + }); + } } }; @@ -363,7 +410,7 @@ */ const removeCustomClasses = (elem, params) => { Array.from(elem.classList).forEach(className => { - if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass || {}).includes(className)) { elem.classList.remove(className); } }); @@ -376,18 +423,23 @@ */ const applyCustomClass = (elem, params, className) => { removeCustomClasses(elem, params); - if (params.customClass && params.customClass[className]) { - if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { - warn(`Invalid type of customClass.${className}! Expected string or iterable object, got "${typeof params.customClass[className]}"`); - return; - } - addClass(elem, params.customClass[className]); + if (!params.customClass) { + return; + } + const customClass = params.customClass[(/** @type {keyof SweetAlertCustomClass} */className)]; + if (!customClass) { + return; } + if (typeof customClass !== 'string' && !customClass.forEach) { + warn(`Invalid type of customClass.${className}! Expected string or iterable object, got "${typeof customClass}"`); + return; + } + addClass(elem, customClass); }; /** * @param {HTMLElement} popup - * @param {import('./renderers/renderInput').InputClass} inputClass + * @param {import('./renderers/renderInput').InputClass | SweetAlertInput} inputClass * @returns {HTMLInputElement | null} */ const getInput$1 = (popup, inputClass) => { @@ -427,7 +479,7 @@ /** * @param {HTMLElement | HTMLElement[] | null} target - * @param {string | string[] | readonly string[]} classList + * @param {string | string[] | readonly string[] | undefined} classList * @param {boolean} condition */ const toggleClass = (target, classList, condition) => { @@ -440,17 +492,25 @@ classList.forEach(className => { if (Array.isArray(target)) { target.forEach(elem => { - condition ? elem.classList.add(className) : elem.classList.remove(className); + if (condition) { + elem.classList.add(className); + } else { + elem.classList.remove(className); + } }); } else { - condition ? target.classList.add(className) : target.classList.remove(className); + if (condition) { + target.classList.add(className); + } else { + target.classList.remove(className); + } } }); }; /** * @param {HTMLElement | HTMLElement[] | null} target - * @param {string | string[] | readonly string[]} classList + * @param {string | string[] | readonly string[] | undefined} classList */ const addClass = (target, classList) => { toggleClass(target, classList, true); @@ -458,7 +518,7 @@ /** * @param {HTMLElement | HTMLElement[] | null} target - * @param {string | string[] | readonly string[]} classList + * @param {string | string[] | readonly string[] | undefined} classList */ const removeClass = (target, classList) => { toggleClass(target, classList, false); @@ -491,28 +551,51 @@ value = parseInt(value); } if (value || parseInt(value) === 0) { - elem.style[property] = typeof value === 'number' ? `${value}px` : value; + elem.style.setProperty(property, typeof value === 'number' ? `${value}px` : value); } else { elem.style.removeProperty(property); } }; /** - * @param {HTMLElement} elem + * @param {HTMLElement | null} elem * @param {string} display */ const show = function (elem) { let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex'; + if (!elem) { + return; + } elem.style.display = display; }; /** - * @param {HTMLElement} elem + * @param {HTMLElement | null} elem */ const hide = elem => { + if (!elem) { + return; + } elem.style.display = 'none'; }; + /** + * @param {HTMLElement | null} elem + * @param {string} display + */ + const showWhenInnerHtmlPresent = function (elem) { + let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'block'; + if (!elem) { + return; + } + new MutationObserver(() => { + toggle(elem, elem.innerHTML, display); + }).observe(elem, { + childList: true, + subtree: true + }); + }; + /** * @param {HTMLElement} parent * @param {string} selector @@ -520,10 +603,10 @@ * @param {string} value */ const setStyle = (parent, selector, property, value) => { - /** @type {HTMLElement} */ + /** @type {HTMLElement | null} */ const el = parent.querySelector(selector); if (el) { - el.style[property] = value; + el.style.setProperty(property, value); } }; @@ -534,13 +617,17 @@ */ const toggle = function (elem, condition) { let display = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'flex'; - condition ? show(elem, display) : hide(elem); + if (condition) { + show(elem, display); + } else { + hide(elem); + } }; /** * borrowed from jquery $(elem).is(':visible') implementation * - * @param {HTMLElement} elem + * @param {HTMLElement | null} elem * @returns {boolean} */ const isVisible$1 = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); @@ -576,6 +663,9 @@ const animateTimerProgressBar = function (timer) { let reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; const timerProgressBar = getTimerProgressBar(); + if (!timerProgressBar) { + return; + } if (isVisible$1(timerProgressBar)) { if (reset) { timerProgressBar.style.transition = 'none'; @@ -589,50 +679,17 @@ }; const stopTimerProgressBar = () => { const timerProgressBar = getTimerProgressBar(); + if (!timerProgressBar) { + return; + } const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); timerProgressBar.style.removeProperty('transition'); timerProgressBar.style.width = '100%'; const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); const timerProgressBarPercent = timerProgressBarWidth / timerProgressBarFullWidth * 100; - timerProgressBar.style.removeProperty('transition'); timerProgressBar.style.width = `${timerProgressBarPercent}%`; }; - const RESTORE_FOCUS_TIMEOUT = 100; - - /** @type {GlobalState} */ - const globalState = {}; - const focusPreviousActiveElement = () => { - if (globalState.previousActiveElement instanceof HTMLElement) { - globalState.previousActiveElement.focus(); - globalState.previousActiveElement = null; - } else if (document.body) { - document.body.focus(); - } - }; - - /** - * Restore previous active (focused) element - * - * @param {boolean} returnFocus - * @returns {Promise} - */ - const restoreActiveElement = returnFocus => { - return new Promise(resolve => { - if (!returnFocus) { - return resolve(); - } - const x = window.scrollX; - const y = window.scrollY; - globalState.restoreFocusTimeout = setTimeout(() => { - focusPreviousActiveElement(); - resolve(); - }, RESTORE_FOCUS_TIMEOUT); // issues/900 - - window.scrollTo(x, y); - }); - }; - /** * Detect Node env * @@ -648,19 +705,19 @@ <img class="${swalClasses.image}" /> <h2 class="${swalClasses.title}" id="${swalClasses.title}"></h2> <div class="${swalClasses['html-container']}" id="${swalClasses['html-container']}"></div> - <input class="${swalClasses.input}" /> + <input class="${swalClasses.input}" id="${swalClasses.input}" /> <input type="file" class="${swalClasses.file}" /> <div class="${swalClasses.range}"> <input type="range" /> <output></output> </div> - <select class="${swalClasses.select}"></select> + <select class="${swalClasses.select}" id="${swalClasses.select}"></select> <div class="${swalClasses.radio}"></div> - <label for="${swalClasses.checkbox}" class="${swalClasses.checkbox}"> - <input type="checkbox" /> + <label class="${swalClasses.checkbox}"> + <input type="checkbox" id="${swalClasses.checkbox}" /> <span class="${swalClasses.label}"></span> </label> - <textarea class="${swalClasses.textarea}"></textarea> + <textarea class="${swalClasses.textarea}" id="${swalClasses.textarea}"></textarea> <div class="${swalClasses['validation-message']}" id="${swalClasses['validation-message']}"></div> <div class="${swalClasses.actions}"> <div class="${swalClasses.loader}"></div> @@ -752,8 +809,6 @@ const init = params => { // Clean up the old popup container if it exists const oldContainerExisted = resetOldContainer(); - - /* istanbul ignore if */ if (isNodeEnv()) { error('SweetAlert2 requires document to initialize'); return; @@ -793,7 +848,7 @@ }; /** - * @param {object} param + * @param {any} param * @param {HTMLElement} target */ const handleObject = (param, target) => { @@ -810,12 +865,12 @@ /** * @param {HTMLElement} target - * @param {HTMLElement} elem + * @param {any} elem */ const handleJqueryElem = (target, elem) => { target.textContent = ''; if (0 in elem) { - for (let i = 0; (i in elem); i++) { + for (let i = 0; i in elem; i++) { target.appendChild(elem[i].cloneNode(true)); } } else { @@ -824,51 +879,15 @@ }; /** - * @returns {'webkitAnimationEnd' | 'animationend' | false} - */ - const animationEndEvent = (() => { - // Prevent run in Node env - /* istanbul ignore if */ - if (isNodeEnv()) { - return false; - } - const testEl = document.createElement('div'); - const transEndEventNames = { - WebkitAnimation: 'webkitAnimationEnd', - // Chrome, Safari and Opera - animation: 'animationend' // Standard syntax - }; - - for (const i in transEndEventNames) { - if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { - return transEndEventNames[i]; - } - } - return false; - })(); - - /** - * Measure scrollbar width for padding body during modal show/hide - * https://github.com/twbs/bootstrap/blob/master/js/src/modal.js - * - * @returns {number} - */ - const measureScrollbar = () => { - const scrollDiv = document.createElement('div'); - scrollDiv.className = swalClasses['scrollbar-measure']; - document.body.appendChild(scrollDiv); - const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; - document.body.removeChild(scrollDiv); - return scrollbarWidth; - }; - - /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderActions = (instance, params) => { const actions = getActions(); const loader = getLoader(); + if (!actions || !loader) { + return; + } // Actions (buttons) wrapper if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { @@ -884,7 +903,7 @@ renderButtons(actions, loader, params); // Loader - setInnerHtml(loader, params.loaderHtml); + setInnerHtml(loader, params.loaderHtml || ''); applyCustomClass(loader, params, 'loader'); }; @@ -897,6 +916,9 @@ const confirmButton = getConfirmButton(); const denyButton = getDenyButton(); const cancelButton = getCancelButton(); + if (!confirmButton || !denyButton || !cancelButton) { + return; + } // Render buttons renderButton(confirmButton, 'confirm', params); @@ -949,32 +971,35 @@ * @param {SweetAlertOptions} params */ function renderButton(button, buttonType, params) { - toggle(button, params[`show${capitalizeFirstLetter(buttonType)}Button`], 'inline-block'); - setInnerHtml(button, params[`${buttonType}ButtonText`]); // Set caption text - button.setAttribute('aria-label', params[`${buttonType}ButtonAriaLabel`]); // ARIA label + const buttonName = /** @type {'Confirm' | 'Deny' | 'Cancel'} */capitalizeFirstLetter(buttonType); + toggle(button, params[`show${buttonName}Button`], 'inline-block'); + setInnerHtml(button, params[`${buttonType}ButtonText`] || ''); // Set caption text + button.setAttribute('aria-label', params[`${buttonType}ButtonAriaLabel`] || ''); // ARIA label // Add buttons custom classes button.className = swalClasses[buttonType]; applyCustomClass(button, params, `${buttonType}Button`); - addClass(button, params[`${buttonType}ButtonClass`]); } /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderCloseButton = (instance, params) => { const closeButton = getCloseButton(); - setInnerHtml(closeButton, params.closeButtonHtml); + if (!closeButton) { + return; + } + setInnerHtml(closeButton, params.closeButtonHtml || ''); // Custom class applyCustomClass(closeButton, params, 'closeButton'); toggle(closeButton, params.showCloseButton); - closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel || ''); }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderContainer = (instance, params) => { @@ -1007,6 +1032,9 @@ * @param {SweetAlertOptions['position']} position */ function handlePositionParam(container, position) { + if (!position) { + return; + } if (position in swalClasses) { addClass(container, swalClasses[position]); } else { @@ -1020,29 +1048,49 @@ * @param {SweetAlertOptions['grow']} grow */ function handleGrowParam(container, grow) { - if (grow && typeof grow === 'string') { - const growClass = `grow-${grow}`; - if (growClass in swalClasses) { - addClass(container, swalClasses[growClass]); - } + if (!grow) { + return; } + addClass(container, swalClasses[`grow-${grow}`]); } + /** + * This module contains `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + + var privateProps = { + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + /// <reference path="../../../../sweetalert2.d.ts"/> + /** @type {InputClass[]} */ const inputClasses = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderInput = (instance, params) => { const popup = getPopup(); + if (!popup) { + return; + } const innerParams = privateProps.innerParams.get(instance); const rerender = !innerParams || params.input !== innerParams.input; inputClasses.forEach(inputClass => { const inputContainer = getDirectChildByClass(popup, swalClasses[inputClass]); + if (!inputContainer) { + return; + } // set attributes setAttributes(inputClass, params.inputAttributes); @@ -1066,18 +1114,26 @@ * @param {SweetAlertOptions} params */ const showInput = params => { + if (!params.input) { + return; + } if (!renderInputType[params.input]) { - error(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${params.input}"`); + error(`Unexpected type of input! Expected ${Object.keys(renderInputType).join(' | ')}, got "${params.input}"`); return; } const inputContainer = getInputContainer(params.input); + if (!inputContainer) { + return; + } const input = renderInputType[params.input](inputContainer, params); show(inputContainer); // input autofocus - setTimeout(() => { - focusInput(input); - }); + if (params.inputAutoFocus) { + setTimeout(() => { + focusInput(input); + }); + } }; /** @@ -1086,7 +1142,7 @@ const removeAttributes = input => { for (let i = 0; i < input.attributes.length; i++) { const attrName = input.attributes[i].name; - if (!['type', 'value', 'style'].includes(attrName)) { + if (!['id', 'type', 'value', 'style'].includes(attrName)) { input.removeAttribute(attrName); } } @@ -1097,7 +1153,11 @@ * @param {SweetAlertOptions['inputAttributes']} inputAttributes */ const setAttributes = (inputClass, inputAttributes) => { - const input = getInput$1(getPopup(), inputClass); + const popup = getPopup(); + if (!popup) { + return; + } + const input = getInput$1(popup, inputClass); if (!input) { return; } @@ -1111,9 +1171,12 @@ * @param {SweetAlertOptions} params */ const setCustomClass = params => { + if (!params.input) { + return; + } const inputContainer = getInputContainer(params.input); - if (typeof params.customClass === 'object') { - addClass(inputContainer, params.customClass.input); + if (inputContainer) { + applyCustomClass(inputContainer, params, 'input'); } }; @@ -1122,7 +1185,7 @@ * @param {SweetAlertOptions} params */ const setInputPlaceholder = (input, params) => { - if (!input.placeholder || params.inputPlaceholder) { + if (!input.placeholder && params.inputPlaceholder) { input.placeholder = params.inputPlaceholder; } }; @@ -1134,7 +1197,6 @@ */ const setInputLabel = (input, prependTo, params) => { if (params.inputLabel) { - input.id = swalClasses.input; const label = document.createElement('label'); const labelClass = swalClasses['input-label']; label.setAttribute('for', input.id); @@ -1148,11 +1210,15 @@ }; /** - * @param {SweetAlertOptions['input']} inputType - * @returns {HTMLElement} + * @param {SweetAlertInput} inputType + * @returns {HTMLElement | undefined} */ const getInputContainer = inputType => { - return getDirectChildByClass(getPopup(), swalClasses[inputType] || swalClasses.input); + const popup = getPopup(); + if (!popup) { + return; + } + return getDirectChildByClass(popup, swalClasses[(/** @type {SwalClass} */inputType)] || swalClasses.input); }; /** @@ -1167,7 +1233,7 @@ } }; - /** @type {Record<string, (input: Input | HTMLElement, params: SweetAlertOptions) => Input>} */ + /** @type {Record<SweetAlertInput, (input: Input | HTMLElement, params: SweetAlertOptions) => Input>} */ const renderInputType = {}; /** @@ -1175,7 +1241,8 @@ * @param {SweetAlertOptions} params * @returns {HTMLInputElement} */ - renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = renderInputType.search = renderInputType.date = renderInputType['datetime-local'] = renderInputType.time = renderInputType.week = renderInputType.month = /** @type {(input: Input | HTMLElement, params: SweetAlertOptions) => Input} */ + (input, params) => { checkAndSetInputValue(input, params.inputValue); setInputLabel(input, input, params); setInputPlaceholder(input, params); @@ -1245,10 +1312,9 @@ renderInputType.checkbox = (checkboxContainer, params) => { const checkbox = getInput$1(getPopup(), 'checkbox'); checkbox.value = '1'; - checkbox.id = swalClasses.checkbox; checkbox.checked = Boolean(params.inputValue); const label = checkboxContainer.querySelector('span'); - setInnerHtml(label, params.inputPlaceholder); + setInnerHtml(label, params.inputPlaceholder || params.inputLabel); return checkbox; }; @@ -1274,11 +1340,15 @@ if ('MutationObserver' in window) { const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); const textareaResizeHandler = () => { + // check if texarea is still in document (i.e. popup wasn't closed in the meantime) + if (!document.body.contains(textarea)) { + return; + } const textareaWidth = textarea.offsetWidth + getMargin(textarea); if (textareaWidth > initialPopupWidth) { getPopup().style.width = `${textareaWidth}px`; } else { - getPopup().style.width = null; + applyNumericalStyle(getPopup(), 'width', params.width); } }; new MutationObserver(textareaResizeHandler).observe(textarea, { @@ -1291,11 +1361,15 @@ }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderContent = (instance, params) => { const htmlContainer = getHtmlContainer(); + if (!htmlContainer) { + return; + } + showWhenInnerHtmlPresent(htmlContainer); applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML @@ -1318,12 +1392,16 @@ }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderFooter = (instance, params) => { const footer = getFooter(); - toggle(footer, params.footer); + if (!footer) { + return; + } + showWhenInnerHtmlPresent(footer); + toggle(footer, params.footer, 'block'); if (params.footer) { parseHtmlToContainer(params.footer, footer); } @@ -1333,12 +1411,15 @@ }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderIcon = (instance, params) => { const innerParams = privateProps.innerParams.get(instance); const icon = getIcon(); + if (!icon) { + return; + } // if the given icon already rendered, apply the styling without re-rendering the icon if (innerParams && params.icon === innerParams.icon) { @@ -1363,7 +1444,7 @@ applyStyles(icon, params); // Animate icon - addClass(icon, params.showClass.icon); + addClass(icon, params.showClass && params.showClass.icon); }; /** @@ -1371,12 +1452,12 @@ * @param {SweetAlertOptions} params */ const applyStyles = (icon, params) => { - for (const iconType in iconTypes) { + for (const [iconType, iconClassName] of Object.entries(iconTypes)) { if (params.icon !== iconType) { - removeClass(icon, iconTypes[iconType]); + removeClass(icon, iconClassName); } } - addClass(icon, iconTypes[params.icon]); + addClass(icon, params.icon && iconTypes[params.icon]); // Icon color setColor(icon, params); @@ -1391,6 +1472,9 @@ // Adjust success icon background color to match the popup background color const adjustSuccessIconBackgroundColor = () => { const popup = getPopup(); + if (!popup) { + return; + } const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); /** @type {NodeListOf<HTMLElement>} */ const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); @@ -1416,16 +1500,19 @@ * @param {SweetAlertOptions} params */ const setContent = (icon, params) => { - let oldContent = icon.innerHTML; - let newContent; - if (params.iconHtml) { + if (!params.icon && !params.iconHtml) { + return; + } + let oldContent = icon.innerHTML; + let newContent = ''; + if (params.iconHtml) { newContent = iconContent(params.iconHtml); } else if (params.icon === 'success') { newContent = successIconHtml; oldContent = oldContent.replace(/ style=".*?"/g, ''); // undo adjustSuccessIconBackgroundColor() } else if (params.icon === 'error') { newContent = errorIconHtml; - } else { + } else if (params.icon) { const defaultIconHtml = { question: '?', warning: '!', @@ -1449,9 +1536,9 @@ icon.style.color = params.iconColor; icon.style.borderColor = params.iconColor; for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { - setStyle(icon, sel, 'backgroundColor', params.iconColor); + setStyle(icon, sel, 'background-color', params.iconColor); } - setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + setStyle(icon, '.swal2-success-ring', 'border-color', params.iconColor); }; /** @@ -1461,11 +1548,14 @@ const iconContent = content => `<div class="${swalClasses['icon-content']}">${content}</div>`; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderImage = (instance, params) => { const image = getImage(); + if (!image) { + return; + } if (!params.imageUrl) { hide(image); return; @@ -1474,7 +1564,7 @@ // Src, alt image.setAttribute('src', params.imageUrl); - image.setAttribute('alt', params.imageAlt); + image.setAttribute('alt', params.imageAlt || ''); // Width, height applyNumericalStyle(image, 'width', params.imageWidth); @@ -1485,20 +1575,112 @@ applyCustomClass(image, params, 'image'); }; + let dragging = false; + let mousedownX = 0; + let mousedownY = 0; + let initialX = 0; + let initialY = 0; + + /** + * @param {HTMLElement} popup + */ + const addDraggableListeners = popup => { + popup.addEventListener('mousedown', down); + document.body.addEventListener('mousemove', move); + popup.addEventListener('mouseup', up); + popup.addEventListener('touchstart', down); + document.body.addEventListener('touchmove', move); + popup.addEventListener('touchend', up); + }; + + /** + * @param {HTMLElement} popup + */ + const removeDraggableListeners = popup => { + popup.removeEventListener('mousedown', down); + document.body.removeEventListener('mousemove', move); + popup.removeEventListener('mouseup', up); + popup.removeEventListener('touchstart', down); + document.body.removeEventListener('touchmove', move); + popup.removeEventListener('touchend', up); + }; + + /** + * @param {MouseEvent | TouchEvent} event + */ + const down = event => { + const popup = getPopup(); + if (event.target === popup || getIcon().contains(/** @type {HTMLElement} */event.target)) { + dragging = true; + const clientXY = getClientXY(event); + mousedownX = clientXY.clientX; + mousedownY = clientXY.clientY; + initialX = parseInt(popup.style.insetInlineStart) || 0; + initialY = parseInt(popup.style.insetBlockStart) || 0; + addClass(popup, 'swal2-dragging'); + } + }; + + /** + * @param {MouseEvent | TouchEvent} event + */ + const move = event => { + const popup = getPopup(); + if (dragging) { + let { + clientX, + clientY + } = getClientXY(event); + popup.style.insetInlineStart = `${initialX + (clientX - mousedownX)}px`; + popup.style.insetBlockStart = `${initialY + (clientY - mousedownY)}px`; + } + }; + const up = () => { + const popup = getPopup(); + dragging = false; + removeClass(popup, 'swal2-dragging'); + }; + + /** + * @param {MouseEvent | TouchEvent} event + * @returns {{ clientX: number, clientY: number }} + */ + const getClientXY = event => { + let clientX = 0, + clientY = 0; + if (event.type.startsWith('mouse')) { + clientX = /** @type {MouseEvent} */event.clientX; + clientY = /** @type {MouseEvent} */event.clientY; + } else if (event.type.startsWith('touch')) { + clientX = /** @type {TouchEvent} */event.touches[0].clientX; + clientY = /** @type {TouchEvent} */event.touches[0].clientY; + } + return { + clientX, + clientY + }; + }; + /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderPopup = (instance, params) => { const container = getContainer(); const popup = getPopup(); + if (!container || !popup) { + return; + } // Width // https://github.com/sweetalert2/sweetalert2/issues/2170 if (params.toast) { applyNumericalStyle(container, 'width', params.width); popup.style.width = '100%'; - popup.insertBefore(getLoader(), getIcon()); + const loader = getLoader(); + if (loader) { + popup.insertBefore(loader, getIcon()); + } } else { applyNumericalStyle(popup, 'width', params.width); } @@ -1519,6 +1701,13 @@ // Classes addClasses$1(popup, params); + if (params.draggable && !params.toast) { + addClass(popup, swalClasses.draggable); + addDraggableListeners(popup); + } else { + removeClass(popup, swalClasses.draggable); + removeDraggableListeners(popup); + } }; /** @@ -1526,8 +1715,9 @@ * @param {SweetAlertOptions} params */ const addClasses$1 = (popup, params) => { + const showClass = params.showClass || {}; // Default Class + showClass when updating Swal.update({}) - popup.className = `${swalClasses.popup} ${isVisible$1(popup) ? params.showClass.popup : ''}`; + popup.className = `${swalClasses.popup} ${isVisible$1(popup) ? showClass.popup : ''}`; if (params.toast) { addClass([document.documentElement, document.body], swalClasses['toast-shown']); addClass(popup, swalClasses.toast); @@ -1537,6 +1727,7 @@ // Custom class applyCustomClass(popup, params, 'popup'); + // TODO: remove in the next major if (typeof params.customClass === 'string') { addClass(popup, params.customClass); } @@ -1548,27 +1739,34 @@ }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderProgressSteps = (instance, params) => { - const progressStepsContainer = getProgressSteps$1(); - if (!params.progressSteps || params.progressSteps.length === 0) { + const progressStepsContainer = getProgressSteps(); + if (!progressStepsContainer) { + return; + } + const { + progressSteps, + currentProgressStep + } = params; + if (!progressSteps || progressSteps.length === 0 || currentProgressStep === undefined) { hide(progressStepsContainer); return; } show(progressStepsContainer); progressStepsContainer.textContent = ''; - if (params.currentProgressStep >= params.progressSteps.length) { + if (currentProgressStep >= progressSteps.length) { warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); } - params.progressSteps.forEach((step, index) => { + progressSteps.forEach((step, index) => { const stepEl = createStepElement(step); progressStepsContainer.appendChild(stepEl); - if (index === params.currentProgressStep) { + if (index === currentProgressStep) { addClass(stepEl, swalClasses['active-progress-step']); } - if (index !== params.progressSteps.length - 1) { + if (index !== progressSteps.length - 1) { const lineEl = createLineElement(params); progressStepsContainer.appendChild(lineEl); } @@ -1600,11 +1798,15 @@ }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const renderTitle = (instance, params) => { const title = getTitle(); + if (!title) { + return; + } + showWhenInnerHtmlPresent(title); toggle(title, params.title || params.titleText, 'block'); if (params.title) { parseHtmlToContainer(params.title, title); @@ -1618,7 +1820,7 @@ }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ const render = (instance, params) => { @@ -1632,60 +1834,13 @@ renderContent(instance, params); renderActions(instance, params); renderFooter(instance, params); - if (typeof params.didRender === 'function') { - params.didRender(getPopup()); - } - }; - - /** - * Hides loader and shows back the button which was hidden by .showLoading() - */ - function hideLoading() { - // do nothing if popup is closed - const innerParams = privateProps.innerParams.get(this); - if (!innerParams) { - return; - } - const domCache = privateProps.domCache.get(this); - hide(domCache.loader); - if (isToast()) { - if (innerParams.icon) { - show(getIcon()); - } - } else { - showRelatedButton(domCache); - } - removeClass([domCache.popup, domCache.actions], swalClasses.loading); - domCache.popup.removeAttribute('aria-busy'); - domCache.popup.removeAttribute('data-loading'); - domCache.confirmButton.disabled = false; - domCache.denyButton.disabled = false; - domCache.cancelButton.disabled = false; - } - const showRelatedButton = domCache => { - const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); - if (buttonToReplace.length) { - show(buttonToReplace[0], 'inline-block'); - } else if (allButtonsAreHidden()) { - hide(domCache.actions); + const popup = getPopup(); + if (typeof params.didRender === 'function' && popup) { + params.didRender(popup); } + globalState.eventEmitter.emit('didRender', popup); }; - /** - * Gets the input DOM node, this method works with input parameter. - * - * @param {SweetAlert2} instance - * @returns {HTMLElement | null} - */ - function getInput(instance) { - const innerParams = privateProps.innerParams.get(instance || this); - const domCache = privateProps.domCache.get(instance || this); - if (!domCache) { - return null; - } - return getInput$1(domCache.popup, innerParams.input); - } - /* * Global function to determine if SweetAlert2 popup is shown */ @@ -1696,18 +1851,30 @@ /* * Global function to click 'Confirm' button */ - const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + const clickConfirm = () => { + var _dom$getConfirmButton; + return (_dom$getConfirmButton = getConfirmButton()) === null || _dom$getConfirmButton === void 0 ? void 0 : _dom$getConfirmButton.click(); + }; /* * Global function to click 'Deny' button */ - const clickDeny = () => getDenyButton() && getDenyButton().click(); + const clickDeny = () => { + var _dom$getDenyButton; + return (_dom$getDenyButton = getDenyButton()) === null || _dom$getDenyButton === void 0 ? void 0 : _dom$getDenyButton.click(); + }; /* * Global function to click 'Cancel' button */ - const clickCancel = () => getCancelButton() && getCancelButton().click(); + const clickCancel = () => { + var _dom$getCancelButton; + return (_dom$getCancelButton = getCancelButton()) === null || _dom$getCancelButton === void 0 ? void 0 : _dom$getCancelButton.click(); + }; + + /** @typedef {'cancel' | 'backdrop' | 'close' | 'esc' | 'timer'} DismissReason */ + /** @type {Record<DismissReason, DismissReason>} */ const DismissReason = Object.freeze({ cancel: 'cancel', backdrop: 'backdrop', @@ -1729,15 +1896,14 @@ }; /** - * @param {SweetAlert2} instance * @param {GlobalState} globalState * @param {SweetAlertOptions} innerParams * @param {*} dismissWith */ - const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + const addKeydownHandler = (globalState, innerParams, dismissWith) => { removeKeydownHandler(globalState); if (!innerParams.toast) { - globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + globalState.keydownHandler = e => keydownHandler(innerParams, e, dismissWith); globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); globalState.keydownListenerCapture = innerParams.keydownListenerCapture; globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { @@ -1748,11 +1914,11 @@ }; /** - * @param {SweetAlertOptions} innerParams * @param {number} index * @param {number} increment */ - const setFocus = (innerParams, index, increment) => { + const setFocus = (index, increment) => { + var _dom$getPopup; const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match if (focusableElements.length) { @@ -1766,21 +1932,21 @@ } else if (index === -1) { index = focusableElements.length - 1; } - return focusableElements[index].focus(); + focusableElements[index].focus(); + return; } // no visible focusable elements, focus the popup - getPopup().focus(); + (_dom$getPopup = getPopup()) === null || _dom$getPopup === void 0 || _dom$getPopup.focus(); }; const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; /** - * @param {SweetAlert2} instance - * @param {KeyboardEvent} e - * @param {function} dismissWith + * @param {SweetAlertOptions} innerParams + * @param {KeyboardEvent} event + * @param {Function} dismissWith */ - const keydownHandler = (instance, e, dismissWith) => { - const innerParams = privateProps.innerParams.get(instance); + const keydownHandler = (innerParams, event, dismissWith) => { if (!innerParams) { return; // This instance has already been destroyed } @@ -1789,60 +1955,58 @@ // https://developer.mozilla.org/en-US/docs/Web/API/Document/keydown_event#ignoring_keydown_during_ime_composition // https://github.com/sweetalert2/sweetalert2/issues/720 // https://github.com/sweetalert2/sweetalert2/issues/2406 - if (e.isComposing || e.keyCode === 229) { + if (event.isComposing || event.keyCode === 229) { return; } if (innerParams.stopKeydownPropagation) { - e.stopPropagation(); + event.stopPropagation(); } // ENTER - if (e.key === 'Enter') { - handleEnter(instance, e, innerParams); + if (event.key === 'Enter') { + handleEnter(event, innerParams); } // TAB - else if (e.key === 'Tab') { - handleTab(e, innerParams); + else if (event.key === 'Tab') { + handleTab(event); } // ARROWS - switch focus between buttons - else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { - handleArrows(e.key); + else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(event.key)) { + handleArrows(event.key); } // ESC - else if (e.key === 'Escape') { - handleEsc(e, innerParams, dismissWith); + else if (event.key === 'Escape') { + handleEsc(event, innerParams, dismissWith); } }; /** - * @param {SweetAlert2} instance - * @param {KeyboardEvent} e + * @param {KeyboardEvent} event * @param {SweetAlertOptions} innerParams */ - const handleEnter = (instance, e, innerParams) => { + const handleEnter = (event, innerParams) => { // https://github.com/sweetalert2/sweetalert2/issues/2386 if (!callIfFunction(innerParams.allowEnterKey)) { return; } - if (e.target && instance.getInput() && e.target instanceof HTMLElement && e.target.outerHTML === instance.getInput().outerHTML) { + const input = getInput$1(getPopup(), innerParams.input); + if (event.target && input && event.target instanceof HTMLElement && event.target.outerHTML === input.outerHTML) { if (['textarea', 'file'].includes(innerParams.input)) { return; // do not submit } - clickConfirm(); - e.preventDefault(); + event.preventDefault(); } }; /** - * @param {KeyboardEvent} e - * @param {SweetAlertOptions} innerParams + * @param {KeyboardEvent} event */ - const handleTab = (e, innerParams) => { - const targetElement = e.target; + const handleTab = event => { + const targetElement = event.target; const focusableElements = getFocusableElements(); let btnIndex = -1; for (let i = 0; i < focusableElements.length; i++) { @@ -1853,31 +2017,40 @@ } // Cycle to the next button - if (!e.shiftKey) { - setFocus(innerParams, btnIndex, 1); + if (!event.shiftKey) { + setFocus(btnIndex, 1); } // Cycle to the prev button else { - setFocus(innerParams, btnIndex, -1); + setFocus(btnIndex, -1); } - e.stopPropagation(); - e.preventDefault(); + event.stopPropagation(); + event.preventDefault(); }; /** * @param {string} key */ const handleArrows = key => { + const actions = getActions(); const confirmButton = getConfirmButton(); const denyButton = getDenyButton(); const cancelButton = getCancelButton(); - if (document.activeElement instanceof HTMLElement && ![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + if (!actions || !confirmButton || !denyButton || !cancelButton) { + return; + } + /** @type HTMLElement[] */ + const buttons = [confirmButton, denyButton, cancelButton]; + if (document.activeElement instanceof HTMLElement && !buttons.includes(document.activeElement)) { return; } const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; let buttonToFocus = document.activeElement; - for (let i = 0; i < getActions().children.length; i++) { + if (!buttonToFocus) { + return; + } + for (let i = 0; i < actions.children.length; i++) { buttonToFocus = buttonToFocus[sibling]; if (!buttonToFocus) { return; @@ -1892,13 +2065,13 @@ }; /** - * @param {KeyboardEvent} e + * @param {KeyboardEvent} event * @param {SweetAlertOptions} innerParams - * @param {function} dismissWith + * @param {Function} dismissWith */ - const handleEsc = (e, innerParams, dismissWith) => { + const handleEsc = (event, innerParams, dismissWith) => { if (callIfFunction(innerParams.allowEscapeKey)) { - e.preventDefault(); + event.preventDefault(); dismissWith(DismissReason.esc); } }; @@ -1924,13 +2097,14 @@ // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. const setAriaHidden = () => { + const container = getContainer(); const bodyChildren = Array.from(document.body.children); bodyChildren.forEach(el => { - if (el === getContainer() || el.contains(getContainer())) { + if (el.contains(container)) { return; } if (el.hasAttribute('aria-hidden')) { - el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden') || ''); } el.setAttribute('aria-hidden', 'true'); }); @@ -1939,7 +2113,7 @@ const bodyChildren = Array.from(document.body.children); bodyChildren.forEach(el => { if (el.hasAttribute('data-previous-aria-hidden')) { - el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden') || ''); el.removeAttribute('data-previous-aria-hidden'); } else { el.removeAttribute('aria-hidden'); @@ -1947,36 +2121,19 @@ }); }; - /* istanbul ignore file */ - - // Fix iOS scrolling http://stackoverflow.com/q/39626302 + // @ts-ignore + const isSafariOrIOS = typeof window !== 'undefined' && !!window.GestureEvent; // true for Safari desktop + all iOS browsers https://stackoverflow.com/a/70585394 + /** + * Fix iOS scrolling + * http://stackoverflow.com/q/39626302 + */ const iOSfix = () => { - const iOS = - // @ts-ignore - /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; - if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + if (isSafariOrIOS && !hasClass(document.body, swalClasses.iosfix)) { const offset = document.body.scrollTop; document.body.style.top = `${offset * -1}px`; addClass(document.body, swalClasses.iosfix); lockBodyScroll(); - addBottomPaddingForTallPopups(); - } - }; - - /** - * https://github.com/sweetalert2/sweetalert2/issues/1948 - */ - const addBottomPaddingForTallPopups = () => { - const ua = navigator.userAgent; - const iOS = !!ua.match(/iPad/i) || !!ua.match(/iPhone/i); - const webkit = !!ua.match(/WebKit/i); - const iOSSafari = iOS && webkit && !ua.match(/CriOS/i); - if (iOSSafari) { - const bottomPanelHeight = 44; - if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { - getContainer().style.paddingBottom = `${bottomPanelHeight}px`; - } } }; @@ -1985,20 +2142,24 @@ */ const lockBodyScroll = () => { const container = getContainer(); + if (!container) { + return; + } + /** @type {boolean} */ let preventTouchMove; /** - * @param {TouchEvent} e + * @param {TouchEvent} event */ - container.ontouchstart = e => { - preventTouchMove = shouldPreventTouchMove(e); + container.ontouchstart = event => { + preventTouchMove = shouldPreventTouchMove(event); }; /** - * @param {TouchEvent} e + * @param {TouchEvent} event */ - container.ontouchmove = e => { + container.ontouchmove = event => { if (preventTouchMove) { - e.preventDefault(); - e.stopPropagation(); + event.preventDefault(); + event.stopPropagation(); } }; }; @@ -2010,6 +2171,10 @@ const shouldPreventTouchMove = event => { const target = event.target; const container = getContainer(); + const htmlContainer = getHtmlContainer(); + if (!container || !htmlContainer) { + return false; + } if (isStylus(event) || isZoom(event)) { return false; } @@ -2020,9 +2185,9 @@ // #1603 target.tagName !== 'TEXTAREA' && // #2266 - !(isScrollable(getHtmlContainer()) && + !(isScrollable(htmlContainer) && // #1944 - getHtmlContainer().contains(target))) { + htmlContainer.contains(target))) { return true; } return false; @@ -2056,29 +2221,56 @@ } }; - const fixScrollbar = () => { + /** + * Measure scrollbar width for padding body during modal show/hide + * https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + * + * @returns {number} + */ + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + /** + * Remember state in cases where opening and handling a modal will fiddle with it. + * @type {number | null} + */ + let previousBodyPadding = null; + + /** + * @param {string} initialBodyOverflow + */ + const replaceScrollbarWithPadding = initialBodyOverflow => { // for queues, do not do this more than once - if (states.previousBodyPadding !== null) { + if (previousBodyPadding !== null) { return; } // if the body has overflow - if (document.body.scrollHeight > window.innerHeight) { + if (document.body.scrollHeight > window.innerHeight || initialBodyOverflow === 'scroll' // https://github.com/sweetalert2/sweetalert2/issues/2663 + ) { // add padding so the content doesn't shift after removal of scrollbar - states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); - document.body.style.paddingRight = `${states.previousBodyPadding + measureScrollbar()}px`; + previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = `${previousBodyPadding + measureScrollbar()}px`; } }; - const undoScrollbar = () => { - if (states.previousBodyPadding !== null) { - document.body.style.paddingRight = `${states.previousBodyPadding}px`; - states.previousBodyPadding = null; + const undoReplaceScrollbarWithPadding = () => { + if (previousBodyPadding !== null) { + document.body.style.paddingRight = `${previousBodyPadding}px`; + previousBodyPadding = null; } }; - /* - * Instance method to close sweetAlert + /** + * @param {SweetAlert} instance + * @param {HTMLElement} container + * @param {boolean} returnFocus + * @param {Function} didClose */ - function removePopupAndResetState(instance, container, returnFocus, didClose) { if (isToast()) { triggerDidCloseAndDispose(instance, didClose); @@ -2086,10 +2278,10 @@ restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); removeKeydownHandler(globalState); } - const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); - // workaround for #2088 + + // workaround for https://github.com/sweetalert2/sweetalert2/issues/2088 // for some reason removing the container in Safari will scroll the document to bottom - if (isSafari) { + if (isSafariOrIOS) { container.setAttribute('style', 'display:none !important'); container.removeAttribute('class'); container.innerHTML = ''; @@ -2097,20 +2289,30 @@ container.remove(); } if (isModal()) { - undoScrollbar(); + undoReplaceScrollbarWithPadding(); undoIOSfix(); unsetAriaHidden(); } removeBodyClasses(); } + + /** + * Remove SweetAlert2 classes from body + */ function removeBodyClasses() { removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); } + + /** + * Instance method to close sweetAlert + * + * @param {any} resolveValue + */ function close(resolveValue) { resolveValue = prepareResolveValue(resolveValue); const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); const didClose = triggerClosePopup(this); - if (this.isAwaitingPromise()) { + if (this.isAwaitingPromise) { // A swal awaiting for a promise (after a click on Confirm or Deny) cannot be dismissed anymore #2335 if (!resolveValue.isDismissed) { handleAwaitingPromise(this); @@ -2121,9 +2323,6 @@ swalPromiseResolve(resolveValue); } } - function isAwaitingPromise() { - return !!privateProps.awaitingPromise.get(this); - } const triggerClosePopup = instance => { const popup = getPopup(); if (!popup) { @@ -2141,6 +2340,10 @@ handlePopupAnimation(instance, popup, innerParams); return true; }; + + /** + * @param {any} error + */ function rejectPromise(error) { const rejectPromise = privateMethods.swalPromiseReject.get(this); handleAwaitingPromise(this); @@ -2149,15 +2352,24 @@ rejectPromise(error); } } + + /** + * @param {SweetAlert} instance + */ const handleAwaitingPromise = instance => { - if (instance.isAwaitingPromise()) { - privateProps.awaitingPromise.delete(instance); + if (instance.isAwaitingPromise) { + delete instance.isAwaitingPromise; // The instance might have been previously partly destroyed, we must resume the destroy process in this case #2335 if (!privateProps.innerParams.get(instance)) { instance._destroy(); } } }; + + /** + * @param {any} resolveValue + * @returns {SweetAlertResult} + */ const prepareResolveValue = resolveValue => { // When user calls Swal.close() if (typeof resolveValue === 'undefined') { @@ -2173,13 +2385,21 @@ isDismissed: false }, resolveValue); }; + + /** + * @param {SweetAlert} instance + * @param {HTMLElement} popup + * @param {SweetAlertOptions} innerParams + */ const handlePopupAnimation = (instance, popup, innerParams) => { + var _globalState$eventEmi; const container = getContainer(); // If animation is supported, animate - const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + const animationIsSupported = hasCssAnimation(popup); if (typeof innerParams.willClose === 'function') { innerParams.willClose(popup); } + (_globalState$eventEmi = globalState.eventEmitter) === null || _globalState$eventEmi === void 0 || _globalState$eventEmi.emit('willClose', popup); if (animationIsSupported) { animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); } else { @@ -2187,802 +2407,965 @@ removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); } }; + + /** + * @param {SweetAlert} instance + * @param {HTMLElement} popup + * @param {HTMLElement} container + * @param {boolean} returnFocus + * @param {Function} didClose + */ const animatePopup = (instance, popup, container, returnFocus, didClose) => { globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); - popup.addEventListener(animationEndEvent, function (e) { + /** + * @param {AnimationEvent | TransitionEvent} e + */ + const swalCloseAnimationFinished = function (e) { if (e.target === popup) { - globalState.swalCloseEventFinishedCallback(); + var _globalState$swalClos; + (_globalState$swalClos = globalState.swalCloseEventFinishedCallback) === null || _globalState$swalClos === void 0 || _globalState$swalClos.call(globalState); delete globalState.swalCloseEventFinishedCallback; + popup.removeEventListener('animationend', swalCloseAnimationFinished); + popup.removeEventListener('transitionend', swalCloseAnimationFinished); } - }); + }; + popup.addEventListener('animationend', swalCloseAnimationFinished); + popup.addEventListener('transitionend', swalCloseAnimationFinished); }; + + /** + * @param {SweetAlert} instance + * @param {Function} didClose + */ const triggerDidCloseAndDispose = (instance, didClose) => { setTimeout(() => { + var _globalState$eventEmi2; if (typeof didClose === 'function') { didClose.bind(instance.params)(); } - instance._destroy(); + (_globalState$eventEmi2 = globalState.eventEmitter) === null || _globalState$eventEmi2 === void 0 || _globalState$eventEmi2.emit('didClose'); + // instance might have been destroyed already + if (instance._destroy) { + instance._destroy(); + } }); }; /** - * @param {SweetAlert2} instance - * @param {string[]} buttons - * @param {boolean} disabled + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + * + * @param {HTMLButtonElement | null} [buttonToReplace] */ - function setButtonsDisabled(instance, buttons, disabled) { - const domCache = privateProps.domCache.get(instance); - buttons.forEach(button => { - domCache[button].disabled = disabled; - }); - } + const showLoading = buttonToReplace => { + let popup = getPopup(); + if (!popup) { + new Swal(); + } + popup = getPopup(); + if (!popup) { + return; + } + const loader = getLoader(); + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + show(loader); + popup.setAttribute('data-loading', 'true'); + popup.setAttribute('aria-busy', 'true'); + popup.focus(); + }; /** - * @param {HTMLInputElement} input - * @param {boolean} disabled + * @param {HTMLElement} popup + * @param {HTMLButtonElement | null} [buttonToReplace] */ - function setInputDisabled(input, disabled) { - if (!input) { + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + if (!actions || !loader) { return; } - if (input.type === 'radio') { - const radiosContainer = input.parentNode.parentNode; - const radios = radiosContainer.querySelectorAll('input'); - for (let i = 0; i < radios.length; i++) { - radios[i].disabled = disabled; - } - } else { - input.disabled = disabled; + if (!buttonToReplace && isVisible$1(getConfirmButton())) { + buttonToReplace = getConfirmButton(); } - } - function enableButtons() { - setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); - } - function disableButtons() { - setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); - } - function enableInput() { - setInputDisabled(this.getInput(), false); - } - function disableInput() { - setInputDisabled(this.getInput(), true); - } - - // Show block with validation message - function showValidationMessage(error) { - const domCache = privateProps.domCache.get(this); - const params = privateProps.innerParams.get(this); - setInnerHtml(domCache.validationMessage, error); - domCache.validationMessage.className = swalClasses['validation-message']; - if (params.customClass && params.customClass.validationMessage) { - addClass(domCache.validationMessage, params.customClass.validationMessage); + show(actions); + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + actions.insertBefore(loader, buttonToReplace); } - show(domCache.validationMessage); - const input = this.getInput(); - if (input) { - input.setAttribute('aria-invalid', true); - input.setAttribute('aria-describedby', swalClasses['validation-message']); - focusInput(input); - addClass(input, swalClasses.inputerror); + addClass([popup, actions], swalClasses.loading); + }; + + /** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params + */ + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].some(i => i === params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); } - } + }; - // Hide block with validation message - function resetValidationMessage() { - const domCache = privateProps.domCache.get(this); - if (domCache.validationMessage) { - hide(domCache.validationMessage); + /** + * @param {SweetAlert} instance + * @param {SweetAlertOptions} innerParams + * @returns {SweetAlertInputValue} + */ + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + if (!input) { + return null; } - const input = this.getInput(); - if (input) { - input.removeAttribute('aria-invalid'); - input.removeAttribute('aria-describedby'); - removeClass(input, swalClasses.inputerror); + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + case 'radio': + return getRadioValue(input); + case 'file': + return getFileValue(input); + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; } - } - - function getProgressSteps() { - const domCache = privateProps.domCache.get(this); - return domCache.progressSteps; - } - - const defaultParams = { - title: '', - titleText: '', - text: '', - html: '', - footer: '', - icon: undefined, - iconColor: undefined, - iconHtml: undefined, - template: undefined, - toast: false, - showClass: { - popup: 'swal2-show', - backdrop: 'swal2-backdrop-show', - icon: 'swal2-icon-show' - }, - hideClass: { - popup: 'swal2-hide', - backdrop: 'swal2-backdrop-hide', - icon: 'swal2-icon-hide' - }, - customClass: {}, - target: 'body', - color: undefined, - backdrop: true, - heightAuto: true, - allowOutsideClick: true, - allowEscapeKey: true, - allowEnterKey: true, - stopKeydownPropagation: true, - keydownListenerCapture: false, - showConfirmButton: true, - showDenyButton: false, - showCancelButton: false, - preConfirm: undefined, - preDeny: undefined, - confirmButtonText: 'OK', - confirmButtonAriaLabel: '', - confirmButtonColor: undefined, - denyButtonText: 'No', - denyButtonAriaLabel: '', - denyButtonColor: undefined, - cancelButtonText: 'Cancel', - cancelButtonAriaLabel: '', - cancelButtonColor: undefined, - buttonsStyling: true, - reverseButtons: false, - focusConfirm: true, - focusDeny: false, - focusCancel: false, - returnFocus: true, - showCloseButton: false, - closeButtonHtml: '×', - closeButtonAriaLabel: 'Close this dialog', - loaderHtml: '', - showLoaderOnConfirm: false, - showLoaderOnDeny: false, - imageUrl: undefined, - imageWidth: undefined, - imageHeight: undefined, - imageAlt: '', - timer: undefined, - timerProgressBar: false, - width: undefined, - padding: undefined, - background: undefined, - input: undefined, - inputPlaceholder: '', - inputLabel: '', - inputValue: '', - inputOptions: {}, - inputAutoTrim: true, - inputAttributes: {}, - inputValidator: undefined, - returnInputValueOnDeny: false, - validationMessage: undefined, - grow: false, - position: 'center', - progressSteps: [], - currentProgressStep: undefined, - progressStepsDistance: undefined, - willOpen: undefined, - didOpen: undefined, - didRender: undefined, - willClose: undefined, - didClose: undefined, - didDestroy: undefined, - scrollbarPadding: true }; - const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'color', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; - const deprecatedParams = {}; - const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; /** - * Is valid parameter - * - * @param {string} paramName - * @returns {boolean} + * @param {HTMLInputElement} input + * @returns {number} */ - const isValidParameter = paramName => { - return Object.prototype.hasOwnProperty.call(defaultParams, paramName); - }; + const getCheckboxValue = input => input.checked ? 1 : 0; /** - * Is valid parameter for Swal.update() method - * - * @param {string} paramName - * @returns {boolean} + * @param {HTMLInputElement} input + * @returns {string | null} */ - const isUpdatableParameter = paramName => { - return updatableParams.indexOf(paramName) !== -1; - }; + const getRadioValue = input => input.checked ? input.value : null; /** - * Is deprecated parameter - * - * @param {string} paramName - * @returns {string | undefined} + * @param {HTMLInputElement} input + * @returns {FileList | File | null} */ - const isDeprecatedParameter = paramName => { - return deprecatedParams[paramName]; - }; + const getFileValue = input => input.files && input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; /** - * @param {string} param + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params */ - const checkIfParamIsValid = param => { - if (!isValidParameter(param)) { - warn(`Unknown parameter "${param}"`); + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + if (!popup) { + return; + } + /** + * @param {Record<string, any>} inputOptions + */ + const processInputOptions = inputOptions => { + if (params.input === 'select') { + populateSelectOptions(popup, formatInputOptions(inputOptions), params); + } else if (params.input === 'radio') { + populateRadioOptions(popup, formatInputOptions(inputOptions), params); + } + }; + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof params.inputOptions}`); } }; /** - * @param {string} param + * @param {SweetAlert} instance + * @param {SweetAlertOptions} params */ - const checkIfToastParamIsValid = param => { - if (toastIncompatibleParams.includes(param)) { - warn(`The parameter "${param}" is incompatible with toasts`); + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + if (!input) { + return; } + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? `${parseFloat(inputValue) || 0}` : `${inputValue}`; + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error(`Error in inputValue promise: ${err}`); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); }; /** - * @param {string} param + * @param {HTMLElement} popup + * @param {InputOptionFlattened[]} inputOptions + * @param {SweetAlertOptions} params */ - const checkIfParamIsDeprecated = param => { - if (isDeprecatedParameter(param)) { - warnAboutDeprecation(param, isDeprecatedParameter(param)); + function populateSelectOptions(popup, inputOptions, params) { + const select = getDirectChildByClass(popup, swalClasses.select); + if (!select) { + return; } - }; + /** + * @param {HTMLElement} parent + * @param {string} optionLabel + * @param {string} optionValue + */ + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; + // <optgroup> spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a <optgroup> + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an <optgroup> + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of <option> + renderOption(select, optionLabel, optionValue); + } + }); + select.focus(); + } /** - * Show relevant warnings for given params - * + * @param {HTMLElement} popup + * @param {InputOptionFlattened[]} inputOptions * @param {SweetAlertOptions} params */ - const showWarningsForParams = params => { - if (params.backdrop === false && params.allowOutsideClick) { - warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + function populateRadioOptions(popup, inputOptions, params) { + const radio = getDirectChildByClass(popup, swalClasses.radio); + if (!radio) { + return; } - for (const param in params) { - checkIfParamIsValid(param); - if (params.toast) { - checkIfToastParamIsValid(param); + inputOptions.forEach(inputOption => { + const radioValue = inputOption[0]; + const radioLabel = inputOption[1]; + const radioInput = document.createElement('input'); + const radioLabelElement = document.createElement('label'); + radioInput.type = 'radio'; + radioInput.name = swalClasses.radio; + radioInput.value = radioValue; + if (isSelected(radioValue, params.inputValue)) { + radioInput.checked = true; } - checkIfParamIsDeprecated(param); + const label = document.createElement('span'); + setInnerHtml(label, radioLabel); + label.className = swalClasses.label; + radioLabelElement.appendChild(radioInput); + radioLabelElement.appendChild(label); + radio.appendChild(radioLabelElement); + }); + const radios = radio.querySelectorAll('input'); + if (radios.length) { + radios[0].focus(); } - }; + } /** - * Updates popup parameters. - */ - function update(params) { - const popup = getPopup(); - const innerParams = privateProps.innerParams.get(this); - if (!popup || hasClass(popup, innerParams.hideClass.popup)) { - return warn(`You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.`); + * Converts `inputOptions` into an array of `[value, label]`s + * + * @param {Record<string, any>} inputOptions + * @typedef {string[]} InputOptionFlattened + * @returns {InputOptionFlattened[]} + */ + const formatInputOptions = inputOptions => { + /** @type {InputOptionFlattened[]} */ + const result = []; + if (inputOptions instanceof Map) { + inputOptions.forEach((value, key) => { + let valueFormatted = value; + if (typeof valueFormatted === 'object') { + // case of <optgroup> + valueFormatted = formatInputOptions(valueFormatted); + } + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + if (typeof valueFormatted === 'object') { + // case of <optgroup> + valueFormatted = formatInputOptions(valueFormatted); + } + result.push([key, valueFormatted]); + }); } - const validUpdatableParams = filterValidParams(params); - const updatedParams = Object.assign({}, innerParams, validUpdatableParams); - render(this, updatedParams); - privateProps.innerParams.set(this, updatedParams); - Object.defineProperties(this, { - params: { - value: Object.assign({}, this.params, params), - writable: false, - enumerable: true - } - }); - } - const filterValidParams = params => { - const validUpdatableParams = {}; - Object.keys(params).forEach(param => { - if (isUpdatableParameter(param)) { - validUpdatableParams[param] = params[param]; - } else { - warn(`Invalid parameter to update: ${param}`); - } - }); - return validUpdatableParams; + return result; }; - function _destroy() { - const domCache = privateProps.domCache.get(this); - const innerParams = privateProps.innerParams.get(this); - if (!innerParams) { - disposeWeakMaps(this); // The WeakMaps might have been partly destroyed, we must recall it to dispose any remaining WeakMaps #2335 - return; // This instance has already been destroyed - } - - // Check if there is another Swal closing - if (domCache.popup && globalState.swalCloseEventFinishedCallback) { - globalState.swalCloseEventFinishedCallback(); - delete globalState.swalCloseEventFinishedCallback; - } - if (typeof innerParams.didDestroy === 'function') { - innerParams.didDestroy(); - } - disposeSwal(this); - } - /** - * @param {SweetAlert2} instance + * @param {string} optionValue + * @param {SweetAlertInputValue} inputValue + * @returns {boolean} */ - const disposeSwal = instance => { - disposeWeakMaps(instance); - // Unset this.params so GC will dispose it (#1569) - // @ts-ignore - delete instance.params; - // Unset globalState props so GC will dispose globalState (#1569) - delete globalState.keydownHandler; - delete globalState.keydownTarget; - // Unset currentInstance - delete globalState.currentInstance; + const isSelected = (optionValue, inputValue) => { + return !!inputValue && inputValue.toString() === optionValue.toString(); }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance */ - const disposeWeakMaps = instance => { - // If the current instance is awaiting a promise result, we keep the privateMethods to call them once the promise result is retrieved #2335 - // @ts-ignore - if (instance.isAwaitingPromise()) { - unsetWeakMaps(privateProps, instance); - privateProps.awaitingPromise.set(instance, true); + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); } else { - unsetWeakMaps(privateMethods, instance); - unsetWeakMaps(privateProps, instance); + confirm(instance, true); } }; /** - * @param {object} obj - * @param {SweetAlert2} instance + * @param {SweetAlert} instance */ - const unsetWeakMaps = (obj, instance) => { - for (const i in obj) { - obj[i].delete(instance); + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); } }; - var instanceMethods = /*#__PURE__*/Object.freeze({ - __proto__: null, - hideLoading: hideLoading, - disableLoading: hideLoading, - getInput: getInput, - close: close, - isAwaitingPromise: isAwaitingPromise, - rejectPromise: rejectPromise, - handleAwaitingPromise: handleAwaitingPromise, - closePopup: close, - closeModal: close, - closeToast: close, - enableButtons: enableButtons, - disableButtons: disableButtons, - enableInput: enableInput, - disableInput: disableInput, - showValidationMessage: showValidationMessage, - resetValidationMessage: resetValidationMessage, - getProgressSteps: getProgressSteps, - update: update, - _destroy: _destroy - }); + /** + * @param {SweetAlert} instance + * @param {Function} dismissWith + */ + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; /** - * Shows loader (spinner), this is useful with AJAX requests. - * By default the loader be shown instead of the "Confirm" button. + * @param {SweetAlert} instance + * @param {'confirm' | 'deny'} type */ - const showLoading = buttonToReplace => { - let popup = getPopup(); - if (!popup) { - new Swal(); // eslint-disable-line no-new + const handleConfirmOrDenyWithInput = (instance, type) => { + const innerParams = privateProps.innerParams.get(instance); + if (!innerParams.input) { + error(`The "input" parameter is needed to be set when using returnInputValueOn${capitalizeFirstLetter(type)}`); + return; } - - popup = getPopup(); - const loader = getLoader(); - if (isToast()) { - hide(getIcon()); + const input = instance.getInput(); + const inputValue = getInputValue(instance, innerParams); + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (input && !input.checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage || input.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); } else { - replaceButton(popup, buttonToReplace); + confirm(instance, inputValue); } - show(loader); - popup.setAttribute('data-loading', 'true'); - popup.setAttribute('aria-busy', 'true'); - popup.focus(); }; - const replaceButton = (popup, buttonToReplace) => { - const actions = getActions(); - const loader = getLoader(); - if (!buttonToReplace && isVisible$1(getConfirmButton())) { - buttonToReplace = getConfirmButton(); + + /** + * @param {SweetAlert} instance + * @param {SweetAlertInputValue} inputValue + * @param {'confirm' | 'deny'} type + */ + const handleInputValidator = (instance, inputValue, type) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + /** + * @param {SweetAlert} instance + * @param {any} value + */ + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); } - show(actions); - if (buttonToReplace) { - hide(buttonToReplace); - loader.setAttribute('data-button-to-replace', buttonToReplace.className); + if (innerParams.preDeny) { + instance.isAwaitingPromise = true; // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preDeny's promise is received + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + handleAwaitingPromise(instance); + } else { + instance.close({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }).catch(error => rejectWith(instance || undefined, error)); + } else { + instance.close({ + isDenied: true, + value + }); } - loader.parentNode.insertBefore(loader, buttonToReplace); - addClass([popup, actions], swalClasses.loading); }; /** - * @typedef { string | number | boolean } InputValue + * @param {SweetAlert} instance + * @param {any} value */ + const succeedWith = (instance, value) => { + instance.close({ + isConfirmed: true, + value + }); + }; /** - * @param {SweetAlert2} instance - * @param {SweetAlertOptions} params + * + * @param {SweetAlert} instance + * @param {string} error */ - const handleInputOptionsAndValue = (instance, params) => { - if (params.input === 'select' || params.input === 'radio') { - handleInputOptions(instance, params); - } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { - showLoading(getConfirmButton()); - handleInputValue(instance, params); - } + const rejectWith = (instance, error) => { + instance.rejectPromise(error); }; /** - * @param {SweetAlert2} instance - * @param {SweetAlertOptions} innerParams - * @returns {string | number | File | FileList | null} + * + * @param {SweetAlert} instance + * @param {any} value */ - const getInputValue = (instance, innerParams) => { - const input = instance.getInput(); - if (!input) { - return null; + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + if (innerParams.showLoaderOnConfirm) { + showLoading(); } - switch (innerParams.input) { - case 'checkbox': - return getCheckboxValue(input); - case 'radio': - return getRadioValue(input); - case 'file': - return getFileValue(input); - default: - return innerParams.inputAutoTrim ? input.value.trim() : input.value; + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + instance.isAwaitingPromise = true; // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preConfirm's promise is received + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible$1(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + handleAwaitingPromise(instance); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }).catch(error => rejectWith(instance || undefined, error)); + } else { + succeedWith(instance, value); } }; /** - * @param {HTMLInputElement} input - * @returns {number} + * Hides loader and shows back the button which was hidden by .showLoading() */ - const getCheckboxValue = input => input.checked ? 1 : 0; + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + if (!innerParams) { + return; + } + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; /** - * @param {HTMLInputElement} input - * @returns {string | null} + * Gets the input DOM node, this method works with input parameter. + * + * @returns {HTMLInputElement | null} */ - const getRadioValue = input => input.checked ? input.value : null; + function getInput() { + const innerParams = privateProps.innerParams.get(this); + const domCache = privateProps.domCache.get(this); + if (!domCache) { + return null; + } + return getInput$1(domCache.popup, innerParams.input); + } /** - * @param {HTMLInputElement} input - * @returns {FileList | File | null} + * @param {SweetAlert} instance + * @param {string[]} buttons + * @param {boolean} disabled */ - const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } /** - * @param {SweetAlert2} instance - * @param {SweetAlertOptions} params + * @param {HTMLInputElement | null} input + * @param {boolean} disabled */ - const handleInputOptions = (instance, params) => { + function setInputDisabled(input, disabled) { const popup = getPopup(); - /** - * @param {Record<string, any>} inputOptions - */ - const processInputOptions = inputOptions => { - populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); - }; - if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { - showLoading(getConfirmButton()); - asPromise(params.inputOptions).then(inputOptions => { - instance.hideLoading(); - processInputOptions(inputOptions); - }); - } else if (typeof params.inputOptions === 'object') { - processInputOptions(params.inputOptions); + if (!popup || !input) { + return; + } + if (input.type === 'radio') { + /** @type {NodeListOf<HTMLInputElement>} */ + const radios = popup.querySelectorAll(`[name="${swalClasses.radio}"]`); + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } } else { - error(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof params.inputOptions}`); + input.disabled = disabled; } - }; + } /** - * @param {SweetAlert2} instance - * @param {SweetAlertOptions} params + * Enable all the buttons + * @this {SweetAlert} */ - const handleInputValue = (instance, params) => { - const input = instance.getInput(); - hide(input); - asPromise(params.inputValue).then(inputValue => { - input.value = params.input === 'number' ? `${parseFloat(inputValue) || 0}` : `${inputValue}`; - show(input); - input.focus(); - instance.hideLoading(); - }).catch(err => { - error(`Error in inputValue promise: ${err}`); - input.value = ''; - show(input); - input.focus(); - instance.hideLoading(); - }); + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + + /** + * Disable all the buttons + * @this {SweetAlert} + */ + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + + /** + * Enable the input field + * @this {SweetAlert} + */ + function enableInput() { + setInputDisabled(this.getInput(), false); + } + + /** + * Disable the input field + * @this {SweetAlert} + */ + function disableInput() { + setInputDisabled(this.getInput(), true); + } + + /** + * Show block with validation message + * + * @param {string} error + * @this {SweetAlert} + */ + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + show(domCache.validationMessage); + const input = this.getInput(); + if (input) { + input.setAttribute('aria-invalid', 'true'); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } + + /** + * Hide block with validation message + * + * @this {SweetAlert} + */ + function resetValidationMessage() { + const domCache = privateProps.domCache.get(this); + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + const input = this.getInput(); + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + draggable: false, + animation: true, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + color: undefined, + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoFocus: true, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true }; - const populateInputOptions = { - /** - * @param {HTMLElement} popup - * @param {Record<string, any>} inputOptions - * @param {SweetAlertOptions} params - */ - select: (popup, inputOptions, params) => { - const select = getDirectChildByClass(popup, swalClasses.select); - /** - * @param {HTMLElement} parent - * @param {string} optionLabel - * @param {string} optionValue - */ - const renderOption = (parent, optionLabel, optionValue) => { - const option = document.createElement('option'); - option.value = optionValue; - setInnerHtml(option, optionLabel); - option.selected = isSelected(optionValue, params.inputValue); - parent.appendChild(option); - }; - inputOptions.forEach(inputOption => { - const optionValue = inputOption[0]; - const optionLabel = inputOption[1]; - // <optgroup> spec: - // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 - // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." - // check whether this is a <optgroup> - if (Array.isArray(optionLabel)) { - // if it is an array, then it is an <optgroup> - const optgroup = document.createElement('optgroup'); - optgroup.label = optionValue; - optgroup.disabled = false; // not configurable for now - select.appendChild(optgroup); - optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); - } else { - // case of <option> - renderOption(select, optionLabel, optionValue); - } - }); - select.focus(); - }, - /** - * @param {HTMLElement} popup - * @param {Record<string, any>} inputOptions - * @param {SweetAlertOptions} params - */ - radio: (popup, inputOptions, params) => { - const radio = getDirectChildByClass(popup, swalClasses.radio); - inputOptions.forEach(inputOption => { - const radioValue = inputOption[0]; - const radioLabel = inputOption[1]; - const radioInput = document.createElement('input'); - const radioLabelElement = document.createElement('label'); - radioInput.type = 'radio'; - radioInput.name = swalClasses.radio; - radioInput.value = radioValue; - if (isSelected(radioValue, params.inputValue)) { - radioInput.checked = true; - } - const label = document.createElement('span'); - setInnerHtml(label, radioLabel); - label.className = swalClasses.label; - radioLabelElement.appendChild(radioInput); - radioLabelElement.appendChild(label); - radio.appendChild(radioLabelElement); - }); - const radios = radio.querySelectorAll('input'); - if (radios.length) { - radios[0].focus(); - } - } + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'color', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'draggable', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + + /** @type {Record<string, string | undefined>} */ + const deprecatedParams = { + allowEnterKey: undefined }; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'draggable', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; /** - * Converts `inputOptions` into an array of `[value, label]`s + * Is valid parameter * - * @param {Record<string, any>} inputOptions - * @returns {Array<Array<string>>} + * @param {string} paramName + * @returns {boolean} */ - const formatInputOptions = inputOptions => { - const result = []; - if (typeof Map !== 'undefined' && inputOptions instanceof Map) { - inputOptions.forEach((value, key) => { - let valueFormatted = value; - if (typeof valueFormatted === 'object') { - // case of <optgroup> - valueFormatted = formatInputOptions(valueFormatted); - } - result.push([key, valueFormatted]); - }); - } else { - Object.keys(inputOptions).forEach(key => { - let valueFormatted = inputOptions[key]; - if (typeof valueFormatted === 'object') { - // case of <optgroup> - valueFormatted = formatInputOptions(valueFormatted); - } - result.push([key, valueFormatted]); - }); - } - return result; + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); }; /** - * @param {string} optionValue - * @param {InputValue | Promise<InputValue> | { toPromise: () => InputValue }} inputValue + * Is valid parameter for Swal.update() method + * + * @param {string} paramName * @returns {boolean} */ - const isSelected = (optionValue, inputValue) => { - return inputValue && inputValue.toString() === optionValue.toString(); + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; }; /** - * @param {SweetAlert2} instance + * Is deprecated parameter + * + * @param {string} paramName + * @returns {string | undefined} */ - const handleConfirmButtonClick = instance => { - const innerParams = privateProps.innerParams.get(instance); - instance.disableButtons(); - if (innerParams.input) { - handleConfirmOrDenyWithInput(instance, 'confirm'); - } else { - confirm(instance, true); - } + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; }; /** - * @param {SweetAlert2} instance + * @param {string} param */ - const handleDenyButtonClick = instance => { - const innerParams = privateProps.innerParams.get(instance); - instance.disableButtons(); - if (innerParams.returnInputValueOnDeny) { - handleConfirmOrDenyWithInput(instance, 'deny'); - } else { - deny(instance, false); + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn(`Unknown parameter "${param}"`); } }; /** - * @param {SweetAlert2} instance - * @param {Function} dismissWith + * @param {string} param */ - const handleCancelButtonClick = (instance, dismissWith) => { - instance.disableButtons(); - dismissWith(DismissReason.cancel); + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn(`The parameter "${param}" is incompatible with toasts`); + } }; /** - * @param {SweetAlert2} instance - * @param {'confirm' | 'deny'} type + * @param {string} param */ - const handleConfirmOrDenyWithInput = (instance, type) => { - const innerParams = privateProps.innerParams.get(instance); - if (!innerParams.input) { - error(`The "input" parameter is needed to be set when using returnInputValueOn${capitalizeFirstLetter(type)}`); - return; - } - const inputValue = getInputValue(instance, innerParams); - if (innerParams.inputValidator) { - handleInputValidator(instance, inputValue, type); - } else if (!instance.getInput().checkValidity()) { - instance.enableButtons(); - instance.showValidationMessage(innerParams.validationMessage); - } else if (type === 'deny') { - deny(instance, inputValue); - } else { - confirm(instance, inputValue); + const checkIfParamIsDeprecated = param => { + const isDeprecated = isDeprecatedParameter(param); + if (isDeprecated) { + warnAboutDeprecation(param, isDeprecated); } }; /** - * @param {SweetAlert2} instance - * @param {string | number | File | FileList | null} inputValue - * @param {'confirm' | 'deny'} type + * Show relevant warnings for given params + * + * @param {SweetAlertOptions} params */ - const handleInputValidator = (instance, inputValue, type) => { - const innerParams = privateProps.innerParams.get(instance); - instance.disableInput(); - const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); - validationPromise.then(validationMessage => { - instance.enableButtons(); - instance.enableInput(); - if (validationMessage) { - instance.showValidationMessage(validationMessage); - } else if (type === 'deny') { - deny(instance, inputValue); - } else { - confirm(instance, inputValue); + const showWarningsForParams = params => { + if (params.backdrop === false && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + for (const param in params) { + checkIfParamIsValid(param); + if (params.toast) { + checkIfToastParamIsValid(param); } - }); + checkIfParamIsDeprecated(param); + } }; /** - * @param {SweetAlert2} instance - * @param {any} value + * Updates popup parameters. + * + * @param {SweetAlertOptions} params */ - const deny = (instance, value) => { - const innerParams = privateProps.innerParams.get(instance || undefined); - if (innerParams.showLoaderOnDeny) { - showLoading(getDenyButton()); - } - if (innerParams.preDeny) { - privateProps.awaitingPromise.set(instance || undefined, true); // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preDeny's promise is received - const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); - preDenyPromise.then(preDenyValue => { - if (preDenyValue === false) { - instance.hideLoading(); - handleAwaitingPromise(instance); - } else { - instance.close({ - isDenied: true, - value: typeof preDenyValue === 'undefined' ? value : preDenyValue - }); - } - }).catch(error => rejectWith(instance || undefined, error)); - } else { - instance.close({ - isDenied: true, - value - }); + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + warn(`You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.`); + return; } - }; + const validUpdatableParams = filterValidParams(params); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } /** - * @param {SweetAlert2} instance - * @param {any} value + * @param {SweetAlertOptions} params + * @returns {SweetAlertOptions} */ - const succeedWith = (instance, value) => { - instance.close({ - isConfirmed: true, - value + const filterValidParams = params => { + const validUpdatableParams = {}; + Object.keys(params).forEach(param => { + if (isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn(`Invalid parameter to update: ${param}`); + } }); + return validUpdatableParams; }; /** - * - * @param {SweetAlert2} instance - * @param {string} error + * Dispose the current SweetAlert2 instance */ - const rejectWith = (instance, error) => { - // @ts-ignore - instance.rejectPromise(error); - }; + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + if (!innerParams) { + disposeWeakMaps(this); // The WeakMaps might have been partly destroyed, we must recall it to dispose any remaining WeakMaps #2335 + return; // This instance has already been destroyed + } + + // Check if there is another Swal closing + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + globalState.eventEmitter.emit('didDestroy'); + disposeSwal(this); + } /** - * - * @param {SweetAlert2} instance - * @param {any} value + * @param {SweetAlert} instance */ - const confirm = (instance, value) => { - const innerParams = privateProps.innerParams.get(instance || undefined); - if (innerParams.showLoaderOnConfirm) { - showLoading(); - } - if (innerParams.preConfirm) { - instance.resetValidationMessage(); - privateProps.awaitingPromise.set(instance || undefined, true); // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preConfirm's promise is received - const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); - preConfirmPromise.then(preConfirmValue => { - if (isVisible$1(getValidationMessage()) || preConfirmValue === false) { - instance.hideLoading(); - handleAwaitingPromise(instance); - } else { - succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); - } - }).catch(error => rejectWith(instance || undefined, error)); + const disposeSwal = instance => { + disposeWeakMaps(instance); + // Unset this.params so GC will dispose it (#1569) + delete instance.params; + // Unset globalState props so GC will dispose globalState (#1569) + delete globalState.keydownHandler; + delete globalState.keydownTarget; + // Unset currentInstance + delete globalState.currentInstance; + }; + + /** + * @param {SweetAlert} instance + */ + const disposeWeakMaps = instance => { + // If the current instance is awaiting a promise result, we keep the privateMethods to call them once the promise result is retrieved #2335 + if (instance.isAwaitingPromise) { + unsetWeakMaps(privateProps, instance); + instance.isAwaitingPromise = true; } else { - succeedWith(instance, value); + unsetWeakMaps(privateMethods, instance); + unsetWeakMaps(privateProps, instance); + delete instance.isAwaitingPromise; + // Unset instance methods + delete instance.disableButtons; + delete instance.enableButtons; + delete instance.getInput; + delete instance.disableInput; + delete instance.enableInput; + delete instance.hideLoading; + delete instance.disableLoading; + delete instance.showValidationMessage; + delete instance.resetValidationMessage; + delete instance.close; + delete instance.closePopup; + delete instance.closeModal; + delete instance.closeToast; + delete instance.rejectPromise; + delete instance.update; + delete instance._destroy; } }; - const handlePopupClick = (instance, domCache, dismissWith) => { - const innerParams = privateProps.innerParams.get(instance); + /** + * @param {object} obj + * @param {SweetAlert} instance + */ + const unsetWeakMaps = (obj, instance) => { + for (const i in obj) { + obj[i].delete(instance); + } + }; + + var instanceMethods = /*#__PURE__*/Object.freeze({ + __proto__: null, + _destroy: _destroy, + close: close, + closeModal: close, + closePopup: close, + closeToast: close, + disableButtons: disableButtons, + disableInput: disableInput, + disableLoading: hideLoading, + enableButtons: enableButtons, + enableInput: enableInput, + getInput: getInput, + handleAwaitingPromise: handleAwaitingPromise, + hideLoading: hideLoading, + rejectPromise: rejectPromise, + resetValidationMessage: resetValidationMessage, + showValidationMessage: showValidationMessage, + update: update + }); + + /** + * @param {SweetAlertOptions} innerParams + * @param {DomCache} domCache + * @param {Function} dismissWith + */ + const handlePopupClick = (innerParams, domCache, dismissWith) => { if (innerParams.toast) { - handleToastClick(instance, domCache, dismissWith); + handleToastClick(innerParams, domCache, dismissWith); } else { // Ignore click events that had mousedown on the popup but mouseup on the container // This can happen when the user drags a slider @@ -2990,13 +3373,18 @@ // Ignore click events that had mousedown on the container but mouseup on the popup handleContainerMousedown(domCache); - handleModalClick(instance, domCache, dismissWith); + handleModalClick(innerParams, domCache, dismissWith); } }; - const handleToastClick = (instance, domCache, dismissWith) => { + + /** + * @param {SweetAlertOptions} innerParams + * @param {DomCache} domCache + * @param {Function} dismissWith + */ + const handleToastClick = (innerParams, domCache, dismissWith) => { // Closing toast by internal click domCache.popup.onclick = () => { - const innerParams = privateProps.innerParams.get(instance); if (innerParams && (isAnyButtonShown(innerParams) || innerParams.timer || innerParams.input)) { return; } @@ -3005,17 +3393,21 @@ }; /** - * @param {*} innerParams + * @param {SweetAlertOptions} innerParams * @returns {boolean} */ const isAnyButtonShown = innerParams => { - return innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton; + return !!(innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton); }; let ignoreOutsideClick = false; + + /** + * @param {DomCache} domCache + */ const handleModalMousedown = domCache => { domCache.popup.onmousedown = () => { domCache.container.onmouseup = function (e) { - domCache.container.onmouseup = undefined; + domCache.container.onmouseup = () => {}; // We only check if the mouseup target is the container because usually it doesn't // have any other direct children aside of the popup if (e.target === domCache.container) { @@ -3024,20 +3416,33 @@ }; }; }; + + /** + * @param {DomCache} domCache + */ const handleContainerMousedown = domCache => { - domCache.container.onmousedown = () => { + domCache.container.onmousedown = e => { + // prevent the modal text from being selected on double click on the container (allowOutsideClick: false) + if (e.target === domCache.container) { + e.preventDefault(); + } domCache.popup.onmouseup = function (e) { - domCache.popup.onmouseup = undefined; + domCache.popup.onmouseup = () => {}; // We also need to check if the mouseup target is a child of the popup - if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + if (e.target === domCache.popup || e.target instanceof HTMLElement && domCache.popup.contains(e.target)) { ignoreOutsideClick = true; } }; }; }; - const handleModalClick = (instance, domCache, dismissWith) => { + + /** + * @param {SweetAlertOptions} innerParams + * @param {DomCache} domCache + * @param {Function} dismissWith + */ + const handleModalClick = (innerParams, domCache, dismissWith) => { domCache.container.onclick = e => { - const innerParams = privateProps.innerParams.get(instance); if (ignoreOutsideClick) { ignoreOutsideClick = false; return; @@ -3067,12 +3472,17 @@ return params; }; + /** + * Main method to create a new SweetAlert2 popup + * + * @param {...SweetAlertOptions} args + * @returns {Promise<SweetAlertResult>} + */ function fire() { - const Swal = this; // eslint-disable-line @typescript-eslint/no-this-alias for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return new Swal(...args); + return new this(...args); } /** @@ -3091,7 +3501,8 @@ * const {value: firstName} = await TextPrompt('What is your first name?') * const {value: lastName} = await TextPrompt('What is your last name?') * - * @param mixinParams + * @param {SweetAlertOptions} mixinParams + * @returns {SweetAlert} */ function mixin(mixinParams) { class MixinSwal extends this { @@ -3099,6 +3510,7 @@ return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); } } + // @ts-ignore return MixinSwal; } @@ -3154,12 +3566,12 @@ * Increase timer. Returns number of milliseconds of an updated timer. * If `timer` parameter isn't set, returns undefined. * - * @param {number} n + * @param {number} ms * @returns {number | undefined} */ - const increaseTimer = n => { + const increaseTimer = ms => { if (globalState.timeout) { - const remaining = globalState.timeout.increase(n); + const remaining = globalState.timeout.increase(ms); animateTimerProgressBar(remaining, true); return remaining; } @@ -3173,7 +3585,7 @@ * @returns {boolean} */ const isTimerRunning = () => { - return globalState.timeout && globalState.timeout.isRunning(); + return !!(globalState.timeout && globalState.timeout.isRunning()); }; let bodyClickListenerAdded = false; @@ -3204,46 +3616,185 @@ } }; + // Source: https://gist.github.com/mudge/5830382?permalink_comment_id=2691957#gistcomment-2691957 + + class EventEmitter { + constructor() { + /** @type {Events} */ + this.events = {}; + } + + /** + * @param {string} eventName + * @returns {EventHandlers} + */ + _getHandlersByEventName(eventName) { + if (typeof this.events[eventName] === 'undefined') { + // not Set because we need to keep the FIFO order + // https://github.com/sweetalert2/sweetalert2/pull/2763#discussion_r1748990334 + this.events[eventName] = []; + } + return this.events[eventName]; + } + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + on(eventName, eventHandler) { + const currentHandlers = this._getHandlersByEventName(eventName); + if (!currentHandlers.includes(eventHandler)) { + currentHandlers.push(eventHandler); + } + } + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + once(eventName, eventHandler) { + var _this = this; + /** + * @param {Array} args + */ + const onceFn = function () { + _this.removeListener(eventName, onceFn); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + eventHandler.apply(_this, args); + }; + this.on(eventName, onceFn); + } + + /** + * @param {string} eventName + * @param {Array} args + */ + emit(eventName) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + this._getHandlersByEventName(eventName).forEach( + /** + * @param {EventHandler} eventHandler + */ + eventHandler => { + try { + eventHandler.apply(this, args); + } catch (error) { + console.error(error); + } + }); + } + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + removeListener(eventName, eventHandler) { + const currentHandlers = this._getHandlersByEventName(eventName); + const index = currentHandlers.indexOf(eventHandler); + if (index > -1) { + currentHandlers.splice(index, 1); + } + } + + /** + * @param {string} eventName + */ + removeAllListeners(eventName) { + if (this.events[eventName] !== undefined) { + // https://github.com/sweetalert2/sweetalert2/pull/2763#discussion_r1749239222 + this.events[eventName].length = 0; + } + } + reset() { + this.events = {}; + } + } + + globalState.eventEmitter = new EventEmitter(); + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + const on = (eventName, eventHandler) => { + globalState.eventEmitter.on(eventName, eventHandler); + }; + + /** + * @param {string} eventName + * @param {EventHandler} eventHandler + */ + const once = (eventName, eventHandler) => { + globalState.eventEmitter.once(eventName, eventHandler); + }; + + /** + * @param {string} [eventName] + * @param {EventHandler} [eventHandler] + */ + const off = (eventName, eventHandler) => { + // Remove all handlers for all events + if (!eventName) { + globalState.eventEmitter.reset(); + return; + } + if (eventHandler) { + // Remove a specific handler + globalState.eventEmitter.removeListener(eventName, eventHandler); + } else { + // Remove all handlers for a specific event + globalState.eventEmitter.removeAllListeners(eventName); + } + }; + var staticMethods = /*#__PURE__*/Object.freeze({ __proto__: null, - isValidParameter: isValidParameter, - isUpdatableParameter: isUpdatableParameter, - isDeprecatedParameter: isDeprecatedParameter, argsToParams: argsToParams, + bindClickHandler: bindClickHandler, + clickCancel: clickCancel, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + enableLoading: showLoading, + fire: fire, + getActions: getActions, + getCancelButton: getCancelButton, + getCloseButton: getCloseButton, + getConfirmButton: getConfirmButton, getContainer: getContainer, - getPopup: getPopup, - getTitle: getTitle, + getDenyButton: getDenyButton, + getFocusableElements: getFocusableElements, + getFooter: getFooter, getHtmlContainer: getHtmlContainer, - getImage: getImage, getIcon: getIcon, getIconContent: getIconContent, + getImage: getImage, getInputLabel: getInputLabel, - getCloseButton: getCloseButton, - getActions: getActions, - getConfirmButton: getConfirmButton, - getDenyButton: getDenyButton, - getCancelButton: getCancelButton, getLoader: getLoader, - getFooter: getFooter, + getPopup: getPopup, + getProgressSteps: getProgressSteps, + getTimerLeft: getTimerLeft, getTimerProgressBar: getTimerProgressBar, - getFocusableElements: getFocusableElements, + getTitle: getTitle, getValidationMessage: getValidationMessage, + increaseTimer: increaseTimer, + isDeprecatedParameter: isDeprecatedParameter, isLoading: isLoading, + isTimerRunning: isTimerRunning, + isUpdatableParameter: isUpdatableParameter, + isValidParameter: isValidParameter, isVisible: isVisible, - clickConfirm: clickConfirm, - clickDeny: clickDeny, - clickCancel: clickCancel, - fire: fire, mixin: mixin, + off: off, + on: on, + once: once, + resumeTimer: resumeTimer, showLoading: showLoading, - enableLoading: showLoading, - getTimerLeft: getTimerLeft, stopTimer: stopTimer, - resumeTimer: resumeTimer, - toggleTimer: toggleTimer, - increaseTimer: increaseTimer, - isTimerRunning: isTimerRunning, - bindClickHandler: bindClickHandler + toggleTimer: toggleTimer }); class Timer { @@ -3257,6 +3808,10 @@ this.running = false; this.start(); } + + /** + * @returns {number} + */ start() { if (!this.running) { this.running = true; @@ -3265,14 +3820,23 @@ } return this.remaining; } + + /** + * @returns {number} + */ stop() { - if (this.running) { + if (this.started && this.running) { this.running = false; clearTimeout(this.id); this.remaining -= new Date().getTime() - this.started.getTime(); } return this.remaining; } + + /** + * @param {number} n + * @returns {number} + */ increase(n) { const running = this.running; if (running) { @@ -3284,6 +3848,10 @@ } return this.remaining; } + + /** + * @returns {number} + */ getTimerLeft() { if (this.running) { this.stop(); @@ -3291,6 +3859,10 @@ } return this.remaining; } + + /** + * @returns {boolean} + */ isRunning() { return this.running; } @@ -3303,8 +3875,7 @@ * @returns {SweetAlertOptions} */ const getTemplateParams = params => { - /** @type {HTMLTemplateElement} */ - const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + const template = typeof params.template === 'string' ? (/** @type {HTMLTemplateElement} */document.querySelector(params.template)) : params.template; if (!template) { return {}; } @@ -3317,16 +3888,20 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record<string, any>} */ const getSwalParams = templateContent => { + /** @type {Record<string, any>} */ const result = {}; /** @type {HTMLElement[]} */ const swalParams = Array.from(templateContent.querySelectorAll('swal-param')); swalParams.forEach(param => { showWarningsForAttributes(param, ['name', 'value']); - const paramName = param.getAttribute('name'); + const paramName = /** @type {keyof SweetAlertOptions} */param.getAttribute('name'); const value = param.getAttribute('value'); + if (!paramName || !value) { + return; + } if (typeof defaultParams[paramName] === 'boolean') { result[paramName] = value !== 'false'; } else if (typeof defaultParams[paramName] === 'object') { @@ -3340,15 +3915,19 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record<string, any>} */ const getSwalFunctionParams = templateContent => { + /** @type {Record<string, any>} */ const result = {}; /** @type {HTMLElement[]} */ const swalFunctions = Array.from(templateContent.querySelectorAll('swal-function-param')); swalFunctions.forEach(param => { - const paramName = param.getAttribute('name'); + const paramName = /** @type {keyof SweetAlertOptions} */param.getAttribute('name'); const value = param.getAttribute('value'); + if (!paramName || !value) { + return; + } result[paramName] = new Function(`return ${value}`)(); }); return result; @@ -3356,15 +3935,19 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record<string, any>} */ const getSwalButtons = templateContent => { + /** @type {Record<string, any>} */ const result = {}; /** @type {HTMLElement[]} */ const swalButtons = Array.from(templateContent.querySelectorAll('swal-button')); swalButtons.forEach(button => { showWarningsForAttributes(button, ['type', 'color', 'aria-label']); const type = button.getAttribute('type'); + if (!type || !['confirm', 'cancel', 'deny'].includes(type)) { + return; + } result[`${type}ButtonText`] = button.innerHTML; result[`show${capitalizeFirstLetter(type)}Button`] = true; if (button.hasAttribute('color')) { @@ -3379,25 +3962,25 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Pick<SweetAlertOptions, 'imageUrl' | 'imageWidth' | 'imageHeight' | 'imageAlt'>} */ const getSwalImage = templateContent => { const result = {}; - /** @type {HTMLElement} */ + /** @type {HTMLElement | null} */ const image = templateContent.querySelector('swal-image'); if (image) { showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); if (image.hasAttribute('src')) { - result.imageUrl = image.getAttribute('src'); + result.imageUrl = image.getAttribute('src') || undefined; } if (image.hasAttribute('width')) { - result.imageWidth = image.getAttribute('width'); + result.imageWidth = image.getAttribute('width') || undefined; } if (image.hasAttribute('height')) { - result.imageHeight = image.getAttribute('height'); + result.imageHeight = image.getAttribute('height') || undefined; } if (image.hasAttribute('alt')) { - result.imageAlt = image.getAttribute('alt'); + result.imageAlt = image.getAttribute('alt') || undefined; } } return result; @@ -3405,17 +3988,15 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record<string, any>} */ const getSwalIcon = templateContent => { const result = {}; - /** @type {HTMLElement} */ + /** @type {HTMLElement | null} */ const icon = templateContent.querySelector('swal-icon'); if (icon) { showWarningsForAttributes(icon, ['type', 'color']); if (icon.hasAttribute('type')) { - /** @type {SweetAlertIcon} */ - // @ts-ignore result.icon = icon.getAttribute('type'); } if (icon.hasAttribute('color')) { @@ -3428,16 +4009,15 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record<string, any>} */ const getSwalInput = templateContent => { + /** @type {Record<string, any>} */ const result = {}; - /** @type {HTMLElement} */ + /** @type {HTMLElement | null} */ const input = templateContent.querySelector('swal-input'); if (input) { showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); - /** @type {SweetAlertInput} */ - // @ts-ignore result.input = input.getAttribute('type') || 'text'; if (input.hasAttribute('label')) { result.inputLabel = input.getAttribute('label'); @@ -3456,6 +4036,9 @@ inputOptions.forEach(option => { showWarningsForAttributes(option, ['value']); const optionValue = option.getAttribute('value'); + if (!optionValue) { + return; + } const optionName = option.innerHTML; result.inputOptions[optionValue] = optionName; }); @@ -3466,13 +4049,14 @@ /** * @param {DocumentFragment} templateContent * @param {string[]} paramNames - * @returns {SweetAlertOptions} + * @returns {Record<string, any>} */ const getSwalStringParams = (templateContent, paramNames) => { + /** @type {Record<string, any>} */ const result = {}; for (const i in paramNames) { const paramName = paramNames[i]; - /** @type {HTMLElement} */ + /** @type {HTMLElement | null} */ const tag = templateContent.querySelector(paramName); if (tag) { showWarningsForAttributes(tag, []); @@ -3520,6 +4104,7 @@ if (typeof params.willOpen === 'function') { params.willOpen(popup); } + globalState.eventEmitter.emit('willOpen', popup); const bodyStyles = window.getComputedStyle(document.body); const initialBodyOverflow = bodyStyles.overflowY; addClasses(container, popup, params); @@ -3538,6 +4123,7 @@ if (typeof params.didOpen === 'function') { setTimeout(() => params.didOpen(popup)); } + globalState.eventEmitter.emit('didOpen', popup); removeClass(container, swalClasses['no-transition']); }; @@ -3550,7 +4136,8 @@ return; } const container = getContainer(); - popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + popup.removeEventListener('animationend', swalOpenAnimationFinished); + popup.removeEventListener('transitionend', swalOpenAnimationFinished); container.style.overflowY = 'auto'; }; @@ -3559,9 +4146,10 @@ * @param {HTMLElement} popup */ const setScrollingVisibility = (container, popup) => { - if (animationEndEvent && hasCssAnimation(popup)) { + if (hasCssAnimation(popup)) { container.style.overflowY = 'hidden'; - popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + popup.addEventListener('animationend', swalOpenAnimationFinished); + popup.addEventListener('transitionend', swalOpenAnimationFinished); } else { container.style.overflowY = 'auto'; } @@ -3575,7 +4163,7 @@ const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { iOSfix(); if (scrollbarPadding && initialBodyOverflow !== 'hidden') { - fixScrollbar(); + replaceScrollbarWithPadding(initialBodyOverflow); } // sweetalert2/issues/1247 @@ -3591,16 +4179,19 @@ */ const addClasses = (container, popup, params) => { addClass(container, params.showClass.backdrop); - // this workaround with opacity is needed for https://github.com/sweetalert2/sweetalert2/issues/2059 - popup.style.setProperty('opacity', '0', 'important'); - show(popup, 'grid'); - setTimeout(() => { - // Animate popup right after showing it - addClass(popup, params.showClass.popup); - // and remove the opacity workaround - popup.style.removeProperty('opacity'); - }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 - + if (params.animation) { + // this workaround with opacity is needed for https://github.com/sweetalert2/sweetalert2/issues/2059 + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); + // and remove the opacity workaround + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + } else { + show(popup, 'grid'); + } addClass([document.documentElement, document.body], swalClasses.shown); if (params.heightAuto && params.backdrop && !params.toast) { addClass([document.documentElement, document.body], swalClasses['height-auto']); @@ -3610,16 +4201,16 @@ var defaultInputValidators = { /** * @param {string} string - * @param {string} validationMessage - * @returns {Promise<void | string>} + * @param {string} [validationMessage] + * @returns {Promise<string | void>} */ email: (string, validationMessage) => { - return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + return /^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); }, /** * @param {string} string - * @param {string} validationMessage - * @returns {Promise<void | string>} + * @param {string} [validationMessage] + * @returns {Promise<string | void>} */ url: (string, validationMessage) => { // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 @@ -3632,12 +4223,14 @@ */ function setDefaultInputValidators(params) { // Use default `inputValidator` for supported input types if not provided - if (!params.inputValidator) { - Object.keys(defaultInputValidators).forEach(key => { - if (params.input === key) { - params.inputValidator = defaultInputValidators[key]; - } - }); + if (params.inputValidator) { + return; + } + if (params.input === 'email') { + params.inputValidator = defaultInputValidators['email']; + } + if (params.input === 'url') { + params.inputValidator = defaultInputValidators['url']; } } @@ -3673,9 +4266,19 @@ init(params); } + /** @type {SweetAlert} */ let currentInstance; + var _promise = /*#__PURE__*/new WeakMap(); class SweetAlert { + /** + * @param {...any} args + * @this {SweetAlert} + */ constructor() { + /** + * @type {Promise<SweetAlertResult>} + */ + _classPrivateFieldInitSpec(this, _promise, void 0); // Prevent run in Node env if (typeof window === 'undefined') { return; @@ -3687,25 +4290,28 @@ args[_key] = arguments[_key]; } const outerParams = Object.freeze(this.constructor.argsToParams(args)); - Object.defineProperties(this, { - params: { - value: outerParams, - writable: false, - enumerable: true, - configurable: true - } - }); - // @ts-ignore - const promise = currentInstance._main(currentInstance.params); - privateProps.promise.set(this, promise); + /** @type {Readonly<SweetAlertOptions>} */ + this.params = outerParams; + + /** @type {boolean} */ + this.isAwaitingPromise = false; + _classPrivateFieldSet2(_promise, this, this._main(currentInstance.params)); } _main(userParams) { let mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; showWarningsForParams(Object.assign({}, mixinParams, userParams)); if (globalState.currentInstance) { - // @ts-ignore + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(globalState.currentInstance); + const { + isAwaitingPromise + } = globalState.currentInstance; globalState.currentInstance._destroy(); + if (!isAwaitingPromise) { + swalPromiseResolve({ + isDismissed: true + }); + } if (isModal()) { unsetAriaHidden(); } @@ -3731,17 +4337,15 @@ // `catch` cannot be the name of a module export, so we define our thenable methods here instead then(onFulfilled) { - const promise = privateProps.promise.get(this); - return promise.then(onFulfilled); + return _classPrivateFieldGet2(_promise, this).then(onFulfilled); } finally(onFinally) { - const promise = privateProps.promise.get(this); - return promise.finally(onFinally); + return _classPrivateFieldGet2(_promise, this).finally(onFinally); } } /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @param {DomCache} domCache * @param {SweetAlertOptions} innerParams * @returns {Promise} @@ -3753,7 +4357,6 @@ * @param {DismissReason} dismiss */ const dismissWith = dismiss => { - // @ts-ignore instance.close({ isDismissed: true, dismiss @@ -3771,11 +4374,10 @@ handleCancelButtonClick(instance, dismissWith); }; domCache.closeButton.onclick = () => { - // @ts-ignore dismissWith(DismissReason.close); }; - handlePopupClick(instance, domCache, dismissWith); - addKeydownHandler(instance, globalState, innerParams, dismissWith); + handlePopupClick(innerParams, domCache, dismissWith); + addKeydownHandler(globalState, innerParams, dismissWith); handleInputOptionsAndValue(instance, innerParams); openPopup(innerParams); setupTimer(globalState, innerParams, dismissWith); @@ -3798,11 +4400,17 @@ const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + if (params.animation === false) { + params.showClass = { + backdrop: 'swal2-noanimation' + }; + params.hideClass = {}; + } return params; }; /** - * @param {SweetAlert2} instance + * @param {SweetAlert} instance * @returns {DomCache} */ const populateDomCache = instance => { @@ -3816,7 +4424,7 @@ loader: getLoader(), closeButton: getCloseButton(), validationMessage: getValidationMessage(), - progressSteps: getProgressSteps$1() + progressSteps: getProgressSteps() }; privateProps.domCache.set(instance, domCache); return domCache; @@ -3849,6 +4457,15 @@ }; /** + * Initialize focus in the popup: + * + * 1. If `toast` is `true`, don't steal focus from the document. + * 2. Else if there is an [autofocus] element, focus it. + * 3. Else if `focusConfirm` is `true` and confirm button is visible, focus it. + * 4. Else if `focusDeny` is `true` and deny button is visible, focus it. + * 5. Else if `focusCancel` is `true` and cancel button is visible, focus it. + * 6. Else focus the first focusable element in a popup (if any). + * * @param {DomCache} domCache * @param {SweetAlertOptions} innerParams */ @@ -3856,13 +4473,34 @@ if (innerParams.toast) { return; } + // TODO: this is dumb, remove `allowEnterKey` param in the next major version if (!callIfFunction(innerParams.allowEnterKey)) { + warnAboutDeprecation('allowEnterKey'); blurActiveElement(); return; } - if (!focusButton(domCache, innerParams)) { - setFocus(innerParams, -1, 1); + if (focusAutofocus(domCache)) { + return; + } + if (focusButton(domCache, innerParams)) { + return; + } + setFocus(-1, 1); + }; + + /** + * @param {DomCache} domCache + * @returns {boolean} + */ + const focusAutofocus = domCache => { + const autofocusElements = Array.from(domCache.popup.querySelectorAll('[autofocus]')); + for (const autofocusElement of autofocusElements) { + if (autofocusElement instanceof HTMLElement && isVisible$1(autofocusElement)) { + autofocusElement.focus(); + return true; + } } + return false; }; /** @@ -3892,23 +4530,44 @@ }; // Dear russian users visiting russian sites. Let's have fun. - if (typeof window !== 'undefined' && /^ru\b/.test(navigator.language) && location.host.match(/\.(ru|su|xn--p1ai)$/)) { - setTimeout(() => { - document.body.style.pointerEvents = 'none'; - const ukrainianAnthem = document.createElement('audio'); - ukrainianAnthem.src = 'https://discoveric.ru/upload/anthem/61/61-1.mp3'; - ukrainianAnthem.loop = true; - document.body.appendChild(ukrainianAnthem); + if (typeof window !== 'undefined' && /^ru\b/.test(navigator.language) && location.host.match(/\.(ru|su|by|xn--p1ai)$/)) { + const now = new Date(); + const initiationDate = localStorage.getItem('swal-initiation'); + if (!initiationDate) { + localStorage.setItem('swal-initiation', `${now}`); + } else if ((now.getTime() - Date.parse(initiationDate)) / (1000 * 60 * 60 * 24) > 3) { setTimeout(() => { - ukrainianAnthem.play().catch(() => { - // ignore - }); - }, 2500); - }, 500); + document.body.style.pointerEvents = 'none'; + const ukrainianAnthem = document.createElement('audio'); + ukrainianAnthem.src = 'https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3'; + ukrainianAnthem.loop = true; + document.body.appendChild(ukrainianAnthem); + setTimeout(() => { + ukrainianAnthem.play().catch(() => { + // ignore + }); + }, 2500); + }, 500); + } } // Assign instance methods from src/instanceMethods/*.js to prototype - Object.assign(SweetAlert.prototype, instanceMethods); + SweetAlert.prototype.disableButtons = disableButtons; + SweetAlert.prototype.enableButtons = enableButtons; + SweetAlert.prototype.getInput = getInput; + SweetAlert.prototype.disableInput = disableInput; + SweetAlert.prototype.enableInput = enableInput; + SweetAlert.prototype.hideLoading = hideLoading; + SweetAlert.prototype.disableLoading = hideLoading; + SweetAlert.prototype.showValidationMessage = showValidationMessage; + SweetAlert.prototype.resetValidationMessage = resetValidationMessage; + SweetAlert.prototype.close = close; + SweetAlert.prototype.closePopup = close; + SweetAlert.prototype.closeModal = close; + SweetAlert.prototype.closeToast = close; + SweetAlert.prototype.rejectPromise = rejectPromise; + SweetAlert.prototype.update = update; + SweetAlert.prototype._destroy = _destroy; // Assign static methods from src/staticMethods/*.js to constructor Object.assign(SweetAlert, staticMethods); @@ -3917,16 +4576,17 @@ Object.keys(instanceMethods).forEach(key => { /** * @param {...any} args - * @returns {any} + * @returns {any | undefined} */ SweetAlert[key] = function () { - if (currentInstance) { + if (currentInstance && currentInstance[key]) { return currentInstance[key](...arguments); } + return null; }; }); SweetAlert.DismissReason = DismissReason; - SweetAlert.version = '11.6.9'; + SweetAlert.version = '11.15.3'; const Swal = SweetAlert; // @ts-ignore diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.min.css b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.min.css index 4c092a8..11e6d1c 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.min.css +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.min.css @@ -1 +1 @@ -.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto} +.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:hsl(0,0%,33%);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid hsl(0,0%,85%);border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:hsl(0,0%,94%);color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:rgb(249.95234375,205.965625,167.74765625);color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:rgb(156.7033492823,224.2822966507,246.2966507177);color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:rgb(200.8064516129,217.9677419355,225.1935483871);color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto} diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.min.js b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.min.js index 427a9eb..5b42e3d 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.min.js +++ b/sample/MyAbpApp/src/MyAbpApp.Web/wwwroot/libs/sweetalert2/sweetalert2.min.js @@ -1,5 +1,5 @@ /*! -* sweetalert2 v11.6.9 +* sweetalert2 v11.15.3 * Released under the MIT License. */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sweetalert2=t()}(this,(function(){"use strict";var e={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const t=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t},n=t(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),o=t(["success","warning","info","question","error"]),i=e=>e.charAt(0).toUpperCase()+e.slice(1),s=e=>{console.warn(`SweetAlert2: ${"object"==typeof e?e.join(" "):e}`)},r=e=>{console.error(`SweetAlert2: ${e}`)},a=[],l=(e,t)=>{var n;n=`"${e}" is deprecated and will be removed in the next major release. Please use "${t}" instead.`,a.includes(n)||(a.push(n),s(n))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=()=>document.body.querySelector(`.${n.container}`),g=e=>{const t=m();return t?t.querySelector(e):null},h=e=>g(`.${e}`),f=()=>h(n.popup),b=()=>h(n.icon),y=()=>h(n.title),w=()=>h(n["html-container"]),v=()=>h(n.image),C=()=>h(n["progress-steps"]),A=()=>h(n["validation-message"]),k=()=>g(`.${n.actions} .${n.confirm}`),B=()=>g(`.${n.actions} .${n.deny}`),P=()=>g(`.${n.loader}`),x=()=>g(`.${n.actions} .${n.cancel}`),E=()=>h(n.actions),$=()=>h(n.footer),T=()=>h(n["timer-progress-bar"]),S=()=>h(n.close),L=()=>{const e=Array.from(f().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")),o=parseInt(t.getAttribute("tabindex"));return n>o?1:n<o?-1:0})),t=Array.from(f().querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n')).filter((e=>"-1"!==e.getAttribute("tabindex")));return(e=>{const t=[];for(let n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t})(e.concat(t)).filter((e=>Z(e)))},O=()=>I(document.body,n.shown)&&!I(document.body,n["toast-shown"])&&!I(document.body,n["no-backdrop"]),j=()=>f()&&I(f(),n.toast),M={previousBodyPadding:null},H=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html");Array.from(n.querySelector("head").childNodes).forEach((t=>{e.appendChild(t)})),Array.from(n.querySelector("body").childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},I=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t<n.length;t++)if(!e.classList.contains(n[t]))return!1;return!0},q=(e,t,i)=>{if(((e,t)=>{Array.from(e.classList).forEach((i=>{Object.values(n).includes(i)||Object.values(o).includes(i)||Object.values(t.showClass).includes(i)||e.classList.remove(i)}))})(e,t),t.customClass&&t.customClass[i]){if("string"!=typeof t.customClass[i]&&!t.customClass[i].forEach)return void s(`Invalid type of customClass.${i}! Expected string or iterable object, got "${typeof t.customClass[i]}"`);F(e,t.customClass[i])}},D=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${n.popup} > .${n[t]}`);case"checkbox":return e.querySelector(`.${n.popup} > .${n.checkbox} input`);case"radio":return e.querySelector(`.${n.popup} > .${n.radio} input:checked`)||e.querySelector(`.${n.popup} > .${n.radio} input:first-child`);case"range":return e.querySelector(`.${n.popup} > .${n.range} input`);default:return e.querySelector(`.${n.popup} > .${n.input}`)}},V=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},N=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},F=(e,t)=>{N(e,t,!0)},R=(e,t)=>{N(e,t,!1)},U=(e,t)=>{const n=Array.from(e.children);for(let e=0;e<n.length;e++){const o=n[e];if(o instanceof HTMLElement&&I(o,t))return o}},_=(e,t,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style[t]="number"==typeof n?`${n}px`:n:e.style.removeProperty(t)},W=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},z=e=>{e.style.display="none"},K=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},Y=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex";t?W(e,n):z(e)},Z=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),J=e=>!!(e.scrollHeight>e.clientHeight),X=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),o=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||o>0},G=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=T();Z(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"}),10))},Q={},ee=e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,o=window.scrollY;Q.restoreFocusTimeout=setTimeout((()=>{Q.previousActiveElement instanceof HTMLElement?(Q.previousActiveElement.focus(),Q.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(n,o)})),te=()=>"undefined"==typeof window||"undefined"==typeof document,ne=`\n <div aria-labelledby="${n.title}" aria-describedby="${n["html-container"]}" class="${n.popup}" tabindex="-1">\n <button type="button" class="${n.close}"></button>\n <ul class="${n["progress-steps"]}"></ul>\n <div class="${n.icon}"></div>\n <img class="${n.image}" />\n <h2 class="${n.title}" id="${n.title}"></h2>\n <div class="${n["html-container"]}" id="${n["html-container"]}"></div>\n <input class="${n.input}" />\n <input type="file" class="${n.file}" />\n <div class="${n.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${n.select}"></select>\n <div class="${n.radio}"></div>\n <label for="${n.checkbox}" class="${n.checkbox}">\n <input type="checkbox" />\n <span class="${n.label}"></span>\n </label>\n <textarea class="${n.textarea}"></textarea>\n <div class="${n["validation-message"]}" id="${n["validation-message"]}"></div>\n <div class="${n.actions}">\n <div class="${n.loader}"></div>\n <button type="button" class="${n.confirm}"></button>\n <button type="button" class="${n.deny}"></button>\n <button type="button" class="${n.cancel}"></button>\n </div>\n <div class="${n.footer}"></div>\n <div class="${n["timer-progress-bar-container"]}">\n <div class="${n["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),oe=()=>{Q.currentInstance.resetValidationMessage()},ie=e=>{const t=(()=>{const e=m();return!!e&&(e.remove(),R([document.documentElement,document.body],[n["no-backdrop"],n["toast-shown"],n["has-column"]]),!0)})();if(te())return void r("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=n.container,t&&F(o,n["no-transition"]),H(o,ne);const i="string"==typeof(s=e.target)?document.querySelector(s):s;var s;i.appendChild(o),(e=>{const t=f();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&F(m(),n.rtl)})(i),(()=>{const e=f(),t=U(e,n.input),o=U(e,n.file),i=e.querySelector(`.${n.range} input`),s=e.querySelector(`.${n.range} output`),r=U(e,n.select),a=e.querySelector(`.${n.checkbox} input`),l=U(e,n.textarea);t.oninput=oe,o.onchange=oe,r.onchange=oe,a.onchange=oe,l.oninput=oe,i.oninput=()=>{oe(),s.value=i.value},i.onchange=()=>{oe(),s.value=i.value}})()},se=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?re(e,t):e&&H(t,e)},re=(e,t)=>{e.jquery?ae(t,e):H(t,e.toString())},ae=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},le=(()=>{if(te())return!1;const e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),ce=(e,t)=>{const o=E(),i=P();t.showConfirmButton||t.showDenyButton||t.showCancelButton?W(o):z(o),q(o,t,"actions"),function(e,t,o){const i=k(),s=B(),r=x();ue(i,"confirm",o),ue(s,"deny",o),ue(r,"cancel",o),function(e,t,o,i){if(!i.buttonsStyling)return void R([e,t,o],n.styled);F([e,t,o],n.styled),i.confirmButtonColor&&(e.style.backgroundColor=i.confirmButtonColor,F(e,n["default-outline"]));i.denyButtonColor&&(t.style.backgroundColor=i.denyButtonColor,F(t,n["default-outline"]));i.cancelButtonColor&&(o.style.backgroundColor=i.cancelButtonColor,F(o,n["default-outline"]))}(i,s,r,o),o.reverseButtons&&(o.toast?(e.insertBefore(r,i),e.insertBefore(s,i)):(e.insertBefore(r,t),e.insertBefore(s,t),e.insertBefore(i,t)))}(o,i,t),H(i,t.loaderHtml),q(i,t,"loader")};function ue(e,t,o){Y(e,o[`show${i(t)}Button`],"inline-block"),H(e,o[`${t}ButtonText`]),e.setAttribute("aria-label",o[`${t}ButtonAriaLabel`]),e.className=n[t],q(e,o,`${t}Button`),F(e,o[`${t}ButtonClass`])}const de=(e,t)=>{const o=m();o&&(!function(e,t){"string"==typeof t?e.style.background=t:t||F([document.documentElement,document.body],n["no-backdrop"])}(o,t.backdrop),function(e,t){t in n?F(e,n[t]):(s('The "position" parameter is not valid, defaulting to "center"'),F(e,n.center))}(o,t.position),function(e,t){if(t&&"string"==typeof t){const o=`grow-${t}`;o in n&&F(e,n[o])}}(o,t.grow),q(o,t,"container"))};const pe=["input","file","range","select","radio","checkbox","textarea"],me=e=>{if(!ve[e.input])return void r(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${e.input}"`);const t=ye(e.input),n=ve[e.input](t,e);W(t),setTimeout((()=>{V(n)}))},ge=(e,t)=>{const n=D(f(),e);if(n){(e=>{for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t].name;["type","value","style"].includes(n)||e.removeAttribute(n)}})(n);for(const e in t)n.setAttribute(e,t[e])}},he=e=>{const t=ye(e.input);"object"==typeof e.customClass&&F(t,e.customClass.input)},fe=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},be=(e,t,o)=>{if(o.inputLabel){e.id=n.input;const i=document.createElement("label"),s=n["input-label"];i.setAttribute("for",e.id),i.className=s,"object"==typeof o.customClass&&F(i,o.customClass.inputLabel),i.innerText=o.inputLabel,t.insertAdjacentElement("beforebegin",i)}},ye=e=>U(f(),n[e]||n.input),we=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:p(t)||s(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},ve={};ve.text=ve.email=ve.password=ve.number=ve.tel=ve.url=(e,t)=>(we(e,t.inputValue),be(e,e,t),fe(e,t),e.type=t.input,e),ve.file=(e,t)=>(be(e,e,t),fe(e,t),e),ve.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return we(n,t.inputValue),n.type=t.input,we(o,t.inputValue),be(n,e,t),e},ve.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");H(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return be(e,e,t),e},ve.radio=e=>(e.textContent="",e),ve.checkbox=(e,t)=>{const o=D(f(),"checkbox");o.value="1",o.id=n.checkbox,o.checked=Boolean(t.inputValue);const i=e.querySelector("span");return H(i,t.inputPlaceholder),o},ve.textarea=(e,t)=>{we(e,t.inputValue),fe(e,t),be(e,e,t);return setTimeout((()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(f()).width);new MutationObserver((()=>{const n=e.offsetWidth+(o=e,parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight));var o;f().style.width=n>t?`${n}px`:null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Ce=(t,o)=>{const i=w();q(i,o,"htmlContainer"),o.html?(se(o.html,i),W(i,"block")):o.text?(i.textContent=o.text,W(i,"block")):z(i),((t,o)=>{const i=f(),s=e.innerParams.get(t),r=!s||o.input!==s.input;pe.forEach((e=>{const t=U(i,n[e]);ge(e,o.inputAttributes),t.className=n[e],r&&z(t)})),o.input&&(r&&me(o),he(o))})(t,o)},Ae=(e,t)=>{for(const n in o)t.icon!==n&&R(e,o[n]);F(e,o[t.icon]),Pe(e,t),ke(),q(e,t,"icon")},ke=()=>{const e=f(),t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},Be=(e,t)=>{let n,o=e.innerHTML;if(t.iconHtml)n=xe(t.iconHtml);else if("success"===t.icon)n='\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n',o=o.replace(/ style=".*?"/g,"");else if("error"===t.icon)n='\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n';else{n=xe({question:"?",warning:"!",info:"i"}[t.icon])}o.trim()!==n.trim()&&H(e,n)},Pe=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])K(e,n,"backgroundColor",t.iconColor);K(e,".swal2-success-ring","borderColor",t.iconColor)}},xe=e=>`<div class="${n["icon-content"]}">${e}</div>`,Ee=(e,t)=>{e.className=`${n.popup} ${Z(e)?t.showClass.popup:""}`,t.toast?(F([document.documentElement,document.body],n["toast-shown"]),F(e,n.toast)):F(e,n.modal),q(e,t,"popup"),"string"==typeof t.customClass&&F(e,t.customClass),t.icon&&F(e,n[`icon-${t.icon}`])},$e=e=>{const t=document.createElement("li");return F(t,n["progress-step"]),H(t,e),t},Te=e=>{const t=document.createElement("li");return F(t,n["progress-step-line"]),e.progressStepsDistance&&_(t,"width",e.progressStepsDistance),t},Se=(t,i)=>{((e,t)=>{const n=m(),o=f();t.toast?(_(n,"width",t.width),o.style.width="100%",o.insertBefore(P(),b())):_(o,"width",t.width),_(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),z(A()),Ee(o,t)})(0,i),de(0,i),((e,t)=>{const o=C();t.progressSteps&&0!==t.progressSteps.length?(W(o),o.textContent="",t.currentProgressStep>=t.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(((e,i)=>{const s=$e(e);if(o.appendChild(s),i===t.currentProgressStep&&F(s,n["active-progress-step"]),i!==t.progressSteps.length-1){const e=Te(t);o.appendChild(e)}}))):z(o)})(0,i),((t,n)=>{const i=e.innerParams.get(t),s=b();if(i&&n.icon===i.icon)return Be(s,n),void Ae(s,n);if(n.icon||n.iconHtml){if(n.icon&&-1===Object.keys(o).indexOf(n.icon))return r(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${n.icon}"`),void z(s);W(s),Be(s,n),Ae(s,n),F(s,n.showClass.icon)}else z(s)})(t,i),((e,t)=>{const o=v();t.imageUrl?(W(o,""),o.setAttribute("src",t.imageUrl),o.setAttribute("alt",t.imageAlt),_(o,"width",t.imageWidth),_(o,"height",t.imageHeight),o.className=n.image,q(o,t,"image")):z(o)})(0,i),((e,t)=>{const n=y();Y(n,t.title||t.titleText,"block"),t.title&&se(t.title,n),t.titleText&&(n.innerText=t.titleText),q(n,t,"title")})(0,i),((e,t)=>{const n=S();H(n,t.closeButtonHtml),q(n,t,"closeButton"),Y(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel)})(0,i),Ce(t,i),ce(0,i),((e,t)=>{const n=$();Y(n,t.footer),t.footer&&se(t.footer,n),q(n,t,"footer")})(0,i),"function"==typeof i.didRender&&i.didRender(f())};function Le(){const t=e.innerParams.get(this);if(!t)return;const o=e.domCache.get(this);z(o.loader),j()?t.icon&&W(b()):Oe(o),R([o.popup,o.actions],n.loading),o.popup.removeAttribute("aria-busy"),o.popup.removeAttribute("data-loading"),o.confirmButton.disabled=!1,o.denyButton.disabled=!1,o.cancelButton.disabled=!1}const Oe=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?W(t[0],"inline-block"):Z(k())||Z(B())||Z(x())||z(e.actions)};const je=()=>k()&&k().click(),Me=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),He=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Ie=(e,t,n)=>{const o=L();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();f().focus()},qe=["ArrowRight","ArrowDown"],De=["ArrowLeft","ArrowUp"],Ve=(t,n,o)=>{const i=e.innerParams.get(t);i&&(n.isComposing||229===n.keyCode||(i.stopKeydownPropagation&&n.stopPropagation(),"Enter"===n.key?Ne(t,n,i):"Tab"===n.key?Fe(n,i):[...qe,...De].includes(n.key)?Re(n.key):"Escape"===n.key&&Ue(n,i,o)))},Ne=(e,t,n)=>{if(c(n.allowEnterKey)&&t.target&&e.getInput()&&t.target instanceof HTMLElement&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;je(),t.preventDefault()}},Fe=(e,t)=>{const n=e.target,o=L();let i=-1;for(let e=0;e<o.length;e++)if(n===o[e]){i=e;break}e.shiftKey?Ie(0,i,-1):Ie(0,i,1),e.stopPropagation(),e.preventDefault()},Re=e=>{const t=k(),n=B(),o=x();if(document.activeElement instanceof HTMLElement&&![t,n,o].includes(document.activeElement))return;const i=qe.includes(e)?"nextElementSibling":"previousElementSibling";let s=document.activeElement;for(let e=0;e<E().children.length;e++){if(s=s[i],!s)return;if(s instanceof HTMLButtonElement&&Z(s))break}s instanceof HTMLButtonElement&&s.focus()},Ue=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(Me.esc))};var _e={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const We=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},ze=()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);if(t&&n&&!e.match(/CriOS/i)){const e=44;f().scrollHeight>window.innerHeight-e&&(m().style.paddingBottom=`${e}px`)}},Ke=()=>{const e=m();let t;e.ontouchstart=e=>{t=Ye(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},Ye=e=>{const t=e.target,n=m();return!Ze(e)&&!Je(e)&&(t===n||!J(n)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!J(w())||!w().contains(t)))},Ze=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Je=e=>e.touches&&e.touches.length>1,Xe=()=>{null===M.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(M.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${M.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=n["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function Ge(e,t,o,i){j()?st(e,i):(ee(o).then((()=>st(e,i))),He(Q));/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),O()&&(null!==M.previousBodyPadding&&(document.body.style.paddingRight=`${M.previousBodyPadding}px`,M.previousBodyPadding=null),(()=>{if(I(document.body,n.iosfix)){const e=parseInt(document.body.style.top,10);R(document.body,n.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),We()),R([document.documentElement,document.body],[n.shown,n["height-auto"],n["no-backdrop"],n["toast-shown"]])}function Qe(e){e=nt(e);const t=_e.swalPromiseResolve.get(this),n=et(this);this.isAwaitingPromise()?e.isDismissed||(tt(this),t(e)):n&&t(e)}const et=t=>{const n=f();if(!n)return!1;const o=e.innerParams.get(t);if(!o||I(n,o.hideClass.popup))return!1;R(n,o.showClass.popup),F(n,o.hideClass.popup);const i=m();return R(i,o.showClass.backdrop),F(i,o.hideClass.backdrop),ot(t,n,o),!0};const tt=t=>{t.isAwaitingPromise()&&(e.awaitingPromise.delete(t),e.innerParams.get(t)||t._destroy())},nt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),ot=(e,t,n)=>{const o=m(),i=le&&X(t);"function"==typeof n.willClose&&n.willClose(t),i?it(e,t,o,n.returnFocus,n.didClose):Ge(e,o,n.returnFocus,n.didClose)},it=(e,t,n,o,i)=>{Q.swalCloseEventFinishedCallback=Ge.bind(null,e,n,o,i),t.addEventListener(le,(function(e){e.target===t&&(Q.swalCloseEventFinishedCallback(),delete Q.swalCloseEventFinishedCallback)}))},st=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()}))};function rt(t,n,o){const i=e.domCache.get(t);n.forEach((e=>{i[e].disabled=o}))}function at(e,t){if(e)if("radio"===e.type){const n=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;e<n.length;e++)n[e].disabled=t}else e.disabled=t}const lt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ct=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],ut={},dt=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],pt=e=>Object.prototype.hasOwnProperty.call(lt,e),mt=e=>-1!==ct.indexOf(e),gt=e=>ut[e],ht=e=>{pt(e)||s(`Unknown parameter "${e}"`)},ft=e=>{dt.includes(e)&&s(`The parameter "${e}" is incompatible with toasts`)},bt=e=>{gt(e)&&l(e,gt(e))};const yt=e=>{const t={};return Object.keys(e).forEach((n=>{mt(n)?t[n]=e[n]:s(`Invalid parameter to update: ${n}`)})),t};const wt=e=>{vt(e),delete e.params,delete Q.keydownHandler,delete Q.keydownTarget,delete Q.currentInstance},vt=t=>{t.isAwaitingPromise()?(Ct(e,t),e.awaitingPromise.set(t,!0)):(Ct(_e,t),Ct(e,t))},Ct=(e,t)=>{for(const n in e)e[n].delete(t)};var At=Object.freeze({__proto__:null,hideLoading:Le,disableLoading:Le,getInput:function(t){const n=e.innerParams.get(t||this),o=e.domCache.get(t||this);return o?D(o.popup,n.input):null},close:Qe,isAwaitingPromise:function(){return!!e.awaitingPromise.get(this)},rejectPromise:function(e){const t=_e.swalPromiseReject.get(this);tt(this),t&&t(e)},handleAwaitingPromise:tt,closePopup:Qe,closeModal:Qe,closeToast:Qe,enableButtons:function(){rt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){rt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){at(this.getInput(),!1)},disableInput:function(){at(this.getInput(),!0)},showValidationMessage:function(t){const o=e.domCache.get(this),i=e.innerParams.get(this);H(o.validationMessage,t),o.validationMessage.className=n["validation-message"],i.customClass&&i.customClass.validationMessage&&F(o.validationMessage,i.customClass.validationMessage),W(o.validationMessage);const s=this.getInput();s&&(s.setAttribute("aria-invalid",!0),s.setAttribute("aria-describedby",n["validation-message"]),V(s),F(s,n.inputerror))},resetValidationMessage:function(){const t=e.domCache.get(this);t.validationMessage&&z(t.validationMessage);const o=this.getInput();o&&(o.removeAttribute("aria-invalid"),o.removeAttribute("aria-describedby"),R(o,n.inputerror))},getProgressSteps:function(){return e.domCache.get(this).progressSteps},update:function(t){const n=f(),o=e.innerParams.get(this);if(!n||I(n,o.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const i=yt(t),r=Object.assign({},o,i);Se(this,r),e.innerParams.set(this,r),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){const t=e.domCache.get(this),n=e.innerParams.get(this);n?(t.popup&&Q.swalCloseEventFinishedCallback&&(Q.swalCloseEventFinishedCallback(),delete Q.swalCloseEventFinishedCallback),"function"==typeof n.didDestroy&&n.didDestroy(),wt(this)):vt(this)}});const kt=e=>{let t=f();t||new xn,t=f();const n=P();j()?z(b()):Bt(t,e),W(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},Bt=(e,t)=>{const o=E(),i=P();!t&&Z(k())&&(t=k()),W(o),t&&(z(t),i.setAttribute("data-button-to-replace",t.className)),i.parentNode.insertBefore(i,t),F([e,o],n.loading)},Pt=e=>e.checked?1:0,xt=e=>e.checked?e.value:null,Et=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,$t=(e,t)=>{const n=f(),o=e=>{St[t.input](n,Lt(e),t)};u(t.inputOptions)||p(t.inputOptions)?(kt(k()),d(t.inputOptions).then((t=>{e.hideLoading(),o(t)}))):"object"==typeof t.inputOptions?o(t.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},Tt=(e,t)=>{const n=e.getInput();z(n),d(t.inputValue).then((o=>{n.value="number"===t.input?`${parseFloat(o)||0}`:`${o}`,W(n),n.focus(),e.hideLoading()})).catch((t=>{r(`Error in inputValue promise: ${t}`),n.value="",W(n),n.focus(),e.hideLoading()}))},St={select:(e,t,o)=>{const i=U(e,n.select),s=(e,t,n)=>{const i=document.createElement("option");i.value=n,H(i,t),i.selected=Ot(n,o.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,i.appendChild(e),n.forEach((t=>s(e,t[1],t[0])))}else s(i,n,t)})),i.focus()},radio:(e,t,o)=>{const i=U(e,n.radio);t.forEach((e=>{const t=e[0],s=e[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=n.radio,r.value=t,Ot(t,o.inputValue)&&(r.checked=!0);const l=document.createElement("span");H(l,s),l.className=n.label,a.appendChild(r),a.appendChild(l),i.appendChild(a)}));const s=i.querySelectorAll("input");s.length&&s[0].focus()}},Lt=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,n)=>{let o=e;"object"==typeof o&&(o=Lt(o)),t.push([n,o])})):Object.keys(e).forEach((n=>{let o=e[n];"object"==typeof o&&(o=Lt(o)),t.push([n,o])})),t},Ot=(e,t)=>t&&t.toString()===e.toString(),jt=(t,n)=>{const o=e.innerParams.get(t);if(!o.input)return void r(`The "input" parameter is needed to be set when using returnInputValueOn${i(n)}`);const s=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Pt(n);case"radio":return xt(n);case"file":return Et(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(t,o);o.inputValidator?Mt(t,s,n):t.getInput().checkValidity()?"deny"===n?Ht(t,s):Dt(t,s):(t.enableButtons(),t.showValidationMessage(o.validationMessage))},Mt=(t,n,o)=>{const i=e.innerParams.get(t);t.disableInput();Promise.resolve().then((()=>d(i.inputValidator(n,i.validationMessage)))).then((e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):"deny"===o?Ht(t,n):Dt(t,n)}))},Ht=(t,n)=>{const o=e.innerParams.get(t||void 0);if(o.showLoaderOnDeny&&kt(B()),o.preDeny){e.awaitingPromise.set(t||void 0,!0);Promise.resolve().then((()=>d(o.preDeny(n,o.validationMessage)))).then((e=>{!1===e?(t.hideLoading(),tt(t)):t.close({isDenied:!0,value:void 0===e?n:e})})).catch((e=>qt(t||void 0,e)))}else t.close({isDenied:!0,value:n})},It=(e,t)=>{e.close({isConfirmed:!0,value:t})},qt=(e,t)=>{e.rejectPromise(t)},Dt=(t,n)=>{const o=e.innerParams.get(t||void 0);if(o.showLoaderOnConfirm&&kt(),o.preConfirm){t.resetValidationMessage(),e.awaitingPromise.set(t||void 0,!0);Promise.resolve().then((()=>d(o.preConfirm(n,o.validationMessage)))).then((e=>{Z(A())||!1===e?(t.hideLoading(),tt(t)):It(t,void 0===e?n:e)})).catch((e=>qt(t||void 0,e)))}else It(t,n)},Vt=(t,n,o)=>{n.popup.onclick=()=>{const n=e.innerParams.get(t);n&&(Nt(n)||n.timer||n.input)||o(Me.close)}},Nt=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let Ft=!1;const Rt=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Ft=!0)}}},Ut=e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(Ft=!0)}}},_t=(t,n,o)=>{n.container.onclick=i=>{const s=e.innerParams.get(t);Ft?Ft=!1:i.target===n.container&&c(s.allowOutsideClick)&&o(Me.backdrop)}},Wt=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const zt=()=>{if(Q.timeout)return(()=>{const e=T(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.removeProperty("transition"),e.style.width=`${n}%`})(),Q.timeout.stop()},Kt=()=>{if(Q.timeout){const e=Q.timeout.start();return G(e),e}};let Yt=!1;const Zt={};const Jt=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in Zt){const n=t.getAttribute(e);if(n)return void Zt[e].fire({template:n})}};var Xt=Object.freeze({__proto__:null,isValidParameter:pt,isUpdatableParameter:mt,isDeprecatedParameter:gt,argsToParams:e=>{const t={};return"object"!=typeof e[0]||Wt(e[0])?["title","html","icon"].forEach(((n,o)=>{const i=e[o];"string"==typeof i||Wt(i)?t[n]=i:void 0!==i&&r(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)})):Object.assign(t,e[0]),t},getContainer:m,getPopup:f,getTitle:y,getHtmlContainer:w,getImage:v,getIcon:b,getIconContent:()=>h(n["icon-content"]),getInputLabel:()=>h(n["input-label"]),getCloseButton:S,getActions:E,getConfirmButton:k,getDenyButton:B,getCancelButton:x,getLoader:P,getFooter:$,getTimerProgressBar:T,getFocusableElements:L,getValidationMessage:A,isLoading:()=>f().hasAttribute("data-loading"),isVisible:()=>Z(f()),clickConfirm:je,clickDeny:()=>B()&&B().click(),clickCancel:()=>x()&&x().click(),fire:function(){const e=this;for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return new e(...n)},mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},showLoading:kt,enableLoading:kt,getTimerLeft:()=>Q.timeout&&Q.timeout.getTimerLeft(),stopTimer:zt,resumeTimer:Kt,toggleTimer:()=>{const e=Q.timeout;return e&&(e.running?zt():Kt())},increaseTimer:e=>{if(Q.timeout){const t=Q.timeout.increase(e);return G(t,!0),t}},isTimerRunning:()=>Q.timeout&&Q.timeout.isRunning(),bindClickHandler:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template";Zt[e]=this,Yt||(document.body.addEventListener("click",Jt),Yt=!0)}});class Gt{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const Qt=["swal-title","swal-html","swal-footer"],en=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{cn(e,["name","value"]);const n=e.getAttribute("name"),o=e.getAttribute("value");t[n]="boolean"==typeof lt[n]?"false"!==o:"object"==typeof lt[n]?JSON.parse(o):o})),t},tn=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const n=e.getAttribute("name"),o=e.getAttribute("value");t[n]=new Function(`return ${o}`)()})),t},nn=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{cn(e,["type","color","aria-label"]);const n=e.getAttribute("type");t[`${n}ButtonText`]=e.innerHTML,t[`show${i(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label"))})),t},on=e=>{const t={},n=e.querySelector("swal-image");return n&&(cn(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},sn=e=>{const t={},n=e.querySelector("swal-icon");return n&&(cn(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},rn=e=>{const t={},n=e.querySelector("swal-input");n&&(cn(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const o=Array.from(e.querySelectorAll("swal-input-option"));return o.length&&(t.inputOptions={},o.forEach((e=>{cn(e,["value"]);const n=e.getAttribute("value"),o=e.innerHTML;t.inputOptions[n]=o}))),t},an=(e,t)=>{const n={};for(const o in t){const i=t[o],s=e.querySelector(i);s&&(cn(s,[]),n[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},ln=e=>{const t=Qt.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const n=e.tagName.toLowerCase();t.includes(n)||s(`Unrecognized element <${n}>`)}))},cn=(e,t)=>{Array.from(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&s([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])}))},un=e=>{const t=m(),o=f();"function"==typeof e.willOpen&&e.willOpen(o);const i=window.getComputedStyle(document.body).overflowY;gn(t,o,e),setTimeout((()=>{pn(t,o)}),10),O()&&(mn(t,e.scrollbarPadding,i),Array.from(document.body.children).forEach((e=>{e===m()||e.contains(m())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))),j()||Q.previousActiveElement||(Q.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(o))),R(t,n["no-transition"])},dn=e=>{const t=f();if(e.target!==t)return;const n=m();t.removeEventListener(le,dn),n.style.overflowY="auto"},pn=(e,t)=>{le&&X(t)?(e.style.overflowY="hidden",t.addEventListener(le,dn)):e.style.overflowY="auto"},mn=(e,t,o)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!I(document.body,n.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",F(document.body,n.iosfix),Ke(),ze()}})(),t&&"hidden"!==o&&Xe(),setTimeout((()=>{e.scrollTop=0}))},gn=(e,t,o)=>{F(e,o.showClass.backdrop),t.style.setProperty("opacity","0","important"),W(t,"grid"),setTimeout((()=>{F(t,o.showClass.popup),t.style.removeProperty("opacity")}),10),F([document.documentElement,document.body],n.shown),o.heightAuto&&o.backdrop&&!o.toast&&F([document.documentElement,document.body],n["height-auto"])};var hn={email:(e,t)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function fn(e){!function(e){e.inputValidator||Object.keys(hn).forEach((t=>{e.input===t&&(e.inputValidator=hn[t])}))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(s('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),ie(e)}let bn;class yn{constructor(){if("undefined"==typeof window)return;bn=this;for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const i=Object.freeze(this.constructor.argsToParams(n));Object.defineProperties(this,{params:{value:i,writable:!1,enumerable:!0,configurable:!0}});const s=bn._main(bn.params);e.promise.set(this,s)}_main(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(e=>{!1===e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)ht(t),e.toast&&ft(t),bt(t)})(Object.assign({},n,t)),Q.currentInstance&&(Q.currentInstance._destroy(),O()&&We()),Q.currentInstance=bn;const o=vn(t,n);fn(o),Object.freeze(o),Q.timeout&&(Q.timeout.stop(),delete Q.timeout),clearTimeout(Q.restoreFocusTimeout);const i=Cn(bn);return Se(bn,o),e.innerParams.set(bn,o),wn(bn,i,o)}then(t){return e.promise.get(this).then(t)}finally(t){return e.promise.get(this).finally(t)}}const wn=(t,n,o)=>new Promise(((i,s)=>{const r=e=>{t.close({isDismissed:!0,dismiss:e})};_e.swalPromiseResolve.set(t,i),_e.swalPromiseReject.set(t,s),n.confirmButton.onclick=()=>{(t=>{const n=e.innerParams.get(t);t.disableButtons(),n.input?jt(t,"confirm"):Dt(t,!0)})(t)},n.denyButton.onclick=()=>{(t=>{const n=e.innerParams.get(t);t.disableButtons(),n.returnInputValueOnDeny?jt(t,"deny"):Ht(t,!1)})(t)},n.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Me.cancel)})(t,r)},n.closeButton.onclick=()=>{r(Me.close)},((t,n,o)=>{e.innerParams.get(t).toast?Vt(t,n,o):(Rt(n),Ut(n),_t(t,n,o))})(t,n,r),((e,t,n,o)=>{He(t),n.toast||(t.keydownHandler=t=>Ve(e,t,o),t.keydownTarget=n.keydownListenerCapture?window:f(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)})(t,Q,o,r),((e,t)=>{"select"===t.input||"radio"===t.input?$t(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(u(t.inputValue)||p(t.inputValue))&&(kt(k()),Tt(e,t))})(t,o),un(o),An(Q,o,r),kn(n,o),setTimeout((()=>{n.container.scrollTop=0}))})),vn=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return ln(n),Object.assign(en(n),tn(n),nn(n),on(n),sn(n),rn(n),an(n,Qt))})(e),o=Object.assign({},lt,t,n,e);return o.showClass=Object.assign({},lt.showClass,o.showClass),o.hideClass=Object.assign({},lt.hideClass,o.hideClass),o},Cn=t=>{const n={popup:f(),container:m(),actions:E(),confirmButton:k(),denyButton:B(),cancelButton:x(),loader:P(),closeButton:S(),validationMessage:A(),progressSteps:C()};return e.domCache.set(t,n),n},An=(e,t,n)=>{const o=T();z(o),t.timer&&(e.timeout=new Gt((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(W(o),q(o,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&G(t.timer)}))))},kn=(e,t)=>{t.toast||(c(t.allowEnterKey)?Bn(e,t)||Ie(0,-1,1):Pn())},Bn=(e,t)=>t.focusDeny&&Z(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&Z(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!Z(e.confirmButton))&&(e.confirmButton.focus(),!0),Pn=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};"undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)&&setTimeout((()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://discoveric.ru/upload/anthem/61/61-1.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((()=>{e.play().catch((()=>{}))}),2500)}),500),Object.assign(yn.prototype,At),Object.assign(yn,Xt),Object.keys(At).forEach((e=>{yn[e]=function(){if(bn)return bn[e](...arguments)}})),yn.DismissReason=Me,yn.version="11.6.9";const xn=yn;return xn.default=xn,xn})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sweetalert2=t()}(this,(function(){"use strict";function e(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function t(t,n){return t.get(e(t,n))}function n(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}const o={},i=e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,i=window.scrollY;o.restoreFocusTimeout=setTimeout((()=>{o.previousActiveElement instanceof HTMLElement?(o.previousActiveElement.focus(),o.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(n,i)})),s="swal2-",r=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce(((e,t)=>(e[t]=s+t,e)),{}),a=["success","warning","info","question","error"].reduce(((e,t)=>(e[t]=s+t,e)),{}),l="SweetAlert2:",c=e=>e.charAt(0).toUpperCase()+e.slice(1),u=e=>{console.warn(`${l} ${"object"==typeof e?e.join(" "):e}`)},d=e=>{console.error(`${l} ${e}`)},p=[],m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;var n;n=`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`,p.includes(n)||(p.push(n),u(n))},g=e=>"function"==typeof e?e():e,h=e=>e&&"function"==typeof e.toPromise,f=e=>h(e)?e.toPromise():Promise.resolve(e),b=e=>e&&Promise.resolve(e)===e,y=()=>document.body.querySelector(`.${r.container}`),v=e=>{const t=y();return t?t.querySelector(e):null},w=e=>v(`.${e}`),C=()=>w(r.popup),A=()=>w(r.icon),E=()=>w(r.title),k=()=>w(r["html-container"]),B=()=>w(r.image),L=()=>w(r["progress-steps"]),$=()=>w(r["validation-message"]),x=()=>v(`.${r.actions} .${r.confirm}`),P=()=>v(`.${r.actions} .${r.cancel}`),T=()=>v(`.${r.actions} .${r.deny}`),S=()=>v(`.${r.loader}`),O=()=>w(r.actions),M=()=>w(r.footer),j=()=>w(r["timer-progress-bar"]),H=()=>w(r.close),I=()=>{const e=C();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(t).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")||"0"),o=parseInt(t.getAttribute("tabindex")||"0");return n>o?1:n<o?-1:0})),o=e.querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n'),i=Array.from(o).filter((e=>"-1"!==e.getAttribute("tabindex")));return[...new Set(n.concat(i))].filter((e=>ee(e)))},D=()=>N(document.body,r.shown)&&!N(document.body,r["toast-shown"])&&!N(document.body,r["no-backdrop"]),q=()=>{const e=C();return!!e&&N(e,r.toast)},V=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html"),o=n.querySelector("head");o&&Array.from(o.childNodes).forEach((t=>{e.appendChild(t)}));const i=n.querySelector("body");i&&Array.from(i.childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},N=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t<n.length;t++)if(!e.classList.contains(n[t]))return!1;return!0},_=(e,t,n)=>{if(((e,t)=>{Array.from(e.classList).forEach((n=>{Object.values(r).includes(n)||Object.values(a).includes(n)||Object.values(t.showClass||{}).includes(n)||e.classList.remove(n)}))})(e,t),!t.customClass)return;const o=t.customClass[n];o&&("string"==typeof o||o.forEach?z(e,o):u(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof o}"`))},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${r.popup} > .${r[t]}`);case"checkbox":return e.querySelector(`.${r.popup} > .${r.checkbox} input`);case"radio":return e.querySelector(`.${r.popup} > .${r.radio} input:checked`)||e.querySelector(`.${r.popup} > .${r.radio} input:first-child`);case"range":return e.querySelector(`.${r.popup} > .${r.range} input`);default:return e.querySelector(`.${r.popup} > .${r.input}`)}},R=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},U=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},z=(e,t)=>{U(e,t,!0)},W=(e,t)=>{U(e,t,!1)},K=(e,t)=>{const n=Array.from(e.children);for(let e=0;e<n.length;e++){const o=n[e];if(o instanceof HTMLElement&&N(o,t))return o}},Y=(e,t,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style.setProperty(t,"number"==typeof n?`${n}px`:n):e.style.removeProperty(t)},X=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e&&(e.style.display=t)},Z=e=>{e&&(e.style.display="none")},J=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"block";e&&new MutationObserver((()=>{Q(e,e.innerHTML,t)})).observe(e,{childList:!0,subtree:!0})},G=(e,t,n,o)=>{const i=e.querySelector(t);i&&i.style.setProperty(n,o)},Q=function(e,t){t?X(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):Z(e)},ee=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),te=e=>!!(e.scrollHeight>e.clientHeight),ne=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),o=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||o>0},oe=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=j();n&&ee(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"}),10))},ie=`\n <div aria-labelledby="${r.title}" aria-describedby="${r["html-container"]}" class="${r.popup}" tabindex="-1">\n <button type="button" class="${r.close}"></button>\n <ul class="${r["progress-steps"]}"></ul>\n <div class="${r.icon}"></div>\n <img class="${r.image}" />\n <h2 class="${r.title}" id="${r.title}"></h2>\n <div class="${r["html-container"]}" id="${r["html-container"]}"></div>\n <input class="${r.input}" id="${r.input}" />\n <input type="file" class="${r.file}" />\n <div class="${r.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${r.select}" id="${r.select}"></select>\n <div class="${r.radio}"></div>\n <label class="${r.checkbox}">\n <input type="checkbox" id="${r.checkbox}" />\n <span class="${r.label}"></span>\n </label>\n <textarea class="${r.textarea}" id="${r.textarea}"></textarea>\n <div class="${r["validation-message"]}" id="${r["validation-message"]}"></div>\n <div class="${r.actions}">\n <div class="${r.loader}"></div>\n <button type="button" class="${r.confirm}"></button>\n <button type="button" class="${r.deny}"></button>\n <button type="button" class="${r.cancel}"></button>\n </div>\n <div class="${r.footer}"></div>\n <div class="${r["timer-progress-bar-container"]}">\n <div class="${r["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),se=()=>{o.currentInstance.resetValidationMessage()},re=e=>{const t=(()=>{const e=y();return!!e&&(e.remove(),W([document.documentElement,document.body],[r["no-backdrop"],r["toast-shown"],r["has-column"]]),!0)})();if("undefined"==typeof window||"undefined"==typeof document)return void d("SweetAlert2 requires document to initialize");const n=document.createElement("div");n.className=r.container,t&&z(n,r["no-transition"]),V(n,ie);const o="string"==typeof(i=e.target)?document.querySelector(i):i;var i;o.appendChild(n),(e=>{const t=C();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&z(y(),r.rtl)})(o),(()=>{const e=C(),t=K(e,r.input),n=K(e,r.file),o=e.querySelector(`.${r.range} input`),i=e.querySelector(`.${r.range} output`),s=K(e,r.select),a=e.querySelector(`.${r.checkbox} input`),l=K(e,r.textarea);t.oninput=se,n.onchange=se,s.onchange=se,a.onchange=se,l.oninput=se,o.oninput=()=>{se(),i.value=o.value},o.onchange=()=>{se(),i.value=o.value}})()},ae=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?le(e,t):e&&V(t,e)},le=(e,t)=>{e.jquery?ce(t,e):V(t,e.toString())},ce=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},ue=(e,t)=>{const n=O(),o=S();n&&o&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?X(n):Z(n),_(n,t,"actions"),function(e,t,n){const o=x(),i=T(),s=P();if(!o||!i||!s)return;de(o,"confirm",n),de(i,"deny",n),de(s,"cancel",n),function(e,t,n,o){if(!o.buttonsStyling)return void W([e,t,n],r.styled);z([e,t,n],r.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,z(e,r["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,z(t,r["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,z(n,r["default-outline"]))}(o,i,s,n),n.reverseButtons&&(n.toast?(e.insertBefore(s,o),e.insertBefore(i,o)):(e.insertBefore(s,t),e.insertBefore(i,t),e.insertBefore(o,t)))}(n,o,t),V(o,t.loaderHtml||""),_(o,t,"loader"))};function de(e,t,n){const o=c(t);Q(e,n[`show${o}Button`],"inline-block"),V(e,n[`${t}ButtonText`]||""),e.setAttribute("aria-label",n[`${t}ButtonAriaLabel`]||""),e.className=r[t],_(e,n,`${t}Button`)}const pe=(e,t)=>{const n=y();n&&(!function(e,t){"string"==typeof t?e.style.background=t:t||z([document.documentElement,document.body],r["no-backdrop"])}(n,t.backdrop),function(e,t){if(!t)return;t in r?z(e,r[t]):(u('The "position" parameter is not valid, defaulting to "center"'),z(e,r.center))}(n,t.position),function(e,t){if(!t)return;z(e,r[`grow-${t}`])}(n,t.grow),_(n,t,"container"))};var me={innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],he=e=>{if(!e.input)return;if(!Ae[e.input])return void d(`Unexpected type of input! Expected ${Object.keys(Ae).join(" | ")}, got "${e.input}"`);const t=we(e.input);if(!t)return;const n=Ae[e.input](t,e);X(t),e.inputAutoFocus&&setTimeout((()=>{R(n)}))},fe=(e,t)=>{const n=C();if(!n)return;const o=F(n,e);if(o){(e=>{for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t].name;["id","type","value","style"].includes(n)||e.removeAttribute(n)}})(o);for(const e in t)o.setAttribute(e,t[e])}},be=e=>{if(!e.input)return;const t=we(e.input);t&&_(t,e,"input")},ye=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},ve=(e,t,n)=>{if(n.inputLabel){const o=document.createElement("label"),i=r["input-label"];o.setAttribute("for",e.id),o.className=i,"object"==typeof n.customClass&&z(o,n.customClass.inputLabel),o.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",o)}},we=e=>{const t=C();if(t)return K(t,r[e]||r.input)},Ce=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:b(t)||u(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Ae={};Ae.text=Ae.email=Ae.password=Ae.number=Ae.tel=Ae.url=Ae.search=Ae.date=Ae["datetime-local"]=Ae.time=Ae.week=Ae.month=(e,t)=>(Ce(e,t.inputValue),ve(e,e,t),ye(e,t),e.type=t.input,e),Ae.file=(e,t)=>(ve(e,e,t),ye(e,t),e),Ae.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return Ce(n,t.inputValue),n.type=t.input,Ce(o,t.inputValue),ve(n,e,t),e},Ae.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return ve(e,e,t),e},Ae.radio=e=>(e.textContent="",e),Ae.checkbox=(e,t)=>{const n=F(C(),"checkbox");n.value="1",n.checked=Boolean(t.inputValue);const o=e.querySelector("span");return V(o,t.inputPlaceholder||t.inputLabel),n},Ae.textarea=(e,t)=>{Ce(e,t.inputValue),ye(e,t),ve(e,e,t);return setTimeout((()=>{if("MutationObserver"in window){const n=parseInt(window.getComputedStyle(C()).width);new MutationObserver((()=>{if(!document.body.contains(e))return;const o=e.offsetWidth+(i=e,parseInt(window.getComputedStyle(i).marginLeft)+parseInt(window.getComputedStyle(i).marginRight));var i;o>n?C().style.width=`${o}px`:Y(C(),"width",t.width)})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Ee=(e,t)=>{const n=k();n&&(J(n),_(n,t,"htmlContainer"),t.html?(ae(t.html,n),X(n,"block")):t.text?(n.textContent=t.text,X(n,"block")):Z(n),((e,t)=>{const n=C();if(!n)return;const o=me.innerParams.get(e),i=!o||t.input!==o.input;ge.forEach((e=>{const o=K(n,r[e]);o&&(fe(e,t.inputAttributes),o.className=r[e],i&&Z(o))})),t.input&&(i&&he(t),be(t))})(e,t))},ke=(e,t)=>{for(const[n,o]of Object.entries(a))t.icon!==n&&W(e,o);z(e,t.icon&&a[t.icon]),$e(e,t),Be(),_(e,t,"icon")},Be=()=>{const e=C();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},Le=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let n=e.innerHTML,o="";if(t.iconHtml)o=xe(t.iconHtml);else if("success"===t.icon)o='\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n',n=n.replace(/ style=".*?"/g,"");else if("error"===t.icon)o='\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n';else if(t.icon){o=xe({question:"?",warning:"!",info:"i"}[t.icon])}n.trim()!==o.trim()&&V(e,o)},$e=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])G(e,n,"background-color",t.iconColor);G(e,".swal2-success-ring","border-color",t.iconColor)}},xe=e=>`<div class="${r["icon-content"]}">${e}</div>`;let Pe=!1,Te=0,Se=0,Oe=0,Me=0;const je=e=>{const t=C();if(e.target===t||A().contains(e.target)){Pe=!0;const n=De(e);Te=n.clientX,Se=n.clientY,Oe=parseInt(t.style.insetInlineStart)||0,Me=parseInt(t.style.insetBlockStart)||0,z(t,"swal2-dragging")}},He=e=>{const t=C();if(Pe){let{clientX:n,clientY:o}=De(e);t.style.insetInlineStart=`${Oe+(n-Te)}px`,t.style.insetBlockStart=`${Me+(o-Se)}px`}},Ie=()=>{const e=C();Pe=!1,W(e,"swal2-dragging")},De=e=>{let t=0,n=0;return e.type.startsWith("mouse")?(t=e.clientX,n=e.clientY):e.type.startsWith("touch")&&(t=e.touches[0].clientX,n=e.touches[0].clientY),{clientX:t,clientY:n}},qe=(e,t)=>{const n=y(),o=C();if(n&&o){if(t.toast){Y(n,"width",t.width),o.style.width="100%";const e=S();e&&o.insertBefore(e,A())}else Y(o,"width",t.width);Y(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),Z($()),Ve(o,t),t.draggable&&!t.toast?(z(o,r.draggable),(e=>{e.addEventListener("mousedown",je),document.body.addEventListener("mousemove",He),e.addEventListener("mouseup",Ie),e.addEventListener("touchstart",je),document.body.addEventListener("touchmove",He),e.addEventListener("touchend",Ie)})(o)):(W(o,r.draggable),(e=>{e.removeEventListener("mousedown",je),document.body.removeEventListener("mousemove",He),e.removeEventListener("mouseup",Ie),e.removeEventListener("touchstart",je),document.body.removeEventListener("touchmove",He),e.removeEventListener("touchend",Ie)})(o))}},Ve=(e,t)=>{const n=t.showClass||{};e.className=`${r.popup} ${ee(e)?n.popup:""}`,t.toast?(z([document.documentElement,document.body],r["toast-shown"]),z(e,r.toast)):z(e,r.modal),_(e,t,"popup"),"string"==typeof t.customClass&&z(e,t.customClass),t.icon&&z(e,r[`icon-${t.icon}`])},Ne=e=>{const t=document.createElement("li");return z(t,r["progress-step"]),V(t,e),t},_e=e=>{const t=document.createElement("li");return z(t,r["progress-step-line"]),e.progressStepsDistance&&Y(t,"width",e.progressStepsDistance),t},Fe=(e,t)=>{qe(0,t),pe(0,t),((e,t)=>{const n=L();if(!n)return;const{progressSteps:o,currentProgressStep:i}=t;o&&0!==o.length&&void 0!==i?(X(n),n.textContent="",i>=o.length&&u("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.forEach(((e,s)=>{const a=Ne(e);if(n.appendChild(a),s===i&&z(a,r["active-progress-step"]),s!==o.length-1){const e=_e(t);n.appendChild(e)}}))):Z(n)})(0,t),((e,t)=>{const n=me.innerParams.get(e),o=A();if(o){if(n&&t.icon===n.icon)return Le(o,t),void ke(o,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(a).indexOf(t.icon))return d(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void Z(o);X(o),Le(o,t),ke(o,t),z(o,t.showClass&&t.showClass.icon)}else Z(o)}})(e,t),((e,t)=>{const n=B();n&&(t.imageUrl?(X(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt||""),Y(n,"width",t.imageWidth),Y(n,"height",t.imageHeight),n.className=r.image,_(n,t,"image")):Z(n))})(0,t),((e,t)=>{const n=E();n&&(J(n),Q(n,t.title||t.titleText,"block"),t.title&&ae(t.title,n),t.titleText&&(n.innerText=t.titleText),_(n,t,"title"))})(0,t),((e,t)=>{const n=H();n&&(V(n,t.closeButtonHtml||""),_(n,t,"closeButton"),Q(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel||""))})(0,t),Ee(e,t),ue(0,t),((e,t)=>{const n=M();n&&(J(n),Q(n,t.footer,"block"),t.footer&&ae(t.footer,n),_(n,t,"footer"))})(0,t);const n=C();"function"==typeof t.didRender&&n&&t.didRender(n),o.eventEmitter.emit("didRender",n)},Re=()=>{var e;return null===(e=x())||void 0===e?void 0:e.click()},Ue=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),ze=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},We=(e,t)=>{var n;const o=I();if(o.length)return(e+=t)===o.length?e=0:-1===e&&(e=o.length-1),void o[e].focus();null===(n=C())||void 0===n||n.focus()},Ke=["ArrowRight","ArrowDown"],Ye=["ArrowLeft","ArrowUp"],Xe=(e,t,n)=>{e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Ze(t,e):"Tab"===t.key?Je(t):[...Ke,...Ye].includes(t.key)?Ge(t.key):"Escape"===t.key&&Qe(t,e,n)))},Ze=(e,t)=>{if(!g(t.allowEnterKey))return;const n=F(C(),t.input);if(e.target&&n&&e.target instanceof HTMLElement&&e.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(t.input))return;Re(),e.preventDefault()}},Je=e=>{const t=e.target,n=I();let o=-1;for(let e=0;e<n.length;e++)if(t===n[e]){o=e;break}e.shiftKey?We(o,-1):We(o,1),e.stopPropagation(),e.preventDefault()},Ge=e=>{const t=O(),n=x(),o=T(),i=P();if(!(t&&n&&o&&i))return;const s=[n,o,i];if(document.activeElement instanceof HTMLElement&&!s.includes(document.activeElement))return;const r=Ke.includes(e)?"nextElementSibling":"previousElementSibling";let a=document.activeElement;if(a){for(let e=0;e<t.children.length;e++){if(a=a[r],!a)return;if(a instanceof HTMLButtonElement&&ee(a))break}a instanceof HTMLButtonElement&&a.focus()}},Qe=(e,t,n)=>{g(t.allowEscapeKey)&&(e.preventDefault(),n(Ue.esc))};var et={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const tt=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},nt="undefined"!=typeof window&&!!window.GestureEvent,ot=()=>{const e=y();if(!e)return;let t;e.ontouchstart=e=>{t=it(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},it=e=>{const t=e.target,n=y(),o=k();return!(!n||!o)&&(!st(e)&&!rt(e)&&(t===n||!te(n)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!te(o)||!o.contains(t))))},st=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,rt=e=>e.touches&&e.touches.length>1;let at=null;const lt=e=>{null===at&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(at=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${at+(()=>{const e=document.createElement("div");e.className=r["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function ct(e,t,n,s){q()?bt(e,s):(i(n).then((()=>bt(e,s))),ze(o)),nt?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),D()&&(null!==at&&(document.body.style.paddingRight=`${at}px`,at=null),(()=>{if(N(document.body,r.iosfix)){const e=parseInt(document.body.style.top,10);W(document.body,r.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),tt()),W([document.documentElement,document.body],[r.shown,r["height-auto"],r["no-backdrop"],r["toast-shown"]])}function ut(e){e=gt(e);const t=et.swalPromiseResolve.get(this),n=dt(this);this.isAwaitingPromise?e.isDismissed||(mt(this),t(e)):n&&t(e)}const dt=e=>{const t=C();if(!t)return!1;const n=me.innerParams.get(e);if(!n||N(t,n.hideClass.popup))return!1;W(t,n.showClass.popup),z(t,n.hideClass.popup);const o=y();return W(o,n.showClass.backdrop),z(o,n.hideClass.backdrop),ht(e,t,n),!0};function pt(e){const t=et.swalPromiseReject.get(this);mt(this),t&&t(e)}const mt=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,me.innerParams.get(e)||e._destroy())},gt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),ht=(e,t,n)=>{var i;const s=y(),r=ne(t);"function"==typeof n.willClose&&n.willClose(t),null===(i=o.eventEmitter)||void 0===i||i.emit("willClose",t),r?ft(e,t,s,n.returnFocus,n.didClose):ct(e,s,n.returnFocus,n.didClose)},ft=(e,t,n,i,s)=>{o.swalCloseEventFinishedCallback=ct.bind(null,e,n,i,s);const r=function(e){var n;e.target===t&&(null===(n=o.swalCloseEventFinishedCallback)||void 0===n||n.call(o),delete o.swalCloseEventFinishedCallback,t.removeEventListener("animationend",r),t.removeEventListener("transitionend",r))};t.addEventListener("animationend",r),t.addEventListener("transitionend",r)},bt=(e,t)=>{setTimeout((()=>{var n;"function"==typeof t&&t.bind(e.params)(),null===(n=o.eventEmitter)||void 0===n||n.emit("didClose"),e._destroy&&e._destroy()}))},yt=e=>{let t=C();if(t||new Jn,t=C(),!t)return;const n=S();q()?Z(A()):vt(t,e),X(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},vt=(e,t)=>{const n=O(),o=S();n&&o&&(!t&&ee(x())&&(t=x()),X(n),t&&(Z(t),o.setAttribute("data-button-to-replace",t.className),n.insertBefore(o,t)),z([e,n],r.loading))},wt=e=>e.checked?1:0,Ct=e=>e.checked?e.value:null,At=e=>e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,Et=(e,t)=>{const n=C();if(!n)return;const o=e=>{"select"===t.input?function(e,t,n){const o=K(e,r.select);if(!o)return;const i=(e,t,o)=>{const i=document.createElement("option");i.value=o,V(i,t),i.selected=Lt(o,n.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,o.appendChild(e),n.forEach((t=>i(e,t[1],t[0])))}else i(o,n,t)})),o.focus()}(n,Bt(e),t):"radio"===t.input&&function(e,t,n){const o=K(e,r.radio);if(!o)return;t.forEach((e=>{const t=e[0],i=e[1],s=document.createElement("input"),a=document.createElement("label");s.type="radio",s.name=r.radio,s.value=t,Lt(t,n.inputValue)&&(s.checked=!0);const l=document.createElement("span");V(l,i),l.className=r.label,a.appendChild(s),a.appendChild(l),o.appendChild(a)}));const i=o.querySelectorAll("input");i.length&&i[0].focus()}(n,Bt(e),t)};h(t.inputOptions)||b(t.inputOptions)?(yt(x()),f(t.inputOptions).then((t=>{e.hideLoading(),o(t)}))):"object"==typeof t.inputOptions?o(t.inputOptions):d("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},kt=(e,t)=>{const n=e.getInput();n&&(Z(n),f(t.inputValue).then((o=>{n.value="number"===t.input?`${parseFloat(o)||0}`:`${o}`,X(n),n.focus(),e.hideLoading()})).catch((t=>{d(`Error in inputValue promise: ${t}`),n.value="",X(n),n.focus(),e.hideLoading()})))};const Bt=e=>{const t=[];return e instanceof Map?e.forEach(((e,n)=>{let o=e;"object"==typeof o&&(o=Bt(o)),t.push([n,o])})):Object.keys(e).forEach((n=>{let o=e[n];"object"==typeof o&&(o=Bt(o)),t.push([n,o])})),t},Lt=(e,t)=>!!t&&t.toString()===e.toString(),$t=(e,t)=>{const n=me.innerParams.get(e);if(!n.input)return void d(`The "input" parameter is needed to be set when using returnInputValueOn${c(t)}`);const o=e.getInput(),i=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return wt(n);case"radio":return Ct(n);case"file":return At(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?xt(e,i,t):o&&!o.checkValidity()?(e.enableButtons(),e.showValidationMessage(n.validationMessage||o.validationMessage)):"deny"===t?Pt(e,i):Ot(e,i)},xt=(e,t,n)=>{const o=me.innerParams.get(e);e.disableInput();Promise.resolve().then((()=>f(o.inputValidator(t,o.validationMessage)))).then((o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===n?Pt(e,t):Ot(e,t)}))},Pt=(e,t)=>{const n=me.innerParams.get(e||void 0);if(n.showLoaderOnDeny&&yt(T()),n.preDeny){e.isAwaitingPromise=!0;Promise.resolve().then((()=>f(n.preDeny(t,n.validationMessage)))).then((n=>{!1===n?(e.hideLoading(),mt(e)):e.close({isDenied:!0,value:void 0===n?t:n})})).catch((t=>St(e||void 0,t)))}else e.close({isDenied:!0,value:t})},Tt=(e,t)=>{e.close({isConfirmed:!0,value:t})},St=(e,t)=>{e.rejectPromise(t)},Ot=(e,t)=>{const n=me.innerParams.get(e||void 0);if(n.showLoaderOnConfirm&&yt(),n.preConfirm){e.resetValidationMessage(),e.isAwaitingPromise=!0;Promise.resolve().then((()=>f(n.preConfirm(t,n.validationMessage)))).then((n=>{ee($())||!1===n?(e.hideLoading(),mt(e)):Tt(e,void 0===n?t:n)})).catch((t=>St(e||void 0,t)))}else Tt(e,t)};function Mt(){const e=me.innerParams.get(this);if(!e)return;const t=me.domCache.get(this);Z(t.loader),q()?e.icon&&X(A()):jt(t),W([t.popup,t.actions],r.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const jt=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?X(t[0],"inline-block"):ee(x())||ee(T())||ee(P())||Z(e.actions)};function Ht(){const e=me.innerParams.get(this),t=me.domCache.get(this);return t?F(t.popup,e.input):null}function It(e,t,n){const o=me.domCache.get(e);t.forEach((e=>{o[e].disabled=n}))}function Dt(e,t){const n=C();if(n&&e)if("radio"===e.type){const e=n.querySelectorAll(`[name="${r.radio}"]`);for(let n=0;n<e.length;n++)e[n].disabled=t}else e.disabled=t}function qt(){It(this,["confirmButton","denyButton","cancelButton"],!1)}function Vt(){It(this,["confirmButton","denyButton","cancelButton"],!0)}function Nt(){Dt(this.getInput(),!1)}function _t(){Dt(this.getInput(),!0)}function Ft(e){const t=me.domCache.get(this),n=me.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=r["validation-message"],n.customClass&&n.customClass.validationMessage&&z(t.validationMessage,n.customClass.validationMessage),X(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid","true"),o.setAttribute("aria-describedby",r["validation-message"]),R(o),z(o,r.inputerror))}function Rt(){const e=me.domCache.get(this);e.validationMessage&&Z(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),W(t,r.inputerror))}const Ut={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},zt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Wt={allowEnterKey:void 0},Kt=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Yt=e=>Object.prototype.hasOwnProperty.call(Ut,e),Xt=e=>-1!==zt.indexOf(e),Zt=e=>Wt[e],Jt=e=>{Yt(e)||u(`Unknown parameter "${e}"`)},Gt=e=>{Kt.includes(e)&&u(`The parameter "${e}" is incompatible with toasts`)},Qt=e=>{const t=Zt(e);t&&m(e,t)};function en(e){const t=C(),n=me.innerParams.get(this);if(!t||N(t,n.hideClass.popup))return void u("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o=tn(e),i=Object.assign({},n,o);Fe(this,i),me.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const tn=e=>{const t={};return Object.keys(e).forEach((n=>{Xt(n)?t[n]=e[n]:u(`Invalid parameter to update: ${n}`)})),t};function nn(){const e=me.domCache.get(this),t=me.innerParams.get(this);t?(e.popup&&o.swalCloseEventFinishedCallback&&(o.swalCloseEventFinishedCallback(),delete o.swalCloseEventFinishedCallback),"function"==typeof t.didDestroy&&t.didDestroy(),o.eventEmitter.emit("didDestroy"),on(this)):sn(this)}const on=e=>{sn(e),delete e.params,delete o.keydownHandler,delete o.keydownTarget,delete o.currentInstance},sn=e=>{e.isAwaitingPromise?(rn(me,e),e.isAwaitingPromise=!0):(rn(et,e),rn(me,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},rn=(e,t)=>{for(const n in e)e[n].delete(t)};var an=Object.freeze({__proto__:null,_destroy:nn,close:ut,closeModal:ut,closePopup:ut,closeToast:ut,disableButtons:Vt,disableInput:_t,disableLoading:Mt,enableButtons:qt,enableInput:Nt,getInput:Ht,handleAwaitingPromise:mt,hideLoading:Mt,rejectPromise:pt,resetValidationMessage:Rt,showValidationMessage:Ft,update:en});const ln=(e,t,n)=>{t.popup.onclick=()=>{e&&(cn(e)||e.timer||e.input)||n(Ue.close)}},cn=e=>!!(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton);let un=!1;const dn=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(un=!0)}}},pn=e=>{e.container.onmousedown=t=>{t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=()=>{},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(un=!0)}}},mn=(e,t,n)=>{t.container.onclick=o=>{un?un=!1:o.target===t.container&&g(e.allowOutsideClick)&&n(Ue.backdrop)}},gn=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const hn=()=>{if(o.timeout)return(()=>{const e=j();if(!e)return;const t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${n}%`})(),o.timeout.stop()},fn=()=>{if(o.timeout){const e=o.timeout.start();return oe(e),e}};let bn=!1;const yn={};const vn=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in yn){const n=t.getAttribute(e);if(n)return void yn[e].fire({template:n})}};o.eventEmitter=new class{constructor(){this.events={}}_getHandlersByEventName(e){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e]}on(e,t){const n=this._getHandlersByEventName(e);n.includes(t)||n.push(t)}once(e,t){var n=this;const o=function(){n.removeListener(e,o);for(var i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];t.apply(n,s)};this.on(e,o)}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];this._getHandlersByEventName(e).forEach((e=>{try{e.apply(this,n)}catch(e){console.error(e)}}))}removeListener(e,t){const n=this._getHandlersByEventName(e),o=n.indexOf(t);o>-1&&n.splice(o,1)}removeAllListeners(e){void 0!==this.events[e]&&(this.events[e].length=0)}reset(){this.events={}}};var wn=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||gn(e[0])?["title","html","icon"].forEach(((n,o)=>{const i=e[o];"string"==typeof i||gn(i)?t[n]=i:void 0!==i&&d(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)})):Object.assign(t,e[0]),t},bindClickHandler:function(){yn[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,bn||(document.body.addEventListener("click",vn),bn=!0)},clickCancel:()=>{var e;return null===(e=P())||void 0===e?void 0:e.click()},clickConfirm:Re,clickDeny:()=>{var e;return null===(e=T())||void 0===e?void 0:e.click()},enableLoading:yt,fire:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new this(...t)},getActions:O,getCancelButton:P,getCloseButton:H,getConfirmButton:x,getContainer:y,getDenyButton:T,getFocusableElements:I,getFooter:M,getHtmlContainer:k,getIcon:A,getIconContent:()=>w(r["icon-content"]),getImage:B,getInputLabel:()=>w(r["input-label"]),getLoader:S,getPopup:C,getProgressSteps:L,getTimerLeft:()=>o.timeout&&o.timeout.getTimerLeft(),getTimerProgressBar:j,getTitle:E,getValidationMessage:$,increaseTimer:e=>{if(o.timeout){const t=o.timeout.increase(e);return oe(t,!0),t}},isDeprecatedParameter:Zt,isLoading:()=>{const e=C();return!!e&&e.hasAttribute("data-loading")},isTimerRunning:()=>!(!o.timeout||!o.timeout.isRunning()),isUpdatableParameter:Xt,isValidParameter:Yt,isVisible:()=>ee(C()),mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},off:(e,t)=>{e?t?o.eventEmitter.removeListener(e,t):o.eventEmitter.removeAllListeners(e):o.eventEmitter.reset()},on:(e,t)=>{o.eventEmitter.on(e,t)},once:(e,t)=>{o.eventEmitter.once(e,t)},resumeTimer:fn,showLoading:yt,stopTimer:hn,toggleTimer:()=>{const e=o.timeout;return e&&(e.running?hn():fn())}});class Cn{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const An=["swal-title","swal-html","swal-footer"],En=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{Sn(e,["name","value"]);const n=e.getAttribute("name"),o=e.getAttribute("value");n&&o&&(t[n]="boolean"==typeof Ut[n]?"false"!==o:"object"==typeof Ut[n]?JSON.parse(o):o)})),t},kn=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const n=e.getAttribute("name"),o=e.getAttribute("value");n&&o&&(t[n]=new Function(`return ${o}`)())})),t},Bn=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{Sn(e,["type","color","aria-label"]);const n=e.getAttribute("type");n&&["confirm","cancel","deny"].includes(n)&&(t[`${n}ButtonText`]=e.innerHTML,t[`show${c(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label")))})),t},Ln=e=>{const t={},n=e.querySelector("swal-image");return n&&(Sn(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")||void 0),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")||void 0),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")||void 0),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt")||void 0)),t},$n=e=>{const t={},n=e.querySelector("swal-icon");return n&&(Sn(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},xn=e=>{const t={},n=e.querySelector("swal-input");n&&(Sn(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const o=Array.from(e.querySelectorAll("swal-input-option"));return o.length&&(t.inputOptions={},o.forEach((e=>{Sn(e,["value"]);const n=e.getAttribute("value");if(!n)return;const o=e.innerHTML;t.inputOptions[n]=o}))),t},Pn=(e,t)=>{const n={};for(const o in t){const i=t[o],s=e.querySelector(i);s&&(Sn(s,[]),n[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},Tn=e=>{const t=An.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const n=e.tagName.toLowerCase();t.includes(n)||u(`Unrecognized element <${n}>`)}))},Sn=(e,t)=>{Array.from(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&u([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])}))},On=e=>{const t=y(),n=C();"function"==typeof e.willOpen&&e.willOpen(n),o.eventEmitter.emit("willOpen",n);const i=window.getComputedStyle(document.body).overflowY;In(t,n,e),setTimeout((()=>{jn(t,n)}),10),D()&&(Hn(t,e.scrollbarPadding,i),(()=>{const e=y();Array.from(document.body.children).forEach((t=>{t.contains(e)||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")||""),t.setAttribute("aria-hidden","true"))}))})()),q()||o.previousActiveElement||(o.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(n))),o.eventEmitter.emit("didOpen",n),W(t,r["no-transition"])},Mn=e=>{const t=C();if(e.target!==t)return;const n=y();t.removeEventListener("animationend",Mn),t.removeEventListener("transitionend",Mn),n.style.overflowY="auto"},jn=(e,t)=>{ne(t)?(e.style.overflowY="hidden",t.addEventListener("animationend",Mn),t.addEventListener("transitionend",Mn)):e.style.overflowY="auto"},Hn=(e,t,n)=>{(()=>{if(nt&&!N(document.body,r.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",z(document.body,r.iosfix),ot()}})(),t&&"hidden"!==n&<(n),setTimeout((()=>{e.scrollTop=0}))},In=(e,t,n)=>{z(e,n.showClass.backdrop),n.animation?(t.style.setProperty("opacity","0","important"),X(t,"grid"),setTimeout((()=>{z(t,n.showClass.popup),t.style.removeProperty("opacity")}),10)):X(t,"grid"),z([document.documentElement,document.body],r.shown),n.heightAuto&&n.backdrop&&!n.toast&&z([document.documentElement,document.body],r["height-auto"])};var Dn=(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),qn=(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL");function Vn(e){!function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=Dn),"url"===e.input&&(e.inputValidator=qn))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&u("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(u('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),re(e)}let Nn;var _n=new WeakMap;class Fn{constructor(){if(n(this,_n,void 0),"undefined"==typeof window)return;Nn=this;for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];const s=Object.freeze(this.constructor.argsToParams(o));var r,a,l;this.params=s,this.isAwaitingPromise=!1,r=_n,a=this,l=this._main(Nn.params),r.set(e(r,a),l)}_main(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((e=>{!1===e.backdrop&&e.allowOutsideClick&&u('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)Jt(t),e.toast&&Gt(t),Qt(t)})(Object.assign({},t,e)),o.currentInstance){const e=et.swalPromiseResolve.get(o.currentInstance),{isAwaitingPromise:t}=o.currentInstance;o.currentInstance._destroy(),t||e({isDismissed:!0}),D()&&tt()}o.currentInstance=Nn;const n=Un(e,t);Vn(n),Object.freeze(n),o.timeout&&(o.timeout.stop(),delete o.timeout),clearTimeout(o.restoreFocusTimeout);const i=zn(Nn);return Fe(Nn,n),me.innerParams.set(Nn,n),Rn(Nn,i,n)}then(e){return t(_n,this).then(e)}finally(e){return t(_n,this).finally(e)}}const Rn=(e,t,n)=>new Promise(((i,s)=>{const r=t=>{e.close({isDismissed:!0,dismiss:t})};et.swalPromiseResolve.set(e,i),et.swalPromiseReject.set(e,s),t.confirmButton.onclick=()=>{(e=>{const t=me.innerParams.get(e);e.disableButtons(),t.input?$t(e,"confirm"):Ot(e,!0)})(e)},t.denyButton.onclick=()=>{(e=>{const t=me.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?$t(e,"deny"):Pt(e,!1)})(e)},t.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Ue.cancel)})(e,r)},t.closeButton.onclick=()=>{r(Ue.close)},((e,t,n)=>{e.toast?ln(e,t,n):(dn(t),pn(t),mn(e,t,n))})(n,t,r),((e,t,n)=>{ze(e),t.toast||(e.keydownHandler=e=>Xe(t,e,n),e.keydownTarget=t.keydownListenerCapture?window:C(),e.keydownListenerCapture=t.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)})(o,n,r),((e,t)=>{"select"===t.input||"radio"===t.input?Et(e,t):["text","email","number","tel","textarea"].some((e=>e===t.input))&&(h(t.inputValue)||b(t.inputValue))&&(yt(x()),kt(e,t))})(e,n),On(n),Wn(o,n,r),Kn(t,n),setTimeout((()=>{t.container.scrollTop=0}))})),Un=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return Tn(n),Object.assign(En(n),kn(n),Bn(n),Ln(n),$n(n),xn(n),Pn(n,An))})(e),o=Object.assign({},Ut,t,n,e);return o.showClass=Object.assign({},Ut.showClass,o.showClass),o.hideClass=Object.assign({},Ut.hideClass,o.hideClass),!1===o.animation&&(o.showClass={backdrop:"swal2-noanimation"},o.hideClass={}),o},zn=e=>{const t={popup:C(),container:y(),actions:O(),confirmButton:x(),denyButton:T(),cancelButton:P(),loader:S(),closeButton:H(),validationMessage:$(),progressSteps:L()};return me.domCache.set(e,t),t},Wn=(e,t,n)=>{const o=j();Z(o),t.timer&&(e.timeout=new Cn((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(X(o),_(o,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&oe(t.timer)}))))},Kn=(e,t)=>{if(!t.toast)return g(t.allowEnterKey)?void(Yn(e)||Xn(e,t)||We(-1,1)):(m("allowEnterKey"),void Zn())},Yn=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const e of t)if(e instanceof HTMLElement&&ee(e))return e.focus(),!0;return!1},Xn=(e,t)=>t.focusDeny&&ee(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&ee(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!ee(e.confirmButton))&&(e.confirmButton.focus(),!0),Zn=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout((()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((()=>{e.play().catch((()=>{}))}),2500)}),500):localStorage.setItem("swal-initiation",`${e}`)}Fn.prototype.disableButtons=Vt,Fn.prototype.enableButtons=qt,Fn.prototype.getInput=Ht,Fn.prototype.disableInput=_t,Fn.prototype.enableInput=Nt,Fn.prototype.hideLoading=Mt,Fn.prototype.disableLoading=Mt,Fn.prototype.showValidationMessage=Ft,Fn.prototype.resetValidationMessage=Rt,Fn.prototype.close=ut,Fn.prototype.closePopup=ut,Fn.prototype.closeModal=ut,Fn.prototype.closeToast=ut,Fn.prototype.rejectPromise=pt,Fn.prototype.update=en,Fn.prototype._destroy=nn,Object.assign(Fn,wn),Object.keys(an).forEach((e=>{Fn[e]=function(){return Nn&&Nn[e]?Nn[e](...arguments):null}})),Fn.DismissReason=Ue,Fn.version="11.15.3";const Jn=Fn;return Jn.default=Jn,Jn})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); diff --git a/sample/MyAbpApp/src/MyAbpApp.Web/yarn.lock b/sample/MyAbpApp/src/MyAbpApp.Web/yarn.lock index 0d17a01..78e7362 100644 --- a/sample/MyAbpApp/src/MyAbpApp.Web/yarn.lock +++ b/sample/MyAbpApp/src/MyAbpApp.Web/yarn.lock @@ -2,201 +2,201 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~3.3.2": - version "3.3.2" - resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-3.3.2.tgz#660c749feac2d241dbb6db8d1fbbe75b97fb4cd4" - integrity sha512-Uu0+iBw+8oBBJ12pUvz4Z2EhLkQV/xVjthaN2yR9l2i9MOoU9eesW9kBgMIb574VJBJa0J1v5wOiRgJCJgO9Ew== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~8.3.2" - -"@abp/aspnetcore.mvc.ui.theme.shared@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-8.3.2.tgz#1eead9e43c7e06627d23d98f9c142ca2d805d1e6" - integrity sha512-p8d+kx9xCUuZS9CpDk2gCnC6L/Sd4oqt07zEsO4IGRV3Dd9eyYZhvk4GhtQa4/lGauwXrKr+YUMZU+2fJm8zUg== - dependencies: - "@abp/aspnetcore.mvc.ui" "~8.3.2" - "@abp/bootstrap" "~8.3.2" - "@abp/bootstrap-datepicker" "~8.3.2" - "@abp/bootstrap-daterangepicker" "~8.3.2" - "@abp/datatables.net-bs5" "~8.3.2" - "@abp/font-awesome" "~8.3.2" - "@abp/jquery-form" "~8.3.2" - "@abp/jquery-validation-unobtrusive" "~8.3.2" - "@abp/lodash" "~8.3.2" - "@abp/luxon" "~8.3.2" - "@abp/malihu-custom-scrollbar-plugin" "~8.3.2" - "@abp/moment" "~8.3.2" - "@abp/select2" "~8.3.2" - "@abp/sweetalert2" "~8.3.2" - "@abp/timeago" "~8.3.2" - "@abp/toastr" "~8.3.2" - -"@abp/aspnetcore.mvc.ui@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-8.3.2.tgz#e6d24c2fe430cd966c9aa7e20e3342b7c0f7fe7f" - integrity sha512-og4n6CZFGSA9Oe5kxZfz5b0db6nBO8oEDdSkpwRO7t/g/WTNpz1gBps32tQbvKEO7FahZ36wvWlD8Or201MapA== +"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~4.0.3": + version "4.0.3" + resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-4.0.3.tgz#51cbd6eb47400f1196216bdff2722e7514624ec4" + integrity sha512-iYrQ42jHCRpL7cpB3RUytciKvEW+e2+zgHzDQs2/Z1Cn+FnZ2TLNZGBaUXkuRj25eNWBgJtxbR4Hpac4G2dzAg== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~9.0.2" + +"@abp/aspnetcore.mvc.ui.theme.shared@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.0.2.tgz#c15eb73b5ec16061da565a98ce2a16e29115d585" + integrity sha512-k30esf0On3mgBAmNbbWn3q/3PiCE4tJXW5j8UGq85DI8kMDmaP7iBQXoMfIFs+Gu5ejNU49AYHlGeEuuK3ObKw== + dependencies: + "@abp/aspnetcore.mvc.ui" "~9.0.2" + "@abp/bootstrap" "~9.0.2" + "@abp/bootstrap-datepicker" "~9.0.2" + "@abp/bootstrap-daterangepicker" "~9.0.2" + "@abp/datatables.net-bs5" "~9.0.2" + "@abp/font-awesome" "~9.0.2" + "@abp/jquery-form" "~9.0.2" + "@abp/jquery-validation-unobtrusive" "~9.0.2" + "@abp/lodash" "~9.0.2" + "@abp/luxon" "~9.0.2" + "@abp/malihu-custom-scrollbar-plugin" "~9.0.2" + "@abp/moment" "~9.0.2" + "@abp/select2" "~9.0.2" + "@abp/sweetalert2" "~9.0.2" + "@abp/timeago" "~9.0.2" + "@abp/toastr" "~9.0.2" + +"@abp/aspnetcore.mvc.ui@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.0.2.tgz#ec8d319196d5ef2c4b9e2c965a2ce61cf2384839" + integrity sha512-w40nUrbM/FLadmkDqx+24FtLPrRO2vVqeqE5WxiARDOUJC/Y7LnmVNtsNODv9m5Ss4ufkyI25LugHwT63w6imA== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-8.3.2.tgz#d185cab0d0c94b85c7b175f321b4dedad8cd47bc" - integrity sha512-Bdxc0SJ4/nC9BbBCz9hutgVtLBWQ2vkMLXFHqLrME7cQ0i8zg7XolEvY6IHt2/0V3omMCw/BA9oUc4JBsE76KQ== +"@abp/bootstrap-datepicker@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.0.2.tgz#ee810c716d84ceb9b36366390d75c366a560f0fe" + integrity sha512-wrnCu3LwoR0WD1fvntv7ICpIsE+5FmEIuod+8pRa17LkNn/JMAhUv1gQI6OD/Ney5QEA1l1HlmFwlV14A/IdSg== dependencies: bootstrap-datepicker "^1.10.0" -"@abp/bootstrap-daterangepicker@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-8.3.2.tgz#61b995adc5b96d1947d3e01d341f488f69bbdd11" - integrity sha512-+hSTVqvlYrdlQ5ajwVvjzQdAWj5U1eoRMHNKFLdddIHp27n5q6waz2kIhqvUe1TNHF98LksbFkylFcuj6v7aZg== +"@abp/bootstrap-daterangepicker@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.0.2.tgz#61869cf4dac3573000bf3f97dd4531747be99cd3" + integrity sha512-Pzt1whhaIX10JWMKAYEE0rq4oZSgYxdyukz95u72Rqjub9057mDPcbIzLx1UdHMUh7FOG6WpCSZA5o/XxqHPxQ== dependencies: bootstrap-daterangepicker "^3.1.0" -"@abp/bootstrap@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/bootstrap/-/bootstrap-8.3.2.tgz#78905110cb8dcd772f5a34b10396ef4f35b9eda6" - integrity sha512-qlCt5xpoIH7l4WeJtZvottpOq/GonYIaOpw4PXf4wmpma+iE8IMW5SKD12ajTI46DvAUuJdJzn/HuZi09btQkw== +"@abp/bootstrap@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/bootstrap/-/bootstrap-9.0.2.tgz#b42a128ea427758f4e4036c47aad79c8cc3e3bf0" + integrity sha512-CFet9h9jvdZXORN60UrUx+l9MakrBaEMEjnXctKltNUaUxEXO9XEi+HiXBJscz1QTwtpM3fUE/wm95JrPDiLAg== dependencies: - "@abp/core" "~8.3.2" + "@abp/core" "~9.0.2" bootstrap "^5.3.3" -"@abp/core@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/core/-/core-8.3.2.tgz#25ab2128906653a5979c7ada80aa332ebf7d9b23" - integrity sha512-sNAJZr7bRBYPzM5zR1a3B+ZAHUUPO1cZey38Vf4UtRZ5cTNnVuM7RovMQKvWZkUcD7S1vWgtKS8m/KWq4/tMQg== +"@abp/core@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/core/-/core-9.0.2.tgz#2b74ee867a421ea85d71d8a5a13644cb278077c4" + integrity sha512-CcGWzGUW9xty+LeVcGC+EcLuJnjfOrPhKbiZrkUYwYmP7GSO0/DJrKd+PcJnvK7czC6uHBBB+5BUIrr+W0071g== dependencies: - "@abp/utils" "~8.3.2" + "@abp/utils" "~9.0.2" -"@abp/datatables.net-bs5@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/datatables.net-bs5/-/datatables.net-bs5-8.3.2.tgz#e9b6da6d5a5e07a656b64ed49490a82cfc73cbc9" - integrity sha512-JrBtjsr4jWgG/8ZJYbyYWk65tCkjkU5UIrK1xdX8hFCHX+Rq4ioCXdswqRzNkLLIfXh6U4J96JurMLuJtinepA== +"@abp/datatables.net-bs5@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.0.2.tgz#b706c4d077162122659c86f6bc78fb5ba723d9fd" + integrity sha512-4cJ1kz/Ecciuz4T7mIBAwgd98/Wd1r4Ok6CnFT7GJp+opWEJJGyfKSp8/Yp4FRRCkjliXgmpRmUeAfUPM97oow== dependencies: - "@abp/datatables.net" "~8.3.2" - datatables.net-bs5 "^2.0.8" + "@abp/datatables.net" "~9.0.2" + datatables.net-bs5 "^2.1.8" -"@abp/datatables.net@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/datatables.net/-/datatables.net-8.3.2.tgz#2d251a17ae64f5da26eb5f0c6ca6ea545c22dfac" - integrity sha512-LI0AM5HYfMVdMZZ7VucyqFq/MxTt1Yh9klh2DB4B0lTeZTaXtjK4rJbV8B2A6MhSN04ZNqz5LF+xoKoUerNK5w== +"@abp/datatables.net@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/datatables.net/-/datatables.net-9.0.2.tgz#5e6b5deea7e2f6ad6e6685c81c3c33044149378e" + integrity sha512-JrUdeKjEGoaWWM7411yZfbEaDDqnsBNgu6oiCgfdcnLM+NvB9Oo1VZCrfZstj5mx736k7VURRjn67aV5oAO9iA== dependencies: - "@abp/jquery" "~8.3.2" - datatables.net "^2.0.8" + "@abp/jquery" "~9.0.2" + datatables.net "^2.1.8" -"@abp/font-awesome@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/font-awesome/-/font-awesome-8.3.2.tgz#885189613ec92b7ee7da74c2932e911e3d021621" - integrity sha512-nhoyY/svGY5iaoU3M8q7MCIB5OGrFSpsyY5eoRROady+BrIww9msZwMFcyE08+uNQXbqL94BcrMIDAnUA/zdYg== +"@abp/font-awesome@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/font-awesome/-/font-awesome-9.0.2.tgz#f03d9fc251218c2afa3fdd8ce6fcfc81f68e20dd" + integrity sha512-zAkDOZ3PTD9paVTiGifMErtRammQHDl9QlnWbhpihidtn1QdXK0TU399xZrnxR5EEL23KJgR8Po0fHJnS6V+5A== dependencies: - "@abp/core" "~8.3.2" - "@fortawesome/fontawesome-free" "^6.5.2" + "@abp/core" "~9.0.2" + "@fortawesome/fontawesome-free" "^6.6.0" -"@abp/jquery-form@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/jquery-form/-/jquery-form-8.3.2.tgz#6510aa472b9e178383d86b9f3367603f9227e5e4" - integrity sha512-cO9VTL2gO7dvd2FpYWHYgUfmzfTQkm90LE5CfEFJipXrq92alPV5FFB/DrTFOX1UoR9SCTdq6k0auEPNPnp6Dw== +"@abp/jquery-form@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/jquery-form/-/jquery-form-9.0.2.tgz#a51a69440264aafcb6b71b42355c9fbb0812696f" + integrity sha512-OZIyHQSRFtwPAoNzwqhFZ6nspJRu9yFySUVoSpgJqqBiPI+BO3ePxXlHGotVuIYAZKAPXo3uFsJPRFp/IQwGCg== dependencies: - "@abp/jquery" "~8.3.2" + "@abp/jquery" "~9.0.2" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-8.3.2.tgz#c75ccf54168ccbb201a0e7972e29a7c3a5fc7bcd" - integrity sha512-KBKozSr7Q3+WZgvYDkpSmMHLikyl8tz9N1XXzkQTvHTI8LEIdP2wLCKqkjccP0IlivYFzcSamAHsuEK+mfg11Q== +"@abp/jquery-validation-unobtrusive@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.0.2.tgz#37f672d828b335d50ff0c5de4f8ab62018af8b40" + integrity sha512-aqVexKt4IgfYEJF0CzdH35YGnWgfhCuB5vWzCkiiEGaZnv04lsfuW7EoFbs5G5cw/3E9j4VV2oWjVm+SbcRZkQ== dependencies: - "@abp/jquery-validation" "~8.3.2" + "@abp/jquery-validation" "~9.0.2" jquery-validation-unobtrusive "^4.0.0" -"@abp/jquery-validation@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/jquery-validation/-/jquery-validation-8.3.2.tgz#26f710c0a362eda895d41beb2408b3f1d1485db9" - integrity sha512-4l4D5cSJw75/dH81JagDcyV82q3+AEwyPcgNymAcxbe0N+8hvch2dWxW/WlxgdSt1Wj17MHRQyaOHJD299yB2Q== +"@abp/jquery-validation@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/jquery-validation/-/jquery-validation-9.0.2.tgz#d57aa85afcaaead1c47c237aa12432ad7e6ec4ed" + integrity sha512-H0wclTupwrD0a9XwVOECq15x4DziVNpquPnRS4gDsAQiPZEZb7568XJigNJMkhfrKZ5Kwb3lP5ex0bVweeKXqg== dependencies: - "@abp/jquery" "~8.3.2" - jquery-validation "^1.20.1" + "@abp/jquery" "~9.0.2" + jquery-validation "^1.21.0" -"@abp/jquery@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/jquery/-/jquery-8.3.2.tgz#bce875782fb88fb2d87d3dce4b22d80a4570c2cc" - integrity sha512-tCNNQJCVQmAmz2z5orBQNFWPD9MfvM3hkFM/TZSDEZMetFBfz1tJKwEjS7eLEOLeSDju3YbByG1PtWGKN1rsUQ== +"@abp/jquery@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/jquery/-/jquery-9.0.2.tgz#3d1d103757be6ce3594a3eda7dbb10f7229eb59f" + integrity sha512-fNYv1DvpAwoCmzW2AVd4IuzjNMoEfjJ5mPp+dqPloAkFPelsgptnMnuguwI2ihDdyr1p/4/K/KfALRfpMJXmmA== dependencies: - "@abp/core" "~8.3.2" + "@abp/core" "~9.0.2" jquery "~3.7.1" -"@abp/lodash@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/lodash/-/lodash-8.3.2.tgz#2b2bb0956c52cb65f159689816c007b8bf594a18" - integrity sha512-O5p6mchGaZHnge1tza3/uQfEqUvIuyWVhzMv+sRq//9FHnMyTThlHU0zriFsYb3wpBQfPf11uOtisv5F+wbuRw== +"@abp/lodash@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/lodash/-/lodash-9.0.2.tgz#4dfcd641c12213a2cda8568313648f31f1439845" + integrity sha512-GBstAsWHgffc0EaSDNZWDcE8DMJSJyAMMGH0i5XL9LS7/mCOgK42gjStzSGOHfuRWhHGN6tpo+EHqYBjagzF/A== dependencies: - "@abp/core" "~8.3.2" + "@abp/core" "~9.0.2" lodash "^4.17.21" -"@abp/luxon@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/luxon/-/luxon-8.3.2.tgz#fcc5dd661a39df35d4a6aadbd30d06dea439ea8a" - integrity sha512-GxjKfYAUu3YPW8oJq/APNvghG8a+PR2vgX13k4FTRi7o0ndLjqu1m4+oqfA9r4tpRgj4WLmoaVjGGJYrtaEBGQ== +"@abp/luxon@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/luxon/-/luxon-9.0.2.tgz#9c746a4c8a68e137bc041018aa1990aacc3bf056" + integrity sha512-94r/pn6Y9dsx+e9qfD5tRLiPrFx/A2g43JlULO9i0LKVgKYofWn8Y1La6bGgRBIVEeyYlLoW8FF1xs4tbOajdw== dependencies: - "@abp/core" "~8.3.2" - luxon "^3.4.4" + "@abp/core" "~9.0.2" + luxon "^3.5.0" -"@abp/malihu-custom-scrollbar-plugin@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-8.3.2.tgz#4bed16d4e42dbf4eba8598b6ff025cbb66b7e94e" - integrity sha512-cyVeeKppYYYR93eyy20QFuwmhCf0k5B/+ZlslOqbm5E4NIoPN8oIVcg02wyq541jSmDINj1pOl71IZcMxt01hA== +"@abp/malihu-custom-scrollbar-plugin@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.0.2.tgz#e3409ea3edd9737fba35f9b2e4890fcb79ee7b38" + integrity sha512-2TlvPTel9361ZlfgqYwN0/NBnDz6aicCZAZ5k1X0ZuHnR9b0w741+eag3FjDzhgcNZim1kWdu0tos4erDY8/qw== dependencies: - "@abp/core" "~8.3.2" + "@abp/core" "~9.0.2" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/moment@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/moment/-/moment-8.3.2.tgz#e3734fc66263c5564bf55808eaab27ea4bbd1aeb" - integrity sha512-2aFlq+sdXpcBS/nOEo1CQMlVl5/Qv0/wYKFez5KylyKic4CKGrmzFWvQWeqsR73Ns+Ayk8dX0Dabzseia1hdIQ== +"@abp/moment@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/moment/-/moment-9.0.2.tgz#5a3bafc28a03ca04768296189059834547b31f58" + integrity sha512-mcuGg0jli8JWw9DIeLg7+/BcG4ytIBcYNU1gxCM7NfBSoqOqzPOxKoZF6lbbADtRmbO9vGqUTmfkXOWHbxSaSg== dependencies: moment "^2.30.1" -"@abp/select2@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/select2/-/select2-8.3.2.tgz#dab0d1ef595d46afb1f4aea08b79df73b83e9706" - integrity sha512-q2pAsmF+J2Zs2+DqDgA63DBfkKUSgqqvSYdeEGVoGQqmr70o6BAvIvyaNSW7FNq/VzQca+zSQAoUI6F3opHiuQ== +"@abp/select2@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/select2/-/select2-9.0.2.tgz#7de6e64104f91aa703a8510543dd1aa44fe23918" + integrity sha512-4HXpNPKif4BDJ4pLhtEaVPJVkKXfiq00h3DSZkp/iC52QUgM03KZHEzbySmfW1pmuXmhaFzn+A/nQoE+ZdgU6g== dependencies: - "@abp/core" "~8.3.2" + "@abp/core" "~9.0.2" select2 "^4.0.13" -"@abp/sweetalert2@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/sweetalert2/-/sweetalert2-8.3.2.tgz#965a36190ae91a548a79741f9751c1c06dea470a" - integrity sha512-rQEU27H9Yj8IMQY5IzwgE6N4jvlE4lnCQno87NDDa6lYp1QO8Bp6VJi77TSj3/eXb/8mJSyyoO1QqLoyrql+tg== +"@abp/sweetalert2@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/sweetalert2/-/sweetalert2-9.0.2.tgz#fee3297b317fc345f74a3faf6a3a648b5fced670" + integrity sha512-JPqd1l0UOdoSW8grzODo4GTAOUBEfN9flEOL6LGr+WIjSpwwiUfScUogmms+bncKPr8+9divRT9cC7X24gGERw== dependencies: - "@abp/core" "~8.3.2" - sweetalert2 "^11.3.6" + "@abp/core" "~9.0.2" + sweetalert2 "^11.14.1" -"@abp/timeago@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/timeago/-/timeago-8.3.2.tgz#7148717d84ee4a3eb592c4a40923713843750a52" - integrity sha512-JZ9lo6AgDjpxs5AhhS+UoNIDpx1yN7bHxYdnEXg7wztVbV+V9U96Upp3rYhRHSjiCmx0xIMLfujElwjgBAhPDQ== +"@abp/timeago@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/timeago/-/timeago-9.0.2.tgz#24ee73ee43d2bf7c1dcb1e6cb1fb2421a52de423" + integrity sha512-e3Px4v8Gd2AItTGAxgraBYfR3C9iDyDRp4J3jHGAWKrInfxyuH1nU5jMitGbOAGK0BMbW3ngZchIYjE8Cv2cBw== dependencies: - "@abp/jquery" "~8.3.2" + "@abp/jquery" "~9.0.2" timeago "^1.6.7" -"@abp/toastr@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/toastr/-/toastr-8.3.2.tgz#3dab08eecab72555cd895e6737bdc37032fddcea" - integrity sha512-aFnSMojAPSIYkHV7tE3Uh00G+r07c6spW+tRqxEiooF11t6PXZyWayNGsol+8L43tXk9dQYj8GwnGau/yTxzRA== +"@abp/toastr@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/toastr/-/toastr-9.0.2.tgz#d9990bda021e06674427b973f078c95faffc71fa" + integrity sha512-3x19A96JZkOVU8CRRKNXDGmHKPSsCLqeykO7RKB3I/46BolEBIxXjVBtBTbep0g32lkpxsArJuRWZ/nXFIj+ng== dependencies: - "@abp/jquery" "~8.3.2" + "@abp/jquery" "~9.0.2" toastr "^2.1.4" -"@abp/utils@~8.3.2": - version "8.3.2" - resolved "https://registry.npmmirror.com/@abp/utils/-/utils-8.3.2.tgz#6b49673e15b07cdb5024b1fc61759683352f38c2" - integrity sha512-0i4yqwxSGnKKZJZwXNBvCPoT7nZ0/vnyNVBMeE12x3Y7MV3bZSza2CGTPUhVVvoWt2JfGiDpAfKzPq2eUKfisg== +"@abp/utils@~9.0.2": + version "9.0.2" + resolved "https://registry.npmmirror.com/@abp/utils/-/utils-9.0.2.tgz#8d67f9f2dbacc829bb260914f46059e613314791" + integrity sha512-XTuqaKpwKfzVrF6C0D338jSXHmtpTFIWXUvwnM10hai0rahydpDRq7kQIfj6jLxLkYfJm8Zw4Oys9kgtPNdZ6w== dependencies: just-compare "^2.3.0" -"@fortawesome/fontawesome-free@^6.5.2": - version "6.6.0" - resolved "https://registry.npmmirror.com/@fortawesome/fontawesome-free/-/fontawesome-free-6.6.0.tgz#0e984f0f2344ee513c185d87d77defac4c0c8224" - integrity sha512-60G28ke/sXdtS9KZCpZSHHkCbdsOGEhIUGlwq6yhY74UpTiToIh8np7A8yphhM4BWsvNFtIvLpi4co+h9Mr9Ow== +"@fortawesome/fontawesome-free@^6.6.0": + version "6.7.2" + resolved "https://registry.npmmirror.com/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.2.tgz#8249de9b7e22fcb3ceb5e66090c30a1d5492b81a" + integrity sha512-JUOtgFW6k9u4Y+xeIaEiLr3+cjoUPiAuLXoyKOJSia6Duzb7pq+A76P9ZdPDoAoxHdHzq6gE9/jKBGXlZT8FbA== ansi-colors@^4.1.3: version "4.1.3" @@ -223,7 +223,7 @@ bootstrap@^5.3.3: resolved "https://registry.npmmirror.com/bootstrap/-/bootstrap-5.3.3.tgz#de35e1a765c897ac940021900fcbb831602bac38" integrity sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg== -datatables.net-bs5@^2.0.8: +datatables.net-bs5@^2.1.8: version "2.1.8" resolved "https://registry.npmmirror.com/datatables.net-bs5/-/datatables.net-bs5-2.1.8.tgz#860717c4ee85ecb84812ba9a73fb1204aa2a68b6" integrity sha512-YlGws8eI3iw/1AmKJH18+YMzm/UgGb6o9s14KAC24QT1/8anolm8GnVAgGcwUcvHm3hn1i8A5QXqgbqeMRINeg== @@ -231,7 +231,7 @@ datatables.net-bs5@^2.0.8: datatables.net "2.1.8" jquery ">=1.7" -datatables.net@2.1.8, datatables.net@^2.0.8: +datatables.net@2.1.8, datatables.net@^2.1.8: version "2.1.8" resolved "https://registry.npmmirror.com/datatables.net/-/datatables.net-2.1.8.tgz#9b020f18e927cc924d72411f62dc595cc688669b" integrity sha512-47ULt+U4bcjbuGTpTlT6SnCuSFVRBxxdWa6X3NfvTObBJ2BZU0o+JUIl05wQ6cABNIavjbAV51gpgvFsMHL9zA== @@ -258,7 +258,7 @@ jquery-validation-unobtrusive@^4.0.0: jquery "^3.6.0" jquery-validation ">=1.19" -jquery-validation@>=1.19, jquery-validation@^1.20.1: +jquery-validation@>=1.19, jquery-validation@^1.21.0: version "1.21.0" resolved "https://registry.npmmirror.com/jquery-validation/-/jquery-validation-1.21.0.tgz#78fc05ab76020912a246af3661b3f54a438bca93" integrity sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w== @@ -288,7 +288,7 @@ lodash@^4.17.21: resolved "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -luxon@^3.4.4: +luxon@^3.5.0: version "3.5.0" resolved "https://registry.npmmirror.com/luxon/-/luxon-3.5.0.tgz#6b6f65c5cd1d61d1fd19dbf07ee87a50bf4b8e20" integrity sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ== @@ -315,10 +315,10 @@ select2@^4.0.13: resolved "https://registry.npmmirror.com/select2/-/select2-4.0.13.tgz#0dbe377df3f96167c4c1626033e924372d8ef44d" integrity sha512-1JeB87s6oN/TDxQQYCvS5EFoQyvV6eYMZZ0AeA4tdFDYWN3BAGZ8npr17UBFddU0lgAt3H0yjX3X6/ekOj1yjw== -sweetalert2@^11.3.6: - version "11.6.9" - resolved "https://registry.npmmirror.com/sweetalert2/-/sweetalert2-11.6.9.tgz#23fdd581d0b695c61fedbe5b9be1994c73d7b722" - integrity sha512-zx0vdToB2Ququk+0qbXruca5KJuScyno77cqPfuwSiRwlMS5CwwnZDWiLqcRlIAZzDEbZHz9g/T7BDqAGqsQlA== +sweetalert2@^11.14.1: + version "11.15.3" + resolved "https://registry.npmmirror.com/sweetalert2/-/sweetalert2-11.15.3.tgz#6322a7c5fa2e835d5a3570c83e55071e357cd4a7" + integrity sha512-+0imNg+XYL8tKgx8hM0xoiXX3KfgxHDmiDc8nTJFO89fQEEhJlkecSdyYOZ3IhVMcUmoNte4fTIwWiugwkPU6w== timeago@^1.6.7: version "1.6.7" diff --git a/sample/MyAbpApp/test/MyAbpApp.Application.Tests/MyAbpApp.Application.Tests.csproj b/sample/MyAbpApp/test/MyAbpApp.Application.Tests/MyAbpApp.Application.Tests.csproj index 28640c5..1261649 100644 --- a/sample/MyAbpApp/test/MyAbpApp.Application.Tests/MyAbpApp.Application.Tests.csproj +++ b/sample/MyAbpApp/test/MyAbpApp.Application.Tests/MyAbpApp.Application.Tests.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>MyAbpApp</RootNamespace> </PropertyGroup> @@ -13,7 +13,7 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" /> </ItemGroup> </Project> diff --git a/sample/MyAbpApp/test/MyAbpApp.Domain.Tests/MyAbpApp.Domain.Tests.csproj b/sample/MyAbpApp/test/MyAbpApp.Domain.Tests/MyAbpApp.Domain.Tests.csproj index 600c32d..d34b4b8 100644 --- a/sample/MyAbpApp/test/MyAbpApp.Domain.Tests/MyAbpApp.Domain.Tests.csproj +++ b/sample/MyAbpApp/test/MyAbpApp.Domain.Tests/MyAbpApp.Domain.Tests.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>MyAbpApp</RootNamespace> </PropertyGroup> @@ -12,7 +12,7 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" /> </ItemGroup> </Project> diff --git a/sample/MyAbpApp/test/MyAbpApp.EntityFrameworkCore.Tests/MyAbpApp.EntityFrameworkCore.Tests.csproj b/sample/MyAbpApp/test/MyAbpApp.EntityFrameworkCore.Tests/MyAbpApp.EntityFrameworkCore.Tests.csproj index afb8870..b6d6bda 100644 --- a/sample/MyAbpApp/test/MyAbpApp.EntityFrameworkCore.Tests/MyAbpApp.EntityFrameworkCore.Tests.csproj +++ b/sample/MyAbpApp/test/MyAbpApp.EntityFrameworkCore.Tests/MyAbpApp.EntityFrameworkCore.Tests.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>MyAbpApp</RootNamespace> </PropertyGroup> @@ -14,7 +14,7 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" /> </ItemGroup> </Project> diff --git a/sample/MyAbpApp/test/MyAbpApp.HttpApi.Client.ConsoleTestApp/MyAbpApp.HttpApi.Client.ConsoleTestApp.csproj b/sample/MyAbpApp/test/MyAbpApp.HttpApi.Client.ConsoleTestApp/MyAbpApp.HttpApi.Client.ConsoleTestApp.csproj index c14f994..7ec1a4d 100644 --- a/sample/MyAbpApp/test/MyAbpApp.HttpApi.Client.ConsoleTestApp/MyAbpApp.HttpApi.Client.ConsoleTestApp.csproj +++ b/sample/MyAbpApp/test/MyAbpApp.HttpApi.Client.ConsoleTestApp/MyAbpApp.HttpApi.Client.ConsoleTestApp.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> </PropertyGroup> <ItemGroup> @@ -22,8 +22,8 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" /> - <PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.0" /> + <PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" /> + <PackageReference Include="Microsoft.Extensions.Http.Polly" Version="9.0.0" /> </ItemGroup> </Project> diff --git a/sample/MyAbpApp/test/MyAbpApp.TestBase/MyAbpApp.TestBase.csproj b/sample/MyAbpApp/test/MyAbpApp.TestBase/MyAbpApp.TestBase.csproj index 2ba5376..2f39ce9 100644 --- a/sample/MyAbpApp/test/MyAbpApp.TestBase/MyAbpApp.TestBase.csproj +++ b/sample/MyAbpApp/test/MyAbpApp.TestBase/MyAbpApp.TestBase.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>MyAbpApp</RootNamespace> </PropertyGroup> @@ -15,7 +15,7 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" /> <PackageReference Include="NSubstitute" Version="5.1.0" /> <PackageReference Include="Shouldly" Version="4.2.1" /> <PackageReference Include="xunit" Version="2.6.1" /> diff --git a/sample/MyAbpApp/test/MyAbpApp.Web.Tests/MyAbpApp.Web.Tests.csproj b/sample/MyAbpApp/test/MyAbpApp.Web.Tests/MyAbpApp.Web.Tests.csproj index 6892023..0170481 100644 --- a/sample/MyAbpApp/test/MyAbpApp.Web.Tests/MyAbpApp.Web.Tests.csproj +++ b/sample/MyAbpApp/test/MyAbpApp.Web.Tests/MyAbpApp.Web.Tests.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <OutputType>Exe</OutputType> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <RootNamespace>MyAbpApp</RootNamespace> @@ -13,7 +13,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" /> <PackageReference Include="HtmlAgilityPack" Version="1.11.54" /> <ProjectReference Include="..\MyAbpApp.Application.Tests\MyAbpApp.Application.Tests.csproj" /> <ProjectReference Include="..\..\src\MyAbpApp.Web\MyAbpApp.Web.csproj" /> diff --git a/sample/MyAbpApp/test/MyAbpApp.Web.Tests/Program.cs b/sample/MyAbpApp/test/MyAbpApp.Web.Tests/Program.cs index 4527b99..9e8a9c6 100644 --- a/sample/MyAbpApp/test/MyAbpApp.Web.Tests/Program.cs +++ b/sample/MyAbpApp/test/MyAbpApp.Web.Tests/Program.cs @@ -3,7 +3,9 @@ using Volo.Abp.AspNetCore.TestBase; var builder = WebApplication.CreateBuilder(); -await builder.RunAbpModuleAsync<MyAbpAppWebTestModule>(); + +builder.Environment.ContentRootPath = GetWebProjectContentRootPathHelper.Get("MyAbpApp.Web.csproj"); +await builder.RunAbpModuleAsync<MyAbpAppWebTestModule>(applicationName: "MyAbpApp.Web" ); public partial class Program { diff --git a/src/EasyAbp.Abp.SettingUi.Application.Contracts/EasyAbp.Abp.SettingUi.Application.Contracts.csproj b/src/EasyAbp.Abp.SettingUi.Application.Contracts/EasyAbp.Abp.SettingUi.Application.Contracts.csproj index 915148d..19c8614 100644 --- a/src/EasyAbp.Abp.SettingUi.Application.Contracts/EasyAbp.Abp.SettingUi.Application.Contracts.csproj +++ b/src/EasyAbp.Abp.SettingUi.Application.Contracts/EasyAbp.Abp.SettingUi.Application.Contracts.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>EasyAbp.Abp.SettingUi</RootNamespace> </PropertyGroup> diff --git a/src/EasyAbp.Abp.SettingUi.Application/EasyAbp.Abp.SettingUi.Application.csproj b/src/EasyAbp.Abp.SettingUi.Application/EasyAbp.Abp.SettingUi.Application.csproj index 13c3024..dda6854 100644 --- a/src/EasyAbp.Abp.SettingUi.Application/EasyAbp.Abp.SettingUi.Application.csproj +++ b/src/EasyAbp.Abp.SettingUi.Application/EasyAbp.Abp.SettingUi.Application.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>EasyAbp.Abp.SettingUi</RootNamespace> </PropertyGroup> diff --git a/src/EasyAbp.Abp.SettingUi.Domain.Shared/EasyAbp.Abp.SettingUi.Domain.Shared.csproj b/src/EasyAbp.Abp.SettingUi.Domain.Shared/EasyAbp.Abp.SettingUi.Domain.Shared.csproj index 3ea0cb0..5b09d65 100644 --- a/src/EasyAbp.Abp.SettingUi.Domain.Shared/EasyAbp.Abp.SettingUi.Domain.Shared.csproj +++ b/src/EasyAbp.Abp.SettingUi.Domain.Shared/EasyAbp.Abp.SettingUi.Domain.Shared.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>EasyAbp.Abp.SettingUi</RootNamespace> <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> </PropertyGroup> @@ -30,7 +30,7 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.4" /> + <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.0" /> </ItemGroup> </Project> diff --git a/src/EasyAbp.Abp.SettingUi.Domain/EasyAbp.Abp.SettingUi.Domain.csproj b/src/EasyAbp.Abp.SettingUi.Domain/EasyAbp.Abp.SettingUi.Domain.csproj index 1ea4439..58b8b9c 100644 --- a/src/EasyAbp.Abp.SettingUi.Domain/EasyAbp.Abp.SettingUi.Domain.csproj +++ b/src/EasyAbp.Abp.SettingUi.Domain/EasyAbp.Abp.SettingUi.Domain.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>EasyAbp.Abp.SettingUi</RootNamespace> </PropertyGroup> diff --git a/src/EasyAbp.Abp.SettingUi.HttpApi.Client/EasyAbp.Abp.SettingUi.HttpApi.Client.csproj b/src/EasyAbp.Abp.SettingUi.HttpApi.Client/EasyAbp.Abp.SettingUi.HttpApi.Client.csproj index ebe91b2..015e7a6 100644 --- a/src/EasyAbp.Abp.SettingUi.HttpApi.Client/EasyAbp.Abp.SettingUi.HttpApi.Client.csproj +++ b/src/EasyAbp.Abp.SettingUi.HttpApi.Client/EasyAbp.Abp.SettingUi.HttpApi.Client.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>EasyAbp.Abp.SettingUi</RootNamespace> </PropertyGroup> diff --git a/src/EasyAbp.Abp.SettingUi.HttpApi/EasyAbp.Abp.SettingUi.HttpApi.csproj b/src/EasyAbp.Abp.SettingUi.HttpApi/EasyAbp.Abp.SettingUi.HttpApi.csproj index 08db5b2..e0453c2 100644 --- a/src/EasyAbp.Abp.SettingUi.HttpApi/EasyAbp.Abp.SettingUi.HttpApi.csproj +++ b/src/EasyAbp.Abp.SettingUi.HttpApi/EasyAbp.Abp.SettingUi.HttpApi.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>EasyAbp.Abp.SettingUi</RootNamespace> </PropertyGroup> diff --git a/src/EasyAbp.Abp.SettingUi.Web/EasyAbp.Abp.SettingUi.Web.csproj b/src/EasyAbp.Abp.SettingUi.Web/EasyAbp.Abp.SettingUi.Web.csproj index fd7d36f..883c2da 100644 --- a/src/EasyAbp.Abp.SettingUi.Web/EasyAbp.Abp.SettingUi.Web.csproj +++ b/src/EasyAbp.Abp.SettingUi.Web/EasyAbp.Abp.SettingUi.Web.csproj @@ -3,7 +3,7 @@ <Import Project="..\..\common.props" /> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <IsPackable>true</IsPackable> <OutputType>Library</OutputType> @@ -22,7 +22,7 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.4" /> + <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.0" /> </ItemGroup> <ItemGroup> diff --git a/test/EasyAbp.Abp.SettingUi.Application.Tests/EasyAbp.Abp.SettingUi.Application.Tests.csproj b/test/EasyAbp.Abp.SettingUi.Application.Tests/EasyAbp.Abp.SettingUi.Application.Tests.csproj index 7c63d3e..2ddabfb 100644 --- a/test/EasyAbp.Abp.SettingUi.Application.Tests/EasyAbp.Abp.SettingUi.Application.Tests.csproj +++ b/test/EasyAbp.Abp.SettingUi.Application.Tests/EasyAbp.Abp.SettingUi.Application.Tests.csproj @@ -1,14 +1,14 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>EasyAbp.Abp.SettingUi</RootNamespace> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\..\src\EasyAbp.Abp.SettingUi.Application\EasyAbp.Abp.SettingUi.Application.csproj" /> <ProjectReference Include="..\EasyAbp.Abp.SettingUi.Domain.Tests\EasyAbp.Abp.SettingUi.Domain.Tests.csproj" /> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" /> </ItemGroup> <ItemGroup> diff --git a/test/EasyAbp.Abp.SettingUi.Domain.Tests/EasyAbp.Abp.SettingUi.Domain.Tests.csproj b/test/EasyAbp.Abp.SettingUi.Domain.Tests/EasyAbp.Abp.SettingUi.Domain.Tests.csproj index bab177d..86e3ea3 100644 --- a/test/EasyAbp.Abp.SettingUi.Domain.Tests/EasyAbp.Abp.SettingUi.Domain.Tests.csproj +++ b/test/EasyAbp.Abp.SettingUi.Domain.Tests/EasyAbp.Abp.SettingUi.Domain.Tests.csproj @@ -1,12 +1,12 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>EasyAbp.Abp.SettingUi</RootNamespace> </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" /> <PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="$(AbpVersion)" /> </ItemGroup> diff --git a/test/EasyAbp.Abp.SettingUi.TestBase/EasyAbp.Abp.SettingUi.TestBase.csproj b/test/EasyAbp.Abp.SettingUi.TestBase/EasyAbp.Abp.SettingUi.TestBase.csproj index 43a3b4a..d3b9eb3 100644 --- a/test/EasyAbp.Abp.SettingUi.TestBase/EasyAbp.Abp.SettingUi.TestBase.csproj +++ b/test/EasyAbp.Abp.SettingUi.TestBase/EasyAbp.Abp.SettingUi.TestBase.csproj @@ -1,12 +1,12 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net8.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <RootNamespace>EasyAbp.Abp.SettingUi</RootNamespace> </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" /> <PackageReference Include="NSubstitute" Version="5.1.0" /> <PackageReference Include="Shouldly" Version="4.2.1" /> <PackageReference Include="Volo.Abp.Authorization" Version="$(AbpVersion)" />